Set TYPE_LENGTH on a variant part
[external/binutils.git] / gdb / ChangeLog
1 2018-08-31  Tom Tromey  <tom@tromey.com>
2
3         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
4         variant part type.
5
6 2018-08-31  Pedro Alves  <palves@redhat.com>
7
8         * gdbarch.h: Regenerate.
9
10 2018-08-31  Pedro Alves  <palves@redhat.com>
11
12         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
13         * target.h (Hardware watchpoint interfaces): Describe
14         continuable/steppable/non-steppable watchpoints.
15         * gdbarch.h, gdbarch.c: Regenerate.
16
17 2018-08-31  Pedro Alves  <palves@redhat.com>
18
19         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
20         Delete.
21         * s390-linux-nat.c
22         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
23         * target.h (target_ops::have_continuable_watchpoint): Delete.
24         (target_have_continuable_watchpoint): Delete.
25         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
26         * target-delegates.c: Regenerate.
27
28 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
29
30         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
31         the files present in "gnulib/import/m4/".
32
33 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
34
35         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
36         c.sw, c.swsp, and c.sdsp.
37
38 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
39
40         * riscv-tdep.c (struct riscv_inferior_data): Delete.
41         (riscv_read_misa_reg): Don't cache value read into inferior data.
42         (riscv_new_inferior_data): Delete.
43         (riscv_inferior_data_cleanup): Delete.
44         (riscv_inferior_data): Delete.
45         (riscv_invalidate_inferior_data): Delete.
46         (_initialize_riscv_tdep): Remove initialisation of inferior data.
47
48 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
49
50         * compile/compile-cplus-types.c
51         (compile_cplus_instance::leave_scope): Take the address of scope
52         object.
53         (compile_cplus_instance::convert_qualified_base): Compare quals
54         to 0.
55
56 2018-08-30  Keith Seitz  <keiths@redhat.com>
57
58         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
59         Use "%s" and host_address_to_string instead of "%p" in printf.
60
61 2018-08-29  Keith Seitz  <keiths@redhat.com>
62
63         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
64         and compile-cplus-types.c.
65         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
66         * c-lang.c (cplus_language_defn): Set C++ compile functions.
67         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
68         Declare.
69         * compile/compile-c-support.c: Include compile-cplus.h.
70         (load_libcompile): Templatize.
71         (get_compile_context): "New" function.
72         (c_get_compile_context): Use get_compile_context.
73         (cplus_get_compile_context): New function.
74         (cplus_push_user_expression, cplus_pop_user_expression)
75         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
76         (cplus_compute_program): Define new structs/functions.
77         * compile/compile-cplus-symmbols.c: New file.
78         * compile/compile-cplus-types.c: New file.
79         * compile/compile-cplus.h: New file.
80         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
81         Declare.
82         * compile/compile-object-load.c (get_out_value_type): Use
83         strncmp_iw when comparing symbol names.
84         (compile_object_load): Add mst_bss and mst_data.
85         * compile/compile.c (_initialize_compile): Remove
86         -Wno-implicit-function-declaration from `compile_args'.
87         * compile/gcc-cp-plugin.h: New file.
88         * NEWS: Mention C++ compile support and new debug options.
89
90 2018-08-29  Keith Seitz  <keiths@redhat.com>
91
92         * linespec.c (collect_info::add_symbol): Make virtual.
93         (struct symbol_searcher_collect_info): New struct.
94         (symbol_searcher::find_all_symbols): New method.
95         * symtab.h (class symbol_searcher): New class.
96
97 2018-08-29  Keith Seitz  <keiths@redhat.com>
98
99         * linespec.c (struct linespec) <function_symbols, label_symbols>:
100         Change to vector of block_symbol.  Update all users.
101         (struct collect_info) <symbols>: Likewise.
102         (collect_info::add_symbol): Take block_symbol as argument.
103         Update all callers.
104         (decode_compound_collector) <m_symbols>: Change type to vector
105         of block_symbol.  Update all users.
106         (decode_compound_collector::operator ()): Change parameter type
107         to block_symbol.
108         (find_method, find_function_symbols, find_linespec_symbols)
109         (find_label_symbols_in_block, find_label_symbols): Change symbol
110         vectors to block_symbol vectors.
111         * symtab.h (symbol_found_callback_ftype): Change parameter type to
112         block_symbol.
113
114 2018-08-29  Keith Seitz  <keiths@redhat.com>
115
116         * linespec.c (symbolp): Remove typedef and VEC definitions.
117         (bound_minimal_symbol_d): Likewise.
118
119 2018-08-29  Keith Seitz  <keiths@redhat.com>
120
121         * linespec.c (decode_compound_collector::decode_compound_collector):
122         Remove initialization for `m_symtabs'.
123         (decode_compound_collector::release_symbols): Change return type
124         to std::vector.  Update all callers.
125         (class decode_compound_collector) <m_symbols>: Change type to
126         std::vector.
127         (lookup_prefix_sym): Change return type to std::vector.  Update all
128         callers.
129         (compare_symbols): Remove.
130         (std_compare_symbols): Rename to `compare_symbols'.
131         (find_method): Change `sym_classes' parameter to std::vector.
132         Update all callers.  Use std::sort to sort sym_classes.
133         (find_linespec_symbols): Remove cleanup.
134
135 2018-08-29  Keith Seitz  <keiths@redhat.com>
136
137         * linespec.c (struct linespec) <minimal_symbols>: Change type to
138         std::vector.  Update all users.
139         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
140         (struct collect_info) <minimal_symbols>: Likewise.
141         (compare_msymbols): Return bool.  Change parameters to const
142         bound_minimal_symbol references.
143         (find_method, find_function_symbols, find_linespec_symbols): Change
144         `minsyms' parameter to std::vector.  Update all callers.
145
146 2018-08-29  Keith Seitz  <keiths@redhat.com>
147
148         * linespec.c (struct linespec) <label_symbols>: Change type to
149         std::vector.  Update all users.
150         (find_label_symbols_in_block): Change `result' parameter to
151         std::vector.  Update all callers.
152         (find_label_symbols): Return std::vector.  Update all callers.
153
154 2018-08-29  Keith Seitz  <keiths@redhat.com>
155
156         * linespec.c (struct linespec) <function_symbols>: Change type to
157         std::vector.  Update all users.
158         (struct collect_info) <function_symbols>: Likewise.
159         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
160         (std_compare_symbols): New function.
161         (find_method, find_function_symbols, find_linespec_symbols)
162         (find_label_symbols_in_block): Change `symbols' parameter to
163         std::vector.  Update all callers.
164         (find_label_symbols): Likewise for `function_symbols' and
165         `label_funcs_ret'.
166
167 2018-08-29  Keith Seitz  <keiths@redhat.com>
168
169         * linespec.c (symtab_vector_up): Define.
170         (struct linespec) <file_symtabs>: Change type to std::vector *.
171         Update all uses.
172         (struct collect_info) <file_symtabs>: Likewise.
173         (collect_symtabs_from_filename): Return symtab_vector_up.
174         Update all callers.
175         (decode_objc): Remove cleanup.
176         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
177         (symtab_collector::release_symtabs): Return symtab_vector_up.
178         Update all callers.
179         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
180         Update all users.
181         (collect_symtabs_from_filename, symtabs_from_filename): Return
182         symtab_vector_up.  Update all callers.
183
184 2018-08-29  Tom Tromey  <tom@tromey.com>
185
186         * csky-tdep.c (csky_analyze_prologue): Use
187         core_addr_to_string_nz.
188
189 2018-08-29  Tom Tromey  <tom@tromey.com>
190
191         * windows-nat.c (struct xlate_exception) <them>: Change type to
192         DWORD.
193         (xlate): Fix formatting.  Remove last entry.
194         (struct xlate_exception, xlate): Comment out.
195         (windows_nat_target::resume): Use ranged for.
196
197 2018-08-29  Jim Wilson  <jimw@sifive.com>
198
199         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
200         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
201         of NT_PRFPREG.
202         (riscv_linux_nat_target::store_registers): Likewise.
203
204 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
205
206         PR gdb/23555
207         PR gdb/23558
208         * gnulib/aclocal.m4: Regenerate.
209         * gnulib/config.in: Regenerate.
210         * gnulib/configure: Regenerate.
211         * gnulib/import/Makefile.am: Update.
212         * gnulib/import/Makefile.in: Update.
213         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
214         * gnulib/import/_Noreturn.h: ... this.
215         * gnulib/import/alloca.in.h: Update.
216         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
217         * gnulib/import/arg-nonnull.h: ... this.
218         * gnulib/import/assure.h: Update.
219         * gnulib/import/at-func.c: Update.
220         * gnulib/import/basename-lgpl.c: Update.
221         * gnulib/import/extra/snippet/c++defs.h: Rename to...
222         * gnulib/import/c++defs.h: ... this.
223         * gnulib/import/canonicalize-lgpl.c: Update.
224         * gnulib/import/cdefs.h: Update.
225         * gnulib/import/chdir-long.c: Update.
226         * gnulib/import/chdir-long.h: Update.
227         * gnulib/import/cloexec.c: Update.
228         * gnulib/import/cloexec.h: Update.
229         * gnulib/import/close.c: Update.
230         * gnulib/import/closedir.c: Update.
231         * gnulib/import/config.charset: Update.
232         * gnulib/import/dirent-private.h: Update.
233         * gnulib/import/dirent.in.h: Update.
234         * gnulib/import/dirfd.c: Update.
235         * gnulib/import/dirname-lgpl.c: Update.
236         * gnulib/import/dirname.h: Update.
237         * gnulib/import/dosname.h: Update.
238         * gnulib/import/dup-safer-flag.c: Update.
239         * gnulib/import/dup-safer.c: Update.
240         * gnulib/import/dup.c: Update.
241         * gnulib/import/dup2.c: Update.
242         * gnulib/import/errno.in.h: Update.
243         * gnulib/import/error.c: Update.
244         * gnulib/import/error.h: Update.
245         * gnulib/import/exitfail.c: Update.
246         * gnulib/import/exitfail.h: Update.
247         * gnulib/import/extra/update-copyright: Update.
248         * gnulib/import/fchdir.c: Update.
249         * gnulib/import/fcntl.c: Update.
250         * gnulib/import/fcntl.in.h: Update.
251         * gnulib/import/fd-hook.c: Update.
252         * gnulib/import/fd-hook.h: Update.
253         * gnulib/import/fd-safer-flag.c: Update.
254         * gnulib/import/fd-safer.c: Update.
255         * gnulib/import/fdopendir.c: Update.
256         * gnulib/import/filename.h: Update.
257         * gnulib/import/filenamecat-lgpl.c: Update.
258         * gnulib/import/filenamecat.h: Update.
259         * gnulib/import/flexmember.h: Update.
260         * gnulib/import/float+.h: Update.
261         * gnulib/import/float.c: Update.
262         * gnulib/import/float.in.h: Update.
263         * gnulib/import/fnmatch.c: Update.
264         * gnulib/import/fnmatch.in.h: Update.
265         * gnulib/import/fnmatch_loop.c: Update.
266         * gnulib/import/fpucw.h: Update.
267         * gnulib/import/frexp.c: Update.
268         * gnulib/import/frexpl.c: Update.
269         * gnulib/import/fstat.c: Update.
270         * gnulib/import/fstatat.c: Update.
271         * gnulib/import/getcwd-lgpl.c: Update.
272         * gnulib/import/getcwd.c: Update.
273         * gnulib/import/getdtablesize.c: Update.
274         * gnulib/import/getlogin_r.c: Update.
275         * gnulib/import/getprogname.c: Update.
276         * gnulib/import/getprogname.h: Update.
277         * gnulib/import/gettext.h: Update.
278         * gnulib/import/gettimeofday.c: Update.
279         * gnulib/import/glob-libc.h: Update.
280         * gnulib/import/glob.c: Update.
281         * gnulib/import/glob.in.h: Update.
282         * gnulib/import/glob_internal.h: Update.
283         * gnulib/import/glob_pattern_p.c: Update.
284         * gnulib/import/globfree.c: Update.
285         * gnulib/import/hard-locale.c: Update.
286         * gnulib/import/hard-locale.h: Update.
287         * gnulib/import/intprops.h: Update.
288         * gnulib/import/inttypes.in.h: Update.
289         * gnulib/import/isnan.c: Update.
290         * gnulib/import/isnand-nolibm.h: Update.
291         * gnulib/import/isnand.c: Update.
292         * gnulib/import/isnanl-nolibm.h: Update.
293         * gnulib/import/isnanl.c: Update.
294         * gnulib/import/itold.c: Update.
295         * gnulib/import/libc-config.h: Update.
296         * gnulib/import/limits.in.h: Update.
297         * gnulib/import/localcharset.c: Update.
298         * gnulib/import/localcharset.h: Update.
299         * gnulib/import/localtime-buffer.c: Update.
300         * gnulib/import/localtime-buffer.h: Update.
301         * gnulib/import/lstat.c: Update.
302         * gnulib/import/m4/00gnulib.m4: Update.
303         * gnulib/import/m4/__inline.m4: Update.
304         * gnulib/import/m4/absolute-header.m4: Update.
305         * gnulib/import/m4/alloca.m4: Update.
306         * gnulib/import/m4/builtin-expect.m4: Update.
307         * gnulib/import/m4/canonicalize.m4: Update.
308         * gnulib/import/m4/chdir-long.m4: Update.
309         * gnulib/import/m4/close.m4: Update.
310         * gnulib/import/m4/closedir.m4: Update.
311         * gnulib/import/m4/configmake.m4: Update.
312         * gnulib/import/m4/d-ino.m4: Update.
313         * gnulib/import/m4/d-type.m4: Update.
314         * gnulib/import/m4/dirent_h.m4: Update.
315         * gnulib/import/m4/dirfd.m4: Update.
316         * gnulib/import/m4/dirname.m4: Update.
317         * gnulib/import/m4/double-slash-root.m4: Update.
318         * gnulib/import/m4/dup.m4: Update.
319         * gnulib/import/m4/dup2.m4: Update.
320         * gnulib/import/m4/eealloc.m4: Update.
321         * gnulib/import/m4/environ.m4: Update.
322         * gnulib/import/m4/errno_h.m4: Update.
323         * gnulib/import/m4/error.m4: Update.
324         * gnulib/import/m4/exponentd.m4: Update.
325         * gnulib/import/m4/exponentl.m4: Update.
326         * gnulib/import/m4/extensions.m4: Update.
327         * gnulib/import/m4/extern-inline.m4: Update.
328         * gnulib/import/m4/fchdir.m4: Update.
329         * gnulib/import/m4/fcntl-o.m4: Update.
330         * gnulib/import/m4/fcntl.m4: Update.
331         * gnulib/import/m4/fcntl_h.m4: Update.
332         * gnulib/import/m4/fdopendir.m4: Update.
333         * gnulib/import/m4/filenamecat.m4: Update.
334         * gnulib/import/m4/flexmember.m4: Update.
335         * gnulib/import/m4/float_h.m4: Update.
336         * gnulib/import/m4/fnmatch.m4: Update.
337         * gnulib/import/m4/fnmatch_h.m4: Update.
338         * gnulib/import/m4/fpieee.m4: Update.
339         * gnulib/import/m4/frexp.m4: Update.
340         * gnulib/import/m4/frexpl.m4: Update.
341         * gnulib/import/m4/fstat.m4: Update.
342         * gnulib/import/m4/fstatat.m4: Update.
343         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
344         * gnulib/import/m4/getcwd-path-max.m4: Update.
345         * gnulib/import/m4/getcwd.m4: Update.
346         * gnulib/import/m4/getdtablesize.m4: Update.
347         * gnulib/import/m4/getlogin.m4: Update.
348         * gnulib/import/m4/getlogin_r.m4: Update.
349         * gnulib/import/m4/getpagesize.m4: Update.
350         * gnulib/import/m4/getprogname.m4: Update.
351         * gnulib/import/m4/gettimeofday.m4: Update.
352         * gnulib/import/m4/glibc21.m4: Update.
353         * gnulib/import/m4/glob.m4: Update.
354         * gnulib/import/m4/glob_h.m4: Update.
355         * gnulib/import/m4/gnulib-cache.m4: Update.
356         * gnulib/import/m4/gnulib-common.m4: Update.
357         * gnulib/import/m4/gnulib-comp.m4: Update.
358         * gnulib/import/m4/gnulib-tool.m4: Update.
359         * gnulib/import/m4/hard-locale.m4: Update.
360         * gnulib/import/m4/include_next.m4: Update.
361         * gnulib/import/m4/inttypes-pri.m4: Update.
362         * gnulib/import/m4/inttypes.m4: Update.
363         * gnulib/import/m4/isnand.m4: Update.
364         * gnulib/import/m4/isnanl.m4: Update.
365         * gnulib/import/m4/largefile.m4: Update.
366         * gnulib/import/m4/limits-h.m4: Update.
367         * gnulib/import/m4/localcharset.m4: Update.
368         * gnulib/import/m4/locale-fr.m4: Update.
369         * gnulib/import/m4/locale-ja.m4: Update.
370         * gnulib/import/m4/locale-zh.m4: Update.
371         * gnulib/import/m4/localtime-buffer.m4: Update.
372         * gnulib/import/m4/longlong.m4: Update.
373         * gnulib/import/m4/lstat.m4: Update.
374         * gnulib/import/m4/malloc.m4: Update.
375         * gnulib/import/m4/malloca.m4: Update.
376         * gnulib/import/m4/math_h.m4: Update.
377         * gnulib/import/m4/mbrtowc.m4: Update.
378         * gnulib/import/m4/mbsinit.m4: Update.
379         * gnulib/import/m4/mbsrtowcs.m4: Update.
380         * gnulib/import/m4/mbstate_t.m4: Update.
381         * gnulib/import/m4/memchr.m4: Update.
382         * gnulib/import/m4/memmem.m4: Update.
383         * gnulib/import/m4/mempcpy.m4: Update.
384         * gnulib/import/m4/memrchr.m4: Update.
385         * gnulib/import/m4/mkdir.m4: Update.
386         * gnulib/import/m4/mkstemp.m4: Update.
387         * gnulib/import/m4/mmap-anon.m4: Update.
388         * gnulib/import/m4/mode_t.m4: Update.
389         * gnulib/import/m4/msvc-inval.m4: Update.
390         * gnulib/import/m4/msvc-nothrow.m4: Update.
391         * gnulib/import/m4/multiarch.m4: Update.
392         * gnulib/import/m4/nocrash.m4: Update.
393         * gnulib/import/m4/off_t.m4: Update.
394         * gnulib/import/m4/onceonly.m4: Update.
395         * gnulib/import/m4/open-cloexec.m4: Update.
396         * gnulib/import/m4/open.m4: Update.
397         * gnulib/import/m4/openat.m4: Update.
398         * gnulib/import/m4/opendir.m4: Update.
399         * gnulib/import/m4/pathmax.m4: Update.
400         * gnulib/import/m4/rawmemchr.m4: Update.
401         * gnulib/import/m4/readdir.m4: Update.
402         * gnulib/import/m4/readlink.m4: Update.
403         * gnulib/import/m4/realloc.m4: Update.
404         * gnulib/import/m4/rename.m4: Update.
405         * gnulib/import/m4/rewinddir.m4: Update.
406         * gnulib/import/m4/rmdir.m4: Update.
407         * gnulib/import/m4/save-cwd.m4: Update.
408         * gnulib/import/m4/secure_getenv.m4: Update.
409         * gnulib/import/m4/setenv.m4: Update.
410         * gnulib/import/m4/signal_h.m4: Update.
411         * gnulib/import/m4/ssize_t.m4: Update.
412         * gnulib/import/m4/stat-time.m4: Update.
413         * gnulib/import/m4/stat.m4: Update.
414         * gnulib/import/m4/std-gnu11.m4: Update.
415         * gnulib/import/m4/stdbool.m4: Update.
416         * gnulib/import/m4/stddef_h.m4: Update.
417         * gnulib/import/m4/stdint.m4: Update.
418         * gnulib/import/m4/stdio_h.m4: Update.
419         * gnulib/import/m4/stdlib_h.m4: Update.
420         * gnulib/import/m4/strchrnul.m4: Update.
421         * gnulib/import/m4/strdup.m4: Update.
422         * gnulib/import/m4/strerror.m4: Update.
423         * gnulib/import/m4/string_h.m4: Update.
424         * gnulib/import/m4/strstr.m4: Update.
425         * gnulib/import/m4/strtok_r.m4: Update.
426         * gnulib/import/m4/sys_socket_h.m4: Update.
427         * gnulib/import/m4/sys_stat_h.m4: Update.
428         * gnulib/import/m4/sys_time_h.m4: Update.
429         * gnulib/import/m4/sys_types_h.m4: Update.
430         * gnulib/import/m4/tempname.m4: Update.
431         * gnulib/import/m4/time_h.m4: Update.
432         * gnulib/import/m4/unistd-safer.m4: Update.
433         * gnulib/import/m4/unistd_h.m4: Update.
434         * gnulib/import/m4/warn-on-use.m4: Update.
435         * gnulib/import/m4/wchar_h.m4: Update.
436         * gnulib/import/m4/wchar_t.m4: Update.
437         * gnulib/import/m4/wctype_h.m4: Update.
438         * gnulib/import/m4/wint_t.m4: Update.
439         * gnulib/import/malloc.c: Update.
440         * gnulib/import/malloc/scratch_buffer.h: Update.
441         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
442         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
443         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
444         * gnulib/import/malloca.c: Update.
445         * gnulib/import/malloca.h: Update.
446         * gnulib/import/malloca.valgrind: Update.
447         * gnulib/import/math.in.h: Update.
448         * gnulib/import/mbrtowc.c: Update.
449         * gnulib/import/mbsinit.c: Update.
450         * gnulib/import/mbsrtowcs-impl.h: Update.
451         * gnulib/import/mbsrtowcs-state.c: Update.
452         * gnulib/import/mbsrtowcs.c: Update.
453         * gnulib/import/memchr.c: Update.
454         * gnulib/import/memmem.c: Update.
455         * gnulib/import/mempcpy.c: Update.
456         * gnulib/import/memrchr.c: Update.
457         * gnulib/import/mkdir.c: Update.
458         * gnulib/import/mkstemp.c: Update.
459         * gnulib/import/msvc-inval.c: Update.
460         * gnulib/import/msvc-inval.h: Update.
461         * gnulib/import/msvc-nothrow.c: Update.
462         * gnulib/import/msvc-nothrow.h: Update.
463         * gnulib/import/open.c: Update.
464         * gnulib/import/openat-die.c: Update.
465         * gnulib/import/openat-priv.h: Update.
466         * gnulib/import/openat-proc.c: Update.
467         * gnulib/import/openat.c: Update.
468         * gnulib/import/openat.h: Update.
469         * gnulib/import/opendir.c: Update.
470         * gnulib/import/pathmax.h: Update.
471         * gnulib/import/pipe-safer.c: Update.
472         * gnulib/import/rawmemchr.c: Update.
473         * gnulib/import/readdir.c: Update.
474         * gnulib/import/readlink.c: Update.
475         * gnulib/import/realloc.c: Update.
476         * gnulib/import/ref-add.sin: Update.
477         * gnulib/import/ref-del.sin: Update.
478         * gnulib/import/rename.c: Update.
479         * gnulib/import/rewinddir.c: Update.
480         * gnulib/import/rmdir.c: Update.
481         * gnulib/import/same-inode.h: Update.
482         * gnulib/import/save-cwd.c: Update.
483         * gnulib/import/save-cwd.h: Update.
484         * gnulib/import/scratch_buffer.h: Update.
485         * gnulib/import/secure_getenv.c: Update.
486         * gnulib/import/setenv.c: Update.
487         * gnulib/import/signal.in.h: Update.
488         * gnulib/import/stat-time.c: Update.
489         * gnulib/import/stat-time.h: Update.
490         * gnulib/import/stat-w32.c: Update.
491         * gnulib/import/stat-w32.h: Update.
492         * gnulib/import/stat.c: Update.
493         * gnulib/import/stdbool.in.h: Update.
494         * gnulib/import/stddef.in.h: Update.
495         * gnulib/import/stdint.in.h: Update.
496         * gnulib/import/stdio.in.h: Update.
497         * gnulib/import/stdlib.in.h: Update.
498         * gnulib/import/str-two-way.h: Update.
499         * gnulib/import/strchrnul.c: Update.
500         * gnulib/import/strdup.c: Update.
501         * gnulib/import/streq.h: Update.
502         * gnulib/import/strerror-override.c: Update.
503         * gnulib/import/strerror-override.h: Update.
504         * gnulib/import/strerror.c: Update.
505         * gnulib/import/string.in.h: Update.
506         * gnulib/import/stripslash.c: Update.
507         * gnulib/import/strnlen1.c: Update.
508         * gnulib/import/strnlen1.h: Update.
509         * gnulib/import/strstr.c: Update.
510         * gnulib/import/strtok_r.c: Update.
511         * gnulib/import/sys_stat.in.h: Update.
512         * gnulib/import/sys_time.in.h: Update.
513         * gnulib/import/sys_types.in.h: Update.
514         * gnulib/import/tempname.c: Update.
515         * gnulib/import/tempname.h: Update.
516         * gnulib/import/time.in.h: Update.
517         * gnulib/import/unistd--.h: Update.
518         * gnulib/import/unistd-safer.h: Update.
519         * gnulib/import/unistd.in.h: Update.
520         * gnulib/import/unsetenv.c: Update.
521         * gnulib/import/verify.h: Update.
522         * gnulib/import/extra/snippet/warn-on-use.h: Update.
523         * gnulib/import/wchar.in.h: Update.
524         * gnulib/import/wctype.in.h: Update.
525         * gnulib/import/xalloc-oversized.h: Update.
526         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
527         "53e2c179f26a890fa6685af4b6c1397ee370433b".
528
529 2018-08-16  Gary Benson <gbenson@redhat.com>
530
531         PR gdb/13000:
532         * gdb/main.c (captured_main_1): Exit with nonzero status
533         in batch mode if the last command to be executed failed.
534         * NEWS: Mention the above.
535
536 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
537
538         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
539         end of warning message.
540
541 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
542
543         PR gdb/22943:
544         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
545         (aarch64_extract_return_value): Use
546         aapcs_is_vfp_call_or_return_candidate.
547         (aarch64_return_in_memory): Likewise.
548         (aarch64_store_return_value): Likewise.
549
550 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
551
552         * aarch64-tdep.c
553         (aapcs_is_vfp_call_or_return_candidate): Make static
554         (pass_in_v_or_stack): Remove function.
555         (pass_in_v_vfp_candidate): New function.
556         (aarch64_push_dummy_call): Check for float register candidates.
557
558 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
559
560         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
561         (aapcs_is_vfp_call_or_return_candidate_1): New function.
562         (aapcs_is_vfp_call_or_return_candidate): Likewise.
563
564 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
565
566         PR build/23399
567         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
568         (struct ipa_sym_addresses): Rename to...
569         (struct ipa_sym_addresses_common): ... this.
570         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
571
572 2018-08-28  Tom Tromey  <tom@tromey.com>
573
574         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
575         (token_fifo): Now a std::vector.
576         (yylex, c_parse): Update.
577         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
578         (token_fifo): Now a std::vector.
579         (yylex, d_parse): Update.
580         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
581         (token_fifo): Now a std::vector.
582         (yylex, go_parse): Update.
583
584 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
585
586         * parser-defs.h (struct type_stack) <elements>: Change type to
587         std::vector<union type_stack_elt>.
588         <depth, size>: Remove.
589         * parse.c (parse_exp_in_context_1): Adjust.
590         (type_stack_reserve): Remove.
591         (check_type_stack_depth): Remove.
592         (insert_into_type_stack): Adjust to std::vector.
593         (insert_type): Likewise.
594         (push_type): Likewise.
595         (push_type_int): Likewise.
596         (insert_type_address_space): Likewise.
597         (pop_type): Likewise.
598         (pop_type_int): Likewise.
599         (pop_typelist): Likewise.
600         (pop_type_stack): Likewise.
601         (append_type_stack): Likewise.
602         (push_type_stack): Likewise.
603         (get_type_stack): Likewise.
604         (type_stack_cleanup): Likewise.
605         (push_typelist): Likewise.
606         (follow_types): Likewise.
607         (_initialize_parse): Likewise.
608
609 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
610
611         * NEWS: Mention csky target.
612
613 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
614             Hafiz Abid Qadeer  <abidh@codesourcery.com>
615             Don Breazeal  <donb@codesourcery.com>
616
617         * csky-linux-tdep.c: New file.
618         * csky-tdep.c: Likewise.
619         * csky-tdep.h: Likewise.
620         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
621         csky-tdep.o.
622         (HFILES_NO_SRCDIR): Add csky-tdep.h.
623         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
624         * configure.tgt: Add csky support.
625
626 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
627
628         * python/py-framefilter.c (py_print_frame): Print frame architecture
629         when printing on an MI output.
630
631 2018-08-27  Tom Tromey  <tom@tromey.com>
632
633         PR build/23087:
634         * configure: Rebuild.
635         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
636
637 2018-08-27  Tom Tromey  <tom@tromey.com>
638
639         * aarch64-linux-tdep.c
640         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
641         casts to int.
642
643 2018-08-27  Tom Tromey  <tom@tromey.com>
644
645         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
646         unsigned.
647         (ppc64_standard_linkage1, ppc64_standard_linkage2)
648         (ppc64_standard_linkage3, ppc64_standard_linkage4)
649         (ppc64_standard_linkage5, ppc64_standard_linkage6)
650         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
651         unsigned.
652
653 2018-08-27  Tom Tromey  <tom@tromey.com>
654
655         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
656         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
657
658 2018-08-27  Tom Tromey  <tom@tromey.com>
659
660         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
661         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
662         ULONGEST_MAX.
663         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
664         ULONGEST_MAX.
665         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
666         ULONGEST_MAX.
667         * sparc-linux-tdep.c (sparc32_linux_sigframe)
668         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
669         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
670         ULONGEST_MAX.
671         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
672         (ppc64_linux_sigaction_tramp_frame)
673         (ppc32_linux_sighandler_tramp_frame)
674         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
675         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
676         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
677         * mn10300-linux-tdep.c (am33_linux_sigframe)
678         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
679         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
680         * mips-linux-tdep.c (mips_linux_o32_sigframe)
681         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
682         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
683         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
684         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
685         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
686         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
687         * microblaze-linux-tdep.c
688         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
689         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
690         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
691         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
692         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
693         * common/common-types.h (ULONGEST_MAX): New define.
694         (CORE_ADDR_MAX): Fix formatting.
695         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
696         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
697         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
698         (arm_linux_rt_sigreturn_tramp_frame)
699         (arm_eabi_linux_sigreturn_tramp_frame)
700         (arm_eabi_linux_rt_sigreturn_tramp_frame)
701         (thumb2_eabi_linux_sigreturn_tramp_frame)
702         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
703         (arm_linux_restart_syscall_tramp_frame)
704         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
705         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
706         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
707         ULONGEST_MAX.
708         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
709
710 2018-08-27  Tom Tromey  <tom@tromey.com>
711
712         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
713         CORE_ADDR_MAX.
714         * mips-tdep.c (mips_deal_with_atomic_sequence)
715         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
716         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
717         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
718         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
719         CORE_ADDR_MAX.
720         * aarch64-tdep.c (aarch64_software_single_step): Use
721         CORE_ADDR_MAX.
722
723 2018-08-27  Tom Tromey  <tom@tromey.com>
724
725         * linespec.c (complete_linespec_component): Add cast to "char".
726         * completer.c (completion_tracker::build_completion_result): Add
727         cast to "char".
728
729 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
730
731         * solist.h (struct solist, struct target_so_ops): Fix
732         indentation.
733
734 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
735
736         * ada-tasks.c (ada_task_info_s): Remove typedef.
737         (DEF_VEC_O(ada_task_info_s)): Remove.
738         (struct ada_tasks_inferior_data): Initialize fields.
739         <task_list>: Make an std::vector.
740         (get_ada_tasks_inferior_data): Allocate with new.
741         (ada_get_task_number): Adjust.
742         (get_task_number_from_id): Likewise.
743         (valid_task_id): Likewise.
744         (ada_get_task_info_from_ptid): Likewise.
745         (iterate_over_live_ada_tasks): Likewise.
746         (add_ada_task): Likewise.
747         (read_known_tasks): Likewise.
748         (ada_build_task_list): Likewise.
749         (print_ada_task_info): Likewise.
750         (info_task): Likewise.
751         (task_command_1): Likewise.
752
753 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
754
755         * ada-lang.c (add_angle_brackets): Return std::string.
756
757 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
758
759         * python/py-threadevent.c (py_get_event_thread): Initialize
760         pythread.
761
762 2018-08-24  Pedro Alves  <palves@redhat.com>
763
764         * python/py-bpevent.c (create_breakpoint_event_object): Use
765         copy-initialization.
766         * python/py-continueevent.c (emit_continue_event): Use
767         copy-initialization.
768         * python/py-exitedevent.c (create_exited_event_object): Return a
769         gdbpy_ref<>.
770         (emit_exited_event): Use copy-initialization.
771         * python/py-inferior.c (python_new_inferior)
772         (python_inferior_deleted, add_thread_object): Use
773         copy-initialization.
774         * python/py-infevents.c (create_inferior_call_event_object)
775         (create_register_changed_event_object)
776         (create_memory_changed_event_object): Return a gdbpy_ref<>.
777         (emit_inferior_call_event, emit_memory_changed_event)
778         (emit_register_changed_event): Use copy-initialization.
779         * python/py-newobjfileevent.c (create_new_objfile_event_object):
780         Return a gdbpy_ref<>.
781         (emit_new_objfile_event): Use copy-initialization.
782         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
783         (emit_clear_objfiles_event): Use copy-initialization.
784         * python/py-signalevent.c (create_signal_event_object): Use
785         copy-initialization.
786         * python/py-threadevent.c (create_thread_event_object): Use
787         copy-initialization.
788
789 2018-08-24  Pedro Alves  <palves@redhat.com>
790             Simon Marchi  <simon.marchi@ericsson.com>
791
792         PR gdb/23379
793         * python/py-continueevent.c: Include "gdbthread.h".
794         (create_continue_event_object): Add intro comment.  Add 'ptid'
795         parameter.  Use it to find thread to pass to
796         create_thread_event_object.
797         (emit_continue_event): Pass PTID down to
798         create_continue_event_object.
799         * python/py-event.h (py_get_event_thread): Declare.
800         (create_thread_event_object): Remove default from 'thread'
801         parameter.
802         * python/py-stopevent.c (create_stop_event_object): Use
803         py_get_event_thread.
804         * python/py-threadevent.c (get_event_thread): Rename to ...
805         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
806         and use it to find the thread.
807         (create_thread_event_object): Assert that THREAD isn't null.
808         Don't find the event thread here.
809
810 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
811
812         * block.h (blockrange, blockranges): New struct declarations.
813         (struct block): Add new field named `ranges'.
814         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
815         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
816         macros for accessing ranges in struct block.
817         (make_blockranges): New declaration.
818         block.c (make_blockranges): New function.
819         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
820         for block.
821         * symtab.h (find_pc_partial_function): Add new parameter `block'.
822         * blockframe.c (cache_pc_function_block): New static global.
823         (clear_pc_function_cache): Clear cache_pc_function_block.
824         (find_pc_partial_function): Move comment to symtab.h.  Add
825         support for non-contiguous blocks.
826         * cli/cli-cmds.c (block.h): Include.
827         (print_disassembly): Handle printing of non-contiguous blocks.
828         (disassemble_current_function): Likewise.
829         (disassemble_command): Likewise.
830
831         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
832         BLOCK_START.
833         * blockframe.c (get_pc_function_start): Likewise.
834         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
835         (gcc_symbol_address): Likewise.
836         * compile/compile-object-run.c (compile_object_run): Likewise.
837         * compile/compile.c (get_expr_block_and_pc): Likewise.
838         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
839         (func_addr_to_tail_call_list): Likewise.
840         * findvar.c (default_read_var_value): Likewise.
841         * inline-frame.c (inline_frame_this_id): Likewise.
842         (skip-inline_frames): Likewise.
843         * infcmd.c (until_next_command): Likewise.
844         * linespec.c (convert_linespec_to_sals): Likewise.
845         * parse.c (parse_exp_in_context_1): Likewise.
846         * printcmd.c (build_address_symbolic): likewise.
847         (info_address_command): Likewise.
848         symtab.c (find_function_start_sal): Likewise.
849         (skip_prologue_sal): Likewise.
850         (find_function_alias_target): Likewise.
851         (find_gnu_ifunc): Likewise.
852         * stack.c (find_frame_funname): Likewise.
853         * symtab.c (fixup_symbol_section): Likewise.
854         (find_function_start_sal): Likewise.
855         (skip_prologue_sal): Likewsie.
856         (find_function_alias_target): Likewise.
857         (find_gnu_ifunc): Likewise.
858         * tracepoint.c (info_scope_command): Likewise.
859         * value.c (value_fn_field): Likewise.
860
861         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
862         in place of find_pc_partial_function.
863         * blockframe.c (find_function_entry_range_from_pc): New function.
864         * symtab.h (find_function_entry_range_from_pc): Declare and document.
865         * objfiles.c (objfile_relocate1): Relocate start and end addresses
866         for each range in a block.
867
868
869 2018-08-23  Xavier Roirand  <roirand@adacore.com>
870
871         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
872         incrementation.
873
874 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
875
876         * solib-svr4.c (read_program_headers_from_bfd): Return
877         gdb::optional<gdb::byte_vector>.
878         (svr4_exec_displacement): Adjust.
879
880 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
881
882         * solib-svr4.c (read_program_header): Return
883         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
884         (find_program_interpreter): Return
885         gdb::optional<gdb::byte_vector>.
886         (scan_dyntag_auxv): Adjust.
887         (enable_break): Adjust.
888         (svr4_exec_displacement): Adjust.
889
890 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
891
892         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
893         * inf-child.c (inf_child_target::terminal_save_inferior): New.
894
895 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
896
897         * guile/scm-string.c (gdbscm_scm_from_printf): Use
898         string_vprintf.
899         * guile/scm-utils.c (gdbscm_printf): Likewise.
900         * serial.c (serial_printf): Likewise.
901         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
902
903 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
904
905         * stack.c (print_frame): Print frame architecture when printing on
906         an MI output.
907         * NEWS: Mention new "arch" attribute in frame output.
908
909 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
910
911         * arch/aarch64.h (aarch64_regnum): Update comment.
912
913 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
914
915         * NEWS: Add SVE to 8.2 section.
916
917 2018-08-21  Pedro Alves  <palves@redhat.com>
918
919         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
920         out from gdbscm_parse_function_args.
921         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
922         gdbscm_parse_function_args_1.
923
924 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
925
926         PR gdb/17816
927         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
928         operator.
929
930 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
931
932         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
933
934 2018-08-19  Michael Spang  <spang@google.com>
935
936         PR gdb/11786
937         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
938         for PT_TLS segments.
939
940 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
941
942         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
943         dwarf_variable_value.
944         * dwarf2-frame.c (class dwarf_expr_executor):
945         Add override for dwarf_variable_value.
946         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
947         (class symbol_needs_eval_context): Likewise.
948         (indirect_synthetic_pointer): Add forward declaration.
949         (sect_variable_value): New function.
950         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
951         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
952         for DW_OP_GNU_variable_value.
953
954 2018-08-16  Tom Tromey  <tom@tromey.com>
955
956         * top.c (read_command_file): Update.
957         (command_line_input): Remove "repeat" argument.
958         * ada-lang.c (get_selections): Update.
959         * linespec.c (decode_line_2): Update.
960         * defs.h (command_line_input): Remove argument.
961         * cli/cli-script.c (read_next_line): Update.
962         * python/py-gdb-readline.c: Update.
963
964 2018-08-17  Tom Tromey  <tom@tromey.com>
965
966         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
967         command_line_input.
968
969 2018-08-15  Tom Tromey  <tom@tromey.com>
970
971         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
972
973 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
974
975         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
976         If used, use find_pc_partial_function to find address range
977         to disassemble.
978         * mi/mi-main.c (mi_cmd_list_features): Report
979         "data-disassemble-a-option" feature.
980         * NEWS: Mention new -data-disassemble option -a.
981
982 2018-08-13  Tom Tromey  <tom@tromey.com>
983
984         * common/common-defs.h (_FORTIFY_SOURCE): Define.
985
986 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
987
988         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
989         (aarch64_linux_collect_sve_regset): Likewise.
990         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
991         * regcache.h (regcache_map_entry_size): New function.
992
993 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
994
995         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
996         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
997         (SVE_HEADER_VL_LENGTH): Likewise.
998         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
999         (SVE_HEADER_FLAGS_LENGTH): Likewise.
1000         (SVE_HEADER_RESERVED_LENGTH): Likewise.
1001         (SVE_HEADER_SIZE_OFFSET): Likewise.
1002         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
1003         (SVE_HEADER_VL_OFFSET): Likewise.
1004         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
1005         (SVE_HEADER_FLAGS_OFFSET): Likewise.
1006         (SVE_HEADER_RESERVED_OFFSET): Likewise.
1007         (SVE_HEADER_SIZE): Likewise.
1008         (aarch64_linux_core_read_vq): Add function.
1009         (aarch64_linux_core_read_description): Check for SVE section.
1010
1011 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
1012
1013         * aarch64-fbsd-tdep.c
1014         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
1015         collect_size.
1016         * aarch64-linux-tdep.c
1017         (aarch64_linux_iterate_over_regset_sections): Likewise.
1018         * alpha-linux-tdep.c
1019         (alpha_linux_iterate_over_regset_sections):
1020         * alpha-nbsd-tdep.c
1021         (alphanbsd_iterate_over_regset_sections): Likewise.
1022         * amd64-fbsd-tdep.c
1023         (amd64fbsd_iterate_over_regset_sections): Likewise.
1024         * amd64-linux-tdep.c
1025         (amd64_linux_iterate_over_regset_sections): Likewise.
1026         * arm-bsd-tdep.c
1027         (armbsd_iterate_over_regset_sections): Likewise.
1028         * arm-fbsd-tdep.c
1029         (arm_fbsd_iterate_over_regset_sections): Likewise.
1030         * arm-linux-tdep.c
1031         (arm_linux_iterate_over_regset_sections): Likewise.
1032         * corelow.c (get_core_registers_cb): Likewise.
1033         (core_target::fetch_registers): Likewise.
1034         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
1035         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
1036         * gdbarch.h (void): Regenerate.
1037         * gdbarch.sh: Add supply_size and collect_size.
1038         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
1039         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
1040         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
1041         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
1042         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
1043         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
1044         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
1045         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
1046         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
1047         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
1048         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
1049         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
1050         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
1051         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
1052         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
1053         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
1054         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
1055         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
1056         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
1057         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
1058         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
1059         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
1060         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
1061         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
1062         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
1063         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
1064         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
1065         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
1066         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
1067         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
1068
1069 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
1070
1071         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
1072         with string_printf.
1073
1074 2018-08-10  Keith Seitz  <keiths@redhat.com>
1075
1076         * compile/compile-c-support.c (add_code_header, add_code_footer):
1077         Move into policy class.
1078         (c_push_user_expression, pop_user_expression_nop)
1079         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
1080         (compile_program): New host class.
1081         (c_compile_program): New typedef.
1082         (c_compute_porgram): Use c_compile_program.
1083
1084 2018-08-10  Keith Seitz  <keiths@redhat.com>
1085
1086         * compile/compile-internal.h (compile_instance::~compile_instance):
1087         Remove calls to htab_delete.
1088         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
1089         * compile.c (compile_instance::compile_instance): Initialize
1090         htab unique pointers.
1091         (compile_instance::get_cached_type, compile_instance::insert_type)
1092         (compile_instance::error_symbol_once): Update for unique_ptr.
1093
1094 2018-08-10  Keith Seitz  <keiths@redhat.com>
1095
1096         * compile/compile-c-symbols.c (struct symbol_error)
1097         (hash_symbol_error, eq_symbol_error, del_symbol_error)
1098         (compile_instance::insert_symbol_error)
1099         (compile_instance::error_symbol_once): Move to ...
1100         * compile/compile.c: ... here.
1101
1102 2018-08-10  Keith Seitz  <keiths@redhat.com>
1103
1104         * compile/compile-c-support.c (c_get_compile_context): Use `new'
1105         instead of `new_compile_instance'.
1106         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
1107         Update description.
1108         If the symbol error map is not initialized, create it.
1109         (generate_c_for_for_one_symbol): Do not check/initialize
1110         the symbol error map.
1111         * compile/compile-c-types.c (compile_c_instance): Make a class.
1112         Update all callers.
1113         (compile_instance::compile_instance): Initialize the type cache.
1114         (get_cached_type): New function.
1115         (insert_type): Update description.
1116         (compile_c_instance::m_default_cflags): Define.
1117         (convert_type): Update description.  Use get_cached_type.
1118         (delete_instance): Moved to destructor.
1119         (new_compile_instance): Moved to constructor.
1120         * compile/compile-c.h (compile_c_instance): Make class inheriting
1121         from compile_instance.
1122         <base>: Remove field.
1123         <type_map, symbol_err_map>: Move to base class.
1124         <c_plugin>: Rename to `m_plugin' and remove pointer type.
1125         * compile/compile-internal.h (compile_instance): Make class.
1126         <type_map_t, symbol_err_map_t>: Define.
1127         <fe>: Rename to `m_gcc_fe'.
1128         <scope, block, gcc_target_options>: Add `m_' prefix.
1129         <m_type_map, m_symbol_err_map>: New fields, moved from
1130         compile_c_instance.
1131         <destroy>: Remove.
1132         (convert_type, new_compile_instance): Remove.
1133         * compile/compile.c (cleanup_compile_instance): Remove.
1134         (compile_to_object): Use unique_ptr to eliminate cleanups.
1135         (compile_instance::set_print_callback, compile_instance::version)
1136         (compile_instance::set_verbose)
1137         (compile_instance::set_driver_filename)
1138         (compile_instance::set_triplet_regexp)
1139         (compile_instance::set_arguments)
1140         (compile_instance::set_source_file)
1141         (compile_instance::compile): Define.
1142
1143 2018-08-10  Keith Seitz  <keiths@redhat.com>
1144
1145         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
1146         * compile/compile-c-types.c: Define GCC_METHODN macros and include
1147         gcc-c-fe.def to define C plugin.
1148         (delete_instance): Delete `c_plugin'.
1149         (new_compile_instance): Initialize `c_plugin'.
1150         * compile/compile-c.h: Include gcc_c_plugin.h.
1151         (struct compile_c_instance) <c_plugin>: New member.
1152         * gcc-c-plugin.h: New file.
1153         Update all callers with API change.
1154
1155 2018-08-10  Keith Seitz  <keiths@redhat.com>
1156
1157         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
1158         (HFILES_NO_SRCDIR): ... to here.
1159         Add compile-internal.h and compile-c.h.
1160         * compile/compile-c-support.c: Include compile-c.h.
1161         * compile/compile-c-symbols.c: Include compile-c.h.
1162         (generate_c_for_variable_locations): Update comment.
1163         * compile/compile-c-types.c: Include compile-c.h.
1164         * compile/compile-c.h: New file -- moved C language declarations
1165         from other files here.
1166         * compile/compile-internal.h: Do not include hashtab.h or
1167         common/enum-flags.h.
1168         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
1169         (gcc_convert_symbol, gcc_symbol_address)
1170         (generate_c_for_variable_locations, c_get_mode_for_size)
1171         (c_get_range_decl_name): Definitions moved to compile-c.h.
1172         * compile/compile-loc2c.c: Include compile-c.h.
1173
1174 2018-08-10  Keith Seitz  <keiths@redhat.com>
1175
1176         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
1177         (c_symbol_substitution_name): ... this.
1178         Update all callers.
1179
1180 2018-08-10  Keith Seitz  <keiths@redhat.com>
1181
1182         * compile/compile-c-support.c (c_compute_program): Use
1183         unique_xmalloc_ptr to eliminate cleanup.
1184         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
1185         Return a unique_xmalloc_ptr and eliminate cleanup.
1186         * compile/compile-internal.h (generate_c_for_variable_locations):
1187         Return unique_xmalloc_ptr and update description.
1188
1189 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
1190
1191         * corelow.c (core_target::get_core_register_section): Rename
1192         min_size to section_min_size.
1193
1194 2018-08-09  Jim Wilson  <jimw@sifive.com>
1195
1196         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
1197         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
1198         * NEWS: Mention new GNU/Linux RISC-V target.
1199         * configure.host: Add riscv*-*-linux*.
1200         * configure.nat: Add riscv*.
1201         * configure.tgt: Add riscv*-*-linux*.
1202         * riscv-linux-nat.c: New file.
1203         * riscv-linux-tdep.c: New file.
1204
1205 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
1206
1207         * infrun.c (resume): Make static, add forward declaration.
1208         (proceed): Update header comment.
1209         * infrun.h (resume): Delete declaration.
1210
1211 2018-08-09  Tom Tromey  <tom@tromey.com>
1212
1213         * riscv-tdep.h: Minor formatting fixes.
1214
1215 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
1216
1217         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
1218         * dwarf-index-cache.c (create_dir_and_check): Likewise.
1219         (test_mkdir_recursive): Likewise.
1220         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
1221
1222 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
1223
1224         * valarith.c (value_subscripted_rvalue): If an array is not in
1225         memory, and we don't know the upper bound, then we can't know that
1226         the requested element exists or not.
1227
1228 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
1229
1230         * target.c (str_comma_list_concat_elem): Fix typo in comment.
1231         (target_options_to_string): Add comment.
1232
1233 2018-08-08  Tom Tromey  <tom@tromey.com>
1234
1235         * unittests/scoped_mmap-selftests.c: Check result of "write".
1236
1237 2018-08-08  Jim Wilson  <jimw@sifive.com>
1238
1239         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
1240         (decode_register_index_short): New.
1241         (decode_j_type_insn, decode_cj_type_insn): New.
1242         (decode_b_type_insn, decode_cb_type_insn): New.
1243         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
1244         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
1245         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
1246         is_c_sw_insn instead of is_sw_insn.
1247         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
1248         (riscv_software_single_step): New.
1249         * riscv-tdep.h (riscv_software_single_step): Declare.
1250
1251         * riscv-tdep.c (riscv_isa_xlen): Drop static.
1252         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
1253
1254 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
1255
1256         PR gdb/18050:
1257         * target.c (dispose_inferior): Don't dispose of inferiors that are
1258         already killed.
1259
1260 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
1261
1262         * remote.c (remote_target::download_tracepoint): Change char* to
1263         const char*.
1264
1265 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
1266
1267         * target.h (target_options_to_string): Return an std::string.
1268         * target.c (str_comma_list_concat_elem): Return void, use
1269         std::string.
1270         (do_option): Likewise.
1271         (target_options_to_string): Return an std::string.
1272         * linux-nat.c (linux_nat_target::wait): Adjust.
1273         * target-debug.h (target_debug_print_options): Adjust.
1274
1275 2018-08-07  Tom Tromey  <tom@tromey.com>
1276
1277         * Makefile.in (CPPFLAGS): New variable.
1278         (INTERNAL_CPPFLAGS): Use it.
1279
1280 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1281
1282         * NEWS: Mention the index cache.
1283
1284 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1285
1286         * common/pathstuff.h (get_standard_cache_dir): New.
1287         * common/pathstuff.c (get_standard_cache_dir): New.
1288         * build-id.h (build_id_to_string): New.
1289         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
1290         DEBUG_STR_SUFFIX): Move to here.
1291         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
1292         DEBUG_STR_SUFFIX): Move from there.
1293         (write_psymtabs_to_index): Make non-static, add basename
1294         parameter.  Write to temporary files, rename when done.
1295         (save_gdb_index_command): Adjust call to
1296         write_psymtabs_to_index.
1297         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
1298         field.
1299         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
1300         (get_gdb_index_contents_from_cache): New.
1301         (get_gdb_index_contents_from_cache_dwz): New.
1302         (dwarf2_initialize_objfile): Read index from cache.
1303         (dwarf2_build_psymtabs): Save to index.
1304         * dwarf-index-cache.h: New file.
1305         * dwarf-index-cache.c: New file.
1306         * dwarf-index-write.h: New file.
1307
1308 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1309
1310         * gnulib/aclocal.m4: Re-generate.
1311         * gnulib/config.in: Re-generate.
1312         * gnulib/configure: Re-generate.
1313         * gnulib/import/Makefile.am: Re-generate.
1314         * gnulib/import/Makefile.in: Re-generate.
1315         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1316         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1317         * gnulib/import/m4/mkdir.m4: New file.
1318         * gnulib/import/mkdir.c: New file.
1319         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
1320         module.
1321
1322 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1323
1324         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
1325         * common/scoped_mmap.c: New file.
1326         * common/scoped_mmap.h (destroy): New method.
1327         (~scoped_mmap, reset): Use destroy.
1328         (scoped_mmap): New move constructor.
1329         (mmap_file): New declaration.
1330         * unittests/scoped_mmap-selftests.c (test_normal,
1331         test_invalid_filename, run_tests): New functions.
1332         (_initialize_scoped_mmap_selftests): Register selftest.
1333
1334 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1335
1336         * dwarf2read.c (read_gdb_index_from_section): Rename to...
1337         (read_gdb_index_from_buffer): ... this.  Remove section
1338         parameter, add buffer parameter.
1339         (get_gdb_index_contents_ftype,
1340         get_gdb_index_contents_dwz_ftype): New typedefs.
1341         (dwarf2_read_gdb_index): Add callback parameters to get the
1342         index contents.
1343         (get_gdb_index_contents_from_section): New.
1344         (dwarf2_initialize_objfile): Update call to
1345         dwarf2_read_gdb_index.
1346
1347 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1348
1349         * common/filestuff.h (gdb_fopen_cloexec): New overload.
1350         (gdb_open_cloexec): Likewise.
1351         * nat/linux-osdata.c (command_from_pid): Use string_printf.
1352         (commandline_from_pid): Likewise.
1353         (linux_xfer_osdata_threads): Likewise.
1354         (linux_xfer_osdata_fds): Likewise.
1355         * ada-lang.c (is_package_name): Likewise.
1356         * auxv.c (procfs_xfer_auxv): Likewise.
1357         * breakpoint.c (print_one_breakpoint_location): Use
1358         uiout::field_fmt.
1359         (print_one_catch_solib): Use string_printf.
1360         * coff-pe-read.c (add_pe_exported_sym): Likewise.
1361         (add_pe_forwarded_sym): Likewise.
1362         * dwarf2read.c (create_type_unit_group): Likewise.
1363         (build_error_marker_type): Likewise.
1364         * infcall.c (get_function_name): Likewise.
1365         * valprint.c (print_converted_chars_to_obstack): Likewise.
1366         * xtensa-tdep.c (xtensa_register_type): Likewise.
1367
1368 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
1369
1370         * remote.c (remote_target::download_tracepoint): Fix format
1371         string errors.
1372
1373 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1374
1375         * tracefile.c: Include common/byte-vector.h.
1376         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
1377         with trace_regblock_size if needed.  Update uses of buf.
1378
1379 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1380
1381         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
1382         std::vector<unsigned char>.
1383         * tracepoint.c (collection_list::collection_list): Remove
1384         m_regs_mask initializer from initializer list.  Resize
1385         m_regs_mask using the largest remote register number.
1386         (collection_list::add_remote_register): Remove size check on
1387         m_regs_mask.  Use at to access element.
1388         (collection_list::stringify): Change type of temp_buf to
1389         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
1390         stringify the register mask.  Use pack_hex_byte for the register
1391         mask.
1392
1393 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1394
1395         * tracepoint.h (class collection_list) <add_register>: Remove.
1396         <add_remote_register, add_ax_registers, add_local_register>:
1397         Declare.
1398         <add_memrange>: Add scope parameter.
1399         * tracepoint.c (encode_actions_1): Likewise.
1400         (collection_list::add_register): Rename to ...
1401         (collection_list::add_remote_register): ... this.  Update
1402         comment.
1403         (collection_list::add_ax_registers, add_local_register): New
1404         methods.
1405         (collection_list::add_memrange): Add scope parameter.  Call
1406         add_local_register instead of add_register.
1407         (finalize_tracepoint_aexpr): New function.
1408         (collection_list::collect_symbol): Update calls to add_memrange.
1409         Call add_local_register instead of add_register.  Call
1410         add_ax_registers.  Call finalize_tracepoint_aexpr.
1411         (encode_actions_1): Get remote regnos for $reg action.  Call
1412         add_remote_register, add_ax_registers, and add_local_register.
1413         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
1414         (validate_actionline): Call finalize_tracepoint_aexpr.
1415
1416 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1417
1418         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
1419         Replace array buf with gdb::char_vector buf, of size
1420         get_remote_packet_size ().  Replace references to buf and
1421         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
1422         and xsnprintf with snprintf.  Raise errors if the buffer is too
1423         small.
1424
1425 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1426
1427         * remote.c (remote_target::download_tracepoint): Fix the has_more
1428         predicate in the QTDP action list iteration.
1429
1430 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1431
1432         * remote.c (remote_target::download_tracepoint): Fix indentation
1433         in for block.
1434
1435 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1436
1437         * proc-api.c (_initialize_proc_api): Remove c, unused.
1438         * procfs.c (procfs_init_inferior): Remove signals, unused.
1439         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
1440         unused.
1441
1442 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
1443             Andrew Burgess  <andrew.burgess@embecosm.com>
1444
1445         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
1446         'W_STOPCODE (0)' as this could be ambiguous.
1447
1448 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
1449
1450         * ser-tcp.c (net_open): Fix thinko when deciding whether to
1451         disable TCP's Nagle algorithm (use "ai_protocol" instead of
1452         "ai_socktype").
1453
1454 2018-08-02  Tom Tromey  <tom@tromey.com>
1455
1456         PR symtab/16842.
1457         * dwarf2read.c (read_func_scope): Set symtab on template parameter
1458         symbols.
1459         (process_structure_scope): Likewise.
1460
1461 2018-08-02  Xavier Roirand  <roirand@adacore.com>
1462
1463         PR gdb/22629:
1464         * darwin-nat.c (darwin_kill_inferior): Fix handling of
1465         kill inferior.
1466
1467 2018-08-02  Tom Tromey  <tom@tromey.com>
1468
1469         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
1470         (darwin_suspend_inferior, darwin_resume_inferior)
1471         (darwin_decode_notify_message, darwin_resume_inferior_threads)
1472         (darwin_check_new_threads): Check result of get_darwin_inferior.
1473
1474 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
1475
1476         GDB 8.1.1 released.
1477
1478 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
1479
1480         * varobj.c (varobj_get_path_expr_parent): Report an error if
1481         parent is a dynamic varobj.
1482
1483 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
1484
1485         * gnulib/aclocal.m4: Re-generate.
1486         * gnulib/config.in: Re-generate.
1487         * gnulib/configure: Re-generate.
1488         * gnulib/import/Makefile.in: Re-generate.
1489         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1490         * gnulib/import/m4/onceonly.m4: Re-generate.
1491
1492 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
1493
1494         * target-descriptions.c (struct xml_test_tdesc): New.
1495         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
1496         (record_xml_tdesc): Update.
1497         (maintenance_check_xml_descriptions): Update.
1498         * target-descriptions.h (record_xml_tdesc): Update comment.
1499
1500 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
1501
1502         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
1503         checking array bounds are defined.
1504
1505 2018-07-30  Tom Tromey  <tom@tromey.com>
1506
1507         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
1508         irreflexivity violation.
1509
1510 2018-07-30  Tom Tromey  <tom@tromey.com>
1511
1512         * cli/cli-decode.c (lookup_cmd): Remove lint code.
1513         * value.c (unpack_long): Remove lint code.
1514         * valops.c (value_ind): Remove lint code.
1515         * valarith.c (value_x_binop, value_x_unop, value_equal)
1516         (value_pos): Remove lint code.
1517
1518 2018-07-28  Tom de Vries  <tdevries@suse.de>
1519
1520         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
1521         with undefined upper bound as <optimized out>.
1522
1523 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
1524
1525         * gcore.in: Rename variable "name" to "prefix".  Expand
1526         "usage" text.
1527
1528 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
1529
1530         * windows-nat.c (windows_nat_target::create_inferior): Update to
1531         call close() in global namespace.
1532
1533 2018-07-26  Tom Tromey  <tom@tromey.com>
1534
1535         * dwarf-index-write.c (add_address_entry): Don't add objfile
1536         offsets.
1537         * dbxread.c (find_stab_function): Rename from
1538         find_stab_function_addr.  Return a bound_minimal_symbol.
1539         (read_dbx_symtab): Use raw_text_low, raw_text_high.
1540         Don't add objfile offsets.
1541         (end_psymtab): Use raw_text_low, raw_text_high,
1542         MSYMBOL_VALUE_RAW_ADDRESS.
1543         (read_ofile_symtab): Update.
1544         (process_one_symbol): Update.
1545         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
1546         offsets.
1547         (dw2_relocate): Remove.
1548         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
1549         searching addrmap.
1550         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
1551         Update.
1552         (process_psymtab_comp_unit_reader, add_partial_symbol)
1553         (add_partial_subprogram, dwarf2_ranges_read): Update.
1554         (load_partial_dies): Update.
1555         (add_address_entry): Don't add objfile offsets.
1556         (dwarf2_build_include_psymtabs): Update.
1557         (create_addrmap_from_aranges): Don't add objfile offsets.
1558         (dw2_find_pc_sect_compunit_symtab): Update.
1559         * mdebugread.c (parse_symbol): Don't add objfile offsets.
1560         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
1561         Update.
1562         (parse_partial_symbols): Don't add objfile offsets.  Use
1563         raw_text_low, raw_text_high.  Update.
1564         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
1565         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
1566         or call 'relocate' quick function.  Clear psymbol_map.
1567         * psympriv.h (struct partial_symbol) <address>: Add section
1568         offset.
1569         <set_unrelocated_address>: Rename from set_address.
1570         <raw_text_low, raw_text_high>: New methods.
1571         <text_low, text_high>: Add objfile parameter.
1572         (add_psymbol_to_bcache): Add 'section' parameter.  Call
1573         set_unrelocated_address.
1574         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1575         (find_pc_psymbol): Update.
1576         (fixup_psymbol_section, relocate_psymtabs): Remove.
1577         (dump_psymtab, psym_functions): Update.
1578         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
1579         parameter.
1580         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
1581         (start_psymtab_common): Update.
1582         * symfile-debug.c (debug_qf_relocate): Remove.
1583         (debug_sym_quick_functions): Update.
1584         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
1585         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
1586         Update.
1587
1588 2018-07-26  Tom Tromey  <tromey@redhat.com>
1589
1590         * dbxread.c (end_psymtab): Use text_high_valid and
1591         text_low_valid.
1592         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
1593         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
1594         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1595         Update comment.
1596         <text_low_valid, text_high_valid>: New fields.
1597         <set_text_low, set_text_high>: Update.
1598         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
1599
1600 2018-07-26  Tom Tromey  <tom@tromey.com>
1601
1602         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
1603         Update.
1604         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
1605         textlow and texthigh fields.
1606         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
1607         Update.
1608         * mdebugread.c (parse_lines, parse_partial_symbols)
1609         (psymtab_to_symtab_1): Update.
1610         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1611         Rename fields.  Update comment.  Now private.
1612         <text_low, text_high, set_text_low, set_text_high>: New methods.
1613         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1614         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
1615         (start_psymtab_common, maintenance_info_psymtabs)
1616         (maintenance_check_psymtabs): Update.
1617         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
1618         texthigh fields.
1619         (scan_xcoff_symtab): Update.
1620
1621 2018-07-26  Tom Tromey  <tromey@redhat.com>
1622
1623         * psympriv.h (struct partial_symbol) <unrelocated_address,
1624         address, set_address>: New methods.
1625         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
1626         (fixup_psymbol_section, relocate_psymtabs): Update.
1627         (print_partial_symbols): Add 'objfile' parameter.  Update.
1628         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
1629         Update.
1630
1631 2018-07-26  Tom Tromey  <tom@tromey.com>
1632
1633         * dwarf-index-write.c (write_psymbols, debug_names::insert)
1634         (debug_names::write_psymbols): Update.
1635         * psympriv.h (struct partial_symbol): Derive from
1636         general_symbol_info.
1637         <obj_section>: New method.
1638         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
1639         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1640         (find_pc_sect_psymbol, fixup_psymbol_section)
1641         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
1642         (print_partial_symbols, recursively_search_psymtabs)
1643         (compare_psymbols, psymbol_hash, psymbol_compare)
1644         (add_psymbol_to_bcache, maintenance_check_psymtabs)
1645         (psymbol_name_matches, psym_fill_psymbol_map): Update.
1646
1647 2018-07-26  Tom Tromey  <tromey@redhat.com>
1648
1649         * dbxread.c (end_psymtab): Remove dead code.
1650
1651 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
1652
1653         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
1654         DWARF unwinders are disabled.
1655         * dwarf2-frame.c: Add dwarf2read.h include.
1656         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
1657         disabled.
1658         (dwarf2_frame_unwinders_enabled_p): Define.
1659         (show_dwarf_unwinders_enabled_p): New function.
1660         (_initialize_dwarf2_frame): Register switch to control DWARF
1661         unwinder use.
1662         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
1663         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
1664         (show_dwarf_cmdlist): Remove static keyword.
1665         * dwarf2read.h (set_dwarf_cmdlist): Declare.
1666         (show_dwarf_cmdlist): Declare.
1667         * NEWS: Document new feature.
1668
1669 2018-07-26  Tom de Vries  <tdevries@suse.de>
1670
1671         PR breakpoints/23366
1672         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
1673
1674 2018-07-26  Tom de Vries  <tdevries@suse.de>
1675
1676         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
1677         DW_AT_count can't be translated to a dynamic prop.
1678
1679 2018-07-25  Tom de Vries  <tdevries@suse.de>
1680
1681         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
1682         try/catch.
1683
1684 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
1685
1686         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
1687
1688 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
1689
1690         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
1691
1692 2018-07-24  Keith Seitz  <keiths@redhat.comt
1693
1694         PR symtab/23010
1695         * dwarf2read.c (dw2_add_symbol_to_list): New function.
1696         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
1697         instead of add_symbol_to_list.
1698         (read_file_scope): Call prepare_one_comp_unit before reading
1699         any other DIEs.
1700
1701 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
1702
1703         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
1704
1705 2018-07-24  Tom Tromey  <tom@tromey.com>
1706
1707         * utils.c (malloc, realloc, free): Don't declare.
1708         * configure, config.in: Rebuild.
1709         * configure.ac: Don't check for declarations of free, malloc, or
1710         realloc.
1711
1712 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
1713
1714         * aarch64-linux-nat.c
1715         (aarch64_linux_nat_target::stopped_data_address): Remove unused
1716         variable.
1717         * arm-linux-nat.c (fetch_regs): Likewise.
1718         (store_regs): Likewise.
1719         (fetch_vfp_regs): Likewise.
1720         (store_vfp_regs): Likewise.
1721         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
1722         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
1723         (arm_linux_nat_target::insert_watchpoint): Likewise.
1724         (arm_linux_nat_target::remove_watchpoint): Likewise.
1725         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
1726         Likewise.
1727         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
1728         Likewise.
1729         * ppc-linux-nat.c (fetch_register): Likewise.
1730         (fetch_all_gp_regs): Likewise.
1731         (fetch_ppc_registers): Likewise.
1732         (store_all_gp_regs): Likewise.
1733         (store_ppc_registers): Likewise.
1734         (hwdebug_insert_point): Likewise.
1735         (can_use_watchpoint_cond_accel): Likewise.
1736         * remote-sim.c (gdb_os_write_stdout): Likewise.
1737
1738 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
1739             Tom Tromey  <tom@tromey.com>
1740
1741         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
1742         test for it.
1743         * configure: Rebuild.
1744
1745 2018-07-22  Tom Tromey  <tom@tromey.com>
1746
1747         * regformats/regdat.sh: Define xmltarget_${name} inside
1748         #ifndef IN_PROCESS_AGENT.
1749
1750 2018-07-22  Tom Tromey  <tom@tromey.com>
1751
1752         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
1753
1754 2018-07-22  Tom Tromey  <tom@tromey.com>
1755
1756         * symfile.c (reread_symbols): Notify iter, not objfile.
1757
1758 2018-07-22  Tom Tromey  <tom@tromey.com>
1759
1760         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
1761         Use arch_ops.
1762         (ravenscar_thread_target::prepare_to_store): Likewise.
1763
1764 2018-07-22  Tom Tromey  <tom@tromey.com>
1765
1766         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
1767         unused variable.  Call value_fetch_lazy when needed.
1768         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
1769         Remove unused variable.  Call value_fetch_lazy when needed.
1770
1771 2018-07-22  Tom Tromey  <tom@tromey.com>
1772
1773         * m32c-tdep.c (mark_dma): Return void.
1774         (make_regs): Remove unused declarations.
1775
1776 2018-07-22  Tom Tromey  <tom@tromey.com>
1777
1778         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
1779         cmdscm_get_valid_command_smob_arg_unsafe for effect.
1780         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
1781         bkscm_get_valid_block_smob_arg_unsafe for effect.
1782
1783 2018-07-22  Tom Tromey  <tom@tromey.com>
1784
1785         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
1786         value_type.
1787
1788 2018-07-22  Tom Tromey  <tom@tromey.com>
1789
1790         * windows-nat.c (saved_context): Conditionally define.
1791         * remote.c (remote_target::remote_btrace_maybe_reopen):
1792         Conditionally declare "warned".
1793         * inflow.c (sigquit_ours): Conditionally define.
1794         (new_tty): Move "tty" declaration inside #if.
1795         * guile/guile.c (guile_datadir): Conditionally define.
1796         * charset.c (set_be_le_names): Move some declarations inside #if.
1797         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
1798         #if.
1799         (parse_xml_btrace_conf): Likewise.
1800
1801 2018-07-22  Tom Tromey  <tom@tromey.com>
1802
1803         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
1804
1805 2018-07-22  Tom Tromey  <tom@tromey.com>
1806
1807         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
1808         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
1809         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
1810         * buildsym-legacy.c (get_macro_table): Remove unused variable.
1811         * stack.c (frame_apply_level_command): Remove unused variable.
1812         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
1813         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
1814         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
1815         unused variable.
1816         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
1817         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
1818         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
1819         variable.
1820         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
1821         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
1822         variable.
1823         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
1824         Remove unused variable.
1825         * cli/cli-script.c (recurse_read_control_structure): Remove unused
1826         variable.
1827         * common/tdesc.c (print_xml_feature::visit): Remove unused
1828         variable.
1829         * compile/compile-object-load.c (store_regs): Remove unused
1830         variables.
1831         * complaints.c (clear_complaints): Remove unused variable.
1832         * corelow.c (core_target_open): Remove unused variable.
1833         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
1834         variable.
1835         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
1836         variable.
1837         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
1838         variable.
1839         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
1840         variable.
1841         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
1842         variable.
1843         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
1844         variable.
1845         * ia64-tdep.c (examine_prologue): Remove unused variable.
1846         * infcall.c (run_inferior_call): Remove unused variable.
1847         * inferior.c (exit_inferior): Remove unused variable.
1848         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
1849         * linespec.c (decode_line_2): Remove unused variable.
1850         * linux-nat.c (super_close): Remove.
1851         * linux-tdep.c (linux_info_proc): Remove unused variable.
1852         * mi/mi-main.c (mi_execute_command): Remove unused variable.
1853         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
1854         Remove unused variable.
1855         * parse.c (find_minsym_type_and_address): Remove unused variable.
1856         * printcmd.c (info_symbol_command, printf_floating): Remove unused
1857         variable.
1858         * python/py-breakpoint.c (bppy_set_commands): Remove unused
1859         variable.
1860         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
1861         variables.
1862         * record-btrace.c (record_btrace_target::store_registers): Remove
1863         unused variable.
1864         (cmd_show_record_btrace_cpu): Remove unused variable.
1865         * riscv-tdep.c (riscv_register_reggroup_p)
1866         (riscv_push_dummy_call, riscv_return_value): Remove unused
1867         variable.
1868         * rust-exp.y (literal): Remove unused variable.
1869         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
1870         unused variable.
1871         <STRUCTOP_ANONYMOUS>: Likewise.
1872         * s390-linux-tdep.c (s390_linux_init_abi_31)
1873         (s390_linux_init_abi_64): Remove unused variable.
1874         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
1875         (file_select_thread, net_windows_open, _initialize_ser_windows):
1876         Remove unused variables.
1877         * symtab.c (find_pc_sect_line): Remove unused variable.
1878         * target-memory.c (compute_garbled_blocks): Remove unused
1879         variable.
1880         (target_write_memory_blocks): Remove unused variable.
1881         * target.c (target_stack::unpush): Remove unused variables.
1882         * tracepoint.c (start_tracing, all_tracepoint_actions)
1883         (merge_uploaded_trace_state_variables)
1884         (print_one_static_tracepoint_marker): Remove unused variable.
1885         * unittests/basic_string_view/element_access/char/1.cc (test01):
1886         Remove unused variable.
1887         * windows-nat.c (windows_continue, windows_add_all_dlls)
1888         (do_initial_windows_stuff, windows_nat_target::create_inferior):
1889         Remove unused variables.
1890
1891 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
1892
1893         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
1894         attr_profile in HAVE_ELF.
1895         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
1896         HAVE_ELF.
1897
1898 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
1899
1900         * frame.c (frame_register_unwind): Change parameter name.
1901         (frame_unwind_register): Likewise.
1902         (frame_unwind_register_value): Likewise.
1903         (frame_unwind_register_signed): Likewise.
1904         (frame_unwind_register_unsigned): Likewise.
1905         * frame.h (frame_register_unwind): Likewise.
1906         (frame_unwind_register): Likewise.
1907         (frame_unwind_register_value): Likewise.
1908         (frame_unwind_register_signed): Likewise.
1909         (frame_unwind_register_unsigned): Likewise.
1910         (frame_unwind_arch): Likewise.
1911
1912 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
1913
1914         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
1915         ISA maintenance.
1916
1917 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
1918
1919         * mips-linux-nat.c (mips_linux_nat_target::read_description):
1920         Call `get_ptrace_pid' rather than extracting the ptrace PID by
1921         hand.
1922
1923 2018-07-20  Keith Seitz  <keiths@redhat.com>
1924
1925         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
1926         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
1927         m_compunit_symtab, m_language>: Add "m_" prefix.
1928         Update all uses.
1929         * buildsym.c: Update all uses.
1930
1931 2018-07-20  Tom Tromey  <tom@tromey.com>
1932
1933         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
1934         * buildsym.h (record_line_ftype): Remove typedef.
1935
1936 2018-07-20  Tom Tromey  <tom@tromey.com>
1937
1938         * buildsym-legacy.h (augment_type_symtab): Don't declare.
1939         (end_expandable_symtab): Likewise.
1940         (end_symtab_get_static_block): Likewise.
1941         (end_symtab_from_static_block): Likewise.
1942         * buildsym-legacy.c (augment_type_symtab): Remove.
1943         (end_expandable_symtab): Remove.
1944         (end_symtab_get_static_block): Remove.
1945         (end_symtab_from_static_block): Remove.
1946
1947 2018-07-20  Tom Tromey  <tom@tromey.com>
1948
1949         * dwarf2read.c: Include buildsym.h.
1950         (struct dwarf2_cu) <builder>: New method.
1951         (fixup_go_packaging): Update.
1952         (process_full_comp_unit, process_full_type_unit): Update.  Don't
1953         use scoped_free_pendings.
1954         (using_directives): Add "cu" parameter, remove "language".
1955         (read_import_statement, setup_type_unit_groups, )
1956         (read_func_scope, read_lexical_block_scope)
1957         (dwarf2_record_block_ranges, read_namespace): Update.
1958         (lnp_state_machine::lnp_state_machine): Add cu parameter.
1959         (lnp_state_machine::handle_end_sequence): Update.
1960         (class lnp_state_machine) <m_cu>: New member.
1961         <m_record_line_callback>: Remove.
1962         <m_currently_recording_lines>: New member.
1963         (lnp_state_machine::handle_set_file): Update.
1964         (noop_record_line): Remove.
1965         (dwarf_record_line_p): Add cu parameter.
1966         (dwarf_record_line_1, dwarf_finish_line): Likewise.
1967         (lnp_state_machine::record_line)
1968         (lnp_state_machine::lnp_state_machine)
1969         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
1970         (dwarf_decode_lines): Update.
1971         (dwarf2_start_subfile): Add cu parameter.
1972         (dwarf2_start_symtab, new_symbol): Update.
1973         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
1974         Remove dwarf2_per_objfile parameter.
1975         (dwarf_decode_macros): Update.
1976
1977 2018-07-20  Tom Tromey  <tom@tromey.com>
1978
1979         * stabsread.c (define_symbol): Update.
1980         * buildsym-legacy.h (get_buildsym_compunit): Declare.
1981         * dwarf2read.c (new_symbol): Update.
1982         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
1983         * cp-namespace.c: Include buildsym.h.
1984         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
1985         * buildsym-legacy.c (get_buildsym_compunit): New function.
1986
1987 2018-07-20  Tom Tromey  <tom@tromey.com>
1988
1989         * xcoffread.c: Include buildsym-legacy.h.
1990         * windows-nat.c: Include buildsym-legacy.h.
1991         * stabsread.c: Include buildsym-legacy.h.
1992         * mdebugread.c: Include buildsym-legacy.h.
1993         * buildsym-legacy.h: New file.
1994         * buildsym-legacy.c: New file, from buildsym.c.
1995         * go32-nat.c: Include buildsym-legacy.h.
1996         * dwarf2read.c: Include buildsym-legacy.h.
1997         * dbxread.c: Include buildsym-legacy.h.
1998         * cp-namespace.c: Include buildsym-legacy.h.
1999         * coffread.c: Include buildsym-legacy.h.
2000         * buildsym.h: Move some contents to buildsym-legacy.h.
2001         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
2002         buildsym-legacy.c.
2003         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
2004
2005 2018-07-20  Tom Tromey  <tom@tromey.com>
2006
2007         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
2008         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
2009         (buildsym_compunit::buildsym_compunit)
2010         (buildsym_compunit::~buildsym_compunit)
2011         (buildsym_compunit::get_macro_table): Define.
2012
2013 2018-07-20  Tom Tromey  <tom@tromey.com>
2014
2015         * buildsym.c (reset_symtab_globals): Remove.
2016         (buildsym_compunit::end_symtab_from_static_block): Update.
2017         (buildsym_compunit::augment_type_symtab): Update.
2018         (end_symtab_from_static_block): Call free_buildsym_compunit.
2019         (augment_type_symtab, end_symtab, end_expandable_symtab):
2020         Likewise.
2021
2022 2018-07-20  Tom Tromey  <tom@tromey.com>
2023
2024         * arch-utils.c: Do not include buildsym.h.
2025         * mipsread.c: Do not include buildsym.h.
2026         * machoread.c: Do not include buildsym.h.
2027         * elfread.c: Do not include buildsym.h.
2028
2029 2018-07-20  Tom Tromey  <tom@tromey.com>
2030
2031         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
2032         initialization.
2033         (buildsym_compunit): Add new constructor.
2034         (struct buildsym_compunit) <get_last_source_file, finish_block,
2035         record_block_range, start_subfile, patch_subfile_names,
2036         push_subfile, pop_subfile, record_line, get_compunit_symtab,
2037         set_last_source_start_addr, get_last_source_start_addr,
2038         get_local_using_directives, set_local_using_directives,
2039         get_global_using_directives, outermost_context_p,
2040         get_current_context_stack, get_context_stack_depth,
2041         get_current_subfile, get_local_symbols, get_file_symbols,
2042         get_global_symbols, record_debugformat, record_producer,
2043         push_context, pop_context, end_symtab_get_static_block,
2044         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
2045         New public methods.
2046         <record_pending_block, finish_block_internal, make_blockvector,
2047         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
2048         private methods.
2049         Update all users.
2050
2051 2018-05-22  Tom Tromey  <tom@tromey.com>
2052
2053         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
2054         parameter.
2055         (finish_block_internal): Update.
2056
2057 2018-07-20  Tom Tromey  <tom@tromey.com>
2058
2059         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
2060         parameter.
2061         (finish_block_internal): Update.
2062
2063 2018-07-20  Tom Tromey  <tom@tromey.com>
2064
2065         * buildsym.h (EXTERN): Don't define or undef.
2066         * buildsym.c (EXTERN): Don't define.
2067
2068 2018-07-20  Tom Tromey  <tom@tromey.com>
2069
2070         * buildsym.c: Remove TODO comment.
2071
2072 2018-07-20  Tom Tromey  <tom@tromey.com>
2073
2074         * coffread.c (coff_symtab_read): Update.
2075         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
2076         (xcoff_new_init): Update.
2077         * mipsread.c (mipscoff_new_init): Update.
2078         * mdebugread.c (mdebug_build_psymtabs): Update.
2079         * elfread.c (elf_new_init): Update.
2080         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
2081         Update.
2082         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
2083         (coffstab_build_psymtabs, elfstab_build_psymtabs)
2084         (stabsect_build_psymtabs): Update.
2085         * buildsym.h (buildsym_init): Don't declare.
2086         * buildsym.c: Update comment.
2087         (prepare_for_building): Remove.
2088         (start_symtab, restart_symtab): Update.
2089         (reset_symtab_globals): Update comment.
2090         (buildsym_init): Remove.
2091
2092 2018-07-20  Tom Tromey  <tom@tromey.com>
2093
2094         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
2095         * stabsread.c (patch_block_stabs, define_symbol, read_type)
2096         (read_enum_type, common_block_start, common_block_end)
2097         (cleanup_undefined_types_1, finish_global_stabs): Update.
2098         * mdebugread.c (psymtab_to_symtab_1): Update.
2099         * dwarf2read.c (fixup_go_packaging, read_func_scope)
2100         (read_lexical_block_scope, new_symbol): Update.
2101         * dbxread.c (process_one_symbol): Update.
2102         * coffread.c (coff_symtab_read, process_coff_symbol)
2103         (coff_read_enum_type): Update.
2104         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
2105         declare.
2106         (get_local_symbols, get_file_symbols, get_global_symbols): New
2107         functions.
2108         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
2109         m_global_symbols.
2110         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
2111         (~scoped_free_pendings): Update.
2112         (finish_block, prepare_for_building, reset_symtab_globals)
2113         (end_symtab_get_static_block, end_symtab_with_blockvector)
2114         (augment_type_symtab, push_context): Update.
2115         (get_local_symbols, get_file_symbols, get_global_symbols): New
2116         functions.
2117         (buildsym_init): Update.
2118
2119 2018-07-20  Tom Tromey  <tom@tromey.com>
2120
2121         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
2122         (process_full_type_unit): Likewise.
2123         (dwarf2_start_symtab): Set list_in_scope.
2124
2125 2018-07-20  Tom Tromey  <tom@tromey.com>
2126
2127         * dwarf2read.c (process_psymtab_comp_unit_reader)
2128         (build_type_psymtabs_reader): Do not set list_in_scope.
2129
2130 2018-07-20  Tom Tromey  <tom@tromey.com>
2131
2132         * buildsym.c (free_pendings): Remove.
2133         (add_symbol_to_list, scoped_free_pendings)
2134         (finish_block_internal, buildsym_init): Update.
2135
2136 2018-07-20  Tom Tromey  <tom@tromey.com>
2137
2138         * xcoffread.c (read_xcoff_symtab): Update.
2139         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
2140         Update.
2141         * dbxread.c (process_one_symbol): Update.
2142         * coffread.c (coff_symtab_read): Update.
2143         * buildsym.h (finish_block): Update.
2144         * buildsym.c (finish_block): Remove "listhead" argument.
2145         (end_symtab_get_static_block): Update.
2146
2147 2018-07-20  Tom Tromey  <tom@tromey.com>
2148
2149         * buildsym.h (class scoped_free_pendings): Remove constructor.
2150         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
2151         method.
2152         <m_pending_block_obstack, m_pending_blocks>: New members.
2153         (pending_block_obstack, pending_blocks): Remove.
2154         (scoped_free_pendings::scoped_free_pendings): Default.
2155         (~scoped_free_pendings): Update.
2156         (free_pending_blocks): Remove.
2157         (finish_block_internal, record_pending_block, make_blockvector)
2158         (end_symtab_get_static_block, augment_type_symtab, push_context)
2159         (buildsym_init): Update.
2160
2161 2018-07-20  Tom Tromey  <tom@tromey.com>
2162
2163         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
2164         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
2165         members.
2166         (pending_addrmap, pending_addrmap_obstack)
2167         (pending_addrmap_interesting): Remove.
2168         (scoped_free_pendings, record_block_range, make_blockvector)
2169         (prepare_for_building, reset_symtab_globals, buildsym_init):
2170         Update.
2171
2172 2018-07-20  Tom Tromey  <tom@tromey.com>
2173
2174         * xcoffread.c (process_linenos): Update.
2175         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
2176         * mdebugread.c (psymtab_to_symtab_1): Update.
2177         * dwarf2read.c (setup_type_unit_groups)
2178         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
2179         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
2180         * dbxread.c (process_one_symbol): Update.
2181         * coffread.c (coff_symtab_read, enter_linenos)
2182         (process_coff_symbol): Update.
2183         * buildsym.h (current_subfile): Don't declare.
2184         (get_current_subfile): Declare.
2185         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
2186         member.
2187         (start_subfile, free_buildsym_compunit, push_subfile)
2188         (prepare_for_building, start_symtab): Update.
2189         (get_current_subfile): New function.
2190
2191 2018-07-20  Tom Tromey  <tom@tromey.com>
2192
2193         * coffread.c (coff_symtab_read): Update.
2194         * xcoffread.c (read_xcoff_symtab): Update.
2195         * dwarf2read.c (new_symbol): Update.
2196         (read_func_scope, read_lexical_block_scope): Update.
2197         * dbxread.c (process_one_symbol): Update.
2198         * buildsym.h (context_stack, context_stack_depth): Don't declare.
2199         (outermost_context_p): Remove macro.
2200         (outermost_context_p, get_current_context_stack)
2201         (get_context_stack_depth): Declare.
2202         (pop_context): Return struct context_stack.
2203         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
2204         member.
2205         (context_stack_size): Remove.
2206         (INITIAL_CONTEXT_STACK_SIZE): Remove.
2207         (prepare_for_building, end_symtab_get_static_block)
2208         (augment_type_symtab, push_context): Update.
2209         (pop_context): Return struct context_stack.
2210         (outermost_context_p, get_current_context_stack)
2211         (get_context_stack_depth): New functions.
2212         (buildsym_init): Update.
2213
2214 2018-07-20  Tom Tromey  <tom@tromey.com>
2215
2216         * rust-exp.y: Now a pure parser.  Update all rules.
2217         (%union): Move earlier.
2218         (current_parser, work_obstack): Remove globals.
2219         (rust_parser, ~rust_parser): Update.
2220         (class rust_parser) <copy_name, concat3, crate_name, super_name,
2221         lex_character, lex_number, lex_string, lex_identifier,
2222         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
2223         convert_name, convert_params_to_expression,
2224         convert_ast_to_expression, ast_basic_type, ast_operation,
2225         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
2226         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
2227         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
2228         ast_array_type, ast_slice_type, ast_reference_type,
2229         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
2230         (rust_parse): Update.
2231         (rustyyerror, rustyylex): Add parser parameter.
2232         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
2233         (rust_lex_stringish_test, rust_lex_test_sequence)
2234         (rust_lex_test_trailing_dot, rust_lex_test_completion)
2235         (rust_lex_test_push_back, rust_lex_tests): Update.
2236
2237 2018-07-19  Pedro Alves  <palves@redhat.com>
2238
2239         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
2240         gdb::unique_xmalloc_ptr.
2241         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
2242         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
2243         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
2244         copy-initialization.
2245         * guile/scm-pretty-print.c (ppscm_print_children): Use
2246         gdb::unique_xmalloc_ptr instead of cleanups.
2247         (gdbscm_apply_val_pretty_printer): Remove cleanups.
2248         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
2249         gdb::unique_xmalloc_ptr.
2250         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2251         Adjust to use gdb::unique_xmalloc_ptr.
2252         * guile/scm-utils.c (extract_arg): Adjust.
2253         * guile/scm-value.c (gdbscm_value_field): Adjust to use
2254         gdb::unique_xmalloc_ptr instead of a cleanup.
2255
2256 2018-07-19  Tom Tromey  <tom@tromey.com>
2257
2258         * utils.c (do_value_free_to_mark)
2259         (make_cleanup_value_free_to_mark): Remove.
2260         * utils.h (make_cleanup_value_free_to_mark): Remove.
2261
2262 2018-07-19  Pedro Alves  <palves@redhat.com>
2263
2264         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
2265         forwarding reference.
2266
2267 2018-07-18  Pedro Alves  <palves@redhat.com>
2268
2269         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
2270         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
2271         cleanup.
2272
2273 2018-07-18  Pedro Alves  <palves@redhat.com>
2274
2275         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
2276         exceptions.
2277         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
2278         (gdbscm_wrap): New.
2279         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
2280         directly instead of a cleanup.
2281         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
2282         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
2283         (vlscm_binop_gdbthrow): New, factored out from ...
2284         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
2285         (vlscm_rich_compare): Use gdbscm_wrap.
2286         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
2287         instead of a cleanup.
2288         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
2289         cleanup.
2290         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2291         Use xfree directly instead of a cleanup.
2292         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
2293         Adjust to use gdbscm_wrap and scoped_value_mark.
2294         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
2295         (gdbscm_value_address, gdbscm_value_dereference)
2296         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
2297         scoped_value_mark.
2298         (gdbscm_value_dynamic_type): Use scoped_value_mark.
2299         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
2300         scoped_value_mark.
2301         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
2302         gdbscm_wrap and scoped_value_mark.
2303         (gdbscm_value_to_string): Use xfree directly instead of a
2304         cleanup.  Move 'buffer' unique_ptr to TRY scope.
2305         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
2306         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
2307         scoped_value_mark.
2308         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
2309         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
2310         scoped_value_mark.
2311         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
2312         gdbscm_wrap.
2313
2314 2018-07-18  Tom de Vries  <tdevries@suse.de>
2315
2316         * findvar.c (default_read_var_value): Also resolve dynamic type for
2317         LOC_OPTIMIZED_OUT vars.
2318
2319 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
2320
2321         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
2322         decoding.
2323
2324 2018-07-17  Tom Tromey  <tom@tromey.com>
2325
2326         * guile/scm-param.c (pascm_set_func, pascm_show_func)
2327         (compute_enum_list, pascm_set_param_value_x)
2328         (gdbscm_parameter_value): Update.
2329         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
2330         (gdbscm_scm_to_host_string): Update.
2331         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
2332         Update.
2333         * guile/scm-cmd.c (cmdscm_add_completion): Update.
2334         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
2335         * guile/scm-string.c (gdbscm_scm_to_string): Return
2336         unique_xmalloc_ptr.
2337         (gdbscm_scm_to_host_string): Likewise.
2338
2339 2018-07-17  Tom Tromey  <tom@tromey.com>
2340
2341         * guile/guile.c (gdbscm_eval_from_control_command): Update.
2342         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
2343         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
2344         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
2345         unique_xmalloc_ptr.
2346
2347 2018-07-17  Tom Tromey  <tom@tromey.com>
2348
2349         * guile/scm-param.c (pascm_signal_setshow_error): Update.
2350         * guile/guile-internal.h (gdbscm_exception_message_to_string):
2351         Update.
2352         * guile/scm-cmd.c (cmdscm_function): Update.
2353         * guile/scm-pretty-print.c
2354         (ppscm_print_exception_unless_memory_error): Update.
2355         * guile/scm-exception.c (gdbscm_exception_message_to_string):
2356         Return unique_xmalloc_ptr.
2357
2358 2018-07-17  Tom Tromey  <tom@tromey.com>
2359
2360         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
2361         Use string_printf.
2362
2363 2018-07-17  Jim Wilson  <jimw@sifive.com>
2364
2365         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
2366         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
2367         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
2368         unecessary braces after EF_RISCV_RVC test.  Delete call to
2369         set_gdbarch_decr_pc_after_break.
2370
2371         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
2372         RISCV_LAST_FP_REGNUM + 1.
2373         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
2374
2375 2018-07-17  Tom Tromey  <tom@tromey.com>
2376
2377         * configure.ac: Remove --disable-gdbcli.
2378         * configure: Rebuild.
2379         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
2380         (SUBDIR_CLI_CFLAGS): Remove.
2381         (SFILES): Use SUBDIR_CLI_SRCS.
2382         (COMMON_OBS): Use SUBDIR_CLI_OBS.
2383
2384 2018-07-17  Tom Tromey  <tom@tromey.com>
2385
2386         PR gdb/18624:
2387         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
2388
2389 2018-07-16  Jim Wilson  <jimw@sifive.com>
2390
2391         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
2392
2393 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
2394
2395         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
2396         variable.
2397         (libunwind_frame_sniffer): Likewise.
2398         (libunwind_frame_prev_register): Likewise.
2399         (libunwind_sigtramp_frame_sniffer): Likewise.
2400         * ia64-tdep.c (ia64_access_reg): Likewise.
2401         (ia64_access_rse_reg): Likewise.
2402         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
2403         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
2404
2405 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
2406
2407         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
2408
2409 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
2410
2411         * remote-sim.c (gdbsim_target::close,
2412         gdbsim_target::mourn_inferior): Remove unused variables.
2413
2414 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
2415
2416         * ia64-tdep.c (ktab_buf): New global.
2417         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
2418         (get_kernel_table): Adjust.
2419
2420 2018-07-16  Tom Tromey  <tom@tromey.com>
2421
2422         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
2423         * dwarf2read.c (using_directives, new_symbol): Use
2424         outermost_context_p.
2425         * dbxread.c (process_one_symbol): Use outermost_context_p.
2426         * coffread.c (coff_symtab_read): Use outermost_context_p.
2427
2428 2018-07-16  Tom Tromey  <tom@tromey.com>
2429
2430         * dwarf2read.c (using_directives, read_func_scope)
2431         (read_lexical_block_scope): Update.
2432         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
2433         * buildsym.h (local_using_directives, global_using_directives):
2434         Don't declare.
2435         (get_local_using_directives, set_local_using_directives)
2436         (get_global_using_directives): Declare.
2437         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
2438         m_global_using_directives>: New members.
2439         (finish_block_internal, prepare_for_building)
2440         (reset_symtab_globals, end_symtab_get_static_block)
2441         (push_context): Update.
2442         (get_local_using_directives, set_local_using_directives)
2443         (get_global_using_directives): New functions.
2444         (buildsym_init): Update.
2445
2446 2018-07-16  Tom Tromey  <tom@tromey.com>
2447
2448         * xcoffread.c (xcoff_initial_scan): Don't call
2449         free_pending_blocks.
2450         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
2451         * buildsym.h (class scoped_free_pendings): Add constructor.
2452         (free_pending_blocks): Don't declare.
2453         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
2454         (free_pending_blocks): Now static.
2455
2456 2018-07-16  Tom Tromey  <tom@tromey.com>
2457
2458         * buildsym.h (push_subfile, pop_subfile): Update declarations.
2459         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
2460         member.
2461         (struct subfile_stack): Remove.
2462         (subfile_stack): Remove.
2463         (push_subfile, pop_subfile, buildsym_init): Update.
2464
2465 2018-07-16  Tom Tromey  <tom@tromey.com>
2466
2467         * buildsym.c (push_subfile): Use gdb_assert.
2468         (pop_subfile): Use gdb_assert.
2469
2470 2018-07-16  Tom Tromey  <tom@tromey.com>
2471
2472         * buildsym.h (merge_symbol_lists): Remove.
2473         * buildsym.c (merge_symbol_lists): Remove.
2474
2475 2018-07-16  Tom Tromey  <tom@tromey.com>
2476
2477         * stabsread.c (scan_file_globals): Update comment.
2478         * stabsread.h (scan_file_globals): Move from buildsym.h.
2479         * buildsym.h (scan_file_globals): Move to stabsread.h.
2480
2481 2018-07-16  Tom Tromey  <tom@tromey.com>
2482
2483         * xcoffread.c (xcoff_new_init): Update.
2484         * mipsread.c (mipscoff_new_init): Update.
2485         * mdebugread.c (mdebug_build_psymtabs): Update.
2486         * elfread.c (elf_new_init): Update.
2487         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
2488         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
2489         * buildsym.h (buildsym_new_init): Don't declare.
2490         * buildsym.c (buildsym_new_init): Remove.
2491
2492 2018-07-16  Tom Tromey  <tom@tromey.com>
2493
2494         * stabsread.h (within_function): Move from buildsym.h.
2495         * stabsread.c (start_stabs): Clear within_function.
2496         * coffread.c (coff_start_symtab): Clear within_function.
2497         * buildsym.h (within_function): Move to stabsread.h.
2498         * buildsym.c (prepare_for_building): Update.
2499
2500 2018-07-16  Tom Tromey  <tom@tromey.com>
2501
2502         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
2503         * dwarf2read.c (dwarf2_start_symtab): Don't set
2504         processing_gcc_compilation.
2505         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
2506
2507 2018-07-16  Tom Tromey  <tom@tromey.com>
2508
2509         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
2510         (next_symbol_text_func): Move from buildsym.h.
2511         * stabsread.c (hashname): Move from buildsym.c.
2512         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
2513         (next_symbol_text_func, hashname): Move to stabsread.h.
2514         * buildsym.c: Don't include bcache.h
2515         (hashname): Move to stasbread.c.
2516
2517 2018-07-16  Tom Tromey  <tom@tromey.com>
2518
2519         * buildsym.h (context_stack_size): Don't declare.
2520         * buildsym.c (context_stack_size): New global.
2521
2522 2018-07-16  Tom Tromey  <tom@tromey.com>
2523
2524         * dbxread.c (processing_acc_compilation): New global.
2525         * buildsym.h (processing_acc_compilation): Don't declare.
2526
2527 2018-07-16  Tom Tromey  <tom@tromey.com>
2528
2529         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
2530         * dbxread.c (read_ofile_symtab): Update.
2531         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
2532         * buildsym.h (last_source_start_addr): Remove.
2533         (set_last_source_start_addr, get_last_source_start_addr):
2534         Declare.
2535         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
2536         parameter.
2537         (struct buildsym_compunit) <m_last_source_start_addr>: New
2538         member.
2539         (prepare_for_building): Remove start_addr parameter.
2540         (start_symtab, restart_symtab, end_symtab_get_static_block)
2541         (end_symtab_with_blockvector): Update.
2542         (set_last_source_start_addr, get_last_source_start_addr): New
2543         functions.
2544
2545 2018-07-16  Tom Tromey  <tom@tromey.com>
2546
2547         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
2548         member.
2549         (have_line_numbers): Remove.
2550         (record_line, prepare_for_building, end_symtab_get_static_block)
2551         (augment_type_symtab): Update.
2552
2553 2018-07-16  Tom Tromey  <tom@tromey.com>
2554
2555         * buildsym.c (~buildsym_compunit): Free the macro table.
2556         (struct buildsym_compunit) <get_macro_table, release_macros>: New
2557         methods.
2558         <m_pending_macros>: New member.
2559         (pending_macros): Remove.
2560         (~scoped_free_pendings, get_macro_table, prepare_for_building)
2561         (reset_symtab_globals, end_symtab_get_static_block)
2562         (end_symtab_with_blockvector, augment_type_symtab)
2563         (buildsym_init): Update.
2564
2565 2018-07-16  Tom Tromey  <tom@tromey.com>
2566
2567         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
2568         parameter.
2569         (buildsym_compunit::set_last_source_file): New method.
2570         <m_last_source_file>: New member.
2571         (prepare_for_building): Remove "name" parameter.
2572         (start_symtab, restart_symtab, reset_symtab_globals): Update.
2573         (last_source_file): Remove.
2574         (set_last_source_file, get_last_source_file): Update.
2575
2576 2018-07-16  Tom Tromey  <tom@tromey.com>
2577
2578         * buildsym.c (prepare_for_building): Add assert.
2579
2580 2018-07-16  Tom Tromey  <tom@tromey.com>
2581
2582         * buildsym.c (~buildsym_compunit): Update.
2583         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
2584         (start_subfile, patch_subfile_names)
2585         (end_symtab_with_blockvector): Update.
2586
2587 2018-07-16  Tom Tromey  <tom@tromey.com>
2588
2589         * buildsym.c (struct buildsym_compunit): Add constructor,
2590         destructor, initializers.
2591         (start_buildsym_compunit): Remove.
2592         (free_buildsym_compunit): Use "delete".
2593         (start_symtab, restart_symtab): Use "new".
2594
2595 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
2596
2597         * symfile.c (set_objfile_default_section_offset): Remove struct
2598         keyword.
2599
2600 2018-07-14  Stafford Horne  <shorne@gmail.com>
2601
2602         * (Responsible Maintainers): Add myself as or1k maintainer.
2603
2604 2018-07-13  Tom Tromey  <tom@tromey.com>
2605
2606         * symfile.c (set_objfile_default_section_offset): Use extra braces
2607         around initializer.
2608
2609 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2610
2611         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
2612         non-branching basr.
2613
2614 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2615
2616         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2617         unittests/cli-utils-selftests.c
2618         * unittests/cli-utils-selftests.c: New file.
2619
2620 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2621
2622         * NEWS: Mention new commands. Mention change to 'thread apply'.
2623
2624 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2625
2626         * thread.c (thr_try_catch_cmd): New function.
2627         (thread_apply_all_command): Handle qcs flags.
2628         (thread_apply_command): Handle qcs flags.
2629         (taas_command): New function.
2630         (tfaas_command): New function.
2631         (_initialize_thread): Update to setup the new commands 'taas
2632         and 'tfaas'. Change doc string for 'thread apply'.
2633
2634 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2635
2636         * stack.c: (trailing_outermost_frame): New function, mostly
2637         extracted from backtrace_command_1.
2638         (leading_innermost_frame): New function.
2639         (backtrace_command_1): Update to call trailing_outermost_frame.
2640         (frame_apply_command_count): New function.
2641         (frame_apply_level_command): New function.
2642         (frame_apply_all_command): New function.
2643         (frame_apply_command): New function.
2644         (faas_command): New function.
2645         (frame_cmd_list): New variable.
2646         (_initialize_stack): Update to setup the new commands 'frame apply'
2647         and 'faas'.
2648
2649 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2650
2651         * cli-utils.c (number_or_range_parser::get_number): Only handle
2652         numbers or convenience var as numbers.
2653         (parse_flags): New function.
2654         (parse_flags_qcs): New function.
2655         (number_or_range_parser::finished): Ensure parsing end is detected
2656         before end of string.
2657         * cli-utils.h (parse_flags): New function.
2658         (parse_flags_qcs): New function.
2659         (number_or_range_parser): Remove m_finished bool.
2660         (number_or_range_parser::skip_range): Set m_in_range to false.
2661
2662 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
2663
2664         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
2665         on Windows.
2666
2667 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
2668             Jan Kratochvil  <jan.kratochvil@redhat.com>
2669             Paul Fertser  <fercerpav@gmail.com>
2670             Tsutomu Seki  <sekiriki@gmail.com>
2671             Pedro Alves  <palves@redhat.com>
2672
2673         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2674         'unittests/parse-connection-spec-selftests.c'.
2675         (COMMON_SFILES): Add 'common/netstuff.c'.
2676         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
2677         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
2678         * common/netstuff.c: New file.
2679         * common/netstuff.h: New file.
2680         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
2681         (wait_for_connect): Update comment.  New parameter
2682         'gdb::optional<int> sock' instead of 'struct serial *scb'.
2683         Use 'sock' directly instead of 'scb->fd'.
2684         (try_connect): New function, with code from 'net_open'.
2685         (net_open): Rewrite main loop to deal with multiple
2686         sockets/addresses.  Handle IPv6-style hostnames; implement
2687         support for IPv6 connections.
2688         * unittests/parse-connection-spec-selftests.c: New file.
2689
2690 2018-07-11  Pedro Alves  <palves@redhat.com>
2691
2692         PR gdb/23377
2693         * remote.c (remote_target::remote_detach_pid): Call
2694         set_current_process.
2695
2696 2018-07-11  Pedro Alves  <palves@redhat.com>
2697
2698         * h8300-tdep.c (h8300_gdbarch_init): Remove
2699         set_gdbarch_ecoff_reg_to_regnum calls.
2700
2701 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
2702
2703         PR c++/23373
2704         * c-typeprint.c (c_type_print_base_struct_union): Don't print
2705         offsets/sizes for static members of a class/struct.
2706
2707 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
2708
2709         * target-descriptions.c (tdesc_register_bitsize): Rename.
2710         * target-descriptions.h (tdesc_register_bitsize): Likewise.
2711         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
2712         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
2713
2714 2018-07-10  Tom Tromey  <tom@tromey.com>
2715
2716         * breakpoint.c (moribund_locations): Now static and a
2717         std::vector.
2718         (breakpoint_init_inferior, moribund_breakpoint_here_p)
2719         (build_bpstat_chain, update_global_location_list)
2720         (breakpoint_retire_moribund): Update.
2721         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
2722         VEC.
2723
2724 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2725
2726         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
2727         (riscv_register_reggroup_p): Use new function, remove unneeded
2728         parenthesis.
2729         (riscv_push_dummy_call): Extend assert to compare against xlen or
2730         flen based on register type.
2731
2732 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2733
2734         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
2735
2736 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
2737
2738         * remote.c (show_hardware_watchpoint_limit): New function.
2739         (show_hardware_watchpoint_length_limit): New function.
2740         (show_hardware_breakpoint_limit): New function.
2741         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
2742         where appropriate, update help text.
2743
2744 2018-07-09  Tom Tromey  <tom@tromey.com>
2745
2746         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
2747         (CLIBS): Don't mention NAT_CLIBS.
2748
2749 2018-07-09  Tom Tromey  <tom@tromey.com>
2750
2751         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
2752         (LIBGDB_OBS, clean mostlyclean): Update.
2753         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
2754
2755 2018-07-09  Tom Tromey  <tom@tromey.com>
2756
2757         * Makefile.in (%.c: %.y): Use ECHO_YACC.
2758         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
2759         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
2760
2761 2018-07-09  Tom Tromey  <tom@tromey.com>
2762
2763         * Makefile.in (ALLDEPFILES): Remove exec.c.
2764         (COMMON_OBS): Remove exec.o.
2765         (COMMON_SFILES): Add exec.c.
2766
2767 2018-07-09  Tom Tromey  <tom@tromey.com>
2768
2769         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
2770
2771 2018-07-09  Tom Tromey  <tom@tromey.com>
2772
2773         * Makefile.in (clean mostlyclean): Remove stamp-version.
2774         (version.c): Depend on stamp-version.
2775         (stamp-version): New rule, from version.c rule.
2776
2777 2018-07-09  Tom Tromey  <tom@tromey.com>
2778
2779         * Makefile.in (init.c): Depend on stamp-init.
2780         (stamp-init): New rule, from init.c rule.
2781         (clean mostlyclean): Remove stamp-init.
2782
2783 2018-07-09  Tom Tromey  <tom@tromey.com>
2784
2785         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
2786         SUBDIR_GCC_COMPILE_SRCS.
2787
2788 2018-07-09  Tom Tromey  <tom@tromey.com>
2789
2790         * Makefile.in (init.c): Remove some unused sed rules.
2791
2792 2018-07-09  Tom Tromey  <tom@tromey.com>
2793
2794         * Makefile.in (TSOBS): Remove.
2795         (INIT_FILES): Update.
2796         (LIBGDB_OBS): Update.
2797         (COMMON_SFILES): Add inflow.c.
2798         (SFILES): Remove inflow.c.
2799
2800 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
2801
2802         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
2803
2804 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
2805
2806         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
2807         get_saveloc_name, is_signal_frame_name, step_name,
2808         init_remote_name, create_addr_space_name,
2809         destroy_addr_space_name, search_unwind_table_name,
2810         find_dyn_list_name): Constify.
2811
2812 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
2813
2814         * darwin-nat.c (darwin_pthread_kill): New function.
2815         (darwin_resume_thread): Use darwin_pthread_kill.
2816
2817 2018-07-05  Tom de Vries  <tdevries@suse.de>
2818
2819         * macroexp.c (macro_buffer) <operator=>: New member function.
2820
2821 2018-07-04  Tom Tromey  <tom@tromey.com>
2822
2823         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
2824
2825 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
2826
2827         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
2828         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
2829         * maint.c: Likewise.
2830         * top.c: Likewise.
2831
2832 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
2833
2834         * NEWS: Create a new section for the next release branch.
2835         Rename the section of the current branch, now that it has
2836         been cut.
2837
2838 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
2839
2840         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
2841         * version.in: Bump version to 8.2.50.DATE-git.
2842
2843 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
2844             Pedro Alves  <palves@redhat.com>
2845
2846         * linux-nat.c (linux_init_ptrace): Rename to ...
2847         (linux_init_ptrace_procfs): ... this.  Call
2848         linux_proc_init_warnings.
2849         (linux_nat_target::post_attach)
2850         (linux_nat_target::post_startup_inferior): Adjust.
2851         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
2852         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
2853
2854 2018-07-04  Tom de Vries  <tdevries@suse.de>
2855
2856         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
2857         check ...
2858         (read_comp_unit_head): ... here.
2859
2860 2018-07-03  Tom Tromey  <tom@tromey.com>
2861
2862         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
2863         (stop_tracing, tstatus_command)
2864         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
2865         (print_one_static_tracepoint_marker): Update.
2866         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
2867         std::vector.
2868         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
2869         VEC.
2870         (all_tracepoints, static_tracepoints_here): Return std::vector.
2871
2872 2018-07-03  Tom Tromey  <tom@tromey.com>
2873
2874         * common/ptid.c (ptid_equal): Remove.
2875         * common/ptid.h (ptid_equal): Don't declare.
2876         * ada-tasks.c: Update.
2877         * breakpoint.c: Update.
2878         * common/agent.c: Update.
2879         * corelow.c: Update.
2880         * darwin-nat-info.c: Update.
2881         * darwin-nat.c: Update.
2882         * dcache.c: Update.
2883         * dtrace-probe.c: Update.
2884         * dummy-frame.c: Update.
2885         * fbsd-nat.c: Update.
2886         * frame.c: Update.
2887         * gdbthread.h: Update.
2888         * gnu-nat.c: Update.
2889         * go32-nat.c: Update.
2890         * inf-loop.c: Update.
2891         * inf-ptrace.c: Update.
2892         * infcall.c: Update.
2893         * infcmd.c: Update.
2894         * inflow.c: Update.
2895         * infrun.c: Update.
2896         * linux-fork.c: Update.
2897         * linux-nat.c: Update.
2898         * linux-thread-db.c: Update.
2899         * mi/mi-cmd-var.c: Update.
2900         * mi/mi-interp.c: Update.
2901         * mi/mi-main.c: Update.
2902         * nto-procfs.c: Update.
2903         * ppc-linux-tdep.c: Update.
2904         * procfs.c: Update.
2905         * python/py-inferior.c: Update.
2906         * python/py-record-btrace.c: Update.
2907         * python/py-record.c: Update.
2908         * ravenscar-thread.c: Update.
2909         * regcache.c: Update.
2910         * remote-sim.c: Update.
2911         * remote.c: Update.
2912         * sol-thread.c: Update.
2913         * solib.c: Update.
2914         * target.c: Update.
2915         * tui/tui-stack.c: Update.
2916         * varobj.c: Update.
2917         * windows-nat.c: Update.
2918         * windows-tdep.c: Update.
2919
2920 2018-07-03  Tom Tromey  <tom@tromey.com>
2921
2922         * common/ptid.c (ptid_match): Remove.
2923         * common/ptid.h (ptid_match): Don't declare.
2924         * fbsd-nat.c: Update.
2925         * infcmd.c: Update.
2926         * infrun.c: Update.
2927         * linux-nat.c: Update.
2928         * record-btrace.c: Update.
2929         * regcache.c: Update.
2930         * remote.c: Update.
2931
2932 2018-07-03  Tom Tromey  <tom@tromey.com>
2933
2934         * common/ptid.c (ptid_tid_p): Remove.
2935         * common/ptid.h (ptid_tid_p): Don't declare.
2936         * sol-thread.c: Update.
2937
2938 2018-07-03  Tom Tromey  <tom@tromey.com>
2939
2940         * common/ptid.c (ptid_lwp_p): Remove.
2941         * common/ptid.h (ptid_lwp_p): Don't declare.
2942         * fbsd-nat.c: Update.
2943         * linux-nat.c: Update.
2944         * nat/linux-procfs.c: Update.
2945         * nat/x86-linux-dregs.c: Update.
2946         * sol-thread.c: Update.
2947
2948 2018-07-03  Tom Tromey  <tom@tromey.com>
2949
2950         * common/ptid.c (ptid_is_pid): Remove.
2951         * common/ptid.h (ptid_is_pid): Don't declare.
2952         * infrun.c: Update.
2953         * linux-nat.c: Update.
2954         * mi/mi-interp.c: Update.
2955         * remote.c: Update.
2956         * thread.c: Update.
2957
2958 2018-07-03  Tom Tromey  <tom@tromey.com>
2959
2960         * common/ptid.c (ptid_get_tid): Remove.
2961         * common/ptid.h (ptid_get_tid): Don't declare.
2962         * ada-tasks.c: Update.
2963         * aix-thread.c: Update.
2964         * bsd-uthread.c: Update.
2965         * darwin-nat.c: Update.
2966         * fbsd-nat.c: Update.
2967         * i386-darwin-nat.c: Update.
2968         * infrun.c: Update.
2969         * linux-tdep.c: Update.
2970         * nto-procfs.c: Update.
2971         * ppc-ravenscar-thread.c: Update.
2972         * python/py-infthread.c: Update.
2973         * ravenscar-thread.c: Update.
2974         * sol-thread.c: Update.
2975         * sparc-ravenscar-thread.c: Update.
2976         * windows-nat.c: Update.
2977
2978 2018-07-03  Tom Tromey  <tom@tromey.com>
2979
2980         * common/ptid.c (ptid_get_lwp): Remove.
2981         * common/ptid.h (ptid_get_lwp): Don't declare.
2982         * aarch64-linux-nat.c: Update.
2983         * ada-tasks.c: Update.
2984         * aix-thread.c: Update.
2985         * amd64-linux-nat.c: Update.
2986         * arm-linux-nat.c: Update.
2987         * corelow.c: Update.
2988         * fbsd-nat.c: Update.
2989         * fbsd-tdep.c: Update.
2990         * gnu-nat.c: Update.
2991         * i386-cygwin-tdep.c: Update.
2992         * i386-gnu-nat.c: Update.
2993         * i386-linux-nat.c: Update.
2994         * ia64-linux-nat.c: Update.
2995         * inf-ptrace.c: Update.
2996         * infrun.c: Update.
2997         * linux-fork.c: Update.
2998         * linux-nat.c: Update.
2999         * linux-tdep.c: Update.
3000         * linux-thread-db.c: Update.
3001         * mips-linux-nat.c: Update.
3002         * nat/aarch64-linux-hw-point.c: Update.
3003         * nat/aarch64-linux.c: Update.
3004         * nat/linux-btrace.c: Update.
3005         * nat/linux-osdata.c: Update.
3006         * nat/linux-procfs.c: Update.
3007         * nat/x86-linux-dregs.c: Update.
3008         * obsd-nat.c: Update.
3009         * ppc-fbsd-nat.c: Update.
3010         * ppc-linux-nat.c: Update.
3011         * procfs.c: Update.
3012         * python/py-infthread.c: Update.
3013         * ravenscar-thread.c: Update.
3014         * remote.c: Update.
3015         * s390-linux-nat.c: Update.
3016         * sol-thread.c: Update.
3017         * sol2-tdep.c: Update.
3018         * spu-linux-nat.c: Update.
3019         * x86-linux-nat.c: Update.
3020         * xtensa-linux-nat.c: Update.
3021
3022 2018-07-03  Tom Tromey  <tom@tromey.com>
3023
3024         * common/ptid.c (ptid_get_pid): Remove.
3025         * common/ptid.h (ptid_get_pid): Don't declare.
3026         * aarch64-linux-nat.c: Update.
3027         * ada-lang.c: Update.
3028         * aix-thread.c: Update.
3029         * alpha-bsd-nat.c: Update.
3030         * amd64-fbsd-nat.c: Update.
3031         * amd64-linux-nat.c: Update.
3032         * arm-linux-nat.c: Update.
3033         * arm-nbsd-nat.c: Update.
3034         * auxv.c: Update.
3035         * break-catch-syscall.c: Update.
3036         * breakpoint.c: Update.
3037         * bsd-uthread.c: Update.
3038         * corelow.c: Update.
3039         * ctf.c: Update.
3040         * darwin-nat.c: Update.
3041         * fbsd-nat.c: Update.
3042         * fbsd-tdep.c: Update.
3043         * gcore.c: Update.
3044         * gnu-nat.c: Update.
3045         * hppa-nbsd-nat.c: Update.
3046         * hppa-obsd-nat.c: Update.
3047         * i386-fbsd-nat.c: Update.
3048         * ia64-linux-nat.c: Update.
3049         * inf-ptrace.c: Update.
3050         * infcmd.c: Update.
3051         * inferior.c: Update.
3052         * inferior.h: Update.
3053         * inflow.c: Update.
3054         * infrun.c: Update.
3055         * linux-fork.c: Update.
3056         * linux-nat.c: Update.
3057         * linux-tdep.c: Update.
3058         * linux-thread-db.c: Update.
3059         * m68k-bsd-nat.c: Update.
3060         * mi/mi-interp.c: Update.
3061         * mi/mi-main.c: Update.
3062         * mips-linux-nat.c: Update.
3063         * mips-nbsd-nat.c: Update.
3064         * mips64-obsd-nat.c: Update.
3065         * nat/aarch64-linux-hw-point.c: Update.
3066         * nat/aarch64-linux.c: Update.
3067         * nat/linux-btrace.c: Update.
3068         * nat/linux-osdata.c: Update.
3069         * nat/linux-procfs.c: Update.
3070         * nat/x86-linux-dregs.c: Update.
3071         * nto-procfs.c: Update.
3072         * obsd-nat.c: Update.
3073         * ppc-linux-nat.c: Update.
3074         * ppc-nbsd-nat.c: Update.
3075         * ppc-obsd-nat.c: Update.
3076         * proc-service.c: Update.
3077         * procfs.c: Update.
3078         * python/py-inferior.c: Update.
3079         * python/py-infthread.c: Update.
3080         * ravenscar-thread.c: Update.
3081         * record.c: Update.
3082         * remote-sim.c: Update.
3083         * remote.c: Update.
3084         * rs6000-nat.c: Update.
3085         * s390-linux-nat.c: Update.
3086         * sh-nbsd-nat.c: Update.
3087         * sol-thread.c: Update.
3088         * sparc-nat.c: Update.
3089         * sparc64-tdep.c: Update.
3090         * spu-linux-nat.c: Update.
3091         * spu-tdep.c: Update.
3092         * target-debug.h: Update.
3093         * target.c: Update.
3094         * thread.c: Update.
3095         * tid-parse.c: Update.
3096         * tracefile-tfile.c: Update.
3097         * vax-bsd-nat.c: Update.
3098         * windows-nat.c: Update.
3099         * x86-linux-nat.c: Update.
3100         * x86-nat.c: Update.
3101
3102 2018-07-03  Tom Tromey  <tom@tromey.com>
3103
3104         * common/ptid.c (pid_to_ptid): Remove.
3105         * common/ptid.h (pid_to_ptid): Don't declare.
3106         * aix-thread.c: Update.
3107         * arm-linux-nat.c: Update.
3108         * common/ptid.c: Update.
3109         * common/ptid.h: Update.
3110         * corelow.c: Update.
3111         * ctf.c: Update.
3112         * darwin-nat.c: Update.
3113         * fbsd-nat.c: Update.
3114         * fork-child.c: Update.
3115         * gnu-nat.c: Update.
3116         * go32-nat.c: Update.
3117         * inf-ptrace.c: Update.
3118         * infcmd.c: Update.
3119         * inferior.c: Update.
3120         * infrun.c: Update.
3121         * linux-fork.c: Update.
3122         * linux-nat.c: Update.
3123         * nat/aarch64-linux-hw-point.c: Update.
3124         * nat/fork-inferior.c: Update.
3125         * nat/x86-linux-dregs.c: Update.
3126         * nto-procfs.c: Update.
3127         * obsd-nat.c: Update.
3128         * procfs.c: Update.
3129         * progspace.c: Update.
3130         * remote.c: Update.
3131         * rs6000-nat.c: Update.
3132         * s390-linux-nat.c: Update.
3133         * sol-thread.c: Update.
3134         * spu-linux-nat.c: Update.
3135         * target.c: Update.
3136         * top.c: Update.
3137         * tracefile-tfile.c: Update.
3138         * windows-nat.c: Update.
3139
3140 2018-07-03  Tom Tromey  <tom@tromey.com>
3141
3142         * common/ptid.h (ptid_build): Don't declare.
3143         * common/ptid.c (ptid_build): Remove.
3144         * aix-thread.c: Update.
3145         * bsd-kvm.c: Update.
3146         * bsd-uthread.c: Update.
3147         * common/agent.c: Update.
3148         * common/ptid.c: Update.
3149         * common/ptid.h: Update.
3150         * corelow.c: Update.
3151         * darwin-nat.c: Update.
3152         * fbsd-nat.c: Update.
3153         * gnu-nat.c: Update.
3154         * linux-fork.c: Update.
3155         * linux-nat.c: Update.
3156         * linux-thread-db.c: Update.
3157         * nat/linux-osdata.c: Update.
3158         * nat/linux-procfs.c: Update.
3159         * nto-procfs.c: Update.
3160         * obsd-nat.c: Update.
3161         * proc-service.c: Update.
3162         * procfs.c: Update.
3163         * ravenscar-thread.c: Update.
3164         * remote-sim.c: Update.
3165         * remote.c: Update.
3166         * sol-thread.c: Update.
3167         * target.c: Update.
3168         * windows-nat.c: Update.
3169
3170 2018-07-03  Tom Tromey  <tom@tromey.com>
3171
3172         * infrun.c (follow_exec): Use exit_inferior_silent.
3173         * inferior.c (exit_inferior_num_silent): Remove.
3174         * inferior.h (exit_inferior_num_silent): Don't declare.
3175
3176 2018-07-03  Tom Tromey  <tom@tromey.com>
3177
3178         PR cli/23340:
3179         * darwin-nat.c (darwin_attach_pid): Reset inferior and
3180         inferior_ptid on error.
3181
3182 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
3183             Simon Marchi  <simon.marchi@polymtl.ca>
3184
3185         PR tdep/8282
3186         * disasm.h (gdb_disassembler): Add
3187         `m_disassembler_options_holder'. member
3188         * disasm.c (get_all_disassembler_options): New function.
3189         (gdb_disassembler::gdb_disassembler): Use it.
3190         (gdb_buffered_insn_length_init_dis): Likewise.
3191         (gdb_buffered_insn_length): Adjust accordingly.
3192         (set_disassembler_options): Handle options with arguments.
3193         (show_disassembler_options_sfunc): Likewise.  Add a leading new
3194         line if showing options with descriptions.
3195         (disassembler_options_completer): Adapt to using the
3196         `disasm_options_and_args_t' structure.
3197         * mips-tdep.c (mips_disassembler_options): New variable.
3198         (mips_disassembler_options_o32): Likewise.
3199         (mips_disassembler_options_n32): Likewise.
3200         (mips_disassembler_options_n64): Likewise.
3201         (gdb_print_insn_mips): Don't set `disassembler_options'.
3202         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
3203         functions.
3204         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
3205         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
3206         `gdbarch_disassembler_options_implicit' and
3207         `gdbarch_valid_disassembler_options'.
3208         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
3209         `disasm_options_and_args_t' structure.
3210         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
3211         method.
3212         (valid_disassembler_options): Switch from `disasm_options_t' to
3213         the `disasm_options_and_args_t' structure.
3214         * NEWS: Document `set disassembler-options' support for the MIPS
3215         target.
3216         * gdbarch.h: Regenerate.
3217         * gdbarch.c: Regenerate.
3218
3219 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
3220
3221         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
3222
3223 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
3224
3225         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
3226         parameter in call to amd64_target_description.
3227         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
3228         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
3229         (amd64fbsd_init_abi): Likewise.
3230         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
3231         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
3232         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
3233         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
3234
3235 2018-06-29  Pedro Alves  <palves@redhat.com>
3236
3237         * gdb/amd64-tdep.h (amd64_create_target_description): Add
3238         "segments" parameter.
3239         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
3240         (_initialize_amd64_tdep): Update call to
3241         amd64_create_target_description.
3242         (amd64_target_description): Add "segments" parameter.  Adjust
3243         the implementation to use it.
3244         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
3245         call to amd64_create_target_description.
3246         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
3247         * gdb/arch/amd64.h (amd64_create_target_description): Add
3248         "segments" register.
3249         * gdb/arch/amd64.c (amd64_create_target_description): Add
3250         "segments" parameter.  Call create_feature_i386_64bit_segments
3251         only if SEGMENTS is true.
3252         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
3253         call to amd64_create_target_description.
3254
3255 2018-06-29  Pedro Alves  <palves@redhat.com>
3256
3257         * thread.c (thread_target_id_str): New, factored out from ...
3258         (print_thread_info_1): ... here.  Use it to compute the max
3259         "Target Id" column width.
3260
3261 2018-06-29  Pedro Alves  <palves@redhat.com>
3262
3263         * remote.c (remote_target::extra_thread_info): Delete
3264         'display_buf' and 'n' locals.  from the cache, regardless of
3265         packet mechanims is in use.  Use cache for qThreadExtra and qP
3266         methods too.
3267
3268 2018-06-29  Pedro Alves  <palves@redhat.com>
3269
3270         * blockframe.c (find_pc_sect_containing_function): New function.
3271         * breakpoint.c (print_breakpoint_location): Don't call
3272         find_pc_sect_function.
3273         * linespec.c (create_sals_line_offset): Record the location's
3274         symbol in the sal.
3275         * linespec.c (convert_address_location_to_sals): Fill in sal's
3276         symbol with find_pc_sect_containing_function.
3277         * symtab.c (find_function_start_sal): Rename to ...
3278         (find_function_start_sal_1): ... this.
3279         (find_function_start_sal): Reimplement as wrapper around
3280         find_function_start_sal_1, and use
3281         find_pc_sect_containing_function to fill in the sal's symbol.
3282         (find_function_start_sal(symbol*, bool)): Adjust.
3283         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
3284         comments.
3285         (find_pc_sect_containing_function): Declare.
3286
3287 2018-06-29  Pedro Alves  <palves@redhat.com>
3288
3289         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
3290         true if the the location has no symbol.
3291
3292 2018-06-28  Tom Tromey  <tom@tromey.com>
3293
3294         * NEWS: Mention --enable-codesign.
3295         * silent-rules.mk (ECHO_SIGN): New variable.
3296         * configure.ac: Add --enable-codesign.
3297         * configure: Rebuild.
3298         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
3299         (gdb$(EXEEXT)): Optionally invoke codesign.
3300
3301 2018-06-28  Pedro Alves  <palves@redhat.com>
3302
3303         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
3304         comments.
3305         (switch_to_thread_no_regs): Adjust comment.
3306         * infcmd.c (stop_pc): Delete.
3307         (post_create_inferior, info_program_command): Replace references
3308         to stop_pc with references to thread_info->suspend.stop_pc.
3309         * inferior.h (stop_pc): Delete declaration.
3310         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
3311         (handle_inferior_event_1, handle_signal_stop)
3312         (process_event_stop_test, keep_going_stepped_thread)
3313         (handle_step_into_function, handle_step_into_function_backward)
3314         (print_stop_location): Replace references to stop_pc with
3315         references to thread_info->suspend.stop_pc.
3316         (struct infcall_suspend_state) <stop_pc>: Delete field.
3317         (save_infcall_suspend_state, restore_infcall_suspend_state):
3318         Remove references to inf_stat->stop_pc.
3319         * linux-fork.c (fork_load_infrun_state): Likewise.
3320         * record-btrace.c (record_btrace_set_replay): Likewise.
3321         * record-full.c (record_full_goto_entry): Likewise.
3322         * remote.c (print_one_stopped_thread): Likewise.
3323         * target.c (target_resume): Extend comment.
3324         * thread.c (set_executing_thread): New.
3325         (set_executing): Use it.
3326         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
3327         Remove references to stop_pc.
3328
3329 2018-06-28  Pedro Alves  <palves@redhat.com>
3330
3331         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
3332         Moving fetching stop_pc until after ecs->event_thread is refreshed.
3333
3334 2018-06-28  Tom Tromey  <tom@tromey.com>
3335
3336         * coffread.c (coff_symfile_finish): Update.
3337         * xcoffread.c (xcoff_symfile_finish): Update.
3338         * elfread.c (elf_symfile_finish): Update.
3339         * symfile.h (dwarf2_free_objfile): Don't declare.
3340         * dwarf2read.c (_initialize_dwarf2_read): Use
3341         register_objfile_data_with_cleanup.
3342         (dwarf2_free_objfile): Now static.  Change signature.
3343
3344 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3345
3346         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
3347         option "-o" to add-symbol-file-load to add an offset to each
3348         section's load address.
3349         * symfile.c (set_objfile_default_section_offset): New function.
3350
3351 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3352
3353         * symfile.c (add_symbol_file_command): Make sure that sections
3354         with the same name are sorted in the same order.
3355
3356 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3357
3358         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
3359         require the second argument.  If omitted, load sections at the
3360         addresses specified in the file.
3361
3362 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3363
3364         * symfile.c (symbol_file_command, symbol_file_add_main_1)
3365         (_initialize_symfile): Add option "-o" to symbol-file to add an
3366         offset to each section of the symbol file.
3367
3368 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3369
3370         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
3371
3372 2018-06-27  Tom Tromey  <tom@tromey.com>
3373
3374         * stack.c (_initialize_stack): Update "func" help text.
3375
3376 2018-06-27  Tom Tromey  <tom@tromey.com>
3377
3378         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
3379         std::vector.
3380         (unwind_infopy_str, pyuw_create_unwind_info)
3381         (unwind_infopy_add_saved_register, pyuw_sniffer)
3382         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
3383         Update.
3384         (struct saved_reg): Add constructor.
3385         <value>: Now a gdbpy_ref<>.
3386
3387 2018-06-27  Tom Tromey  <tom@tromey.com>
3388
3389         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
3390
3391 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3392
3393         * gdb-gdb.py.in: Format using autopep8.
3394
3395 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3396
3397         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
3398         (type_lookup_function): Recognize CORE_ADDR values.
3399
3400 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3401
3402         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
3403         print tag_name.
3404
3405 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3406
3407         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
3408         <__lt__>: Add.
3409
3410 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3411
3412         * gdb-gdb.py: Move to...
3413         * gdb-gdb.py.in: ... here.
3414         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
3415         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
3416         dependencies.
3417         (distclean): Remove gdb-gdb.py when cleaning.
3418         (gdb-gdb.py, gdb-gdb.gdb): New rules.
3419         * configure: Re-generate.
3420
3421 2018-06-27  Pedro Alves  <palves@redhat.com>
3422
3423         * proc-service.c (get_ps_regcache): New.
3424         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3425         (ps_lsetfpregs): Use it.
3426
3427 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
3428
3429         PR gdb/21695
3430         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
3431         (dwarf_decode_lines_1): Adjust.
3432
3433 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3434
3435         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
3436         override.
3437         <info_proc>: Likewise.
3438
3439 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
3440
3441         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
3442         to windows_fetch_one_register, and only handle the case of
3443         fetching one register.  Move the code that reloads the context
3444         and iterates over all registers if R is negative to...
3445         (windows_nat_target::fetch_registers): ... here.
3446         (do_windows_store_inferior_registers): Rename to
3447         windows_store_one_register, and only handle the case of storing
3448         one register.  Move the code that handles the case where r is
3449         negative to...
3450         (windows_nat_target::store_registers) ... here.
3451
3452 2018-06-26  Tom Tromey  <tom@tromey.com>
3453
3454         PR rust/22574:
3455         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
3456         * rust-lang.c (rust_print_struct_def): Add podata parameter.
3457         Update.
3458         (rust_internal_print_type): Add podata parameter.
3459         (rust_print_type): Update.
3460
3461 2018-06-26  Tom Tromey  <tom@tromey.com>
3462
3463         * typeprint.h (struct print_offset_data) <update, finish,
3464         maybe_print_hole>: New methods.
3465         <indentation>: New constant.
3466         * typeprint.c (print_offset_data::indentation): Define.
3467         (print_offset_data::maybe_print_hole, print_offset_data::update)
3468         (print_offset_data::finish): Move from c-typeprint.c and rename.
3469         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
3470         (print_spaces_filtered_with_print_options): Update.
3471         (c_print_type_union_field_offset, maybe_print_hole)
3472         (c_print_type_struct_field_offset): Move to typeprint.c and
3473         rename.
3474         (c_type_print_base_struct_union): Update.
3475
3476 2018-06-25  Pedro Alves  <palves@redhat.com>
3477
3478         * gdbthread.h (thread_info_ref, delete_thread)
3479         (delete_thread_silent, first_thread_of_inferior)
3480         (any_thread_of_inferior, switch_to_thread)
3481         (enable_thread_stack_temporaries)
3482         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3483         (get_last_thread_stack_temporary)
3484         (value_in_thread_stack_temporaries, can_access_registers_thread):
3485         Spell out "struct thread_info" instead of just "thread_info".
3486         * inferior.h (notice_new_inferior): Likewise.
3487
3488 2018-06-25  Pedro Alves  <palves@redhat.com>
3489
3490         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3491         pass thread_info pointer to delete_thread.
3492         (windows_nat_target::detach): Pass inferior pointer to
3493         detach_inferior.
3494         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
3495         delete_thread.
3496         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
3497         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
3498         and pass a thread_info pointer to delete_thread.
3499         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
3500         pass thread_info pointer to delete_thread.
3501         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
3502         delete_thread_silent call.
3503         * procfs.c (procfs_target::detach): Pass inferior pointer to
3504         detach_inferior.
3505         (procfs_target::wait): Pass thread_info pointer to delete_thread.
3506         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
3507         delete_thread_silent call.
3508         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3509         pass thread_info pointer to delete_thread.
3510         (windows_nat_target::detach): Pass inferior pointer to
3511         delete_inferior.
3512
3513 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
3514
3515         * regcache.c (readable_regcache::read_part): Fix asserts.
3516         (reg_buffer::raw_collect_part): New function.
3517         (regcache::write_part): Fix asserts.
3518         (reg_buffer::raw_supply_part): New function.
3519         (regcache::transfer_regset_register): New helper function.
3520         (regcache::transfer_regset): Call new functions.
3521         (regcache_supply_regset): Use gdb_byte*.
3522         (regcache::supply_regset): Likewise.
3523         (regcache_collect_regset): Likewise.
3524         (regcache::collect_regset): Likewise.
3525         * regcache.h (reg_buffer::raw_collect_part): New declaration.
3526         (reg_buffer::raw_supply_part): Likewise.
3527         (regcache::transfer_regset_register): Likewise.
3528         (regcache::transfer_regset): Use gdb_byte*.
3529
3530 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
3531
3532         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
3533
3534 2018-06-21  Pedro Alves  <palves@redhat.com>
3535
3536         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
3537         instead of a ptid_t.  All callers adjusted.
3538         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
3539         adjusted.
3540         (print_ada_task_info, display_current_task_id, task_command_1):
3541         Adjust.
3542         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
3543         inferior_thread.
3544         (breakpoint_kind): Adjust.
3545         (remove_breakpoints_pid): Rename to ...
3546         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
3547         pointer.  All callers adjusted.
3548         (bpstat_clear_actions): Use inferior_thread.
3549         (get_bpstat_thread): New.
3550         (bpstat_do_actions): Use it.
3551         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
3552         to take a thread_info pointer.  All callers adjusted.
3553         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
3554         (breakpoint_re_set_thread): Use inferior_thread.
3555         * breakpoint.h (struct inferior): Forward declare.
3556         (bpstat_stop_status): Update.
3557         (remove_breakpoints_pid): Delete.
3558         (remove_breakpoints_inf): New.
3559         * bsd-uthread.c (bsd_uthread_target::wait)
3560         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
3561         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
3562         (maint_btrace_packet_history_cmd)
3563         (maint_btrace_clear_packet_history_cmd): Adjust.
3564         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
3565         inferior_thread.
3566         * cli/cli-interp.c: Include "inferior.h".
3567         * common/refcounted-object.h (struct
3568         refcounted_object_ref_policy): New.
3569         * compile/compile-object-load.c: Include gdbthread.h.
3570         (store_regs): Use inferior_thread.
3571         * corelow.c (core_target::close): Use current_inferior.
3572         (core_target_open): Adjust to use first_thread_of_inferior and use
3573         the current inferior.
3574         * ctf.c (ctf_target::close): Adjust to use current_inferior.
3575         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
3576         <thread>: ... this new field.  All references adjusted.
3577         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
3578         Take a thread_info pointer instead of a ptid_t.
3579         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
3580         (dummy_frame_discard, register_dummy_frame_dtor): Take a
3581         thread_info pointer instead of a ptid_t.
3582         * elfread.c: Include "inferior.h".
3583         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
3584         Use inferior_thread.
3585         * eval.c (evaluate_subexp): Likewise.
3586         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
3587         inferior_thread.
3588         * gdb_proc_service.h (struct thread_info): Forward declare.
3589         (struct ps_prochandle) <ptid>: Delete, replaced by ...
3590         <thread>: ... this new field.  All references adjusted.
3591         * gdbarch.h, gdbarch.c: Regenerate.
3592         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
3593         'thread' parameter.  All implementations and callers adjusted.
3594         * gdbthread.h (thread_info) <set_running>: New method.
3595         (delete_thread, delete_thread_silent): Take a thread_info pointer
3596         instead of a ptid.
3597         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
3598         (first_thread_of_process): Delete, replaced by ...
3599         (first_thread_of_inferior): ... this new function.  All callers
3600         adjusted.
3601         (any_live_thread_of_process): Delete, replaced by ...
3602         (any_live_thread_of_inferior): ... this new function.  All callers
3603         adjusted.
3604         (switch_to_thread, switch_to_no_thread): Declare.
3605         (is_executing): Delete.
3606         (enable_thread_stack_temporaries): Update comment.
3607         <enable_thread_stack_temporaries>: Take a thread_info pointer
3608         instead of a ptid_t.  Incref the thread.
3609         <~enable_thread_stack_temporaries>: Decref the thread.
3610         <m_ptid>: Delete
3611         <m_thr>: New.
3612         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3613         (get_last_thread_stack_temporary)
3614         (value_in_thread_stack_temporaries, can_access_registers_thread):
3615         Take a thread_info pointer instead of a ptid_t.  All callers
3616         adjusted.
3617         * infcall.c (get_call_return_value): Use inferior_thread.
3618         (run_inferior_call): Work with thread pointers instead of ptid_t.
3619         (call_function_by_hand_dummy): Work with thread pointers instead
3620         of ptid_t.  Use thread_info_ref.
3621         * infcmd.c (proceed_thread_callback): Access thread's state
3622         directly.
3623         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
3624         access thread's state directly.
3625         (continue_command): Use inferior_thread.
3626         (info_program_command): Use find_thread_ptid and access thread
3627         state directly.
3628         (proceed_after_attach_callback): Use thread state directly.
3629         (notice_new_inferior): Take a thread_info pointer instead of a
3630         ptid_t.  All callers adjusted.
3631         (exit_inferior): Take an inferior pointer instead of a pid.  All
3632         callers adjusted.
3633         (exit_inferior_silent): New.
3634         (detach_inferior): Delete.
3635         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
3636         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
3637         (detach_inferior_command, kill_inferior_command): Use
3638         find_inferior_id instead of valid_gdb_inferior_id and
3639         gdb_inferior_id_to_pid.
3640         (inferior_command): Use inferior and thread pointers.
3641         * inferior.h (struct thread_info): Forward declare.
3642         (notice_new_inferior): Take a thread_info pointer instead of a
3643         ptid_t.  All callers adjusted.
3644         (detach_inferior): Delete declaration.
3645         (exit_inferior, exit_inferior_silent): Take an inferior pointer
3646         instead of a pid.  All callers adjusted.
3647         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
3648         (valid_gdb_inferior_id): Delete.
3649         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
3650         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
3651         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
3652         ...
3653         <inf>: ... this new field.
3654         <step_ptid>: Delete, replaced by ...
3655         <step_thread>: ... this new field.
3656         (get_displaced_stepping_state): Take an inferior pointer instead
3657         of a pid.  All callers adjusted.
3658         (displaced_step_in_progress_any_inferior): Adjust.
3659         (displaced_step_in_progress_thread): Take a thread pointer instead
3660         of a ptid_t.  All callers adjusted.
3661         (displaced_step_in_progress, add_displaced_stepping_state): Take
3662         an inferior pointer instead of a pid.  All callers adjusted.
3663         (get_displaced_step_closure_by_addr): Adjust.
3664         (remove_displaced_stepping_state): Take an inferior pointer
3665         instead of a pid.  All callers adjusted.
3666         (displaced_step_prepare_throw, displaced_step_prepare)
3667         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
3668         All callers adjusted.
3669         (start_step_over): Adjust.
3670         (infrun_thread_ptid_changed): Remove bit updating ptids in the
3671         displaced step queue.
3672         (do_target_resume): Adjust.
3673         (fetch_inferior_event): Use inferior_thread.
3674         (context_switch, get_inferior_stop_soon): Take an
3675         execution_control_state pointer instead of a ptid_t.  All callers
3676         adjusted.
3677         (switch_to_thread_cleanup): Delete.
3678         (stop_all_threads): Use scoped_restore_current_thread.
3679         * inline-frame.c: Include "gdbthread.h".
3680         (inline_state) <inline_state>: Take a thread pointer instead of a
3681         ptid_t.  All callers adjusted.
3682         <ptid>: Delete, replaced by ...
3683         <thread>: ... this new field.
3684         (find_inline_frame_state): Take a thread pointer instead of a
3685         ptid_t.  All callers adjusted.
3686         (skip_inline_frames, step_into_inline_frame)
3687         (inline_skipped_frames, inline_skipped_symbol): Take a thread
3688         pointer instead of a ptid_t.  All callers adjusted.
3689         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
3690         (inline_skipped_frames, inline_skipped_symbol): Likewise.
3691         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
3692         pointers directly.
3693         * linux-nat.c (get_detach_signal): Likewise.
3694         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
3695         (thread_db_notice_clone): Adjust.
3696         (thread_db_find_new_threads_silently)
3697         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
3698         a thread pointer instead of a ptid_t.  All callers adjusted.
3699         * mi/mi-cmd-var.c: Include "inferior.h".
3700         (mi_cmd_var_update_iter): Update to use thread pointers.
3701         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
3702         inferior directly.
3703         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
3704         out to ...
3705         (mi_output_running): ... this new function.
3706         (mi_on_resume_1): Adjust to use it.
3707         (mi_user_selected_context_changed): Adjust to use inferior_thread.
3708         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
3709         directly.
3710         (interrupt_thread_callback): : Adjust to use thread and inferior
3711         pointers.
3712         * proc-service.c: Include "gdbthread.h".
3713         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
3714         * progspace-and-thread.c: Include "inferior.h".
3715         * progspace.c: Include "inferior.h".
3716         * python/py-exitedevent.c (create_exited_event_object): Adjust to
3717         hold a reference to an inferior_object.
3718         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
3719         inferior_thread.
3720         * python/py-inferior.c (struct inferior_object): Give the type a
3721         tag name instead of a typedef.
3722         (python_on_normal_stop): No need to check if the current thread is
3723         listed.
3724         (inferior_to_inferior_object): Change return type to
3725         inferior_object.  All callers adjusted.
3726         (find_thread_object): Delete, bits factored out to ...
3727         (thread_to_thread_object): ... this new function.
3728         * python/py-infthread.c (create_thread_object): Use
3729         inferior_to_inferior_object.
3730         (thpy_is_stopped): Use thread pointer directly.
3731         (gdbpy_selected_thread): Use inferior_thread.
3732         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
3733         field, replaced with ...
3734         <thread>: ... this new field.  All users adjusted.
3735         (btpy_insn_or_gap_new): Drop const.
3736         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
3737         callers adjusted.
3738         * python/py-record.c: Include "gdbthread.h".
3739         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3740         a ptid_t.  All callers adjusted.
3741         (gdbpy_current_recording): Use inferior_thread.
3742         * python/py-record.h (recpy_record_object) <ptid>: Delete
3743         field, replaced with ...
3744         <thread>: ... this new field.  All users adjusted.
3745         (recpy_element_object) <ptid>: Delete
3746         field, replaced with ...
3747         <thread>: ... this new field.  All users adjusted.
3748         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3749         a ptid_t.  All callers adjusted.
3750         * python/py-threadevent.c: Include "gdbthread.h".
3751         (get_event_thread): Use thread_to_thread_object.
3752         * python/python-internal.h (struct inferior_object): Forward
3753         declare.
3754         (find_thread_object, find_inferior_object): Delete declarations.
3755         (thread_to_thread_object, inferior_to_inferior_object): New
3756         declarations.
3757         * record-btrace.c: Include "inferior.h".
3758         (require_btrace_thread): Use inferior_thread.
3759         (record_btrace_frame_sniffer)
3760         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
3761         (get_thread_current_frame): Use scoped_restore_current_thread and
3762         switch_to_thread.
3763         (get_thread_current_frame): Use thread pointer directly.
3764         (record_btrace_replay_at_breakpoint): Use thread's inferior
3765         pointer directly.
3766         * record-full.c: Include "inferior.h".
3767         * regcache.c: Include "gdbthread.h".
3768         (get_thread_arch_regcache): Use the inferior's address space
3769         directly.
3770         (get_thread_regcache, registers_changed_thread): New.
3771         * regcache.h (get_thread_regcache(thread_info *thread)): New
3772         overload.
3773         (registers_changed_thread): New.
3774         (remote_target) <remote_detach_1>: Swap order of parameters.
3775         (remote_add_thread): <remote_add_thread>: Return the new thread.
3776         (get_remote_thread_info(ptid_t)): New overload.
3777         (remote_target::remote_notice_new_inferior): Use thread pointers
3778         directly.
3779         (remote_target::process_initial_stop_replies): Use
3780         thread_info::set_running.
3781         (remote_target::remote_detach_1, remote_target::detach)
3782         (extended_remote_target::detach): Adjust.
3783         * stack.c (frame_show_address): Use inferior_thread.
3784         * target-debug.h (target_debug_print_thread_info_pp): New.
3785         * target-delegates.c: Regenerate.
3786         * target.c (default_thread_address_space): Delete.
3787         (memory_xfer_partial_1): Use current_inferior.
3788         (target_detach): Use current_inferior.
3789         (target_thread_address_space): Delete.
3790         (generic_mourn_inferior): Use current_inferior.
3791         * target.h (struct target_ops) <thread_address_space>: Delete.
3792         (target_thread_address_space): Delete.
3793         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
3794         pointers directly.
3795         (delete_thread_1, delete_thread, delete_thread_silent): Take a
3796         thread pointer instead of a ptid_t.  Adjust all callers.
3797         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
3798         (first_thread_of_process): Delete, replaced by ...
3799         (first_thread_of_inferior): ... this new function.  All callers
3800         adjusted.
3801         (any_thread_of_process): Rename to ...
3802         (any_thread_of_inferior): ... this, and take an inferior pointer.
3803         (any_live_thread_of_process): Rename to ...
3804         (any_live_thread_of_inferior): ... this, and take an inferior
3805         pointer.
3806         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3807         (value_in_thread_stack_temporaries)
3808         (get_last_thread_stack_temporary): Take a thread pointer instead
3809         of a ptid_t.  Adjust all callers.
3810         (thread_info::set_running): New.
3811         (validate_registers_access): Use inferior_thread.
3812         (can_access_registers_ptid): Rename to ...
3813         (can_access_registers_thread): ... this, and take a thread
3814         pointer.
3815         (print_thread_info_1): Adjust to compare thread pointers instead
3816         of ptids.
3817         (switch_to_no_thread, switch_to_thread): Make extern.
3818         (scoped_restore_current_thread::~scoped_restore_current_thread):
3819         Use m_thread pointer directly.
3820         (scoped_restore_current_thread::scoped_restore_current_thread):
3821         Use inferior_thread.
3822         (thread_command): Use thread pointer directly.
3823         (thread_num_make_value_helper): Use inferior_thread.
3824         * top.c (execute_command): Use inferior_thread.
3825         * tui/tui-interp.c: Include "inferior.h".
3826         * varobj.c (varobj_create): Use inferior_thread.
3827         (value_of_root_1): Use find_thread_global_id instead of
3828         global_thread_id_to_ptid.
3829
3830 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
3831
3832         * regcache.c (readable_regcache::read_part): Avoid memcpy when
3833         possible.
3834         (regcache::write_part): Likewise.
3835         (readable_regcache::cooked_read_part): Update comment.
3836         (readable_regcache::cooked_write_part): Likewise.
3837         * regcache.h: (readable_regcache::read_part): Likewise.
3838         (regcache::write_part): Likewise.
3839
3840 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
3841             Dirk Schubert  <dirk.schubert@arm.com>
3842
3843         * aarch64-linux-nat.c (post_attach): New.
3844         (aarch64_linux_nat_target::post_attach): Override post_attach to
3845         record the number of hardware debug registers.
3846
3847 2018-06-20  Tom Tromey  <tom@tromey.com>
3848
3849         * python/py-param.c (add_setshow_generic): Make parameters const.
3850         (parmpy_init): Update.
3851
3852 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
3853
3854         * regcache.h (regcache_cooked_read_ftype): Rename to...
3855         (register_read_ftype): ...this, change type to function_view.
3856         (class reg_buffer) <save>: Remove src parameter.
3857         (readonly_detached_regcache) <readonly_detached_regcache>: Make
3858         parameter non-const in first overload.  Remove src parameter in
3859         second overload.
3860         * regcache.c (do_cooked_read): Remove.
3861         (readonly_detached_regcache::readonly_detached_regcache): Make
3862         parameter non-const, adjust call to other constructor.
3863         (reg_buffer::save): Remove src parameter.
3864         * frame.c (do_frame_register_read): Remove.
3865         (frame_save_as_regcache): Use lambda function.
3866         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
3867         parameter to ppu2spu_data *.
3868         (ppu2spu_sniffer): Use lambda function.
3869
3870 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
3871
3872         * record-full.c (record_full_target::insert_breakpoint): Remove
3873         "struct" keyword, add const.
3874
3875 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
3876
3877         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
3878         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
3879         * configure.ac: Remove AC_PREREQ, add missing quoting.
3880         * gnulib/configure.ac: Modernize usage of
3881         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
3882         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
3883         (AUTOMAKE_VERSION): Bump to 1.15.1.
3884         * configure: Re-generate.
3885         * config.in: Re-generate.
3886         * aclocal.m4: Re-generate.
3887         * gnulib/aclocal.m4: Re-generate.
3888         * gnulib/config.in: Re-generate.
3889         * gnulib/configure: Re-generate.
3890         * gnulib/import/Makefile.in: Re-generate.
3891
3892 2018-06-19  Pedro Alves  <palves@redhat.com>
3893
3894         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
3895         (lookup_minimal_symbol_by_pc_section): ... here with
3896         gdb_assert_not_reached added.
3897
3898 2018-06-19  Pedro Alves  <palves@redhat.com>
3899
3900         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
3901         parameter with a block parameter.  Compare location's block symbol
3902         with the frame's block instead of addresses.
3903         (skip_inline_frames): Pass the current block instead of the
3904         frame's address.  Break out as soon as we determine the frame
3905         should not be skipped.
3906
3907 2018-06-18  Tom Tromey  <tom@tromey.com>
3908
3909         * solib-aix.c (solib_aix_get_section_offsets): Return
3910         unique_xmalloc_ptr.
3911         (solib_aix_solib_create_inferior_hook): Update.
3912
3913 2018-06-18  Tom Tromey  <tom@tromey.com>
3914
3915         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
3916
3917 2018-06-18  Tom Tromey  <tom@tromey.com>
3918
3919         * solib-frv.c (frv_relocate_main_executable): Use
3920         unique_xmalloc_ptr.
3921         * solib-dsbt.c (dsbt_relocate_main_executable): Use
3922         unique_xmalloc_ptr.
3923
3924 2018-06-18  Tom Tromey  <tom@tromey.com>
3925
3926         * objfiles.h (inhibit_section_map_updates): Update.
3927         (resume_section_map_updates, resume_section_map_updates_cleanup):
3928         Remove.
3929         * solib-svr4.c (svr4_handle_solib_event): Update.
3930         * objfiles.c (inhibit_section_map_updates): Return
3931         scoped_restore_tmpl<int>.
3932         (resume_section_map_updates, resume_section_map_updates_cleanup):
3933         Remove.
3934
3935 2018-06-18  Tom Tromey  <tom@tromey.com>
3936
3937         * valprint.h (read_string): Update.
3938         * valprint.c (read_string): Change type of "buffer".
3939         (val_print_string): Update.
3940         * python/py-value.c (valpy_string): Update.
3941         * language.h (struct language_defn) <la_get_string>: Change
3942         type of "buffer".
3943         (default_get_string, c_get_string): Update.
3944         * language.c (default_get_string): Change type of "buffer".
3945         * guile/scm-value.c (gdbscm_value_to_string): Update.
3946         * c-lang.c (c_get_string): Change type of "buffer".
3947
3948 2018-06-18  Tom Tromey  <tom@tromey.com>
3949
3950         * ser-mingw.c (struct pipe_state_destroyer): New.
3951         (pipe_state_up): New typedef.
3952         (cleanup_pipe_state): Remove.
3953         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
3954
3955 2018-06-18  Tom Tromey  <tom@tromey.com>
3956
3957         * rust-lang.h (rust_yyerror): Don't declare.
3958         * rust-lang.c (rust_language_defn): Update.
3959         * rust-exp.y (yyerror): Now static.
3960         * parse.c (parse_exp_in_context_1): Update.
3961         * p-lang.h (p_yyerror): Don't declare.
3962         * p-lang.c (p_language_defn): Update.
3963         * p-exp.y (yyerror): Now static.
3964         * opencl-lang.c (opencl_language_defn): Update.
3965         * objc-lang.c (objc_language_defn): Update.
3966         * m2-lang.h (m2_yyerror): Don't declare.
3967         * m2-lang.c (m2_language_defn): Update.
3968         * m2-exp.y (yyerror): Now static.
3969         * language.h (struct language_defn) <la_error>: Remove.
3970         * language.c (unk_lang_error): Remove.
3971         (unknown_language_defn, auto_language_defn): Remove.
3972         * go-lang.h (go_yyerror): Don't declare.
3973         * go-lang.c (go_language_defn): Update.
3974         * go-exp.y (yyerror): Now static.
3975         * f-lang.h (f_yyerror): Don't declare.
3976         * f-lang.c (f_language_defn): Update.
3977         * f-exp.y (yyerror): Now static.
3978         * d-lang.h (d_yyerror): Don't declare.
3979         * d-lang.c (d_language_defn): Update.
3980         * d-exp.y (yyerror): Now static.
3981         * c-lang.h (c_yyerror): Don't declare.
3982         * c-lang.c (c_language_defn, cplus_language_defn)
3983         (asm_language_defn, minimal_language_defn): Update.
3984         * c-exp.y (yyerror): Now static.
3985         * ada-lang.h (ada_yyerror): Don't declare.
3986         * ada-lang.c (ada_language_defn): Update.
3987         * ada-exp.y (yyerror): Now static.
3988
3989 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
3990
3991         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
3992         (store_sveregs_to_thread): Likewise.
3993         (aarch64_linux_fetch_inferior_registers): Check for SVE.
3994         (aarch64_linux_store_inferior_registers): Likewise.
3995         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
3996         function.
3997         (aarch64_sve_regs_copy_to_regcache): Likewise.
3998         (aarch64_sve_regs_copy_from_regcache): Likewise.
3999         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
4000         declaration.
4001         (aarch64_sve_regs_copy_to_regcache): Likewise.
4002         (aarch64_sve_regs_copy_from_regcache): Likewise.
4003         (sve_context): Structure from Linux headers.
4004         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
4005         (SVE_SIG_ZREG_SIZE): Likewise.
4006         (SVE_SIG_PREG_SIZE): Likewise.
4007         (SVE_SIG_FFR_SIZE): Likewise.
4008         (SVE_SIG_REGS_OFFSET): Likewise.
4009         (SVE_SIG_ZREGS_OFFSET): Likewise.
4010         (SVE_SIG_ZREG_OFFSET): Likewise.
4011         (SVE_SIG_ZREGS_SIZE): Likewise.
4012         (SVE_SIG_PREGS_OFFSET): Likewise.
4013         (SVE_SIG_PREG_OFFSET): Likewise.
4014         (SVE_SIG_PREGS_SIZE): Likewise.
4015         (SVE_SIG_FFR_OFFSET): Likewise.
4016         (SVE_SIG_REGS_SIZE): Likewise.
4017         (SVE_SIG_CONTEXT_SIZE): Likewise.
4018         (SVE_PT_REGS_MASK): Likewise.
4019         (SVE_PT_REGS_FPSIMD): Likewise.
4020         (SVE_PT_REGS_SVE): Likewise.
4021         (SVE_PT_VL_INHERIT): Likewise.
4022         (SVE_PT_VL_ONEXEC): Likewise.
4023         (SVE_PT_REGS_OFFSET): Likewise.
4024         (SVE_PT_FPSIMD_OFFSET): Likewise.
4025         (SVE_PT_FPSIMD_SIZE): Likewise.
4026         (SVE_PT_SVE_ZREG_SIZE): Likewise.
4027         (SVE_PT_SVE_PREG_SIZE): Likewise.
4028         (SVE_PT_SVE_FFR_SIZE): Likewise.
4029         (SVE_PT_SVE_FPSR_SIZE): Likewise.
4030         (SVE_PT_SVE_FPCR_SIZE): Likewise.
4031         (__SVE_SIG_TO_PT): Likewise.
4032         (SVE_PT_SVE_OFFSET): Likewise.
4033         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
4034         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
4035         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
4036         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
4037         (SVE_PT_SVE_PREG_OFFSET): Likewise.
4038         (SVE_PT_SVE_PREGS_SIZE): Likewise.
4039         (SVE_PT_SVE_FFR_OFFSET): Likewise.
4040         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
4041         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
4042         (SVE_PT_SVE_SIZE): Likewise.
4043         (SVE_PT_SIZE): Likewise.
4044         (HAS_SVE_STATE): New define.
4045
4046 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
4047
4048         * nat/aarch64-sve-linux-sigcontext.h: New file.
4049         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
4050         new files.
4051         (SVE_VQ_MIN): Likewise.
4052         (SVE_VQ_MAX): Likewise.
4053         (SVE_VL_MIN): Likewise.
4054         (SVE_VL_MAX): Likewise.
4055         (SVE_NUM_ZREGS): Likewise.
4056         (SVE_NUM_PREGS): Likewise.
4057         (sve_vl_valid): Likewise.
4058         (struct user_sve_header): Likewise.
4059
4060 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
4061             Richard Bunt <Richard.Bunt@arm.com>
4062
4063         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
4064         was requested by GDB.
4065
4066 2018-06-15  Tom de Vries  <tdevries@suse.de>
4067
4068         * MAINTAINERS (Write After Approval): Add Tom de Vries.
4069
4070 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
4071
4072         * gnulib/update-gnulib.sh: Print expected versions of
4073         autoconf/aclocal.
4074
4075 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
4076
4077         * arch-utils.c (default_type_align): Use type_length_units.
4078         * gdbtypes.c (type_align): Use type_length_units.
4079
4080 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4081
4082         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
4083         of 'define' command.
4084
4085 2018-06-14  Tom de Vries  <tdevries@suse.de>
4086
4087         PR cli/22573
4088         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
4089         get_no_prettyformat_print_options.
4090
4091 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
4092
4093         * sparc-nat.h: Include target.h.
4094         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
4095         <fetch_registers>: Remove this argument in function call.
4096         <store_registers>: Remove this argument in function call, remove
4097         extra semicolon.
4098         <low_forget_process>: Call sparc64_forget_process instead of
4099         sparc_forget_process.
4100
4101 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4102
4103         * procfs.c (_initialize_procfs): Use add_inf_child_target.
4104         (procfs_target::make_corefile_notes): Adjust to new
4105         target_read_alloc return type.
4106
4107 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
4108             Stephen Roberts  <stephen.roberts@arm.com>
4109
4110         PR gdb/22882
4111         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
4112         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
4113         Move should_notify_stop local into more inner scope.
4114
4115 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
4116             Stephen Roberts  <stephen.roberts@arm.com>
4117
4118         PR gdb/22882
4119         * infrun.c (resume_1): Add call to mark_async_event_handler.
4120
4121 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
4122
4123         * infrun.c (do_target_wait): Change old version of $pc printed.
4124
4125 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
4126
4127         * dwarf2read.c (read_index_from_section): Rename to...
4128         (read_gdb_index_from_section): ... this, update all callers.
4129         (dwarf2_read_index): Rename to...
4130         (dwarf2_read_gdb_index): ... this, update all callers.
4131
4132 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
4133
4134         * gdb/hppa-linux-nat.c
4135         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
4136         hppa_linux_nat_target::fetch_registers.
4137
4138 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
4139
4140         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
4141         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
4142         (AARCH64_DWARF_SVE_FFR): Likewise.
4143         (AARCH64_DWARF_SVE_P0): Likewise.
4144         (AARCH64_DWARF_SVE_Z0): Likewise.
4145
4146 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
4147
4148         * common/common-regcache.h (raw_compare): New function.
4149         * regcache.c (regcache::raw_compare): Likewise.
4150         * regcache.h (regcache::raw_compare): New declaration.
4151
4152 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
4153
4154         * common/common-regcache.h (reg_buffer_common): New structure.
4155         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
4156         (reg_buffer::raw_supply): Likewise.
4157         (reg_buffer::raw_supply_integer): Likewise.
4158         (reg_buffer::raw_supply_zeroed): Likewise.
4159         (reg_buffer::raw_collect): Likewise.
4160         (reg_buffer::raw_collect_integer): Likewise.
4161         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
4162         (reg_buffer::raw_supply): Likewise.
4163         (reg_buffer::raw_supply_integer): Likewise.
4164         (reg_buffer::raw_supply_zeroed): Likewise.
4165         (reg_buffer::raw_collect): Likewise.
4166         (reg_buffer::raw_collect_integer): Likewise.
4167
4168 2018-06-10  Tom Tromey  <tom@tromey.com>
4169
4170         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
4171         (class remote_state) <stop_reply_queue>: Now std::vector.
4172         (remote_state::~remote_state)
4173         (remote_target::stop_reply_queue_length): Update.
4174         (struct queue_iter_param, remove_child_of_pending_fork)
4175         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
4176         (check_pending_event_prevents_wildcard_vcont_callback)
4177         (remove_stop_reply_for_inferior)
4178         (remove_stop_reply_of_remote_state)
4179         (remote_notif_remove_once_on_match)
4180         (stop_reply_match_ptid_and_ws)
4181         (remote_kill_child_of_pending_fork): Remove.
4182         (remote_target::remove_new_fork_children)
4183         (remote_target::check_pending_events_prevent_wildcard_vcont)
4184         (remote_target::discard_pending_stop_replies)
4185         (remote_target::discard_pending_stop_replies_in_queue)
4186         (remote_target::remote_notif_remove_queued_reply)
4187         (remote_target::queued_stop_reply)
4188         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
4189         (remote_target::wait, remote_target::kill_new_fork_children)
4190         (remote_target::async): Update.
4191
4192 2018-06-10  Tom Tromey  <tom@tromey.com>
4193
4194         * record-full.c (record_full_arch_list_cleanups): Remove.
4195         (record_full_message): Use try/catch.
4196         (record_full_wait_cleanups): Remove.
4197         (record_full_wait_1): Use try/catch.
4198         (record_full_restore): Likewise.
4199
4200 2018-06-10  Tom Tromey  <tom@tromey.com>
4201
4202         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
4203         declare VEC.  Add constructor.
4204         <in_target_beneath>: Now bool.
4205         (record_full_breakpoints): Now a std::vector, static.
4206         (record_full_sync_record_breakpoints)
4207         (record_full_init_record_breakpoints)
4208         (record_full_target::insert_breakpoint)
4209         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
4210
4211 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
4212
4213         * dwarf2read.c (process_cu_includes): Remove struct keyword.
4214         * serial.c (serial_interface_lookup): Remove struct keyword.
4215
4216 2018-06-10  Tom Tromey  <tom@tromey.com>
4217
4218         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
4219         method.
4220         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
4221         a method.
4222         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
4223         method.
4224         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
4225         "beneath" as a method.
4226         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
4227         Use "beneath" as a method.
4228
4229 2018-06-10  Tom Tromey  <tom@tromey.com>
4230
4231         * tracefile.c (struct trace_file_writer_deleter): New.
4232         <operator()>: Rename from trace_file_writer_xfree.
4233         (trace_file_writer_up): New typedef.
4234         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
4235
4236 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
4237
4238         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
4239         <m_registers, m_register_status>: Change type to
4240         std::unique_ptr.
4241         * regcache.c (reg_buffer::reg_buffer): Use new instead of
4242         XCNEWVEC.
4243
4244 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
4245
4246         * common/common-regcache.h (enum register_status): Add
4247         underlying type "signed char".
4248         * regcache.h (reg_buffer) <m_register_status>: Change type to
4249         register_status *.
4250         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
4251         register_status instead of signed char.
4252         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
4253         (reg_buffer::get_register_status): Remove cast.
4254         (readable_regcache::raw_read): Remove cast.
4255         (readable_regcache::cooked_read): Remove cast.
4256
4257 2018-06-09  Tom Tromey  <tom@tromey.com>
4258
4259         * source.c (reverse_search_command, forward_search_command): Use
4260         scoped_fd.
4261
4262 2018-06-09  Tom Tromey  <tom@tromey.com>
4263
4264         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
4265         (serial_ops_list): Now static, std::vector.
4266         (serial_interface_lookup, serial_add_interface): Update.
4267
4268 2018-06-09  Tom Tromey  <tom@tromey.com>
4269
4270         * dwarf2read.c (process_cu_includes): Update.
4271         (process_full_comp_unit): Update.
4272         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
4273         std::vector.
4274
4275 2018-06-08  Paul Koning  <paul_koning@dell.com>
4276
4277         PR gdb/23252
4278
4279         * python/python.c (do_start_initialization):
4280         Avoid call to internal Python API.
4281         (init__gdb_module): New function.
4282
4283 2018-06-08  Gary Benson <gbenson@redhat.com>
4284
4285         * linux-thread-db.c (valprint.h): New include.
4286         (struct check_thread_db_info): New structure.
4287         (check_thread_db_on_load, tdb_testinfo): New static globals.
4288         (check_thread_db, check_thread_db_callback): New functions.
4289         (try_thread_db_load_1): Run integrity checks if requested.
4290         (maintenance_check_libthread_db): New function.
4291         (_initialize_thread_db): Register "maint check libthread-db"
4292         and "maint set/show check-libthread-db".
4293         * NEWS: Mention the above new commands.
4294
4295 2018-06-08  Tom Tromey  <tom@tromey.com>
4296
4297         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
4298         now a method.
4299
4300 2018-06-08  Tom Tromey  <tom@tromey.com>
4301
4302         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
4303
4304 2018-06-08  Tom Tromey  <tom@tromey.com>
4305
4306         * common/btrace-common.h (struct btrace_data): Add constructor,
4307         destructor, move assignment operator.
4308         <empty, clear, fini>: New methods.
4309         <format>: Initialize.
4310         (btrace_data_init, btrace_data_fini, btrace_data_clear)
4311         (btrace_data_empty): Don't declare.
4312         * common/btrace-common.c (btrace_data_init): Remove.
4313         (btrace_data::fini): Rename from btrace_data_fini.
4314         (btrace_data::empty): Rename from btrace_data_empty.
4315         (btrace_data::clear): Rename from btrace_data_clear.  Return
4316         bool.
4317         * btrace.h (make_cleanup_btrace_data): Don't declare.
4318         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
4319         (parse_xml_btrace): Update.
4320         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
4321         (maint_btrace_clear_packet_history_cmd): Update.
4322
4323 2018-06-07  Pedro Alves  <palves@redhat.com>
4324
4325         * target.h (target_ops) <beneath>: Now a method.  All references
4326         updated.
4327         (class target_stack): New.
4328         * target.c (g_target_stack): New.
4329         (g_current_top_target): Delete.
4330         (current_top_target): Get the top target out of g_target_stack.
4331         (target_stack::push, target_stack::unpush): New.
4332         (push_target, unpush_target): Reimplement.
4333         (target_is_pushed): Reimplement in terms of g_target_stack.
4334         (target_ops::beneath, target_stack::find_beneath): New.
4335
4336 2018-06-07  Pedro Alves  <palves@redhat.com>
4337
4338         * target.h (find_target_beneath): Delete declaration.
4339         * target.c (find_target_beneath): Delete definition.
4340         * aix-thread.c: All callers of find_target_beneath adjusted to
4341         call target_ops::beneath instead.
4342         * bsd-uthread.c: Likewise.
4343         * linux-thread-db.c: Likewise.
4344         * ravenscar-thread.c: Likewise.
4345         * sol-thread.c: Likewise.
4346         * spu-multiarch.c: Likewise.
4347
4348 2018-06-07  Pedro Alves  <palves@redhat.com>
4349
4350         * target.h (target_ops) <beneath>: Now a method.  All references
4351         updated.
4352         (target_ops) <m_beneath>: New.
4353         * target.c (target_ops::beneath): New.
4354         * corelow.c: Adjust all references to target_ops::beneath.
4355         * linux-thread-db.c: Likewise.
4356         * make-target-delegates: Likewise.
4357         * record-btrace.c: Likewise.
4358         * record-full.c: Likewise.
4359         * remote.c: Likewise.
4360         * target.c: Likewise.
4361         * target-delegates.c: Regenerate.
4362
4363 2018-06-07  Pedro Alves  <palves@redhat.com>
4364
4365         * target.h (target_stack): Delete.
4366         (current_top_target): Declare function.
4367         * target.c (target_stack): Delete.
4368         (g_current_top_target): New.
4369         (current_top_target): New function.
4370         * auxv.c: Use current_top_target instead of target_stack
4371         throughout.
4372         * avr-tdep.c: Likewise.
4373         * breakpoint.c: Likewise.
4374         * corefile.c: Likewise.
4375         * elfread.c: Likewise.
4376         * eval.c: Likewise.
4377         * exceptions.c: Likewise.
4378         * frame.c: Likewise.
4379         * gdbarch-selftests.c: Likewise.
4380         * gnu-v3-abi.c: Likewise.
4381         * ia64-tdep.c: Likewise.
4382         * ia64-vms-tdep.c: Likewise.
4383         * infcall.c: Likewise.
4384         * infcmd.c: Likewise.
4385         * infrun.c: Likewise.
4386         * linespec.c: Likewise.
4387         * linux-tdep.c: Likewise.
4388         * minsyms.c: Likewise.
4389         * ppc-linux-nat.c: Likewise.
4390         * ppc-linux-tdep.c: Likewise.
4391         * procfs.c: Likewise.
4392         * regcache.c: Likewise.
4393         * remote.c: Likewise.
4394         * rs6000-tdep.c: Likewise.
4395         * s390-linux-nat.c: Likewise.
4396         * s390-tdep.c: Likewise.
4397         * solib-aix.c: Likewise.
4398         * solib-darwin.c: Likewise.
4399         * solib-dsbt.c: Likewise.
4400         * solib-spu.c: Likewise.
4401         * solib-svr4.c: Likewise.
4402         * solib-target.c: Likewise.
4403         * sparc-tdep.c: Likewise.
4404         * sparc64-tdep.c: Likewise.
4405         * spu-tdep.c: Likewise.
4406         * symfile.c: Likewise.
4407         * symtab.c: Likewise.
4408         * target-descriptions.c: Likewise.
4409         * target-memory.c: Likewise.
4410         * target.c: Likewise.
4411         * target.h: Likewise.
4412         * tracefile-tfile.c: Likewise.
4413         * tracepoint.c: Likewise.
4414         * valops.c: Likewise.
4415         * valprint.c: Likewise.
4416         * value.c: Likewise.
4417         * windows-tdep.c: Likewise.
4418         * mi/mi-main.c: Likewise.
4419
4420 2018-06-07  Tom Tromey  <tom@tromey.com>
4421
4422         * valprint.h (build_address_symbolic): Declare.
4423         * printcmd.c (print_address_symbolic): Update.
4424         (build_address_symbolic): Change "name" and "filename" to
4425         std::string.
4426         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
4427         Update.
4428         * defs.h (build_address_symbolic): Remove declaration.
4429
4430 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
4431
4432         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
4433         (aarch64_vnv_type): Add function.
4434         (aarch64_pseudo_register_name): Add V regs for SVE.
4435         (aarch64_pseudo_register_type): Likewise.
4436         (aarch64_pseudo_register_reggroup_p): Likewise.
4437         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
4438         (aarch64_pseudo_read_value): Add V regs for SVE.
4439         (aarch64_pseudo_write_2): Use V0 offset for SVE
4440         (aarch64_pseudo_write): Add V regs for SVE.
4441         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
4442
4443 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
4444
4445         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
4446         (sve_vl_from_vq): Likewise.
4447
4448 2018-06-05  Tom Tromey  <tom@tromey.com>
4449
4450         * cli/cli-cmds.c (show_version): Update.
4451         * top.c (print_gdb_version): Add "interactive" parameter.
4452         Update.
4453         * main.c (captured_main_1): Update.
4454         * top.h (print_gdb_version): Add "interactive" parameter and a
4455         comment.
4456
4457 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
4458
4459         * common/enum-flags.h: Add trailing semicolon to example in
4460         comment.
4461
4462 2018-06-05  Tom Tromey  <tom@tromey.com>
4463
4464         PR cli/12326:
4465         * NEWS: Add entry about pager.
4466         * utils.c (pagination_disabled_for_command): New global.
4467         (prompt_for_continue): Allow "c" response to prompt.
4468         (reinitialize_more_filter): Clear
4469         pagination_disabled_for_command.
4470         (fputs_maybe_filtered): Check pagination_disabled_for_command.
4471
4472 2018-06-04  Tom Tromey  <tom@tromey.com>
4473
4474         * ada-lang.h (ada_lookup_symbol_list): Update.
4475         * ada-lang.c (resolve_subexp): Update.
4476         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
4477         parameter.
4478         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
4479         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
4480         results parameter to std::vector.
4481         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
4482         Update.
4483         * ada-exp.y (block_lookup): Update.
4484         (select_possible_type_sym): Change type of syms.  Remove nsyms
4485         parameter.
4486         (write_var_or_type, write_name_assoc): Update.
4487
4488 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
4489
4490         * windows-nat.c (windows_nat_target::xfer_partial): Return
4491         TARGET_XFER_E_IO if we need to delegate to the target beneath
4492         but BENEATH is NULL.
4493
4494 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
4495
4496         * Makefile.in (config.status): Add configure.nat as a
4497         dependency.
4498
4499 2018-06-04  Tom Tromey  <tom@tromey.com>
4500
4501         * cp-name-parser.y (cpname_state): Add method declarations.
4502         (HANDLE_QUAL): Update.
4503         (cpname_state::d_grab, cpname_state::fill_comp)
4504         (cpname_state::make_operator, cpname_state::make_dtor)
4505         (cpname_state::make_builtin_type, cpname_state::make_name)
4506         (cpname_state::d_qualify, cpname_state::d_int_type)
4507         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
4508         (%union): Move earlier.
4509
4510 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4511
4512         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
4513
4514 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4515
4516         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
4517         (aarch64_pseudo_write_1): Likewise.
4518         (aarch64_pseudo_read_value): Use helper.
4519         (aarch64_pseudo_write): Likewise.
4520
4521 2018-06-04  Pedro Alves  <palves@redhat.com>
4522
4523         * darwin-nat.c (darwin_ops): Delete.
4524         (darwin_attach_pid): Use get_native_target.
4525
4526 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4527
4528         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
4529         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
4530
4531 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4532
4533         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
4534         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
4535         (aarch64_gdbarch_init): Check for SVE.
4536         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
4537
4538 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4539
4540         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
4541         * aarch64-tdep.h (aarch64_read_description): Likewise.
4542         * arch/aarch64.c (aarch64_create_target_description): Likewise.
4543         * arch/aarch64.h (aarch64_create_target_description): Likewise.
4544         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
4545         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
4546         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
4547
4548 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
4549
4550         * value.c (value_fetch_lazy_bitfield): New.
4551         (value_fetch_lazy_memory): New.
4552         (value_fetch_lazy_register): New.
4553         (value_fetch_lazy): Factor out to smaller functions.
4554
4555 2018-06-01  Tom Tromey  <tom@tromey.com>
4556
4557         * cp-name-parser.y (backslashable, represented): Now const.
4558
4559 2018-06-01  Tom Tromey  <tom@tromey.com>
4560
4561         * cp-name-parser.y: Include parser-defs.h.
4562         (parser_fprintf): Remove declaration.
4563
4564 2018-06-01  Tom Tromey  <tom@tromey.com>
4565
4566         * cp-name-parser.y: Use %pure-parser, %lex-param, and
4567         %parse-param.
4568         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
4569         (global_result): Remove globals.
4570         (struct cpname_state): New.
4571         (yyparse): Don't declare.
4572         (yylex, yyerror): Move declarations after %union.
4573         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
4574         (make_name): Add state parameter.
4575         Update all callers.
4576         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
4577         parameter.
4578         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
4579         Update.
4580         (yylex): Add lvalp, state parameters.
4581         (yyerror): Add state parameter.
4582         (cp_demangled_name_to_comp): Update.
4583
4584 2018-06-01  Tom Tromey  <tom@tromey.com>
4585
4586         * cp-name-parser.y (parser_fprintf): Declare.
4587         (GDB_YY_REMAP_PREFIX): Define.
4588         Include yy-remap.h.  Don't redefine yy* identifiers.
4589
4590 2018-06-01  Tom Tromey  <tom@tromey.com>
4591
4592         * python/py-type.c (typy_legacy_template_argument): Update.
4593         * cp-support.h (cp_demangled_name_to_comp): Update.
4594         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
4595         parameter to be a "std::string *".
4596         (main): Update.
4597
4598 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
4599
4600         * ada-lex.l: Include "diagnostics.h" instead of
4601         "common/diagnostics.h".
4602         * unittests/environ-selftests.c: Likewise.
4603         * common/diagnostics.h: Moved to ../include.
4604
4605 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
4606
4607         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
4608         to language_mode_manual while calling breakpoint_re_set_one.
4609
4610 2018-06-01  Tom Tromey  <tom@tromey.com>
4611
4612         * valops.c (value_cast_structs, destructor_name_p): Update.
4613         * symtab.c (gdb_mangle_name): Update.
4614         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
4615         Update.
4616         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
4617         (pascal_object_print_value_fields, pascal_object_print_value):
4618         Update.
4619         * p-typeprint.c (pascal_type_print_derivation_info): Update.
4620         * linespec.c (find_methods): Update.
4621         * gdbtypes.h (type_name_no_tag): Remove.
4622         (type_name_or_error): Rename from type_name_no_tag_or_error.
4623         * gdbtypes.c (type_name_no_tag): Remove.
4624         (type_name_or_error): Rename from type_name_no_tag_or_error.
4625         (lookup_struct_elt_type, check_typedef): Update.
4626         * expprint.c (print_subexp_standard): Update.
4627         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
4628         * d-namespace.c (d_lookup_nested_symbol): Update.
4629         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
4630         (cp_print_class_member): Update.
4631         * cp-namespace.c (cp_lookup_nested_symbol): Update.
4632         * completer.c (add_struct_fields): Update.
4633         * c-typeprint.c (cp_type_print_derivation_info)
4634         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
4635         Update.
4636         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
4637         (ada_prefer_type, ada_is_exception_sym): Update.
4638
4639 2018-06-01  Tom Tromey  <tom@tromey.com>
4640
4641         * valops.c (enum_constant_from_type, value_namespace_elt)
4642         (value_maybe_namespace_elt): Update.
4643         * valarith.c (find_size_for_pointer_math): Update.
4644         * target-descriptions.c (make_gdb_type): Update.
4645         * symmisc.c (print_symbol): Update.
4646         * stabsread.c (define_symbol, read_type)
4647         (complain_about_struct_wipeout, add_undefined_type)
4648         (cleanup_undefined_types_1): Update.
4649         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
4650         (rust_range_type_p, val_print_struct, rust_print_struct_def)
4651         (rust_internal_print_type, rust_composite_type)
4652         (rust_evaluate_funcall, rust_evaluate_subexp)
4653         (rust_inclusive_range_type_p): Update.
4654         * python/py-type.c (typy_get_tag): Update.
4655         * p-typeprint.c (pascal_type_print_base): Update.
4656         * mdebugread.c (parse_symbol, parse_type): Update.
4657         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
4658         Update.
4659         * guile/scm-type.c (gdbscm_type_tag): Update.
4660         * go-lang.c (sixg_string_p): Update.
4661         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
4662         Update.
4663         * gdbtypes.h (struct main_type) <tag_name>: Remove.
4664         (TYPE_TAG_NAME): Remove.
4665         * gdbtypes.c (type_name_no_tag): Simplify.
4666         (check_typedef, check_types_equal, recursive_dump_type)
4667         (copy_type_recursive, arch_composite_type): Update.
4668         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
4669         in summary mode when needed.
4670         * eval.c (evaluate_funcall): Update.
4671         * dwarf2read.c (fixup_go_packaging, read_structure_type)
4672         (process_structure_scope, read_enumeration_type)
4673         (read_namespace_type, read_module_type, determine_prefix): Update.
4674         * cp-support.c (inspect_type): Update.
4675         * coffread.c (process_coff_symbol, decode_base_type): Update.
4676         * c-varobj.c (c_is_path_expr_parent): Update.
4677         * c-typeprint.c (c_type_print_base_struct_union): Update.
4678         (c_type_print_base_1): Update.  Print struct/class/union/enum in
4679         summary when using C language.
4680         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
4681         (gen_maybe_namespace_elt): Update.
4682         * ada-lang.c (ada_type_name): Simplify.
4683         (empty_record, ada_template_to_fixed_record_type_1)
4684         (template_to_static_fixed_type)
4685         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
4686
4687 2018-06-01  Tom Tromey  <tom@tromey.com>
4688
4689         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
4690         c_print_type.
4691         * c-typeprint.c (c_print_type_1): Add "language" parameter.
4692         (c_print_type): Update.
4693         (c_print_type): New overload.
4694         (c_type_print_varspec_prefix, c_type_print_args)
4695         (c_type_print_varspec_suffix, c_print_type_no_offsets)
4696         (c_type_print_base_struct_union, c_type_print_base_1)
4697         (cp_type_print_method_args): Add "language" parameter.
4698         (c_type_print_base): Update.
4699         * c-lang.h (c_print_type): Add new overload.
4700
4701 2018-06-01  Tom Tromey  <tom@tromey.com>
4702
4703         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
4704         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
4705
4706 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
4707
4708         * aarch64-tdep.c (aarch64_sve_register_names): New const
4709         var.
4710         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
4711         (AARCH64_SVE_Z_REGS_NUM): New define.
4712         (AARCH64_SVE_P_REGS_NUM): Likewise.
4713         (AARCH64_SVE_NUM_REGS): Likewise.
4714
4715 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
4716
4717         * nat/linux-ptrace.h [__alpha__]
4718         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
4719         definitions.
4720
4721 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
4722
4723         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
4724         the endianness selected.
4725         * NEWS: Document `set endian auto' mode operation update.
4726
4727 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
4728
4729         * Makefile.in: Add new header.
4730         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
4731         (sve_vl_from_vg): Likewise.
4732         (sve_vq_from_vl): Likewise.
4733         (sve_vl_from_vq): Likewise.
4734         (sve_vq_from_vg): Likewise.
4735         (sve_vg_from_vq): Likewise.
4736         * configure.nat: Add new c file.
4737         * nat/aarch64-sve-linux-ptrace.c: New file.
4738         * nat/aarch64-sve-linux-ptrace.h: New file.
4739
4740 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
4741
4742         * aarch64-linux-nat.c (aarch64_linux_read_description):
4743         Add parmeter zero.
4744         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
4745         Likewise.
4746         * aarch64-tdep.c (tdesc_aarch64_list): Add.
4747         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
4748         (aarch64_gdbarch_init): Add parmeter zero.
4749         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
4750         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
4751         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
4752         parmeter.
4753         * doc/gdb.texinfo: Describe SVE feature
4754         * features/aarch64-sve.c: New file.
4755
4756 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
4757
4758         PR gdb/23210
4759         * gdbarch.sh (significant_addr_bit): Default to zero when
4760         not set by target architecture.
4761         * gdbarch.c: Re-generated.
4762         * utils.c (address_significant): Update.
4763
4764 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
4765
4766         * stack.c (func_command): Remove trailing newline in call to error.
4767
4768 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4769
4770         * regcache.h (regcache_raw_collect): Remove, update callers to
4771         use regcache::raw_collect.
4772         * regcache.c (regcache_raw_collect): Remove.
4773
4774 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4775
4776         * regcache.h (regcache_raw_supply): Remove, update callers to
4777         use detached_regcache::raw_supply.
4778         * regcache.c (regcache_raw_supply): Remove.
4779
4780 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4781
4782         * regcache.h (regcache_cooked_write_part): Remove, update
4783         callers to use regcache::cooked_write_part.
4784         * regcache.c (regcache_cooked_write_part): Remove.
4785
4786 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4787
4788         * regcache.h (regcache_cooked_read_part): Remove, update callers
4789         to use readable_regcache::cooked_read_part.
4790         * regcache.c (regcache_cooked_read_part): Remove.
4791
4792 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4793
4794         * regcache.h (regcache_cooked_read_value): Remove, update
4795         callers to use readable_regcache::cooked_read_value.
4796         * regcache.c (regcache_cooked_read_value): Remove.
4797
4798 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4799
4800         * regcache.h (regcache_cooked_write): Remove, update callers to
4801         use regcache::cooked_write.
4802         * regcache.c (regcache_cooked_write): Remove.
4803
4804 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4805
4806         * regcache.h (regcache_invalidate): Remove, update callers to
4807         use detached_regcache::invalidate instead.
4808         * regcache.c (regcache_invalidate): Remove.
4809
4810 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4811
4812         * regcache.h (regcache_raw_write_part): Remove, update callers
4813         to use regcache::raw_write_part instead.
4814         * regcache.c (regcache_raw_write_part): Remove.
4815
4816 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4817
4818         * regcache.h (regcache_raw_read_part): Remove, update callers to
4819         use readable_regcache::raw_read_part instead.
4820         * regcache.c (regcache_raw_read_part): Remove.
4821
4822 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4823
4824         * regcache.h (regcache_cooked_read): Remove, update callers to
4825         use readable_regcache::cooked_read instead.
4826         * regcache.c (regcache_cooked_read): Remove.
4827
4828 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4829
4830         * regcache.h (regcache_raw_write): Remove, update callers to use
4831         regcache::raw_write instead.
4832         * regcache.c (regcache_raw_write): Remove.
4833
4834 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4835
4836         * regcache.h (regcache_raw_read): Remove, update callers to use
4837         readable_regcache::raw_read instead.
4838         * regcache.c (regcache_raw_read): Remove.
4839
4840 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4841
4842         * regcache.h (regcache_raw_update): Remove, update callers to
4843         use readable_regcache::raw_update instead.
4844         * regcache.c (regcache_raw_update): Remove.
4845
4846 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4847
4848         * regcache.h (regcache_register_status): Remove, update callers
4849         to use reg_buffer::get_register_status directly instead.
4850         * regcache.c (regcache_register_status): Remove.
4851
4852 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4853
4854         * regcache.h (regcache_get_ptid): Remove, update all callers to
4855         call regcache::ptid instead.
4856         * regcache.c (regcache_get_ptid): Remove.
4857
4858 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4859
4860         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
4861
4862 2018-05-30  Pedro Alves  <palves@redhat.com>
4863
4864         * common/common-exceptions.h (exception_rethrow): Use
4865         ATTRIBUTE_NORETURN.
4866
4867 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
4868
4869         * breakpoint.c (print_solib_event, check_status_catch_solib):
4870         Remove struct keyword in range-based for loops.
4871         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
4872         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
4873         Likewise.
4874         * linespec.c (find_superclass_methods, search_minsyms_for_name):
4875         Likewise.
4876         * symfile.c (addr_info_make_relative): Likewise.
4877         * thread.c (value_in_thread_stack_temporaries): Likewise.
4878
4879 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
4880
4881         PR gdb/16841
4882         * valops.c (value_struct_elt_for_reference): Call check_typedef on
4883         aggregate type to get its real type before accessing it.
4884
4885 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
4886
4887         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
4888         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
4889         * coff-pe-read.c (add_pe_forwarded_sym): Replace
4890         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
4891         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
4892         * jit.c (jit_breakpoint_re_set_internal): Likewise.
4893         * printcmd.c (info_address_command): Likewise.
4894
4895 2018-05-29  Tom Tromey  <tom@tromey.com>
4896
4897         * windows-nat.c (handle_exception): Update fall-through comment.
4898
4899 2018-05-29  Tom Tromey  <tom@tromey.com>
4900
4901         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
4902         (struct program_space) <added_solibs>: Now a std::vector.
4903         * breakpoint.c (print_solib_event): Update.
4904         (check_status_catch_solib): Update.
4905         * progspace.c (clear_program_space_solib_cache): Update.
4906         * solib.c (update_solib_list): Update.
4907
4908 2018-05-29  Tom Tromey  <tom@tromey.com>
4909
4910         * python/py-type.c (typy_richcompare): Update.
4911         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
4912         * gdbtypes.h (types_deeply_equal): Return bool.
4913         (types_equal): Likewise.
4914         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
4915         declare VEC.
4916         (check_types_equal): Change worklist to std::vector.  Return
4917         bool.
4918         (struct type_equality_entry): Add constructor.
4919         (compare_maybe_null_strings): Return bool.
4920         (check_types_worklist): Return bool.  Change worklist to
4921         std::vector.
4922         (types_deeply_equal): Use std::vector.
4923         (types_equal): Return bool.
4924         (compare_maybe_null_strings): Simplify.
4925
4926 2018-05-29  Tom Tromey  <tom@tromey.com>
4927
4928         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
4929
4930 2018-05-29  Tom Tromey  <tom@tromey.com>
4931
4932         * objc-lang.h: Don't include cp-support.h.
4933         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
4934         declare VEC.
4935
4936 2018-05-27  Tom Tromey  <tom@tromey.com>
4937
4938         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
4939
4940 2018-05-25  Tom Tromey  <tom@tromey.com>
4941
4942         * value.c (value::location): Initialize.
4943
4944 2018-05-25  Tom Tromey  <tom@tromey.com>
4945
4946         * dbxread.c (init_bincl_list): Remove.
4947         (bincl_list): Now a std::vector.
4948         (bincls_allocated, next_bincl): Remove.
4949         (free_bincl_list, do_free_bincl_list_cleanup)
4950         (make_cleanup_free_bincl_list): Remove.
4951         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
4952         unique_xmalloc_ptr.
4953         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
4954         (struct header_file_location): Add constructor.
4955         (add_bincl_to_list): Remove.
4956
4957 2018-05-25  Tom Tromey  <tom@tromey.com>
4958
4959         * tui/tui.c (tui_enable): Update.
4960         * mi/mi-interp.c (mi_interp::init): Update.
4961         * interps.h (class interp) <name>: New method.
4962         <m_name>: Rename from name.
4963         (~scoped_restore_interp): Update.
4964         * interps.c (interp::interp): Update.
4965         (interp_add, interp_set, interp_lookup_existing)
4966         (current_interp_named_p): Update.
4967
4968 2018-05-25  Tom Tromey  <tom@tromey.com>
4969
4970         * interps.c (interp_name): Remove.
4971         * mi/mi-interp.c (mi_interp::init): Update.
4972         * interps.h (interp_name): Remove.
4973         (~scoped_restore_interp): Update.
4974         * tui/tui.c (tui_enable): Update.
4975
4976 2018-05-25  Tom Tromey  <tom@tromey.com>
4977
4978         * utils.c (fputs_maybe_filtered): Update.
4979         * linespec.c (decode_line_full): Update.
4980         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
4981         (mi_print_breakpoint_for_event, mi_solib_loaded)
4982         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4983         (mi_user_selected_context_changed): Update.
4984         * mi/mi-main.c (mi_execute_command): Update.
4985         * cli/cli-script.c (execute_control_command): Update.
4986         * python/python.c (execute_gdb_command): Update.
4987         * solib.c (info_sharedlibrary_command): Update.
4988         * interps.c (interp_ui_out): Remove.
4989         * interps.h (interp_ui_out): Remove.
4990
4991 2018-05-25  Tom Tromey  <tom@tromey.com>
4992
4993         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
4994         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
4995         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
4996
4997 2018-05-25  Tom Tromey  <tom@tromey.com>
4998
4999         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
5000         * interps.c (interp_exec): Use scoped_restore.
5001
5002 2018-05-25  Tom Tromey  <tom@tromey.com>
5003
5004         * remote.c (remote_target::remote_file_get): Use
5005         gdb::byte_vector.
5006         (remote_target::remote_file_put): Likewise.
5007
5008 2018-05-25  Tom Tromey  <tom@tromey.com>
5009
5010         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
5011         a std::string.
5012         (get_pe_section_index, add_pe_exported_sym): Update.
5013         (read_pe_exported_syms): Use gdb::def_vector.
5014
5015 2018-05-25  Tom Tromey  <tom@tromey.com>
5016
5017         * frame.c (remove_prev_frame): Remove.
5018         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
5019
5020 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
5021
5022         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
5023         Remove prototypes.
5024         * mips-linux-nat.c (supply_fpregset): Always call
5025         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
5026         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
5027         `mips_fill_fpregset'.
5028         * mips-linux-tdep.c (mips_supply_fpregset)
5029         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
5030         (mips_fill_fpregset_wrapper): Remove functions.
5031         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
5032         (mips_linux_fpregset): Remove variable.
5033         (mips_linux_iterate_over_regset_sections): Use
5034         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
5035         (mips_linux_o32_sigframe_init): Remove comment.
5036
5037 2018-05-25  Pedro Alves  <palves@redhat.com>
5038
5039         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
5040         (struct readahead_cache, struct packet_reg, struct
5041         remote_arch_state, class remote_state): Move higher up in the
5042         file.
5043         (remote_target::m_remote_state): Now an object instead of a pointer.
5044         (remote_target::get_remote_state): Adjust.
5045
5046 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
5047
5048         * stack.c (select_and_print_frame): Delete.
5049         (struct function_bounds): Move struct within function.
5050         (func_command): Most content moved into new function
5051         find_frame_for_function, use new function, print result, add
5052         function comment.
5053         (find_frame_for_function): New function, now returns a result.
5054
5055 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5056
5057         * stack.c (iterate_over_block_arg_vars): Fix comment.
5058         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
5059
5060 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
5061
5062         PR gdb/23203
5063         * frame.c
5064         (scoped_restore_selected_frame::scoped_restore_selected_frame):
5065         Define.
5066         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
5067         Define.
5068         * frame.h (class scoped_restore_selected_frame): New class.
5069         * stack.c (print_frame_local_vars): Remove catching and rethrowing
5070         of any exception, use scoped_restore_selected_frame to restore the
5071         frame instead.
5072
5073 2018-05-24  Pedro Alves  <palves@redhat.com>
5074
5075         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
5076         override.
5077
5078 2018-05-23  Tom Tromey  <tom@tromey.com>
5079
5080         * complaints.c (struct complaints): Remove.
5081         (symfile_complaint_book): Remove.
5082         (series): New global.
5083         (complaint_internal): Update.
5084         (clear_complaints): Update.
5085
5086 2018-05-23  Tom Tromey  <tom@tromey.com>
5087
5088         * complaints.c (counters): New global.
5089         (struct complain): Remove.
5090         (struct complaints) <root>: Remove.
5091         (complaint_sentinel): Remove.
5092         (symfile_complaint_book): Update.
5093         (find_complaint) Remove.
5094         (complaint_internal, clear_complaints): Update.
5095
5096 2018-05-23  Tom Tromey  <tom@tromey.com>
5097
5098         * complaints.c (struct complain) <file, line>: Remove.
5099         (find_complaint): Remove file, line parameters.
5100         (complaint_internal): Update.
5101
5102 2018-05-23  Tom Tromey  <tom@tromey.com>
5103
5104         * complaints.c (vcomplaint): Remove.
5105         (complaint_internal) Merge in contents of vcomplaint.
5106
5107 2018-05-23  Tom Tromey  <tom@tromey.com>
5108
5109         * complaints.c (struct complaints) <explanation>: Remove.
5110         (symfile_explanations): Remove.
5111         (symfile_complaint_book): Update.
5112         (vcomplaint): Update.
5113         (struct explanation): Remove.
5114
5115 2018-05-23  Tom Tromey  <tom@tromey.com>
5116
5117         * complaints.c (symfile_complaints): Remove.
5118         (complaint_internal): Remove "complaints" parameter.
5119         (clear_complaints, vcomplaint): Remove "c" parameter.
5120         (get_complaints): Remove.
5121         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
5122         (dwarf2_debug_line_missing_file_complaint)
5123         (dwarf2_debug_line_missing_end_sequence_complaint)
5124         (dwarf2_complex_location_expr_complaint)
5125         (dwarf2_const_value_length_mismatch_complaint)
5126         (dwarf2_section_buffer_overflow_complaint)
5127         (dwarf2_macro_malformed_definition_complaint)
5128         (dwarf2_invalid_attrib_class_complaint)
5129         (create_addrmap_from_index, dw2_symtab_iter_next)
5130         (dw2_expand_marked_cus)
5131         (dw2_debug_names_iterator::find_vec_in_debug_names)
5132         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
5133         (create_debug_type_hash_table, init_cutu_and_read_dies)
5134         (partial_die_parent_scope, add_partial_enumeration)
5135         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
5136         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
5137         (read_import_statement, read_file_scope, create_dwo_cu_reader)
5138         (create_cus_hash_table, create_dwp_hash_table)
5139         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
5140         (dwarf2_rnglists_process, dwarf2_ranges_process)
5141         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
5142         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
5143         (handle_struct_member_die, process_structure_scope)
5144         (read_array_type, read_common_block, read_module_type)
5145         (read_tag_pointer_type, read_typedef, read_base_type)
5146         (read_subrange_type, load_partial_dies, partial_die_info::read)
5147         (partial_die_info::read, partial_die_info::read)
5148         (partial_die_info::read, read_checked_initial_length_and_offset)
5149         (dwarf2_string_attr, read_formatted_entries)
5150         (dwarf_decode_line_header)
5151         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
5152         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
5153         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
5154         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5155         (get_signatured_type, get_DW_AT_signature_type)
5156         (decode_locdesc, file_file_name, consume_improper_spaces)
5157         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
5158         (dwarf_decode_macro_bytes, dwarf_decode_macros)
5159         (dwarf2_symbol_mark_computed, set_die_type)
5160         (read_attribute_value): Update.
5161         * stap-probe.c (handle_stap_probe, get_stap_base_address):
5162         Update.
5163         * dbxread.c (unknown_symtype_complaint)
5164         (lbrac_mismatch_complaint, repeated_header_complaint)
5165         (set_namestring, function_outside_compilation_unit_complaint)
5166         (read_dbx_symtab, process_one_symbol): Update.
5167         * gdbtypes.c (stub_noname_complaint): Update.
5168         * windows-nat.c (handle_unload_dll): Update.
5169         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
5170         (decode_base_type): Update.
5171         * xcoffread.c (bf_notfound_complaint, ef_complaint)
5172         (eb_complaint, record_include_begin, record_include_end)
5173         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
5174         (process_xcoff_symbol, read_symbol)
5175         (function_outside_compilation_unit_complaint)
5176         (scan_xcoff_symtab): Update.
5177         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
5178         * buildsym.c (finish_block_internal, make_blockvector)
5179         (end_symtab_get_static_block, augment_type_symtab): Update.
5180         * dtrace-probe.c (dtrace_process_dof)
5181         (dtrace_static_probe_ops::get_probes): Update.
5182         * complaints.h (struct complaint): Don't declare.
5183         (symfile_complaints): Remove.
5184         (complaint_internal): Remove "complaints" parameter.
5185         (complaint): Likewise.
5186         (clear_complaints): Likewise.
5187         * symfile.c (syms_from_objfile_1, finish_new_objfile)
5188         (reread_symbols): Update.
5189         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
5190         (dwarf2_frame_cache, decode_frame_entry): Update.
5191         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
5192         * objc-lang.c (lookup_objc_class, lookup_child_selector)
5193         (info_selectors_command): Update.
5194         * macrotab.c (macro_include, check_for_redefinition)
5195         (macro_undef): Update.
5196         * objfiles.c (filter_overlapping_sections): Update.
5197         * stabsread.c (invalid_cpp_abbrev_complaint)
5198         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
5199         (define_symbol, error_type, read_type, rs6000_builtin_type)
5200         (stabs_method_name_from_physname, read_member_functions)
5201         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
5202         (attach_fields_to_type, complain_about_struct_wipeout)
5203         (read_range_type, read_args, common_block_start)
5204         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
5205         Update.
5206         * mdebugread.c (index_complaint, unknown_ext_complaint)
5207         (basic_type_complaint, bad_tag_guess_complaint)
5208         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
5209         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
5210         (parse_procedure, parse_lines)
5211         (function_outside_compilation_unit_complaint)
5212         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
5213         (bad_tag_guess_complaint, reg_value_complaint): Update.
5214         * cp-support.c (demangled_name_complaint): Update.
5215         * macroscope.c (sal_macro_scope): Update.
5216         * dwarf-index-write.c (class debug_names): Update.
5217
5218 2018-05-23  Tom Tromey  <tom@tromey.com>
5219
5220         * complaints.c (clear_complaints): Remove "noisy" parameter.
5221         * complaints.h (clear_complaints): Update.
5222         * symfile.c (syms_from_objfile_1, finish_new_objfile)
5223         (reread_symbols): Update.
5224
5225 2018-05-23  Tom Tromey  <tom@tromey.com>
5226
5227         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
5228         SUBSEQUENT_MESSAGE.
5229         (vcomplaint, clear_complaints): Update.
5230         (symfile_explanations): Remove some messages.
5231
5232 2018-05-23  Tom Tromey  <tom@tromey.com>
5233
5234         * complaints.c (internal_complaint): Remove.
5235         * complaints.h (internal_complaint): Remove.
5236
5237 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
5238
5239         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
5240
5241 2018-05-22  Pedro Alves  <palves@redhat.com>
5242
5243         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
5244         (remote_fileio_badfd, remote_fileio_return_errno)
5245         (remote_fileio_return_success, remote_fileio_func_open)
5246         (remote_fileio_func_open, remote_fileio_func_close)
5247         (remote_fileio_func_read, remote_fileio_func_write)
5248         (remote_fileio_func_lseek, remote_fileio_func_rename)
5249         (remote_fileio_func_unlink, remote_fileio_func_stat)
5250         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
5251         (remote_fileio_func_isatty, remote_fileio_func_system): Add
5252         remote_target parameter.
5253         (remote_fio_func_map) <func>: Add remote_target parameter.
5254         (do_remote_fileio_request, remote_fileio_request):
5255         * remote-fileio.h (remote_fileio_request):
5256         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
5257         remote_target parameter.
5258         (remote_notif_process, handle_notification): Adjust to pass down
5259         the remote.
5260         (remote_notif_state_allocate): Add remote_target parameter.  Save
5261         it.
5262         * remote-notif.h (struct remote_target): Forward declare.
5263         (struct notif_client) <parse, ack, can_get_pending_events>: Add
5264         remote_target parameter.
5265         (struct remote_notif_state) <remote>: New field.
5266         (remote_notif_ack, remote_notif_parse): Add remote_target
5267         parameter.
5268         (remote_notif_state_allocate, remote_notif_state_allocate): Add
5269         remote_target parameter.
5270         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
5271         (threads_listing_context, rmt_thread_action, protocol_feature)
5272         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
5273         (packet_result, struct threads_listing_context, remote_state):
5274         Move definitions and declarations higher up.
5275         (remote_target) <~remote_target>: Declare.
5276         (remote_download_command_source, remote_file_put, remote_file_get)
5277         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
5278         (remote_hostio_pread_vFile, remote_hostio_send_command)
5279         (remote_hostio_set_filesystem, remote_hostio_open)
5280         (remote_hostio_close, remote_hostio_unlink, remote_state)
5281         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
5282         (get_memory_write_packet_size, get_memory_read_packet_size)
5283         (append_pending_thread_resumptions, remote_detach_1)
5284         (append_resumption, remote_resume_with_vcont)
5285         (add_current_inferior_and_thread, wait_ns, wait_as)
5286         (process_stop_reply, remote_notice_new_inferior)
5287         (process_initial_stop_replies, remote_add_thread)
5288         (btrace_sync_conf, remote_btrace_maybe_reopen)
5289         (remove_new_fork_children, kill_new_fork_children)
5290         (discard_pending_stop_replies, stop_reply_queue_length)
5291         (check_pending_events_prevent_wildcard_vcont)
5292         (discard_pending_stop_replies_in_queue, stop_reply)
5293         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
5294         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
5295         (remote_interrupt_as, remote_interrupt_ns)
5296         (remote_get_noisy_reply, remote_query_attached)
5297         (remote_add_inferior, remote_current_thread, get_current_thread)
5298         (set_thread, set_general_thread, set_continue_thread)
5299         (set_general_process, write_ptid)
5300         (remote_unpack_thread_info_response, remote_get_threadinfo)
5301         (parse_threadlist_response, remote_get_threadlist)
5302         (remote_threadlist_iterator, remote_get_threads_with_ql)
5303         (remote_get_threads_with_qxfer)
5304         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
5305         (get_offsets, remote_check_symbols, remote_supported_packet)
5306         (remote_query_supported, remote_packet_size)
5307         (remote_serial_quit_handler, remote_detach_pid)
5308         (remote_vcont_probe, remote_resume_with_hc)
5309         (send_interrupt_sequence, interrupt_query)
5310         (remote_notif_get_pending_events, fetch_register_using_p)
5311         (send_g_packet, process_g_packet, fetch_registers_using_g)
5312         (store_register_using_P, store_registers_using_G)
5313         (set_remote_traceframe, check_binary_download)
5314         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
5315         (remote_xfer_live_readonly_partial, remote_read_bytes)
5316         (remote_send_printf, remote_flash_write, readchar)
5317         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
5318         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
5319         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
5320         (extended_remote_disable_randomization, extended_remote_run)
5321         (send_environment_packet, extended_remote_environment_support)
5322         (extended_remote_set_inferior_cwd, remote_write_qxfer)
5323         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
5324         (packet_command): Now methods of ...
5325         (remote_target): ... this class.
5326         (m_remote_state) <remote_target>: New field.
5327         (struct remote_state) <stop_reply_queue,
5328         remote_async_inferior_event_token, wait_forever_enabled_p>: New
5329         fields.
5330         (remote_state::remote_state): Allocate stop_reply_queue.
5331         (remote_state): Delete global.
5332         (get_remote_state_raw): Delete.
5333         (remote_target::get_remote_state): Allocate m_remote_state on
5334         demand.
5335         (get_current_remote_target): New.
5336         (remote_ops, extended_remote_ops): Delete.
5337         (wait_forever_enabled_p, remote_async_inferior_event_token):
5338         Delete, moved to struct remote_state.
5339         (remote_target::close): Delete self.  Destruction bits split to
5340         ...
5341         (remote_target::~remote_target): ... this.
5342         (show_memory_packet_size): Adjust to use
5343         get_current_remote_target.
5344         (struct protocol_feature) <func>: Add remote_target parameter.
5345         All callers adjusted.
5346         (curr_quit_handler_target): New.
5347         (remote_serial_quit_handler): Reimplement.
5348         (remote_target::open_1): Adjust to use get_current_remote_target.
5349         Heap-allocate remote_target/extended_remote_target instances.
5350         (vcont_builder::vcont_builder): Add remote_target parameter, and
5351         save it in m_remote.  All callers adjusted.
5352         (vcont_builder::m_remote): New field.
5353         (vcont_builder::restart, vcont_builder::flush)
5354         (vcont_builder::push_action): Use it.
5355         (remote_target::commit_resume): Use it.
5356         (struct queue_iter_param) <remote>: New field.
5357         (remote_target::remove_new_fork_children): Fill in 'remote' field.
5358         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
5359         (check_pending_event_prevents_wildcard_vcont_callback)
5360         (remote_target::check_pending_events_prevent_wildcard_vcont)
5361         (remote_target::discard_pending_stop_replies)
5362         (remote_target::discard_pending_stop_replies_in_queue)
5363         (remote_target::remote_notif_remove_queued_reply): Fill in
5364         'remote' field.
5365         (remote_notif_get_pending_events): New.
5366         (remote_target::readchar, remote_target::remote_serial_write):
5367         Save/restore curr_quit_handler_target.
5368         (putpkt): New.
5369         (kill_new_fork_children): Fill in 'remote' field.
5370         (packet_command): Use get_current_remote_target, defer to
5371         remote_target method of same name.
5372         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
5373         parameter, and save it in m_remote.  All callers adjusted.
5374         (scoped_remote_fd::release): Use m_remote.
5375         (scoped_remote_fd::m_remote): New field.
5376         (remote_file_put, remote_file_get, remote_file_delete): Use
5377         get_current_remote_target, defer to remote_target method of same
5378         name.
5379         (remote_btrace_reset): Add remote_state paremeter.  Update all
5380         callers.
5381         (remote_async_inferior_event_handler). Pass down 'data'.
5382         (remote_new_objfile): Use get_current_remote_target.
5383         (remote_target::vcont_r_supported): New.
5384         (set_range_stepping): Use get_current_remote_target and
5385         remote_target::vcont_r_supported.
5386         (_initialize_remote): Don't allocate 'remote_state' and
5387         'stop_reply_queue' globals.
5388         * remote.h (struct remote_target): Forward declare.
5389         (getpkt, putpkt, remote_notif_get_pending_events): Add
5390         'remote_target' parameter.
5391
5392 2018-05-22  Pedro Alves  <palves@redhat.com>
5393
5394         * remote.c (vcont_builder): Now a class.  Make all data members
5395         private.
5396         (vcont_builder) <vcont_builder, restart, flush, push_action>:
5397         Declare methods.
5398         (vcont_builder_restart): Rename to ...
5399         (vcont_builder::restart): ... this.
5400         (vcont_builder_flush): Rename to ...
5401         (vcont_builder::flush): ... this.
5402         (vcont_builder_push_action): Rename to ...
5403         (vcont_builder::push_action): ... this.
5404         (remote_target::commit_resume): Adjust.
5405
5406 2018-05-22  Pedro Alves  <palves@redhat.com>
5407
5408         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
5409         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
5410         (get_fixed_memory_packet_size): New.
5411         (get_memory_packet_size): Use it.
5412         (set_memory_packet_size): Don't override the config size with
5413         DEFAULT_MAX_MEMORY_PACKET_SIZE.
5414         (show_memory_packet_size): Use get_fixed_memory_packet_size.
5415         Don't refer to get_memory_packet_size if not connected to a remote
5416         target.  Show "(default)" if configured size is 0.
5417
5418 2018-05-22  Pedro Alves  <palves@redhat.com>
5419
5420         * remote.c (remote_target::mourn_inferior): Move
5421         discard_pending_stop_replies call here from ...
5422         (_initialize_remote): ... here.
5423
5424 2018-05-22  Pedro Alves  <palves@redhat.com>
5425
5426         * remote.c (compare_section_command): Remove set_general_process
5427         call.
5428
5429 2018-05-22  Pedro Alves  <palves@redhat.com>
5430
5431         * remote.c (struct packet_reg, struct remote_arch_state):
5432         Move higher up in the file.
5433         (remote_state) <m_arch_states>: Store remote_arch_state values
5434         instead of remote_arch_state pointers.
5435         (remote_state::get_remote_arch_state): Adjust.
5436
5437 2018-05-22  Pedro Alves  <palves@redhat.com>
5438
5439         * remote.c: Include <unordered_map>.
5440         (remote_state): Now a class.
5441         (remote_state) <get_remote_arch_state>: Declare method.
5442         <get_remote_arch_state>: New field.
5443         (remote_arch_state) <remote_arch_state>: Declare ctor.
5444         <regs>: Now a unique_ptr.
5445         (remote_gdbarch_data_handle): Delete.
5446         (get_remote_arch_state): Delete.
5447         (remote_state::get_remote_arch_state): New.
5448         (get_remote_state): Adjust to call remote_state's
5449         get_remote_arch_state method.
5450         (init_remote_state): Delete, bits factored out to ...
5451         (remote_arch_state::remote_arch_state): ... this new method.
5452         (get_remote_packet_size, get_memory_packet_size)
5453         (process_g_packet, remote_target::fetch_registers)
5454         (remote_target::prepare_to_store, store_registers_using_G)
5455         (remote_target::store_registers, remote_target::get_trace_status):
5456         Adjust to call remote_state's method.
5457         (_initialize_remote): Remove reference to
5458         remote_gdbarch_data_handle.
5459
5460 2018-05-22  Pedro Alves  <palves@redhat.com>
5461
5462         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
5463         pread>: New method declarations.
5464         (remote_target::open_1): Adjust.
5465         (readahead_cache_invalidate): Rename to ...
5466         (readahead_cache::invalidate): ... this, and adjust to be a class
5467         method.
5468         (readahead_cache_invalidate_fd): Rename to ...
5469         (readahead_cache::invalidate_fd): ... this, and adjust to be a
5470         class method.
5471         (remote_hostio_pwrite): Adjust.
5472         (remote_hostio_pread_from_cache): Rename to ...
5473         (readahead_cache::pread): ... this, and adjust to be a class
5474         method.
5475         (remote_hostio_close): Adjust.
5476
5477 2018-05-22  Pedro Alves  <palves@redhat.com>
5478
5479         * remote.c (remote_hostio_close_cleanup): Delete.
5480         (class scoped_remote_fd): New.
5481         (remote_file_put, remote_file_get): Use it.
5482
5483 2018-05-22  Pedro Alves  <palves@redhat.com>
5484
5485         (struct vCont_action_support): Use bool and initialize all fields.
5486         (struct readahead_cache): Initialize all fields.
5487         (remote_state): Use bool and initialize all fields.
5488         (remote_state::remote_state, remote_state::~remote_state): New.
5489         (new_remote_state): Delete.
5490         (_initialize_remote): Use new to allocate remote_state.
5491
5492 2018-05-22  Pedro Alves  <palves@redhat.com>
5493             張俊芝  <zjz@zjz.name>
5494
5495         PR gdb/22973
5496         * c-exp.y: Include "c-support.h".
5497         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
5498         of tolower.  Use c_ident_is_alpha to scan names.
5499         * c-lang.c: Include "c-support.h".
5500         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
5501         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
5502         * c-support.h: New file, with bits factored out from ...
5503         * cp-name-parser.y: ... this file.
5504         Include "c-support.h".
5505         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
5506         c-support.h and renamed.
5507         (symbol_end, yylex): Adjust.
5508
5509 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5510
5511         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
5512         parameter type to CORE_ADDR.
5513         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
5514         parameter type in declaration to CORE_ADDR.
5515         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
5516         target_auxv_search to get AT_HWCAP and use the result to get the
5517         target description.
5518         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
5519         to CORE_ADDR. Remove the cast of the return value to unsigned
5520         long. Fix error predicate of target_auxv_search.
5521         (ppc_linux_nat_target::read_description): Change the type of the
5522         hwcap variable to CORE_ADDR.
5523
5524 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5525
5526         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
5527         if the size of fpscr is larger than 32 bits.
5528
5529 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5530
5531         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
5532         (ppc32_linux_vsxregmap): New global.
5533         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
5534         regcache_supply_regset, and regcache_collect_regset.
5535         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
5536         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
5537         (fetch_vsx_register, store_vsx_register): Remove.
5538         (fetch_vsx_registers): Add regno parameter. Get regset using
5539         ppc_linux_vsxregset. Use regset to supply registers.
5540         (store_vsx_registers): Add regno parameter. Get regset using
5541         ppc_linux_vsxregset. Use regset to collect registers.
5542         (fetch_register): Call fetch_vsx_registers instead of
5543         fetch_vsx_register.
5544         (store_register): Call store_vsx_registers instead of
5545         store_vsx_register.
5546         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
5547         new regno parameter.
5548         (store_ppc_registers): Call store_vsx_registers with -1 for the
5549         new regno parameter.
5550         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
5551         (ppc_collect_vsxregset): Remove.
5552
5553 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5554
5555         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
5556         offset fields.
5557         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
5558         for vector register offset fields.
5559         (ppc64_fbsd_reg_offsets): Likewise.
5560         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5561         to vector register offset fields.
5562         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5563         to vector register offset fields.
5564         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
5565         vector register offset fields.
5566         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
5567         initializers for vector register offset fields.
5568         (rs6000_aix64_reg_offsets): Likewise.
5569         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
5570         (ppc_supply_vrregset): Remove.
5571         (ppc_collect_vrregset): Remove.
5572         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
5573         (ppc_linux_vrregset) : New function.
5574         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
5575         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
5576         (ppc32_linux_vrregset): Remove.
5577         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
5578         and use result instead of ppc32_linux_vrregset.
5579         (ppc32_linux_reg_offsets): Remove initializers for vector register
5580         offset fields.
5581         (ppc64_linux_reg_offsets): Likewise.
5582         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
5583         * ppc-linux-nat.c: Include regset.h.
5584         (gdb_vrregset_t): Adjust comment to account for little-endian
5585         mode.
5586         (supply_vrregset, fill_vrregset): Remove.
5587         (fetch_altivec_register, store_altivec_register): Remove.
5588         (fetch_altivec_registers): Add regno parameter. Get regset using
5589         ppc_linux_vrregset. Use regset to supply registers.
5590         (store_altivec_registers): Add regno parameter. Get regset using
5591         ppc_linux_vrregset. Use regset to collect registers.
5592         (fetch_register): Call fetch_altivec_registers instead of
5593         fetch_altivec_register.
5594         (store_register): Call store_altivec_registers instead of
5595         store_altivec_register.
5596         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
5597         the new regno parameter.
5598         (store_ppc_registers): Call store_altivec_registers with -1 for
5599         the new regno parameter.
5600
5601 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5602
5603         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
5604         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
5605         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
5606         (gdb_vrregset_t): Change array type size to
5607         PPC_LINUX_SIZEOF_VRREGSET.
5608         (gdb_vsxregset_t): Change array type size to
5609         PPC_LINUX_SIZEOF_VSXREGSET.
5610         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
5611         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
5612         PPC_LINUX_SIZEOF_VSXREGSET.
5613
5614 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5615
5616         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
5617         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
5618         nat/ppc-linux.c.
5619         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
5620         ppc_linux_target_wordsize with tid.
5621         (ppc_linux_nat_target::read_description): Call ppc_linux_target
5622         wordsize with tid.
5623         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
5624         (ppc64_64bit_inferior_p): Add static and inline specifiers.
5625         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
5626         tid parameter. Remove static specifier.
5627         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
5628         (ppc_linux_target_wordsize): New declaration.
5629
5630 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5631
5632         * arch/ppc-linux-common.c: New file.
5633         * arch/ppc-linux-common.h: New file.
5634         * arch/ppc-linux-tdesc.h: New file.
5635         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
5636         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
5637         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
5638         arch/ppc-linux-tdesc.h.
5639         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
5640         arch/ppc-linux-tdesc.h.
5641         (ppc_linux_nat_target::read_description): Remove target
5642         description matching code. Fill a ppc_linux_features struct and
5643         call ppc_linux_match_description with it. Move comment about ISA
5644         2.05 to ppc-linux-common.c.
5645         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
5646         arch/ppc-linux-tdesc.h.
5647         (ppc_linux_core_read_description): Remove target description
5648         matching code. Fill a ppc_linux_features struct and call
5649         ppc_linux_match_description with it.
5650         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
5651         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
5652         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
5653         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
5654         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
5655         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
5656         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
5657         (tdesc_powerpc_e500l): Remove.
5658
5659 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
5660
5661         * ada-lang.c (catch_assert_command): Pass empty string instead
5662         of NULL for excep_string argument.
5663
5664 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
5665
5666         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
5667         the width of the requested register exceeds the width of the
5668         `ptrace' data type.
5669
5670 2018-05-21  Tom Tromey  <tom@tromey.com>
5671
5672         * printcmd.c (output_command): Remove.
5673         (output_command_const): Rename to output_command.
5674         * valprint.h (output_command): Rename from output_command_const.
5675         * tracepoint.c (trace_dump_actions): Call output_command.
5676
5677 2018-05-21  Tom Tromey  <tom@tromey.com>
5678
5679         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5680         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
5681         * ada-lang.h (create_ada_exception_catchpoint): Update.
5682         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
5683         std::string.
5684         (create_excep_cond_exprs, ~ada_catchpoint)
5685         (should_stop_exception, print_one_exception)
5686         (print_mention_exception, print_recreate_exception): Update.
5687         (ada_get_next_arg): Remove.
5688         (catch_ada_exception_command_split): Use std::string.  Change type
5689         of "excep_string", "cond_string".
5690         (catch_ada_exception_command): Update.
5691         (create_ada_exception_catchpoint): Change type of excep_string.
5692         (ada_exception_sal): Remove excep_string parameter.
5693         (~ada_catchpoint): Remove.
5694
5695 2018-05-21  Tom Tromey  <tom@tromey.com>
5696
5697         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
5698         cleanup.
5699
5700 2018-05-21  Tom Tromey  <tom@tromey.com>
5701
5702         * ada-lang.c (ada_exception_message_1, ada_exception_message):
5703         Return unique_xmalloc_ptr.
5704         (print_it_exception): Update.
5705
5706 2018-05-21  Tom Tromey  <tom@tromey.com>
5707
5708         * tracepoint.c (trace_dump_actions): Use std::string.
5709
5710 2018-05-21  Tom Tromey  <tom@tromey.com>
5711
5712         * symfile.c (reread_symbols): Use std::string for original_name.
5713
5714 2018-05-21  Tom Tromey  <tom@tromey.com>
5715
5716         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
5717         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
5718         constructor.
5719
5720 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
5721
5722         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
5723         instance to...
5724         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
5725         * objfiles.c (get_objfile_bfd_data): Allocate
5726         objfile_per_bfd_storage with obstack_new when allocating on
5727         obstack.
5728
5729 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
5730
5731         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
5732         OBSTACK_ZALLOC.
5733         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
5734         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
5735         * mdebugread.c (mdebug_build_psymtabs): Likewise.
5736         (add_pending): Likewise.
5737         (parse_symbol): Likewise.
5738         (parse_partial_symbols): Likewise.
5739         (psymtab_to_symtab_1): Likewise.
5740         (new_psymtab): Likewise.
5741         (elfmdebug_build_psymtabs): Likewise.
5742         * minsyms.c (terminate_minimal_symbol_table): Likewise.
5743         * objfiles.c (get_objfile_bfd_data): Likewise.
5744         (objfile_register_static_link): Likewise.
5745         * psymtab.c (allocate_psymtab): Likewise.
5746         * stabsread.c (read_member_functions): Likewise.
5747         * xcoffread.c (xcoff_end_psymtab): Likewise.
5748
5749 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
5750
5751         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
5752         compiler supports std::is_trivially_constructible.
5753         * common/poison.h: Include obstack.h.
5754         (IsMallocable): Define to is_trivially_constructible if the
5755         compiler supports it, define to true_type otherwise.
5756         (xobnew): New.
5757         (XOBNEW): Redefine.
5758         (xobnewvec): New.
5759         (XOBNEWVEC): Redefine.
5760         * gdb_obstack.h (obstack_zalloc): New.
5761         (OBSTACK_ZALLOC): Redefine.
5762         (obstack_calloc): New.
5763         (OBSTACK_CALLOC): Redefine.
5764         (obstack_new): New.
5765         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
5766         (gdbarch_obstack): New declaration in gdbarch.h, definition in
5767         gdbarch.c.
5768         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
5769         obstack_calloc/obstack_zalloc.
5770         (gdbarch_obstack_zalloc): Remove.
5771         * target-descriptions.c (tdesc_data_init): Use obstack_new.
5772
5773 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5774
5775         * stack.c (backtrace_command_1): Remove useless variable int i.
5776
5777 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5778
5779         * stack.c (print_frame_info): Fix comment.
5780
5781 2018-05-18  Tom Tromey  <tom@tromey.com>
5782
5783         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
5784         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
5785         (~dwarf2_per_objfile): Update
5786         (dwarf2_get_dwz_file): Use new.
5787         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
5788         unique_ptr.
5789
5790 2018-05-18  Tom Tromey  <tom@tromey.com>
5791
5792         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
5793         unique_ptr.
5794         * dwarf2read.c (struct dwp_file): Add constructor and
5795         initializers.
5796         (open_and_init_dwp_file): Return a unique_ptr.
5797         (dwarf2_per_objfile, create_dwp_hash_table)
5798         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
5799         (lookup_dwo_unit_in_dwp): Update.
5800         (open_and_init_dwp_file, get_dwp_file): Update.
5801
5802 2018-05-18  Tom Tromey  <tom@tromey.com>
5803
5804         * dwarf2read.c (dwarf2_per_objfile): Update.
5805         (struct mapped_index): Add initializers.
5806         (dwarf2_read_index): Use new.
5807         (dw2_symtab_iter_init): Update.
5808         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
5809         unique_ptr.
5810
5811 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
5812
5813         * dwarf2read.c (mapped_index) <total_size>: Remove.
5814
5815 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
5816
5817         * unittests/format_pieces-selftests.c (test_format_specifier):
5818         Add ARI comments.
5819
5820 2018-05-18  Tom Tromey  <tom@tromey.com>
5821
5822         * c-typeprint.c (maybe_print_hole): New function.
5823         (c_print_type_struct_field_offset): Update.
5824         (c_type_print_base_struct_union): Call maybe_print_hole.
5825
5826 2018-05-17  Keith Seitz  <keiths@redhat.com>
5827
5828         * breakpoint.c (build_bpstat_chain): New function, moved from
5829         bpstat_stop_status.
5830         (bpstat_stop_status): Add optional parameter, `stop_chain'.
5831         If no stop chain is passed, call build_bpstat_chain to build it.
5832         * breakpoint.h (build_bpstat_chain): Declare.
5833         (bpstat_stop_status): Move documentation here from breakpoint.c.
5834         * infrun.c (handle_signal_stop): Before eliding inlined frames,
5835         build the stop chain and pass it to skip_inline_frames.
5836         Pass this stop chain to bpstat_stop_status.
5837         * inline-frame.c: Include breakpoint.h.
5838         (stopped_by_user_bp_inline_frame): New function.
5839         (skip_inline_frames): Add parameter `stop_chain'.
5840         Move documention to inline-frame.h.
5841         If non-NULL, use stopped_by_user_bp_inline_frame to determine
5842         whether the frame should be elided.
5843         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
5844         Add moved documentation and update for new parameter.
5845
5846 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
5847
5848         PR cli/14975
5849         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5850         unittests/format_pieces-selftests.c.
5851         * common/format.h (format_piece) <operator==>: New.
5852         (format_pieces) <operator[]>: Remove.
5853         * common/format.c (format_pieces::format_pieces): Handle \e.
5854         * unittests/format_pieces-selftests.c: New.
5855
5856 2018-05-17  Tom Tromey  <tom@tromey.com>
5857
5858         PR symtab/23010:
5859         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
5860         (dw2_instantiate_symtab): Add skip_partial parameter.
5861         (dw2_find_last_source_symtab, dw2_map_expand_apply)
5862         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
5863         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
5864         (dw2_expand_symtabs_matching_one)
5865         (dw2_find_pc_sect_compunit_symtab)
5866         (dw2_debug_names_lookup_symbol)
5867         (dw2_debug_names_expand_symtabs_for_function): Update.
5868         (init_cutu_and_read_dies): Add skip_partial parameter.
5869         (process_psymtab_comp_unit, build_type_psymtabs_1)
5870         (process_skeletonless_type_unit, load_partial_comp_unit)
5871         (psymtab_to_symtab_1): Update.
5872         (load_full_comp_unit): Add skip_partial parameter.
5873         (process_imported_unit_die, dwarf2_read_addr_index)
5874         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
5875         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
5876         (read_signatured_type): Update.
5877
5878 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
5879
5880         * value.c (release_value): Remove unused variable.
5881         (record_latest_value): Likewise.
5882         (access_value_history): Likewise.
5883         (preserve_values): Likewise.
5884
5885 2018-05-17  Tom Tromey  <tom@tromey.com>
5886
5887         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
5888         Initialize.
5889
5890 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
5891
5892         PR gdb/22286
5893         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
5894         Also handle registers whose width is not a multiple of
5895         PTRACE_TYPE_RET.
5896         (linux_nat_trad_target::store_register): Likewise.
5897
5898 2018-05-16  Tom Tromey  <tom@tromey.com>
5899
5900         * gdbcore.h (core_bfd): Redefine.
5901         * corelow.c (core_target::close): Update.
5902         (core_target_open): Update.
5903         * progspace.h (struct program_space) <cbfd>: Now a
5904         gdb_bfd_ref_ptr.
5905
5906 2018-05-16  Tom Tromey  <tom@tromey.com>
5907
5908         PR cli/19551:
5909         * symfile-add-flags.h (enum symfile_add_flags)
5910         <SYMFILE_NOT_FILENAME>: New constant.
5911         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
5912         objfile name from BFD.
5913         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
5914         * minidebug.c (find_separate_debug_file_in_section): Put
5915         ".gnu_debugdata" into BFD's file name.
5916
5917 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
5918
5919         * regcache.c (regcache_read_ftype, regcache_write_ftype):
5920         Remove.
5921
5922 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
5923
5924         PR binutils/21446
5925         * aarch64-tdep.c (aarch64_analyze_prologue,
5926         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
5927         Indicate not interested in errors.
5928
5929 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
5930
5931         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
5932         Supply the MIPS_ZERO_REGNUM register.
5933
5934 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
5935
5936         * mips-tdep.c (mask_address_var): Make variable static.
5937
5938 2018-05-14  Tom Tromey  <tom@tromey.com>
5939
5940         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
5941
5942 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
5943
5944         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
5945         FXSAVE_ADDR for the mxcsr register.
5946
5947 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
5948
5949         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
5950
5951 2018-05-11  Pedro Alves  <palves@redhat.com>
5952
5953         * corelow.c (core_target) <core_target>: No longer inline.
5954         Initialize m_core_gdbarch, m_core_vec and build the section table
5955         here.
5956         <~core_target>: New.
5957         <core_gdbarch, get_core_register_section>: New methods.
5958         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
5959         factored out from ...
5960         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
5961         (core_ops): Delete.
5962         (sniff_core_bfd): Add gdbarch parameter.
5963         (core_close): Delete, merged into ...
5964         (core_target::close): ... here.  Delete self.
5965         (core_close_cleanup): Delete.
5966         (core_target_open): Allocate a core_target on the heap.  Use a
5967         unique_ptr instead of a cleanup.  Bits moved into the core_target
5968         ctor.  Adjust to use core_target methods instead of globals.
5969         (get_core_register_section): Rename to ...
5970         (core_target::get_core_register_section): ... this and adjust.
5971         (struct get_core_registers_cb_data): New.
5972         (get_core_registers_cb): Use it.  Use bool.
5973         (core_target::fetch_registers, core_target::files_info)
5974         (core_target::xfer_partial, core_target::read_description)
5975         (core_target::pid_to, core_target::thread_name): Adjust to
5976         reference class fields instead of globals.
5977         * target.h (struct target_ops_deleter, target_ops_up): New.
5978
5979 2018-05-11  Pedro Alves  <palves@redhat.com>
5980
5981         * corefile.c (core_file_command): Move to corelow.c.
5982         * corelow.c (the_core_target): Delete.
5983         (core_file_command): Moved from corefile.c.  Check exec_bfd
5984         instead of the_core_target.  Use target_detach instead of calling
5985         into the_core_target directly.
5986         (maybe_say_no_core_file_now): New.
5987         (core_target::detach): Use it.
5988         (_initialize_corelow): Remove references to the_core_target.
5989         * gdbcore.h (the_core_target): Delete.
5990
5991 2018-05-11  Tom Tromey  <tromey@redhat.com>
5992             Pedro Alves  <palves@redhat.com>
5993
5994         * corefile.c (core_bfd): Remove.
5995         * gdbcore.h (core_bfd): Now a macro.
5996         * progspace.h (struct program_space) <cbfd>: New field.
5997
5998 2018-05-11  Tom Tromey  <tom@tromey.com>
5999
6000         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
6001         gdb::def_vector.
6002
6003 2018-05-10  Tom Tromey  <tom@tromey.com>
6004
6005         * configure: Rebuild.
6006         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
6007
6008 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
6009
6010         PR server/23158:
6011         * regformats/regdat.sh: Adjust script, following the addition
6012         of the new expedite_regs parameter to init_target_desc.
6013
6014 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
6015     
6016         PR gdb/23127
6017         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
6018         set_gdbarch_significant_addr_bit.
6019         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
6020         set_gdbarch_significant_addr_bit.
6021         * utils.c (address_significant): Update to sign extend addr.
6022
6023 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
6024
6025         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
6026         (xtensa_linux_init_abi): Limit tdep->num_regs by
6027         tdep->num_nopriv_regs.
6028         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
6029         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
6030         not initialized.
6031
6032 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
6033
6034         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
6035
6036 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
6037
6038         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
6039         (I387_MXCSR_INIT_VAL): New constant.
6040         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
6041         buffer if it was supplied by the inferior.
6042         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
6043         (i387_xsave_get_clear_bv): New function.
6044         (i387_supply_xsave): Only read x87 control registers from the
6045         xsave buffer if the feature is enabled, and the state will have
6046         been written, otherwise, provide a suitable default.
6047         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
6048         including x87 control registers.  Update control registers if they
6049         have changed from the default value, and mark features as enabled
6050         as required.
6051         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
6052
6053 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
6054
6055         * spu-tdep.c (info_spu_event_command): Fix output formatting.
6056
6057 2018-05-07  Tom Tromey  <tom@tromey.com>
6058
6059         * configure: Rebuild.
6060         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
6061
6062 2018-05-07  Tom Tromey  <tom@tromey.com>
6063
6064         PR tdep/20362:
6065         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
6066         bit.  Use correct value for VDIV.
6067
6068 2018-05-04  Tom Tromey  <tom@tromey.com>
6069
6070         * configure: Rebuild.
6071         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
6072
6073 2018-05-04  Tom Tromey  <tom@tromey.com>
6074
6075         * linux-record.c (record_linux_system_call) <case
6076         RECORD_SYS_RECVFROM>: Add "break".
6077
6078 2018-05-04  Tom Tromey  <tom@tromey.com>
6079
6080         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
6081         Add missing "break".
6082         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
6083         Add missing "break".
6084
6085 2018-05-04  Tom Tromey  <tom@tromey.com>
6086
6087         * rs6000-tdep.c (ppc_process_record_op4)
6088         (ppc_process_record_op63): Add fall-through comment.
6089
6090 2018-05-04  Tom Tromey  <tom@tromey.com>
6091
6092         * i386-tdep.c (i386_process_record): Add fall-through comment.
6093
6094 2018-05-04  Tom Tromey  <tom@tromey.com>
6095
6096         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
6097         comment.
6098
6099 2018-05-04  Tom Tromey  <tom@tromey.com>
6100
6101         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
6102         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
6103         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
6104         comment.
6105         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
6106         comment.
6107         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
6108         comment.
6109
6110 2018-05-04  Tom Tromey  <tom@tromey.com>
6111
6112         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
6113
6114 2018-05-04  Tom Tromey  <tom@tromey.com>
6115
6116         * s390-tdep.c (s390_process_record): Fix fall-through comments.
6117         * xcoffread.c (scan_xcoff_symtab): Move comment later.
6118         * symfile.c (section_is_mapped): Fix fall-through comment.
6119         * stabsread.c (define_symbol, read_member_functions): Fix
6120         fall-through comment.
6121         * s390-linux-tdep.c (s390_process_record): Fix fall-through
6122         comment.
6123         * remote.c (remote_wait_as): Fix fall-through comment.
6124         * p-exp.y (yylex): Fix fall-through comment.
6125         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
6126         comment.
6127         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
6128         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
6129         * jv-exp.y (yylex): Fix fall-through comment.
6130         * go-exp.y (lex_one_token): Fix fall-through comment.
6131         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
6132         fall-through comment.
6133         * f-exp.y (yylex): Fix fall-through comment.
6134         * dwarf2read.c (process_die): Fix fall-through comments.
6135         * dbxread.c (process_one_symbol): Fix fall-through comment.
6136         * d-exp.y (lex_one_token): Fix fall-through comment.
6137         * cp-name-parser.y (yylex): Fix fall-through comment.
6138         * coffread.c (coff_symtab_read): Fix fall-through comment.
6139         * c-exp.y (lex_one_token): Fix fall-through comment.
6140         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
6141         comment.
6142         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
6143         comment.
6144
6145 2018-05-04  Tom Tromey  <tom@tromey.com>
6146
6147         PR python/22730:
6148         * NEWS: Mention gdb.execute change.
6149         * gdbcmd.h (execute_control_command): Don't declare.
6150         * python/python.c (execute_gdb_command): Use read_command_lines_1,
6151         execute_control_commands, execute_control_commands_to_string.
6152         * cli/cli-script.h (execute_control_commands)
6153         (execute_control_commands_to_string): Declare.
6154         (execute_control_command): Add from_tty parameter.
6155         * cli/cli-script.c (execute_control_commands)
6156         (execute_control_commands_to_string): New functions.
6157         (execute_user_command): Use execute_control_commands.
6158         (execute_control_command_1): Add "from_tty" parameter.  Update.
6159         (execute_control_command): Likewise.
6160
6161 2018-05-04  Tom Tromey  <tom@tromey.com>
6162
6163         PR python/22731:
6164         * NEWS: Mention that breakpoint commands are writable.
6165         * python/py-breakpoint.c (bppy_set_commands): New function.
6166         (breakpoint_object_getset) <"commands">: Use it.
6167
6168 2018-05-04  Tom Tromey  <tom@tromey.com>
6169
6170         * tracepoint.c (actions_command): Update.
6171         * mi/mi-cmd-break.c (mi_command_line_array)
6172         (mi_command_line_array_cnt, mi_command_line_array_ptr)
6173         (mi_read_next_line): Remove.
6174         (mi_cmd_break_commands): Update.
6175         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
6176         function_view.
6177         * cli/cli-script.c (get_command_line): Update.
6178         (process_next_line): Use function_view.  Constify.
6179         (recurse_read_control_structure, read_command_lines)
6180         (read_command_lines_1): Change argument types to function_view.
6181         (do_define_command, document_command): Update.
6182         * breakpoint.h (check_tracepoint_command): Don't declare.
6183         * breakpoint.c (check_tracepoint_command): Remove.
6184         (commands_command_1, create_tracepoint_from_upload): Update.
6185
6186 2018-05-04  Tom Tromey  <tom@tromey.com>
6187
6188         PR gdb/11750:
6189         * cli/cli-script.h (enum command_control_type) <define_control>:
6190         New constant.
6191         * cli/cli-script.c (multi_line_command_p): Handle define_control.
6192         (build_command_line, execute_control_command_1)
6193         (process_next_line): Likewise.
6194         (do_define_command): New function, extracted from define_command.
6195         (define_command): Use it.
6196
6197 2018-05-04  Tom Tromey  <tom@tromey.com>
6198
6199         * tracepoint.c (actions_command): Update.
6200         * cli/cli-script.h (read_command_lines): Update.
6201         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
6202         (MAX_TMPBUF): Remove define.
6203         (define_command): Use string_printf.
6204         (document_command): Likewise.
6205         * breakpoint.c (commands_command_1): Update.
6206
6207 2018-05-04  Tom Tromey  <tom@tromey.com>
6208
6209         * top.c (execute_command): Update.
6210         * cli/cli-script.h (print_command_lines): Now varargs.
6211         * cli/cli-script.c (print_command_lines): Now varargs.
6212         (execute_control_command_1) <case while_control, case if_control>:
6213         Update.
6214
6215 2018-05-04  Tom Tromey  <tom@tromey.com>
6216
6217         * tracepoint.c (all_tracepoint_actions): Rename from
6218         all_tracepoint_actions_and_cleanup.  Change return type.
6219         (actions_command, encode_actions_1, encode_actions)
6220         (trace_dump_actions, tdump_command): Update.
6221         * remote.c (remote_download_command_source): Update.
6222         * python/python.c (gdbpy_eval_from_control_command)
6223         (python_command, python_interactive_command): Update.
6224         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
6225         * guile/guile.c (guile_command)
6226         (gdbscm_eval_from_control_command, guile_command): Update.
6227         * compile/compile.c (compile_code_command)
6228         (compile_print_command, compile_to_object): Update.
6229         * cli/cli-script.h (struct command_lines_deleter): New.
6230         (counted_command_line): New typedef.
6231         (struct command_line): Add constructor, destructor.
6232         <body_list>: Remove.
6233         <body_list_0, body_list_1>: New members.
6234         (command_line_up): Remove typedef.
6235         (read_command_lines, read_command_lines_1, get_command_line):
6236         Update.
6237         (copy_command_lines): Don't declare.
6238         * cli/cli-script.c (build_command_line): Use "new".
6239         (get_command_line): Return counted_command_line.
6240         (print_command_lines, execute_user_command)
6241         (execute_control_command_1, while_command, if_command): Update.
6242         (realloc_body_list): Remove.
6243         (process_next_line, recurse_read_control_structure): Update.
6244         (read_command_lines, read_command_lines_1): Return counted_command_line.
6245         (free_command_lines): Use "delete".
6246         (copy_command_lines): Remove.
6247         (define_command, document_command, show_user_1): Update.
6248         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
6249         a counted_command_line.
6250         * breakpoint.h (counted_command_line): Remove typedef.
6251         (breakpoint_set_commands): Update.
6252         * breakpoint.c (check_no_tracepoint_commands)
6253         (validate_commands_for_breakpoint): Update.
6254         (breakpoint_set_commands): Change commands to be a
6255         counted_command_line.
6256         (commands_command_1, update_dprintf_command_list)
6257         (create_tracepoint_from_upload): Update.
6258
6259 2018-05-04  Tom Tromey  <tom@tromey.com>
6260
6261         * cli/cli-decode.h (cmd_list_element): New constructor.
6262         (~cmd_list_element): New destructor.
6263         (struct cmd_list_element): Add initializers.
6264         * cli/cli-decode.c (do_add_cmd): Use "new".
6265         (delete_cmd): Use "delete".
6266
6267 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
6268             Pedro Alves <palves@redhat.com>
6269
6270         PR breakpoints/19806 and support for PR external/20207.
6271         * NEWS: Mention Aarch64 watchpoint improvements.
6272         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
6273         watchpoints and PR external/20207 watchpoints.
6274         * nat/aarch64-linux-hw-point.c
6275         (kernel_supports_any_contiguous_range): New.
6276         (aarch64_watchpoint_offset): New.
6277         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
6278         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
6279         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
6280         (aarch64_align_watchpoint): New parameters aligned_offset_p and
6281         next_addr_orig_p.  Support PR external/20207 watchpoints.
6282         (aarch64_downgrade_regs): New.
6283         (aarch64_dr_state_insert_one_point): New parameters offset and
6284         addr_orig.
6285         (aarch64_dr_state_remove_one_point): Likewise.
6286         (aarch64_handle_breakpoint): Update caller.
6287         (aarch64_handle_aligned_watchpoint): Likewise.
6288         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
6289         aligned_offset.
6290         (aarch64_linux_set_debug_regs): Remove const from state.  Call
6291         aarch64_downgrade_regs.
6292         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
6293         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
6294         (DR_CONTROL_MASK): ... this.
6295         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
6296         (unsigned int aarch64_watchpoint_offset): New prototype.
6297         (aarch64_linux_set_debug_regs): Remove const from state.
6298         * utils.c (align_up, align_down): Move to ...
6299         * common/common-utils.c (align_up, align_down): ... here.
6300         * utils.h (align_up, align_down): Move to ...
6301         * common/common-utils.h (align_up, align_down): ... here.
6302
6303 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
6304
6305         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
6306         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
6307         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
6308         Re-implement to match the ABI as summarized in GCC's
6309         gcc/config/sparc/sparc.c.  All callers updated.
6310         (sparc32_store_arguments): Remove assertion.
6311
6312 2018-05-04  Tom Tromey  <tom@tromey.com>
6313
6314         * printcmd.c: Don't include tui.h.
6315         (decode_format): Use skip_spaces.
6316
6317 2018-05-04  Tom Tromey  <tom@tromey.com>
6318
6319         PR gdb/22619:
6320         * printcmd.c (last_count): New global.
6321         (x_command): Use saved count when repeating.
6322
6323 2018-05-04  Tom Tromey  <tom@tromey.com>
6324
6325         * nto-procfs.c (do_closedir_cleanup): Remove.
6326         (procfs_pidlist): Use gdb_dir_up.
6327         * procfs.c (do_closedir_cleanup): Remove.
6328         (proc_update_threads): Use gdb_dir_up.
6329         * common/filestuff.h (struct gdb_dir_deleter): New.
6330         (gdb_dir_up): New typedef.
6331
6332 2018-05-04  Tom Tromey  <tom@tromey.com>
6333
6334         * ada-lang.c (print_mention_exception): Use std::string.
6335
6336 2018-05-04  Tom Tromey  <tom@tromey.com>
6337
6338         * ada-lang.c (create_excep_cond_exprs): Update.
6339         (ada_exception_catchpoint_cond_string): Use std::string.
6340
6341 2018-05-04  Tom Tromey  <tom@tromey.com>
6342
6343         * ada-lang.c (xget_renaming_scope): Return std::string.
6344         (old_renaming_is_invisible): Update.
6345
6346 2018-05-04  Tom Tromey  <tom@tromey.com>
6347
6348         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
6349         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
6350
6351 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
6352
6353         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
6354
6355 2018-05-04  Tom Tromey  <tom@tromey.com>
6356
6357         * remote.c (remote_query_supported_append): Change type.
6358         (remote_check_symbols): Update.
6359
6360 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
6361
6362         PR gdb/11420
6363         * configure.ac: Prepend libpython.
6364         * python/python-config.py: Likewise.
6365         * configure: Regenerate.
6366
6367 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
6368
6369         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
6370
6371 2018-05-03  Pedro Alves  <palves@redhat.com>
6372
6373         * s390-linux-nat.c
6374         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
6375         override.  Write 'true' instead of '1'.
6376         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
6377         declaration.
6378
6379 2018-05-02  Pedro Alves  <palves@redhat.com>
6380
6381         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
6382         add_inf_child_target.
6383         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
6384         add_inf_child_target.
6385         * aix-thread.c (aix_thread_target_info): New.
6386         (aix_thread_target) <shortname, longname, doc>: Delete.
6387         <info>: New.
6388         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
6389         add_inf_child_target.
6390         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
6391         add_inf_child_target.
6392         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
6393         add_inf_child_target.
6394         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
6395         add_inf_child_target.
6396         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
6397         add_inf_child_target.
6398         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
6399         add_inf_child_target.
6400         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
6401         add_inf_child_target.
6402         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
6403         add_inf_child_target.
6404         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
6405         add_inf_child_target.
6406         * bfd-target.c (target_bfd_target_info): New.
6407         (target_bfd) <shortname, longname, doc>: Delete.
6408         <info>: New.
6409         * bsd-kvm.c (bsd_kvm_target_info): New.
6410         (bsd_kvm_target) <shortname, longname, doc>: Delete.
6411         <info>: New.
6412         (bsd_kvm_target::open): Rename to ...
6413         (bsd_kvm_target_open): ... this.  Adjust.
6414         * bsd-uthread.c (bsd_uthread_target_info): New.
6415         (bsd_uthread_target) <shortname, longname, doc>: Delete.
6416         <info>: New.
6417         * corefile.c (core_file_command): Adjust.
6418         * corelow.c (core_target_info): New.
6419         (core_target) <shortname, longname, doc>: Delete.
6420         <info>: New.
6421         (core_target::open): Rename to ...
6422         (core_target_open): ... this.  Adjust.
6423         * ctf.c (ctf_target_info): New.
6424         (ctf_target) <shortname, longname, doc>: Delete.
6425         <info>: New.
6426         (ctf_target::open): Rename to ...
6427         (ctf_target_open): ... this.
6428         (_initialize_ctf): Adjust.
6429         * exec.c (exec_target_info): New.
6430         (exec_target) <shortname, longname, doc>: Delete.
6431         <info>: New.
6432         (exec_target::open): Rename to ...
6433         (exec_target_open): ... this.
6434         * gdbcore.h (core_target_open): Declare.
6435         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
6436         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
6437         add_inf_child_target.
6438         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
6439         add_inf_child_target.
6440         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
6441         add_inf_child_target.
6442         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
6443         add_inf_child_target.
6444         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
6445         add_inf_child_target.
6446         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
6447         add_inf_child_target.
6448         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
6449         add_inf_child_target.
6450         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
6451         add_inf_child_target.
6452         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
6453         add_inf_child_target.
6454         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
6455         add_inf_child_target.
6456         * inf-child.c (inf_child_target_info): New.
6457         (inf_child_target::info): New.
6458         (inf_child_open_target): Remove 'target' parameter.  Use
6459         get_native_target instead.
6460         (inf_child_target::open): Delete.
6461         (add_inf_child_target): New.
6462         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
6463         Delete.
6464         <info>: New.
6465         (add_inf_child_target): Declare.
6466         (inf_child_open_target): Declare.
6467         * linux-thread-db.c (thread_db_target_info): New.
6468         (thread_db_target) <shortname, longname, doc>: Delete.
6469         <info>: New.
6470         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
6471         add_inf_child_target.
6472         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
6473         add_inf_child_target.
6474         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
6475         add_inf_child_target.
6476         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
6477         add_inf_child_target.
6478         * make-target-delegates (print_class): Adjust.
6479         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
6480         add_inf_child_target.
6481         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
6482         add_inf_child_target.
6483         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
6484         add_inf_child_target.
6485         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
6486         add_inf_child_target.
6487         * nto-procfs.c (nto_native_target_info): New.
6488         (nto_procfs_target_native) <shortname, longname, doc>:
6489         Delete.
6490         <info>: New.
6491         (nto_procfs_target_info): New.
6492         (nto_procfs_target_procfs) <shortname, longname, doc>:
6493         Delete.
6494         <info>: New.
6495         (init_procfs_targets): Adjust.
6496         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
6497         add_inf_child_target.
6498         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
6499         add_inf_child_target.
6500         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
6501         add_inf_child_target.
6502         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
6503         add_inf_child_target.
6504         * ravenscar-thread.c (ravenscar_target_info): New.
6505         (ravenscar_thread_target) <shortname, longname, doc>:
6506         Delete.
6507         <info>: New.
6508         * record-btrace.c (record_btrace_target_info):
6509         (record_btrace_target) <shortname, longname, doc>: Delete.
6510         <info>: New.
6511         (record_btrace_target::open): Rename to ...
6512         (record_btrace_target_open): ... this.  Adjust.
6513         * record-full.c (record_longname, record_doc): New.
6514         (record_full_base_target) <shortname, longname, doc>: Delete.
6515         <info>: New.
6516         (record_full_target_info): New.
6517         (record_full_target): <shortname>: Delete.
6518         <info>: New.
6519         (record_full_core_open_1, record_full_open_1): Update comments.
6520         (record_full_base_target::open): Rename to ...
6521         (record_full_open): ... this.
6522         (cmd_record_full_restore): Update.
6523         (_initialize_record_full): Update.
6524         * remote-sim.c (remote_sim_target_info): New.
6525         (gdbsim_target) <shortname, longname, doc>: Delete.
6526         <info>: New.
6527         (gdbsim_target::open): Rename to ...
6528         (gdbsim_target_open): ... this.
6529         (_initialize_remote_sim): Adjust.
6530         * remote.c (remote_doc): New.
6531         (remote_target_info): New.
6532         (remote_target) <shortname, longname, doc>: Delete.
6533         <info>: New.
6534         (extended_remote_target_info): New.
6535         (extended_remote_target) <shortname, longname, doc>: Delete.
6536         <info>: New.
6537         (remote_target::open_1): Make static.  Adjust.
6538         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
6539         * s390-linux-nat.c (_initialize_s390_nat): Use
6540         add_inf_child_target.
6541         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
6542         add_inf_child_target.
6543         * sol-thread.c (thread_db_target_info): New.
6544         (sol_thread_target) <shortname, longname, doc>: Delete.
6545         <info>: New.
6546         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
6547         add_inf_child_target.
6548         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
6549         add_inf_child_target.
6550         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
6551         add_inf_child_target.
6552         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
6553         add_inf_child_target.
6554         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
6555         add_inf_child_target.
6556         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
6557         add_inf_child_target.
6558         * spu-linux-nat.c (_initialize_spu_nat): Use
6559         add_inf_child_target.
6560         * spu-multiarch.c (spu_multiarch_target_info): New.
6561         (spu_multiarch_target) <shortname, longname, doc>: Delete.
6562         <info>: New.
6563         * target-delegates.c: Regenerate.
6564         * target.c: Include <unordered_map>.
6565         (target_ops_p): Delete.
6566         (DEF_VEC_P(target_ops_p)): Delete.
6567         (target_factories): New.
6568         (test_target_info): New.
6569         (test_target_ops::info): New.
6570         (open_target): Adjust to use target_factories.
6571         (add_target_with_completer): Rename to ...
6572         (add_target): ... this.  Change prototype.  Register target_info
6573         and open callback in target_factories.  Register target_info in
6574         command context instead of target_ops.
6575         (add_target): Delete old implementation.
6576         (add_deprecated_target_alias): Change prototype.  Adjust.
6577         (the_native_target): New.
6578         (set_native_target, get_native_target): New.
6579         (find_default_run_target): Use the_native_target.
6580         (find_attach_target, find_run_target): Simplify.
6581         (target_ops::open): Delete.
6582         (dummy_target_info): New.
6583         (dummy_target::shortname, dummy_target::longname)
6584         (dummy_target::doc): Delete.
6585         (dummy_target::info): New.
6586         (debug_target::shortname, debug_target::longname)
6587         (debug_target::doc): Delete.
6588         (debug_target::info): New.
6589         * target.h (struct target_info): New.
6590         (target_ops::~target_ops): Add comment.
6591         (target_ops::info): New.
6592         (target_ops::shortname, target_ops::longname, target_ops::doc): No
6593         longer virtual.  Implement in terms of target_info.
6594         (set_native_target, get_native_target): Declare.
6595         (target_open_ftype): New.
6596         (add_target, add_target_with_completer)
6597         (add_deprecated_target_alias): Change prototype.
6598         (test_target) <shortname, longname, doc>: Delete.
6599         <info>: New.
6600         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
6601         add_inf_child_target.
6602         * tracefile-tfile.c (tfile_target_info): New.
6603         (tfile_target) <shortname, longname, doc>: Delete.
6604         <info>: New.
6605         (tfile_target::open): Rename to ...
6606         (tfile_target_open): ... this.
6607         (_initialize_tracefile_tfile): Adjust.
6608         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
6609         add_inf_child_target.
6610         * windows-nat.c (_initialize_windows_nat): Use
6611         add_inf_child_target.
6612         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
6613         add_inf_child_target.
6614
6615 2018-05-02  Pedro Alves  <palves@redhat.com>
6616
6617         * linux-nat.h (linux_nat_target) <low_new_thread,
6618         low_delete_thread, low_new_fork, low_forget_process,
6619         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
6620         New virtual methods.
6621         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6622         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
6623         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
6624         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6625         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
6626         Delete.
6627         * linux-fork.c (delete_fork): Adjust to call low method.
6628         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
6629         (linux_nat_new_fork, linux_nat_forget_process_hook)
6630         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
6631         (linux_nat_status_is_event):
6632         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
6633         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
6634         to call low method.
6635         (sigtrap_is_event): Rename to ...
6636         (linux_nat_target::low_status_is_event): ... this.
6637         (linux_nat_set_status_is_event): Delete.
6638         (save_stop_reason, linux_nat_wait_1)
6639         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
6640         low methods.
6641         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6642         (linux_nat_set_new_fork, linux_nat_set_forget_process)
6643         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6644         (linux_nat_set_prepare_to_resume): Delete.
6645         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
6646         low virtual methods.
6647         * amd64-linux-nat.c: Likewise.
6648         * arm-linux-nat.c: Likewise.
6649         * i386-linux-nat.c: Likewise.
6650         * ia64-linux-nat.c: Likewise.
6651         * mips-linux-nat.c: Likewise.
6652         * ppc-linux-nat.c: Likewise.
6653         * s390-linux-nat.c: Likewise.
6654         * sparc64-linux-nat.c: Likewise.
6655         * x86-linux-nat.c: Likewise.
6656         * x86-linux-nat.h: Include "nat/x86-linux.h".
6657         (x86_linux_nat_target) <low_new_fork, low_forget_process,
6658         low_prepare_to_resume, low_new_thread, low_delete_thread>:
6659         Override methods.
6660
6661 2018-05-02  Pedro Alves  <palves@redhat.com>
6662
6663         * target.h (target_ops)
6664         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6665         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
6666         stopped_by_watchpoint, have_continuable_watchpoint,
6667         stopped_data_address, watchpoint_addr_within_range,
6668         can_accel_watchpoint_condition, can_run, thread_alive,
6669         has_all_memory, has_memory, has_stack, has_registers,
6670         has_execution, can_async_p, is_async_p, supports_non_stop,
6671         always_non_stop_p, can_execute_reverse, supports_multi_process,
6672         supports_enable_disable_tracepoint,
6673         supports_disable_randomization, supports_string_tracing,
6674         supports_evaluation_of_breakpoint_conditions,
6675         can_run_breakpoint_commands, filesystem_is_local,
6676         can_download_tracepoint, get_trace_state_variable_value,
6677         set_trace_notes, get_tib_address, use_agent, can_use_agent,
6678         record_is_replaying, record_will_replay,
6679         augmented_libraries_svr4_read>: Adjust to return bool.
6680         * aarch64-linux-nat.c: All implementations adjusted.
6681         * aix-thread.c: All implementations adjusted.
6682         * arm-linux-nat.c: All implementations adjusted.
6683         * breakpoint.c: All implementations adjusted.
6684         * bsd-kvm.c: All implementations adjusted.
6685         * bsd-uthread.c: All implementations adjusted.
6686         * corelow.c: All implementations adjusted.
6687         * ctf.c: All implementations adjusted.
6688         * darwin-nat.c: All implementations adjusted.
6689         * darwin-nat.h: All implementations adjusted.
6690         * exec.c: All implementations adjusted.
6691         * fbsd-nat.c: All implementations adjusted.
6692         * fbsd-nat.h: All implementations adjusted.
6693         * gnu-nat.c: All implementations adjusted.
6694         * gnu-nat.h: All implementations adjusted.
6695         * go32-nat.c: All implementations adjusted.
6696         * ia64-linux-nat.c: All implementations adjusted.
6697         * inf-child.c: All implementations adjusted.
6698         * inf-child.h: All implementations adjusted.
6699         * inf-ptrace.c: All implementations adjusted.
6700         * inf-ptrace.h: All implementations adjusted.
6701         * linux-nat.c: All implementations adjusted.
6702         * linux-nat.h: All implementations adjusted.
6703         * mips-linux-nat.c: All implementations adjusted.
6704         * nto-procfs.c: All implementations adjusted.
6705         * ppc-linux-nat.c: All implementations adjusted.
6706         * procfs.c: All implementations adjusted.
6707         * ravenscar-thread.c: All implementations adjusted.
6708         * record-btrace.c: All implementations adjusted.
6709         * record-full.c: All implementations adjusted.
6710         * remote-sim.c: All implementations adjusted.
6711         * remote.c: All implementations adjusted.
6712         * s390-linux-nat.c: All implementations adjusted.
6713         * sol-thread.c: All implementations adjusted.
6714         * spu-multiarch.c: All implementations adjusted.
6715         * target-delegates.c: All implementations adjusted.
6716         * target.c: All implementations adjusted.
6717         * target.h: All implementations adjusted.
6718         * tracefile-tfile.c: All implementations adjusted.
6719         * tracefile.c: All implementations adjusted.
6720         * tracefile.h: All implementations adjusted.
6721         * windows-nat.c: All implementations adjusted.
6722         * x86-linux-nat.h: All implementations adjusted.
6723         * x86-nat.h: All implementations adjusted.
6724
6725 2018-05-02  Pedro Alves  <palves@redhat.com>
6726
6727         * make-target-delegates (scan_target_h): Don't trim lines here.
6728         Replace sequences of tabs and/or whitespace with a single
6729         whitespace.
6730         (top level, parsing methods): Trim each line before processing it
6731         here.
6732
6733 2018-05-02  Pedro Alves  <palves@redhat.com>
6734             John Baldwin  <jhb@freebsd.org>
6735
6736         * target.h (enum strata) <debug_stratum>: New.
6737         (struct target_ops) <all delegation methods>: Replace by C++
6738         virtual methods, and drop "to_" prefix.  All references updated
6739         throughout.
6740         <to_shortname, to_longname, to_doc, to_data,
6741         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
6742         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
6743         virtual methods.  All references updated throughout.
6744         <can_attach, supports_terminal_ours, can_create_inferior,
6745         get_thread_control_capabilities, attach_no_wait>: New
6746         virtual methods.
6747         <insert_breakpoint, remove_breakpoint>: Now
6748         TARGET_DEFAULT_NORETURN methods.
6749         <info_proc>: Now returns bool.
6750         <to_magic>: Delete.
6751         (OPS_MAGIC): Delete.
6752         (current_target): Delete.  All references replaced by references
6753         to ...
6754         (target_stack): ... this.  New.
6755         (target_shortname, target_longname): Adjust.
6756         (target_can_run): Now a function declaration.
6757         (default_child_has_all_memory, default_child_has_memory)
6758         (default_child_has_stack, default_child_has_registers)
6759         (default_child_has_execution): Remove target_ops parameter.
6760         (complete_target_initialization): Delete.
6761         (memory_breakpoint_target): New template class.
6762         (test_target_ops): Refactor as a C++ class with virtual methods.
6763         * make-target-delegates (NAME_PART): Tighten.
6764         (POINTER_PART, CP_SYMBOL): New.
6765         (SIMPLE_RETURN_PART): Reimplement.
6766         (VEC_RETURN_PART): Expect less.
6767         (RETURN_PART, VIRTUAL_PART): New.
6768         (METHOD): Adjust to C++ virtual methods.
6769         (scan_target_h): Remove reference to C99.
6770         (dname): Output "target_ops::" prefix.
6771         (write_function_header): Adjust to output a C++ class method.
6772         (write_declaration): New.
6773         (write_delegator): Adjust to output a C++ class method.
6774         (tdname): Output "dummy_target::" prefix.
6775         (write_tdefault, write_debugmethod): Adjust to output a C++ class
6776         method.
6777         (tdefault_names, debug_names): Delete.
6778         (return_types, tdefaults, styles, argtypes_array): New.
6779         (top level): All methods are delegators.
6780         (print_class): New.
6781         (top level): Print dummy_target and debug_target classes.
6782         * target-delegates.c: Regenerate.
6783         * target-debug.h (target_debug_print_enum_info_proc_what)
6784         (target_debug_print_thread_control_capabilities)
6785         (target_debug_print_thread_info_p): New.
6786         * target.c (dummy_target): Delete.
6787         (the_dummy_target, the_debug_target): New.
6788         (target_stack): Now extern.
6789         (set_targetdebug): Push/unpush debug target.
6790         (default_child_has_all_memory, default_child_has_memory)
6791         (default_child_has_stack, default_child_has_registers)
6792         (default_child_has_execution): Remove target_ops parameter.
6793         (complete_target_initialization): Delete.
6794         (add_target_with_completer): No longer call
6795         complete_target_initialization.
6796         (target_supports_terminal_ours): Use regular delegation.
6797         (update_current_target): Delete.
6798         (push_target): No longer check magic number.  Don't call
6799         update_current_target.
6800         (unpush_target): Don't call update_current_target.
6801         (target_is_pushed): No longer check magic number.
6802         (target_require_runnable): Skip for all stratums over
6803         process_stratum.
6804         (target_ops::info_proc): New.
6805         (target_info_proc): Use find_target_at and
6806         find_default_run_target.
6807         (target_supports_disable_randomization): Use regular delegation.
6808         (target_get_osdata): Use find_target_at.
6809         (target_ops::open, target_ops::close, target_ops::can_attach)
6810         (target_ops::attach, target_ops::can_create_inferior)
6811         (target_ops::create_inferior, target_ops::can_run)
6812         (target_can_run): New.
6813         (default_fileio_target): Use regular delegation.
6814         (target_ops::fileio_open, target_ops::fileio_pwrite)
6815         (target_ops::fileio_pread, target_ops::fileio_fstat)
6816         (target_ops::fileio_close, target_ops::fileio_unlink)
6817         (target_ops::fileio_readlink): New.
6818         (target_fileio_open_1, target_fileio_unlink)
6819         (target_fileio_readlink): Always call the target method.  Handle
6820         FILEIO_ENOSYS.
6821         (return_zero, return_zero_has_execution): Delete.
6822         (init_dummy_target): Delete.
6823         (dummy_target::dummy_target, dummy_target::shortname)
6824         (dummy_target::longname, dummy_target::doc)
6825         (debug_target::debug_target, debug_target::shortname)
6826         (debug_target::longname, debug_target::doc): New.
6827         (target_supports_delete_record): Use regular delegation.
6828         (setup_target_debug): Delete.
6829         (maintenance_print_target_stack): Skip debug_stratum.
6830         (initialize_targets): Instantiate the_dummy_target and
6831         the_debug_target.
6832         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
6833         use target_stack.
6834         (target_auxv_search, fprint_target_auxv): Adjust.
6835         (info_auxv_command): Adjust to use target_stack.
6836         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
6837         * exceptions.c (print_flush): Handle a NULL target_stack.
6838         * regcache.c (target_ops_no_register): Refactor as class with
6839         virtual methods.
6840
6841         * exec.c (exec_target): New class.
6842         (exec_ops): Now an exec_target.
6843         (exec_open, exec_close_1, exec_get_section_table)
6844         (exec_xfer_partial, exec_files_info, exec_has_memory)
6845         (exec_make_note_section): Refactor as exec_target methods.
6846         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
6847         Delete.
6848         (exec_target::find_memory_regions): New.
6849         (_initialize_exec): Don't call init_exec_ops.
6850         * gdbcore.h (exec_file_clear): Delete.
6851
6852         * corefile.c (core_target): Delete.
6853         (core_file_command): Adjust.
6854         * corelow.c (core_target): New class.
6855         (the_core_target): New.
6856         (core_close): Remove target_ops parameter.
6857         (core_close_cleanup): Adjust.
6858         (core_target::close): New.
6859         (core_open, core_detach, get_core_registers, core_files_info)
6860         (core_xfer_partial, core_thread_alive, core_read_description)
6861         (core_pid_to_str, core_thread_name, core_has_memory)
6862         (core_has_stack, core_has_registers, core_info_proc): Rework as
6863         core_target methods.
6864         (ignore, core_remove_breakpoint, init_core_ops): Delete.
6865         (_initialize_corelow): Initialize the_core_target.
6866         * gdbcore.h (core_target): Delete.
6867         (the_core_target): New.
6868
6869         * ctf.c: (ctf_target): New class.
6870         (ctf_ops): Now a ctf_target.
6871         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
6872         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
6873         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
6874         methods.
6875         (init_ctf_ops): Delete.
6876         (_initialize_ctf): Don't call it.
6877         * tracefile-tfile.c (tfile_target): New class.
6878         (tfile_ops): Now a tfile_target.
6879         (tfile_open, tfile_close, tfile_files_info)
6880         (tfile_get_tracepoint_status, tfile_trace_find)
6881         (tfile_fetch_registers, tfile_xfer_partial)
6882         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
6883         Refactor as tfile_target methods.
6884         (tfile_xfer_partial_features): Remove target_ops parameter.
6885         (init_tfile_ops): Delete.
6886         (_initialize_tracefile_tfile): Don't call it.
6887         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
6888         (tracefile_has_stack, tracefile_has_registers)
6889         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
6890         tracefile_target methods.
6891         (init_tracefile_ops): Delete.
6892         (tracefile_target::tracefile_target): New.
6893         * tracefile.h: Include "target.h".
6894         (tracefile_target): New class.
6895         (init_tracefile_ops): Delete.
6896
6897         * spu-multiarch.c (spu_multiarch_target): New class.
6898         (spu_ops): Now a spu_multiarch_target.
6899         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
6900         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
6901         (spu_search_memory, spu_mourn_inferior): Refactor as
6902         spu_multiarch_target methods.
6903         (init_spu_ops): Delete.
6904         (_initialize_spu_multiarch): Remove references to init_spu_ops,
6905         complete_target_initialization.
6906
6907         * ravenscar-thread.c (ravenscar_thread_target): New class.
6908         (ravenscar_ops): Now a ravenscar_thread_target.
6909         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
6910         (ravenscar_thread_alive, ravenscar_pid_to_str)
6911         (ravenscar_fetch_registers, ravenscar_store_registers)
6912         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
6913         (ravenscar_stopped_by_hw_breakpoint)
6914         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
6915         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
6916         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
6917         methods.
6918         (init_ravenscar_thread_ops): Delete.
6919         (_initialize_ravenscar): Remove references to
6920         init_ravenscar_thread_ops and complete_target_initialization.
6921
6922         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
6923         (bsd_uthread_target): New class.
6924         (bsd_uthread_ops): Now a bsd_uthread_target.
6925         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
6926         (bsd_uthread_close, bsd_uthread_mourn_inferior)
6927         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
6928         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
6929         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
6930         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
6931         (bsd_uthread_target): Delete function.
6932         (_initialize_bsd_uthread): Remove reference to
6933         complete_target_initialization.
6934
6935         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
6936         (target_bfd): ... this new class.
6937         (target_bfd_xfer_partial, target_bfd_get_section_table)
6938         (target_bfd_close): Refactor as target_bfd methods.
6939         (target_bfd::~target_bfd): New.
6940         (target_bfd_reopen): Adjust.
6941         (target_bfd::close): New.
6942
6943         * record-btrace.c (record_btrace_target): New class.
6944         (record_btrace_ops): Now a record_btrace_target.
6945         (record_btrace_open, record_btrace_stop_recording)
6946         (record_btrace_disconnect, record_btrace_close)
6947         (record_btrace_async, record_btrace_info)
6948         (record_btrace_insn_history, record_btrace_insn_history_range)
6949         (record_btrace_insn_history_from, record_btrace_call_history)
6950         (record_btrace_call_history_range)
6951         (record_btrace_call_history_from, record_btrace_record_method)
6952         (record_btrace_is_replaying, record_btrace_will_replay)
6953         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
6954         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
6955         (record_btrace_store_registers, record_btrace_prepare_to_store)
6956         (record_btrace_to_get_unwinder)
6957         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
6958         (record_btrace_commit_resume, record_btrace_wait)
6959         (record_btrace_stop, record_btrace_can_execute_reverse)
6960         (record_btrace_stopped_by_sw_breakpoint)
6961         (record_btrace_supports_stopped_by_sw_breakpoint)
6962         (record_btrace_stopped_by_hw_breakpoint)
6963         (record_btrace_supports_stopped_by_hw_breakpoint)
6964         (record_btrace_update_thread_list, record_btrace_thread_alive)
6965         (record_btrace_goto_begin, record_btrace_goto_end)
6966         (record_btrace_goto, record_btrace_stop_replaying_all)
6967         (record_btrace_execution_direction)
6968         (record_btrace_prepare_to_generate_core)
6969         (record_btrace_done_generating_core): Refactor as
6970         record_btrace_target methods.
6971         (init_record_btrace_ops): Delete.
6972         (_initialize_record_btrace): Remove reference to
6973         init_record_btrace_ops.
6974         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
6975         the execution_direction global.
6976         (record_full_base_target, record_full_target)
6977         (record_full_core_target): New classes.
6978         (record_full_ops): Now a record_full_target.
6979         (record_full_core_ops): Now a record_full_core_target.
6980         (record_full_target::detach, record_full_target::disconnect)
6981         (record_full_core_target::disconnect)
6982         (record_full_target::mourn_inferior, record_full_target::kill):
6983         New.
6984         (record_full_open, record_full_close, record_full_async): Refactor
6985         as methods of the record_full_base_target class.
6986         (record_full_resume, record_full_commit_resume): Refactor
6987         as methods of the record_full_target class.
6988         (record_full_wait, record_full_stopped_by_watchpoint)
6989         (record_full_stopped_data_address)
6990         (record_full_stopped_by_sw_breakpoint)
6991         (record_full_supports_stopped_by_sw_breakpoint)
6992         (record_full_stopped_by_hw_breakpoint)
6993         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
6994         methods of the record_full_base_target class.
6995         (record_full_store_registers, record_full_xfer_partial)
6996         (record_full_insert_breakpoint, record_full_remove_breakpoint):
6997         Refactor as methods of the record_full_target class.
6998         (record_full_can_execute_reverse, record_full_get_bookmark)
6999         (record_full_goto_bookmark, record_full_execution_direction)
7000         (record_full_record_method, record_full_info, record_full_delete)
7001         (record_full_is_replaying, record_full_will_replay)
7002         (record_full_goto_begin, record_full_goto_end, record_full_goto)
7003         (record_full_stop_replaying): Refactor as methods of the
7004         record_full_base_target class.
7005         (record_full_core_resume, record_full_core_kill)
7006         (record_full_core_fetch_registers)
7007         (record_full_core_prepare_to_store)
7008         (record_full_core_store_registers, record_full_core_xfer_partial)
7009         (record_full_core_insert_breakpoint)
7010         (record_full_core_remove_breakpoint)
7011         (record_full_core_has_execution): Refactor
7012         as methods of the record_full_core_target class.
7013         (record_full_base_target::supports_delete_record): New.
7014         (init_record_full_ops): Delete.
7015         (init_record_full_core_ops): Delete.
7016         (record_full_save): Refactor as method of the
7017         record_full_base_target class.
7018         (_initialize_record_full): Remove references to
7019         init_record_full_ops and init_record_full_core_ops.
7020
7021         * remote.c (remote_target, extended_remote_target): New classes.
7022         (remote_ops): Now a remote_target.
7023         (extended_remote_ops): Now an extended_remote_target.
7024         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
7025         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
7026         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
7027         (remote_pass_signals, remote_set_syscall_catchpoint)
7028         (remote_program_signals, )
7029         (remote_thread_always_alive): Remove target_ops parameter.
7030         (remote_thread_alive, remote_thread_name)
7031         (remote_update_thread_list, remote_threads_extra_info)
7032         (remote_static_tracepoint_marker_at)
7033         (remote_static_tracepoint_markers_by_strid)
7034         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
7035         (remote_open): Refactor as methods of remote_target.
7036         (extended_remote_open, extended_remote_detach)
7037         (extended_remote_attach, extended_remote_post_attach):
7038         (extended_remote_supports_disable_randomization)
7039         (extended_remote_create_inferior): : Refactor as method of
7040         extended_remote_target.
7041         (remote_set_permissions, remote_open_1, remote_detach)
7042         (remote_follow_fork, remote_follow_exec, remote_disconnect)
7043         (remote_resume, remote_commit_resume, remote_stop)
7044         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
7045         (remote_terminal_ours, remote_wait, remote_fetch_registers)
7046         (remote_prepare_to_store, remote_store_registers)
7047         (remote_flash_erase, remote_flash_done, remote_files_info)
7048         (remote_kill, remote_mourn, remote_insert_breakpoint)
7049         (remote_remove_breakpoint, remote_insert_watchpoint)
7050         (remote_watchpoint_addr_within_range)
7051         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
7052         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
7053         (remote_supports_stopped_by_sw_breakpoint)
7054         (remote_stopped_by_hw_breakpoint)
7055         (remote_supports_stopped_by_hw_breakpoint)
7056         (remote_stopped_by_watchpoint, remote_stopped_data_address)
7057         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
7058         (remote_verify_memory): Refactor as methods of remote_target.
7059         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
7060         parameter.
7061         (remote_xfer_partial, remote_get_memory_xfer_limit)
7062         (remote_search_memory, remote_rcmd, remote_memory_map)
7063         (remote_pid_to_str, remote_get_thread_local_address)
7064         (remote_get_tib_address, remote_read_description): Refactor as
7065         methods of remote_target.
7066         (remote_target::fileio_open, remote_target::fileio_pwrite)
7067         (remote_target::fileio_pread, remote_target::fileio_close): New.
7068         (remote_hostio_readlink, remote_hostio_fstat)
7069         (remote_filesystem_is_local, remote_can_execute_reverse)
7070         (remote_supports_non_stop, remote_supports_disable_randomization)
7071         (remote_supports_multi_process, remote_supports_cond_breakpoints)
7072         (remote_supports_enable_disable_tracepoint)
7073         (remote_supports_string_tracing)
7074         (remote_can_run_breakpoint_commands, remote_trace_init)
7075         (remote_download_tracepoint, remote_can_download_tracepoint)
7076         (remote_download_trace_state_variable, remote_enable_tracepoint)
7077         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
7078         (remote_trace_start, remote_get_trace_status)
7079         (remote_get_tracepoint_status, remote_trace_stop)
7080         (remote_trace_find, remote_get_trace_state_variable_value)
7081         (remote_save_trace_data, remote_get_raw_trace_data)
7082         (remote_set_disconnected_tracing, remote_core_of_thread)
7083         (remote_set_circular_trace_buffer, remote_traceframe_info)
7084         (remote_get_min_fast_tracepoint_insn_len)
7085         (remote_set_trace_buffer_size, remote_set_trace_notes)
7086         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
7087         (remote_disable_btrace, remote_teardown_btrace)
7088         (remote_read_btrace, remote_btrace_conf)
7089         (remote_augmented_libraries_svr4_read, remote_load)
7090         (remote_pid_to_exec_file, remote_can_do_single_step)
7091         (remote_execution_direction, remote_thread_handle_to_thread_info):
7092         Refactor as methods of remote_target.
7093         (init_remote_ops, init_extended_remote_ops): Delete.
7094         (remote_can_async_p, remote_is_async_p, remote_async)
7095         (remote_thread_events, remote_upload_tracepoints)
7096         (remote_upload_trace_state_variables): Refactor as methods of
7097         remote_target.
7098         (_initialize_remote): Remove references to init_remote_ops and
7099         init_extended_remote_ops.
7100
7101         * remote-sim.c (gdbsim_target): New class.
7102         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
7103         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
7104         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
7105         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
7106         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
7107         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
7108         Refactor as methods of gdbsim_target.
7109         (gdbsim_ops): Now a gdbsim_target.
7110         (init_gdbsim_ops): Delete.
7111         (gdbsim_cntrl_c): Adjust.
7112         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
7113
7114         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
7115         (the_amd64_linux_nat_target): New.
7116         (amd64_linux_fetch_inferior_registers)
7117         (amd64_linux_store_inferior_registers): Refactor as methods of
7118         amd64_linux_nat_target.
7119         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
7120         * i386-linux-nat.c: Don't include "linux-nat.h".
7121         (i386_linux_nat_target): New class.
7122         (the_i386_linux_nat_target): New.
7123         (i386_linux_fetch_inferior_registers)
7124         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
7125         as methods of i386_linux_nat_target.
7126         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
7127         * inf-child.c (inf_child_ops): Delete.
7128         (inf_child_fetch_inferior_registers)
7129         (inf_child_store_inferior_registers): Delete.
7130         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
7131         methods of inf_child_target.
7132         (inf_child_target::supports_terminal_ours)
7133         (inf_child_target::terminal_init)
7134         (inf_child_target::terminal_inferior)
7135         (inf_child_target::terminal_ours_for_output)
7136         (inf_child_target::terminal_ours, inf_child_target::interrupt)
7137         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
7138         New.
7139         (inf_child_open, inf_child_disconnect, inf_child_close)
7140         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
7141         (inf_child_post_startup_inferior, inf_child_can_run)
7142         (inf_child_pid_to_exec_file): Refactor as methods of
7143         inf_child_target.
7144         (inf_child_follow_fork): Delete.
7145         (inf_child_target::can_create_inferior)
7146         (inf_child_target::can_attach): New.
7147         (inf_child_target::has_all_memory, inf_child_target::has_memory)
7148         (inf_child_target::has_stack, inf_child_target::has_registers)
7149         (inf_child_target::has_execution): New.
7150         (inf_child_fileio_open, inf_child_fileio_pwrite)
7151         (inf_child_fileio_pread, inf_child_fileio_fstat)
7152         (inf_child_fileio_close, inf_child_fileio_unlink)
7153         (inf_child_fileio_readlink, inf_child_use_agent)
7154         (inf_child_can_use_agent): Refactor as methods of
7155         inf_child_target.
7156         (return_zero, inf_child_target): Delete.
7157         (inf_child_target::inf_child_target): New.
7158         * inf-child.h: Include "target.h".
7159         (inf_child_target): Delete function prototype.
7160         (inf_child_target): New class.
7161         (inf_child_open_target, inf_child_mourn_inferior)
7162         (inf_child_maybe_unpush_target): Delete.
7163         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
7164         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
7165         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
7166         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
7167         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
7168         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
7169         (inf_ptrace_wait, inf_ptrace_xfer_partial)
7170         (inf_ptrace_thread_alive, inf_ptrace_files_info)
7171         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
7172         methods of inf_ptrace_target.
7173         (inf_ptrace_target): Delete function.
7174         * inf-ptrace.h: Include "inf-child.h".
7175         (inf_ptrace_target): Delete function declaration.
7176         (inf_ptrace_target): New class.
7177         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
7178         * linux-nat.c (linux_target): New.
7179         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
7180         (linux_nat_target::~linux_nat_target): New.
7181         (linux_child_post_attach, linux_child_post_startup_inferior)
7182         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
7183         (linux_child_remove_fork_catchpoint)
7184         (linux_child_insert_vfork_catchpoint)
7185         (linux_child_remove_vfork_catchpoint)
7186         (linux_child_insert_exec_catchpoint)
7187         (linux_child_remove_exec_catchpoint)
7188         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
7189         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
7190         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
7191         (linux_nat_stopped_data_address)
7192         (linux_nat_stopped_by_sw_breakpoint)
7193         (linux_nat_supports_stopped_by_sw_breakpoint)
7194         (linux_nat_stopped_by_hw_breakpoint)
7195         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
7196         (linux_nat_kill, linux_nat_mourn_inferior)
7197         (linux_nat_xfer_partial, linux_nat_thread_alive)
7198         (linux_nat_update_thread_list, linux_nat_pid_to_str)
7199         (linux_nat_thread_name, linux_child_pid_to_exec_file)
7200         (linux_child_static_tracepoint_markers_by_strid)
7201         (linux_nat_is_async_p, linux_nat_can_async_p)
7202         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
7203         (linux_nat_supports_multi_process)
7204         (linux_nat_supports_disable_randomization, linux_nat_async)
7205         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
7206         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
7207         (linux_nat_fileio_open, linux_nat_fileio_readlink)
7208         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
7209         methods of linux_nat_target.
7210         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
7211         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
7212         parameter.
7213         (check_stopped_by_watchpoint): Adjust.
7214         (linux_xfer_partial): Delete.
7215         (linux_target_install_ops, linux_target, linux_nat_add_target):
7216         Delete.
7217         (linux_nat_target::linux_nat_target): New.
7218         * linux-nat.h: Include "inf-ptrace.h".
7219         (linux_nat_target): New.
7220         (linux_target, linux_target_install_ops, linux_nat_add_target):
7221         Delete function declarations.
7222         (linux_target): Declare global.
7223         * linux-thread-db.c (thread_db_target): New.
7224         (thread_db_target::thread_db_target): New.
7225         (thread_db_ops): Delete.
7226         (the_thread_db_target): New.
7227         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
7228         (thread_db_update_thread_list, thread_db_pid_to_str)
7229         (thread_db_extra_thread_info)
7230         (thread_db_thread_handle_to_thread_info)
7231         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
7232         (thread_db_resume): Refactor as methods of thread_db_target.
7233         (init_thread_db_ops): Delete.
7234         (_initialize_thread_db): Remove reference to init_thread_db_ops.
7235         * x86-linux-nat.c: Don't include "linux-nat.h".
7236         (super_post_startup_inferior): Delete.
7237         (x86_linux_nat_target::~x86_linux_nat_target): New.
7238         (x86_linux_child_post_startup_inferior)
7239         (x86_linux_read_description, x86_linux_enable_btrace)
7240         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
7241         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
7242         methods of x86_linux_nat_target.
7243         (x86_linux_create_target): Delete.  Bits folded ...
7244         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
7245         pointer.
7246         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
7247         (x86_linux_nat_target): New class.
7248         (x86_linux_create_target): Delete.
7249         (x86_linux_add_target): Now takes a linux_nat_target pointer.
7250         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
7251         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
7252         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
7253         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
7254         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
7255         make extern.
7256         (x86_use_watchpoints): Delete.
7257         * x86-nat.h: Include "breakpoint.h" and "target.h".
7258         (x86_use_watchpoints): Delete.
7259         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
7260         (x86_stopped_by_watchpoint, x86_stopped_data_address)
7261         (x86_insert_watchpoint, x86_remove_watchpoint)
7262         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
7263         (x86_stopped_by_hw_breakpoint): New declarations.
7264         (x86_nat_target): New template class.
7265
7266         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
7267         (the_ppc_linux_nat_target): New.
7268         (ppc_linux_fetch_inferior_registers)
7269         (ppc_linux_can_use_hw_breakpoint)
7270         (ppc_linux_region_ok_for_hw_watchpoint)
7271         (ppc_linux_ranged_break_num_registers)
7272         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
7273         (ppc_linux_insert_mask_watchpoint)
7274         (ppc_linux_remove_mask_watchpoint)
7275         (ppc_linux_can_accel_watchpoint_condition)
7276         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
7277         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
7278         (ppc_linux_watchpoint_addr_within_range)
7279         (ppc_linux_masked_watch_num_registers)
7280         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
7281         (ppc_linux_read_description): Refactor as methods of
7282         ppc_linux_nat_target.
7283         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
7284
7285         * procfs.c (procfs_xfer_partial): Delete forward declaration.
7286         (procfs_target): New class.
7287         (the_procfs_target): New.
7288         (procfs_target): Delete function.
7289         (procfs_auxv_parse, procfs_attach, procfs_detach)
7290         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
7291         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
7292         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
7293         (procfs_create_inferior, procfs_update_thread_list)
7294         (procfs_thread_alive, procfs_pid_to_str)
7295         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
7296         (procfs_stopped_data_address, procfs_insert_watchpoint)
7297         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
7298         (proc_find_memory_regions, procfs_info_proc)
7299         (procfs_make_note_section): Refactor as methods of procfs_target.
7300         (_initialize_procfs): Adjust.
7301         * sol-thread.c (sol_thread_target): New class.
7302         (sol_thread_ops): Now a sol_thread_target.
7303         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
7304         (sol_thread_fetch_registers, sol_thread_store_registers)
7305         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
7306         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
7307         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
7308         (init_sol_thread_ops): Delete.
7309         (_initialize_sol_thread): Adjust.  Remove references to
7310         init_sol_thread_ops and complete_target_initialization.
7311
7312         * windows-nat.c (windows_nat_target): New class.
7313         (windows_fetch_inferior_registers)
7314         (windows_store_inferior_registers, windows_resume, windows_wait)
7315         (windows_attach, windows_detach, windows_pid_to_exec_file)
7316         (windows_files_info, windows_create_inferior)
7317         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
7318         (windows_close, windows_pid_to_str, windows_xfer_partial)
7319         (windows_get_tib_address, windows_get_ada_task_ptid)
7320         (windows_thread_name, windows_thread_alive): Refactor as
7321         windows_nat_target methods.
7322         (do_initial_windows_stuff): Adjust.
7323         (windows_target): Delete function.
7324         (_initialize_windows_nat): Adjust.
7325
7326         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
7327         (darwin_mourn_inferior, darwin_kill_inferior)
7328         (darwin_create_inferior, darwin_attach, darwin_detach)
7329         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
7330         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
7331         (darwin_supports_multi_process): Refactor as darwin_nat_target
7332         methods.
7333         (darwin_resume_to, darwin_files_info): Delete.
7334         (_initialize_darwin_inferior): Rename to ...
7335         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
7336         * darwin-nat.h: Include "inf-child.h".
7337         (darwin_nat_target): New class.
7338         (darwin_complete_target): Delete.
7339         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
7340         (darwin_target): New.
7341         (i386_darwin_fetch_inferior_registers)
7342         (i386_darwin_store_inferior_registers): Refactor as methods of
7343         darwin_nat_target.
7344         (darwin_complete_target): Delete, with ...
7345         (_initialize_i386_darwin_nat): ... bits factored out here.
7346
7347         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
7348         (the_alpha_linux_nat_target): New.
7349         (alpha_linux_register_u_offset): Refactor as
7350         alpha_linux_nat_target method.
7351         (_initialize_alpha_linux_nat): Adjust.
7352         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
7353         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7354         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
7355         methods of linux_nat_trad_target.
7356         (linux_trad_target): Delete.
7357         * linux-nat-trad.h (linux_trad_target): Delete function.
7358         (linux_nat_trad_target): New class.
7359         * mips-linux-nat.c (mips_linux_nat_target): New class.
7360         (super_fetch_registers, super_store_registers, super_close):
7361         Delete.
7362         (the_mips_linux_nat_target): New.
7363         (mips64_linux_regsets_fetch_registers)
7364         (mips64_linux_regsets_store_registers)
7365         (mips64_linux_fetch_registers, mips64_linux_store_registers)
7366         (mips_linux_register_u_offset, mips_linux_read_description)
7367         (mips_linux_can_use_hw_breakpoint)
7368         (mips_linux_stopped_by_watchpoint)
7369         (mips_linux_stopped_data_address)
7370         (mips_linux_region_ok_for_hw_watchpoint)
7371         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
7372         (mips_linux_close): Refactor as methods of mips_linux_nat.
7373         (_initialize_mips_linux_nat): Adjust to C++ification.
7374
7375         * aix-thread.c (aix_thread_target): New class.
7376         (aix_thread_ops): Now an aix_thread_target.
7377         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
7378         (aix_thread_fetch_registers, aix_thread_store_registers)
7379         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
7380         (aix_thread_thread_alive, aix_thread_pid_to_str)
7381         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
7382         Refactor as methods of aix_thread_target.
7383         (init_aix_thread_ops): Delete.
7384         (_initialize_aix_thread): Remove references to init_aix_thread_ops
7385         and complete_target_initialization.
7386         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
7387         (rs6000_nat_target): New class.
7388         (the_rs6000_nat_target): New.
7389         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
7390         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
7391         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
7392         (super_create_inferior): Delete.
7393         (_initialize_rs6000_nat): Adjust to C++ification.
7394
7395         * arm-linux-nat.c (arm_linux_nat_target): New class.
7396         (the_arm_linux_nat_target): New.
7397         (arm_linux_fetch_inferior_registers)
7398         (arm_linux_store_inferior_registers, arm_linux_read_description)
7399         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
7400         (arm_linux_remove_hw_breakpoint)
7401         (arm_linux_region_ok_for_hw_watchpoint)
7402         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
7403         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
7404         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
7405         arm_linux_nat_target.
7406         (_initialize_arm_linux_nat): Adjust to C++ification.
7407
7408         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
7409         (the_aarch64_linux_nat_target): New.
7410         (aarch64_linux_fetch_inferior_registers)
7411         (aarch64_linux_store_inferior_registers)
7412         (aarch64_linux_child_post_startup_inferior)
7413         (aarch64_linux_read_description)
7414         (aarch64_linux_can_use_hw_breakpoint)
7415         (aarch64_linux_insert_hw_breakpoint)
7416         (aarch64_linux_remove_hw_breakpoint)
7417         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
7418         (aarch64_linux_region_ok_for_hw_watchpoint)
7419         (aarch64_linux_stopped_data_address)
7420         (aarch64_linux_stopped_by_watchpoint)
7421         (aarch64_linux_watchpoint_addr_within_range)
7422         (aarch64_linux_can_do_single_step): Refactor as methods of
7423         aarch64_linux_nat_target.
7424         (super_post_startup_inferior): Delete.
7425         (_initialize_aarch64_linux_nat): Adjust to C++ification.
7426
7427         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
7428         (the_hppa_linux_nat_target): New.
7429         (hppa_linux_fetch_inferior_registers)
7430         (hppa_linux_store_inferior_registers): Refactor as methods of
7431         hppa_linux_nat_target.
7432         (_initialize_hppa_linux_nat): Adjust to C++ification.
7433
7434         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
7435         (the_ia64_linux_nat_target): New.
7436         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
7437         (ia64_linux_stopped_data_address)
7438         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
7439         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
7440         ia64_linux_nat_target methods.
7441         (super_xfer_partial): Delete.
7442         (_initialize_ia64_linux_nat): Adjust to C++ification.
7443
7444         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
7445         (the_m32r_linux_nat_target): New.
7446         (m32r_linux_fetch_inferior_registers)
7447         (m32r_linux_store_inferior_registers): Refactor as
7448         m32r_linux_nat_target methods.
7449         (_initialize_m32r_linux_nat): Adjust to C++ification.
7450
7451         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
7452         (the_m68k_linux_nat_target): New.
7453         (m68k_linux_fetch_inferior_registers)
7454         (m68k_linux_store_inferior_registers): Refactor as
7455         m68k_linux_nat_target methods.
7456         (_initialize_m68k_linux_nat): Adjust to C++ification.
7457
7458         * s390-linux-nat.c (s390_linux_nat_target): New class.
7459         (the_s390_linux_nat_target): New.
7460         (s390_linux_fetch_inferior_registers)
7461         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
7462         (s390_insert_watchpoint, s390_remove_watchpoint)
7463         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
7464         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
7465         (s390_auxv_parse, s390_read_description): Refactor as methods of
7466         s390_linux_nat_target.
7467         (_initialize_s390_nat): Adjust to C++ification.
7468
7469         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
7470         (the_sparc_linux_nat_target): New.
7471         (_initialize_sparc_linux_nat): Adjust to C++ification.
7472         * sparc-nat.c (sparc_fetch_inferior_registers)
7473         (sparc_store_inferior_registers): Remove target_ops parameter.
7474         * sparc-nat.h (sparc_fetch_inferior_registers)
7475         (sparc_store_inferior_registers): Remove target_ops parameter.
7476         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
7477         (the_sparc64_linux_nat_target): New.
7478         (_initialize_sparc64_linux_nat): Adjust to C++ification.
7479
7480         * spu-linux-nat.c (spu_linux_nat_target): New class.
7481         (the_spu_linux_nat_target): New.
7482         (spu_child_post_startup_inferior, spu_child_post_attach)
7483         (spu_child_wait, spu_fetch_inferior_registers)
7484         (spu_store_inferior_registers, spu_xfer_partial)
7485         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
7486         methods.
7487         (_initialize_spu_nat): Adjust to C++ification.
7488
7489         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
7490         (the_tilegx_linux_nat_target): New.
7491         (fetch_inferior_registers, store_inferior_registers):
7492         Refactor as methods.
7493         (_initialize_tile_linux_nat): Adjust to C++ification.
7494
7495         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
7496         (the_xtensa_linux_nat_target): New.
7497         (xtensa_linux_fetch_inferior_registers)
7498         (xtensa_linux_store_inferior_registers): Refactor as
7499         xtensa_linux_nat_target methods.
7500         (_initialize_xtensa_linux_nat): Adjust to C++ification.
7501
7502         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
7503         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
7504         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
7505         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
7506         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
7507         (fbsd_stopped_by_sw_breakpoint)
7508         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
7509         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
7510         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
7511         (fbsd_post_startup_inferior, fbsd_post_attach)
7512         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
7513         (fbsd_set_syscall_catchpoint)
7514         (super_xfer_partial, super_resume, super_wait)
7515         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
7516         (fbsd_handle_debug_trap): Remove target_ops parameter.
7517         (fbsd_nat_add_target): Delete.
7518         * fbsd-nat.h: Include "inf-ptrace.h".
7519         (fbsd_nat_add_target): Delete.
7520         (USE_SIGTRAP_SIGINFO): Define.
7521         (fbsd_nat_target): New class.
7522
7523         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
7524         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
7525         (amd64bsd_target): Delete.
7526         * amd64-bsd-nat.h: New file.
7527         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
7528         "x86-bsd-nat.h".
7529         (amd64_fbsd_nat_target): New class.
7530         (the_amd64_fbsd_nat_target): New.
7531         (amd64fbsd_read_description): Refactor as method of
7532         amd64_fbsd_nat_target.
7533         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7534         (_initialize_amd64fbsd_nat): Adjust to C++ification.
7535         * amd64-nat.h (amd64bsd_target): Delete function declaration.
7536         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
7537         (i386bsd_store_inferior_registers): Remove target_ops parameter.
7538         (i386bsd_target): Delete.
7539         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
7540         (i386bsd_fetch_inferior_registers)
7541         (i386bsd_store_inferior_registers): Declare.
7542         (i386_bsd_nat_target): New class.
7543         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
7544         (the_i386_fbsd_nat_target): New.
7545         (i386fbsd_resume, i386fbsd_read_description): Refactor as
7546         i386_fbsd_nat_target methods.
7547         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7548         (_initialize_i386fbsd_nat): Adjust to C++ification.
7549         * x86-bsd-nat.c (super_mourn_inferior): Delete.
7550         (x86bsd_mourn_inferior, x86bsd_target): Delete.
7551         (_initialize_x86_bsd_nat): Adjust to C++ification.
7552         * x86-bsd-nat.h: Include "x86-nat.h".
7553         (x86bsd_target): Delete declaration.
7554         (x86bsd_nat_target): New class.
7555
7556         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
7557         (the_aarch64_fbsd_nat_target): New.
7558         (aarch64_fbsd_fetch_inferior_registers)
7559         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
7560         aarch64_fbsd_nat_target.
7561         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
7562         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
7563         (the_alpha_bsd_nat_target): New.
7564         (alphabsd_fetch_inferior_registers)
7565         (alphabsd_store_inferior_registers): Refactor as
7566         alpha_bsd_nat_target methods.
7567         (_initialize_alphabsd_nat): Refactor as methods of
7568         alpha_bsd_nat_target.
7569         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
7570         (the_amd64_nbsd_nat_target): New.
7571         (_initialize_amd64nbsd_nat): Adjust to C++ification.
7572         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
7573         (the_amd64_obsd_nat_target): New.
7574         (_initialize_amd64obsd_nat): Adjust to C++ification.
7575         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
7576         (the_arm_fbsd_nat_target): New.
7577         (arm_fbsd_fetch_inferior_registers)
7578         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
7579         (_initialize_arm_fbsd_nat): Refactor as methods of
7580         arm_fbsd_nat_target.
7581         (_initialize_arm_fbsd_nat): Adjust to C++ification.
7582         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
7583         (the_arm_netbsd_nat_target): New.
7584         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
7585         arm_netbsd_nat_target.
7586         (_initialize_arm_netbsd_nat): Adjust to C++ification.
7587         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
7588         (the_hppa_nbsd_nat_target): New.
7589         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
7590         hppa_nbsd_nat_target methods.
7591         (_initialize_hppanbsd_nat): Adjust to C++ification.
7592         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
7593         (the_hppa_obsd_nat_target): New.
7594         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
7595         methods of hppa_obsd_nat_target.
7596         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
7597         add_target.
7598         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
7599         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
7600         add_target.
7601         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
7602         (_initialize_i386obsd_nat): Use add_target.
7603         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
7604         (the_m68k_bsd_nat_target): New.
7605         (m68kbsd_fetch_inferior_registers)
7606         (m68kbsd_store_inferior_registers): Refactor as methods of
7607         m68k_bsd_nat_target.
7608         (_initialize_m68kbsd_nat): Adjust to C++ification.
7609         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
7610         (the_mips_fbsd_nat_target): New.
7611         (mips_fbsd_fetch_inferior_registers)
7612         (mips_fbsd_store_inferior_registers): Refactor as methods of
7613         mips_fbsd_nat_target.
7614         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
7615         add_target.
7616         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
7617         (the_mips_nbsd_nat_target): New.
7618         (mipsnbsd_fetch_inferior_registers)
7619         (mipsnbsd_store_inferior_registers): Refactor as methods of
7620         mips_nbsd_nat_target.
7621         (_initialize_mipsnbsd_nat): Adjust to C++ification.
7622         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
7623         (the_mips64_obsd_nat_target): New.
7624         (mips64obsd_fetch_inferior_registers)
7625         (mips64obsd_store_inferior_registers): Refactor as methods of
7626         mips64_obsd_nat_target.
7627         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
7628         add_target.
7629         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
7630         nbsd_nat_target.
7631         * nbsd-nat.h: Include "inf-ptrace.h".
7632         (nbsd_nat_target): New class.
7633         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
7634         (obsd_wait): Refactor as methods of obsd_nat_target.
7635         (obsd_add_target): Delete.
7636         * obsd-nat.h: Include "inf-ptrace.h".
7637         (obsd_nat_target): New class.
7638         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
7639         (the_ppc_fbsd_nat_target): New.
7640         (ppcfbsd_fetch_inferior_registers)
7641         (ppcfbsd_store_inferior_registers): Refactor as methods of
7642         ppc_fbsd_nat_target.
7643         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
7644         add_target.
7645         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
7646         (the_ppc_nbsd_nat_target): New.
7647         (ppcnbsd_fetch_inferior_registers)
7648         (ppcnbsd_store_inferior_registers): Refactor as methods of
7649         ppc_nbsd_nat_target.
7650         (_initialize_ppcnbsd_nat): Adjust to C++ification.
7651         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
7652         (the_ppc_obsd_nat_target): New.
7653         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
7654         methods of ppc_obsd_nat_target.
7655         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
7656         add_target.
7657         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
7658         (the_sh_nbsd_nat_target): New.
7659         (shnbsd_fetch_inferior_registers)
7660         (shnbsd_store_inferior_registers): Refactor as methods of
7661         sh_nbsd_nat_target.
7662         (_initialize_shnbsd_nat): Adjust to C++ification.
7663         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
7664         (inf_ptrace_xfer_partial): Delete.
7665         (sparc_xfer_partial, sparc_target): Delete.
7666         * sparc-nat.h (sparc_fetch_inferior_registers)
7667         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
7668         (sparc_target): Delete function declaration.
7669         (sparc_target): New template class.
7670         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
7671         (_initialize_sparcnbsd_nat): Adjust to C++ification.
7672         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
7673         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
7674         add_target.
7675         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
7676         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
7677         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
7678         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
7679         add_target.
7680         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
7681         (the_vax_bsd_nat_target): New.
7682         (vaxbsd_fetch_inferior_registers)
7683         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
7684         methods.
7685         (_initialize_vaxbsd_nat): Adjust to C++ification.
7686
7687         * bsd-kvm.c (bsd_kvm_target): New class.
7688         (bsd_kvm_ops): Now a bsd_kvm_target.
7689         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
7690         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
7691         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
7692         bsd_kvm_target.
7693         (bsd_kvm_return_one): Delete.
7694         (bsd_kvm_add_target): Adjust to C++ification.
7695
7696         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
7697         (nto_procfs_target_procfs): New classes.
7698         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
7699         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
7700         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
7701         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
7702         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
7703         (procfs_remove_hw_breakpoint, procfs_resume)
7704         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
7705         (procfs_kill_inferior, procfs_store_registers)
7706         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
7707         as methods of nto_procfs_target.
7708         (nto_procfs_ops): Now an nto_procfs_target_procfs.
7709         (nto_native_ops): Delete.
7710         (procfs_open, procfs_native_open): Delete.
7711         (nto_native_ops): Now an nto_procfs_target_native.
7712         (init_procfs_targets): Adjust to C++ification.
7713         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
7714         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
7715         Refactor as methods of nto_procfs_target.
7716
7717         * go32-nat.c (go32_nat_target): New class.
7718         (the_go32_nat_target): New.
7719         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
7720         (go32_store_registers, go32_xfer_partial, go32_files_info)
7721         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
7722         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
7723         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
7724         (go32_pid_to_str): Refactor as methods of go32_nat_target.
7725         (go32_target): Delete.
7726         (_initialize_go32_nat): Adjust to C++ification.
7727
7728         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
7729         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
7730         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
7731         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
7732         gnu_nat_target.
7733         (gnu_target): Delete.
7734         * gnu-nat.h (gnu_target): Delete.
7735         (gnu_nat_target): New class.
7736         * i386-gnu-nat.c (gnu_base_target): New.
7737         (i386_gnu_nat_target): New class.
7738         (the_i386_gnu_nat_target): New.
7739         (_initialize_i386gnu_nat): Adjust to C++ification.
7740
7741 2018-05-02  Pedro Alves  <palves@redhat.com>
7742
7743         * bfd-target.c (target_bfd_xclose): Rename to ...
7744         (target_bfd_close): ... this.
7745         (target_bfd_reopen): Adjust.
7746         * target.c (target_close): Remove references to to_xclose.
7747         * target.h (target_ops::to_xclose): Delete.
7748         (target_ops::to_close): Update comments.
7749
7750 2018-05-02  Pedro Alves  <palves@redhat.com>
7751
7752         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
7753         "linux-nat.h".
7754         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
7755         * inf-ptrace.c (inf_ptrace_register_u_offset)
7756         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7757         (inf_ptrace_store_register, inf_ptrace_store_registers)
7758         (inf_ptrace_trad_target): Move to ...
7759         * linux-nat-trad.c: ... this new file.
7760         * linux-nat-trad.h: New file.
7761         * linux-nat.c (linux_target_install_ops): Make extern.
7762         (linux_trad_target): Delete.
7763         * linux-nat.h (linux_trad_target): Delete declaration.
7764         (linux_target_install_ops): Declare.
7765         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
7766         "linux-nat.h".
7767
7768 2018-05-02  Pedro Alves  <palves@redhat.com>
7769
7770         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7771         procfs_target/add_target here.
7772         * procfs.c (procfs_target): Make static.
7773         (_initialize_procfs): Call add_target here.
7774         * procfs.h (struct target_ops): Remove forward declaration.
7775         (procfs_target): Remove declaration.
7776         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
7777
7778 2018-05-02  Pedro Alves  <palves@redhat.com>
7779
7780         * procfs.c (procfs_stopped_by_watchpoint)
7781         (procfs_insert_watchpoint, procfs_remove_watchpoint)
7782         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
7783         Forward declare.
7784         (procfs_use_watchpoints): Delete, move contents...
7785         (procfs_target): ... here.
7786         * procfs.h (procfs_use_watchpoints): Delete declaration.
7787         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7788         procfs_use_watchpoints.
7789         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
7790         procfs_use_watchpoints.
7791
7792 2018-05-02  Tom Tromey  <tom@tromey.com>
7793
7794         PR python/20084:
7795         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
7796         and var_zuinteger_unlimited.
7797         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
7798         and PARAM_ZUINTEGER_UNLIMITED.
7799         (set_parameter_value): Handle var_zuinteger and
7800         var_zuinteger_unlimited.
7801         (add_setshow_generic): Likewise.
7802         (parmpy_init): Likewise.
7803
7804 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
7805
7806         PR rust/23124
7807         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
7808         pointer is not null before dereferencing it.
7809
7810 2018-04-30  Tom Tromey  <tom@tromey.com>
7811
7812         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
7813         is_mi_like_p.
7814
7815 2018-04-30  Tom Tromey  <tom@tromey.com>
7816
7817         * breakpoint.c (mention): Remove use of is_mi_like_p.
7818         (print_mention_ranged_breakpoint): Likewise.
7819         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
7820         of is_mi_like_p.
7821
7822 2018-04-30  Tom Tromey  <tom@tromey.com>
7823
7824         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
7825
7826 2018-04-30  Tom Tromey  <tom@tromey.com>
7827
7828         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
7829         (info_spu_event_command): Remove some uses of is_mi_like_p.
7830
7831 2018-04-30  Tom Tromey  <tom@tromey.com>
7832
7833         * python/py-framefilter.c (py_print_single_arg)
7834         (enumerate_locals, py_print_args, py_print_frame): Remove some
7835         uses of is_mi_like_p.
7836
7837 2018-04-30  Tom Tromey  <tom@tromey.com>
7838
7839         * ui-out.c: Update.
7840         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
7841         * ui-out.h (ui_out::is_mi_like_p): Now const.
7842         (ui_out::do_is_mi_like_p): Now const.
7843         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
7844
7845 2018-04-30  Tom Tromey  <tom@tromey.com>
7846
7847         * varobj.c (varobj_set_visualizer): Use new_reference.
7848         * python/python.c (gdbpy_decode_line): Use new_reference.
7849         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
7850         new_reference.
7851
7852 2018-04-30  Tom Tromey  <tom@tromey.com>
7853
7854         * varobj.c (install_new_value): Use new_reference.
7855         * value.h (value_incref): Return void.  Swap intro comment with
7856         value_decref.
7857         * value.c (set_value_parent): Use new_reference.
7858         (value_incref): Return void.  Update intro comment.
7859         (release_value): Use new_reference.
7860         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
7861
7862 2018-04-30  Tom Tromey  <tom@tromey.com>
7863
7864         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
7865         * gdb_bfd.h (new_bfd_ref): Remove.
7866         (gdb_bfd_open): Update comment.
7867         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
7868         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
7869         (gdb_bfd_fdopenr): Use new_reference.
7870         * exec.c (exec_file_attach): Use new_reference.
7871
7872 2018-04-30  Tom Tromey  <tom@tromey.com>
7873
7874         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
7875         method.
7876
7877 2018-04-30  Tom Tromey  <tom@tromey.com>
7878
7879         * jit.c (jit_read_code_entry): Use type_align.
7880         * i386-tdep.c (i386_gdbarch_init): Don't call
7881         set_gdbarch_long_long_align_bit.
7882         * gdbarch.sh: Remove long_long_align_bit.
7883         * gdbarch.c, gdbarch.h: Rebuild.
7884         * arc-tdep.c (arc_type_align): New function.
7885         (arc_gdbarch_init): Use arc_type_align.  Don't call
7886         set_gdbarch_long_long_align_bit.
7887
7888 2018-04-30  Tom Tromey  <tom@tromey.com>
7889
7890         * rust-lang.c (rust_type_alignment): Remove.
7891         (rust_composite_type): Use type_align.
7892
7893 2018-04-30  Tom Tromey  <tom@tromey.com>
7894
7895         * NEWS: Mention Type.align.
7896         * python/py-type.c (typy_get_alignof): New function.
7897         (type_object_getset): Add "alignof".
7898
7899 2018-04-30  Tom Tromey  <tom@tromey.com>
7900
7901         PR exp/17095:
7902         * NEWS: Update.
7903         * std-operator.def (UNOP_ALIGNOF): New operator.
7904         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
7905         New.
7906         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
7907         * c-lang.c (c_op_print_tab): Add alignof.
7908         * c-exp.y (ALIGNOF): New token.
7909         (exp): Add "ALIGNOF" production.
7910         (ident_tokens): Add _Alignof and alignof.
7911
7912 2018-04-30  Tom Tromey  <tom@tromey.com>
7913
7914         * i386-tdep.c (i386_type_align): New function.
7915         (i386_gdbarch_init): Update.
7916         * gdbarch.sh (type_align): New method.
7917         * gdbarch.c, gdbarch.h: Rebuild.
7918         * arch-utils.h (default_type_align): Declare.
7919         * arch-utils.c (default_type_align): New function.
7920         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
7921         (struct type) <align_log2>: New field.
7922         <instance_flags>: Now a bitfield.
7923         (TYPE_RAW_ALIGN): New macro.
7924         (type_align, type_raw_align, set_type_align): Declare.
7925         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
7926         functions.
7927         * dwarf2read.c (quirk_rust_enum): Set type alignment.
7928         (get_alignment, maybe_set_alignment): New functions.
7929         (read_structure_type, read_enumeration_type, read_array_type)
7930         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
7931         (read_subrange_type, read_base_type): Set type alignment.
7932
7933 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
7934
7935         * dwarf2read.c (read_index_from_section): Use bool.
7936
7937 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
7938
7939         PR gdb/22950
7940         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
7941         with #ifdef.
7942
7943 2018-04-29  John Reiser  <jreiser@BitWagon.com>
7944
7945         PR build/22873
7946         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
7947         last step, and do it atomically.
7948
7949 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
7950
7951         * compile/compile-c-types.c (convert_int, convert_float):
7952         Update for C FE v1.
7953
7954 2018-04-27  Tom Tromey  <tom@tromey.com>
7955
7956         PR rust/22545:
7957         * rust-lang.c (rust_inclusive_range_type_p): New function.
7958         (rust_range): Handle inclusive ranges.
7959         (rust_compute_range): Likewise.
7960         * rust-exp.y (struct rust_op) <inclusive>: New field.
7961         (DOTDOTEQ): New constant.
7962         (range_expr): Add "..=" productions.
7963         (operator_tokens): Add "..=" token.
7964         (ast_range): Add "inclusive" parameter.
7965         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
7966         ranges.
7967         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
7968         bounds values.
7969         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
7970         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
7971         Update comments.
7972         * expprint.c (print_subexp_standard): Handle new bounds values.
7973         (dump_subexp_body_standard): Likewise.
7974
7975 2018-04-27  Tom Tromey  <tom@tromey.com>
7976
7977         * configure: Rebuild.
7978         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
7979         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
7980         "OVERRIDE".
7981         (class symbol_needs_eval_context): Likewise.
7982         * dwarf2read.c (mock_mapped_index::symbol_name_count)
7983         (mock_mapped_index::symbol_name_at): Use "override".  Remove
7984         "virtual".
7985         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
7986         "override".
7987         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
7988         * aarch64-tdep.c (instruction_reader::read): Use "override".
7989         (instruction_reader_test::read): Likewise.
7990         * arm-tdep.c (instruction_reader::read): Use "override".
7991         (instruction_reader_thumb::read): Likewise.
7992
7993 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
7994
7995         PR remote/9665
7996         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
7997         instead of remote_send.
7998         (remote_send): Remove.
7999
8000 2018-04-26  Pedro Alves  <palves@redhat.com>
8001
8002         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
8003         find_function_start_sal instead of find_pc_line.
8004
8005 2018-04-26  Pedro Alves  <palves@redhat.com>
8006
8007         * breakpoint.c (set_breakpoint_location_function): Handle
8008         mst_data_gnu_ifunc.
8009         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
8010         * elfread.c (elf_symtab_read): Give data symbols with
8011         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
8012         (elf_rel_plt_read): Update comment.
8013         * linespec.c (convert_linespec_to_sals): Handle
8014         mst_data_gnu_ifunc.
8015         (minsym_found): Handle mst_data_gnu_ifunc.
8016         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
8017         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
8018         * parse.c (find_minsym_type_and_address): Handle
8019         mst_data_gnu_ifunc.
8020         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
8021         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
8022         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
8023         comment.
8024         <mst_data_gnu_ifunc>: New enumerator.
8025
8026 2018-04-26  Pedro Alves  <palves@redhat.com>
8027
8028         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
8029         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
8030         'want_trampoline' parameter by a lookup_msym_prefer parameter.
8031         Handle it.
8032         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
8033         (lookup_minimal_symbol_by_pc): Adjust.
8034         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
8035         (lookup_solib_trampoline_symbol_by_pc): Adjust.
8036         * minsyms.h (lookup_msym_prefer): New enum.
8037         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8038         parameter by a lookup_msym_prefer parameter.
8039
8040 2018-04-26  Pedro Alves  <palves@redhat.com>
8041
8042         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
8043         ends in "@plt" instead of looking at the symbol's section.
8044
8045 2018-04-26  Pedro Alves  <palves@redhat.com>
8046
8047         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
8048         all references.
8049         (find_pc_partial_function_gnu_ifunc): Rename to ...
8050         (find_pc_partial_function): ... this, and remove references to
8051         'is_gnu_ifunc_p'.
8052         (find_pc_partial_function): Delete old implementation.
8053         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
8054
8055 2018-04-26  Pedro Alves  <palves@redhat.com>
8056
8057         * linespec.c (struct bound_minimal_symbol_search_key): New.
8058         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
8059         skip first line if we found a GNU ifunc minimal symbol by name.
8060         (compare_msymbols): Change parameters to work with a destructured
8061         lhs minsym.
8062         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
8063         functions.
8064
8065 2018-04-26  Pedro Alves  <palves@redhat.com>
8066
8067         * breakpoint.c (set_breakpoint_location_function): Don't resolve
8068         ifunc targets here.  Instead, if we have an ifunc minsym, use its
8069         address/name.
8070         (add_location_to_breakpoint): Store the minsym and the objfile in
8071         the breakpoint location.
8072         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
8073         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
8074         Record the minsym in the sal.
8075         * symtab.h (symtab_and_line) <msymbol>: New field.
8076
8077 2018-04-26  Pedro Alves  <palves@redhat.com>
8078
8079         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
8080         unless we actually resolved the ifunc.
8081
8082 2018-04-26  Pedro Alves  <palves@redhat.com>
8083
8084         * c-exp.y (variable production): Prefer ifunc minsyms over
8085         regular function symbols.
8086         * symtab.c (find_gnu_ifunc): New function.
8087         * minsyms.h (lookup_msym_prefer): New enum.
8088         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8089         parameter by a lookup_msym_prefer parameter.
8090         * symtab.h (find_gnu_ifunc): New declaration.
8091
8092 2018-04-26  Pedro Alves  <palves@redhat.com>
8093
8094         * blockframe.c (find_gnu_ifunc_target_type): New function.
8095         (find_function_type): New.
8096         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
8097         return a value with a memory address.
8098         (eval_call): For calls to GNU ifunc functions, try to find the
8099         type of the target function from the type that the resolver
8100         returns.
8101         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
8102         symbols.
8103         * infcall.c (find_function_return_type): Delete.
8104         (find_function_addr): Add 'function_type' parameter.  For calls to
8105         GNU ifunc functions, try to find the type of the target function
8106         from the type that the resolver returns, and return it via
8107         FUNCTION_TYPE.
8108         (call_function_by_hand_dummy): Adjust to use the function type
8109         returned by find_function_addr.
8110         (find_function_addr): Add 'function_type' parameter and move
8111         description here.
8112         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
8113         declarations.
8114
8115 2018-04-26  Pedro Alves  <palves@redhat.com>
8116
8117         * c-exp.y (variable production): Skip finding an alias for ifunc
8118         symbols.
8119
8120 2018-04-26  Pedro Alves  <palves@redhat.com>
8121
8122         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
8123
8124 2018-04-25  Pedro Alves  <palves@redhat.com>
8125
8126         * infcmd.c (kill_command): Print the pid as string, not the whole
8127         thread's ptid.  Add comment.  s/has been killed/killed/ in output
8128         message.
8129         * remote.c (remote_detach_1): Print the pid as string, not the
8130         whole thread's ptid.
8131
8132 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
8133             Sergio Durigan Junior  <sergiodj@redhat.com>
8134             Pedro Alves  <palves@redhat.com>
8135
8136         * infcmd.c (kill_command): Print message when inferior has
8137         been killed.
8138         * inferior.c (print_inferior_events): Remove 'static'.  Set as
8139         '1'.
8140         (add_inferior): Improve message printed when
8141         'print_inferior_events' is on.
8142         (exit_inferior): Remove message printed when
8143         'print_inferior_events' is on.
8144         (detach_inferior): Improve message printed when
8145         'print_inferior_events' is on.
8146         (initialize_inferiors): Use 'add_inferior_silent' to set
8147         'current_inferior_'.
8148         * inferior.h (print_inferior_events): Declare here as
8149         'extern'.
8150         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
8151         '[Detaching...]' messages when 'print_inferior_events' is on.
8152         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
8153         as prefix/suffix for messages.  Remove periods.  Fix erroneous
8154         'Detaching after fork from child...', replace it by '... from
8155         parent...'.
8156         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
8157         prefix/suffix when printing 'Detaching...' messages.  Print
8158         them when 'print_inferior_events' is on.
8159         * remote.c (remote_detach_1): Print message when detaching
8160         from inferior and '!is_fork_parent'.
8161
8162 2018-04-24  Tom Tromey  <tom@tromey.com>
8163
8164         * cli-out.h: Reindent.
8165
8166 2018-04-24  Tom Tromey  <tom@tromey.com>
8167
8168         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
8169         (cli_ui_out::do_field_string): Use fputs_filtered.
8170         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
8171
8172 2018-04-23  Tom Tromey  <tom@tromey.com>
8173
8174         * guile/scm-frame.c (gdbscm_frame_read_var): Use
8175         gdb::unique_xmalloc_ptr.
8176
8177 2018-04-23  Tom Tromey  <tom@tromey.com>
8178
8179         * configure: Rebuild.
8180
8181 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
8182
8183         PR gdb/23095
8184         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
8185         prepare_for_testing.  Set normal_bp to r_debug_state if target
8186         is bsd.
8187
8188 2018-04-21  Pedro Alves  <palves@redhat.com>
8189             Rajendra SY  <rajendra.sy@gmail.com>
8190
8191         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
8192         * remote.c (extended_remote_attach): In all-stop mode, mark the
8193         thread as executing.
8194
8195 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8196
8197         * thread.c (thread_apply_all_command): Fix comment.
8198         (thread_command): Fix comment.
8199
8200 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
8201
8202         * common/tdesc.h (tdesc_create_feature): Remove xml filename
8203         parameter.
8204         * features/aarch64-core.c (create_feature_aarch64_core):
8205         Regenerate.
8206         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
8207         Likewise.
8208         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
8209         Likewise.
8210         * features/i386/32bit-avx512.c
8211         (create_feature_i386_32bit_avx512): Likewise.
8212         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
8213         Likewise.
8214         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
8215         Likewise.
8216         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
8217         Likewise.
8218         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
8219         Likewise.
8220         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
8221         Likewise.
8222         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
8223         Likewise.
8224         * features/i386/64bit-avx512.c
8225         (create_feature_i386_64bit_avx512): Likewise.
8226         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
8227         Likewise.
8228         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
8229         Likewise.
8230         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
8231         Likewise.
8232         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
8233         Likewise.
8234         * features/i386/64bit-segments.c
8235         (create_feature_i386_64bit_segments): Likewise.
8236         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
8237         Likewise.
8238         * features/i386/x32-core.c
8239         (create_feature_i386_x32_core): Likewise.
8240         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
8241         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
8242         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
8243         * target-descriptions.c: In generated code, don't pass xml
8244         filename.
8245
8246 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8247
8248         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
8249         (print_xml_feature::visit_post): Likewise.
8250         (print_xml_feature::visit): Likewise.
8251         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
8252         (print_xml_feature): Add new class.
8253         * regformats/regdat.sh: Null xmltarget on feature targets.
8254         * target-descriptions.c (struct target_desc): Add xmltarget.
8255         (maintenance_check_tdesc_xml_convert): Add unittest function.
8256         (tdesc_get_features_xml): Add function to get xml.
8257         (maintenance_check_xml_descriptions): Test xml generation.
8258         * xml-tdesc.c (string_read_description_xml): Add function.
8259         * xml-tdesc.h (string_read_description_xml): Add declaration.
8260
8261 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8262
8263         * features/Makefile: Add feature marker to targets with new style
8264         target descriptions.
8265         * regformats/aarch64.dat: Regenerate.
8266         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
8267         * regformats/i386/amd64-avx-linux.dat: Likewise.
8268         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
8269         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
8270         * regformats/i386/amd64-linux.dat: Likewise.
8271         * regformats/i386/amd64-mpx-linux.dat: Likewise.
8272         * regformats/i386/amd64.dat: Likewise.
8273         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
8274         * regformats/i386/i386-avx-linux.dat: Likewise.
8275         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
8276         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
8277         * regformats/i386/i386-linux.dat: Likewise.
8278         * regformats/i386/i386-mmx-linux.dat: Likewise.
8279         * regformats/i386/i386-mpx-linux.dat: Likewise.
8280         * regformats/i386/i386.dat: Likewise.
8281         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
8282         * regformats/i386/x32-avx-linux.dat: Likewise.
8283         * regformats/i386/x32-linux.dat: Likewise.
8284         * regformats/tic6x-c62x-linux.dat: Likewise.
8285         * regformats/tic6x-c64x-linux.dat: Likewise.
8286         * regformats/tic6x-c64xp-linux.dat: Likewise.
8287         * regformats/regdat.sh: Parse feature marker.
8288
8289 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8290
8291         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
8292         (tdesc_osabi_name): Likewise.
8293         * target-descriptions.c (tdesc_architecture_name): Add new
8294         function.
8295         (tdesc_osabi_name): Likewise.
8296
8297 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8298
8299         * common/tdesc.c (tdesc_predefined_type): Move to here.
8300         (tdesc_named_type): Likewise.
8301         (tdesc_create_vector): Likewise.
8302         (tdesc_create_struct): Likewise.
8303         (tdesc_set_struct_size): Likewise.
8304         (tdesc_create_union): Likewise.
8305         (tdesc_create_flags): Likewise.
8306         (tdesc_create_enum): Likewise.
8307         (tdesc_add_field): Likewise.
8308         (tdesc_add_typed_bitfield): Likewise.
8309         (tdesc_add_bitfield): Likewise.
8310         (tdesc_add_flag): Likewise.
8311         (tdesc_add_enum_value): Likewise.
8312         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
8313         (struct tdesc_type_vector): Likewise.
8314         (struct tdesc_type_field): Likewise.
8315         (struct tdesc_type_with_fields): Likewise.
8316         (tdesc_create_enum): Add declaration.
8317         (tdesc_add_typed_bitfield): Likewise.
8318         (tdesc_add_enum_value): Likewise.
8319         * target-descriptions.c (tdesc_type_field): Move from here.
8320         (tdesc_type_builtin): Likewise.
8321         (tdesc_type_vector): Likewise.
8322         (tdesc_type_with_fields): Likewise.
8323         (tdesc_predefined_types): Likewise.
8324         (tdesc_named_type): Likewise.
8325         (tdesc_create_vector): Likewise.
8326         (tdesc_create_struct): Likewise.
8327         (tdesc_set_struct_size): Likewise.
8328         (tdesc_create_union): Likewise.
8329         (tdesc_create_flags): Likewise.
8330         (tdesc_create_enum): Likewise.
8331         (tdesc_add_field): Likewise.
8332         (tdesc_add_typed_bitfield): Likewise.
8333         (tdesc_add_bitfield): Likewise.
8334         (tdesc_add_flag): Likewise.
8335         (tdesc_add_enum_value): Likewise.
8336         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
8337         (tdesc_add_typed_bitfield): Likewise.
8338         (tdesc_add_enum_value): Likewise.
8339
8340 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8341
8342         * common/tdesc.c (tdesc_feature::accept): Move to here.
8343         (tdesc_feature::operator==): Likewise.
8344         (tdesc_create_reg): Likewise.
8345         * common/tdesc.h (tdesc_type_kind): Likewise.
8346         (struct tdesc_type): Likewise.
8347         (struct tdesc_feature): Likewise.
8348         * regformats/regdat.sh: Create a feature.
8349         * target-descriptions.c (tdesc_type_kind): Move from here.
8350         (tdesc_type): Likewise.
8351         (tdesc_type_up): Likewise.
8352         (tdesc_feature): Likewise.
8353         (tdesc_create_reg): Likewise.
8354
8355 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8356
8357         * Makefile.in: Add arch/tdesc.c
8358         * common/tdesc.c: New file.
8359         * common/tdesc.h (tdesc_element_visitor): Move to here.
8360         (tdesc_element): Likewise.
8361         (tdesc_reg): Likewise.
8362         (tdesc_reg_up): Likewise.
8363         * regformats/regdef.h (reg): Add offset to constructors.
8364         * target-descriptions.c (tdesc_element_visitor): Move from here.
8365         (tdesc_element): Likewise.
8366         (tdesc_reg): Likewise.
8367         (tdesc_reg_up): Likewise.
8368
8369 2018-04-17  Tom Tromey  <tom@tromey.com>
8370
8371         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
8372         discriminant field.
8373
8374 2018-04-17  Tom Tromey  <tom@tromey.com>
8375
8376         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
8377
8378 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8379
8380         * symtab.c (print_symbol_info): Skip printing filename and line
8381         number when `last' is NULL.
8382         (symtab_symbol_info): Use empty string instead of NULL for first
8383         invocation of print_symbol_info.
8384         (rbreak_command): Pass NULL to `last' parameter of
8385         print_symbol_info.
8386
8387 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
8388
8389         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
8390         instead of nullptr.
8391
8392 2018-04-16  Pedro Alves  <palves@redhat.com>
8393
8394         * MAINTAINERS (sh): Remove.
8395         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
8396         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
8397         (ALLDEPFILES): Remove sh64-tdep.c.
8398         * NEWS: Mentions that support for SH-5/SH64 is removed.
8399         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
8400         (sh*-*-openbsd*): Ditto.
8401         (sh64-*-elf*): Remove.
8402         (sh*): Remove.
8403         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
8404         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
8405         * sh-tdep.c: No longer include "sh64-tdep.h".
8406         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
8407         * sh64-tdep.c, sh64-tdep.h: Remove files.
8408
8409 2018-04-16  Pedro Alves  <palves@redhat.com>
8410
8411         * MAINTAINERS: Remove m88k.
8412         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
8413         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
8414         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
8415         * NEWS: Mention that support for m88k was removed.
8416         * configure.host (m88*-*-*): Remove support.
8417         * configure.nat (m88k-*-*): Remove support.
8418         * configure.tgt (m88*-*-openbsd*): Remove.
8419         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
8420
8421 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
8422
8423         * configure.tgt (x86_tobjs): New variable.
8424         (amd64_tobjs, i386_tobjs): Use it.
8425
8426 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8427
8428         * symtab.c (print_symbol_info): Precede the symbol definition by
8429         the line number when available.
8430         * NEWS: Advertise this enhancement.
8431
8432 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8433
8434         * NEWS (New options): announce set/show record btrace cpu.
8435         * btrace.c: Include record-btrace.h.
8436         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
8437         the vendor is unknown.
8438         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
8439         Maybe overwrite the btrace configuration's cpu.
8440         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
8441         (btrace_fetch): Add cpu parameter.  Update callers.
8442         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
8443         Maybe overwrite the btrace configuration's cpu.  Skip enabling
8444         errata workarounds if the vendor is unknown.
8445         * python/py-record-btrace.c: Include record-btrace.h.
8446         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
8447         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
8448         * record-btrace.c (record_btrace_cpu_state_kind): New.
8449         (record_btrace_cpu): New.
8450         (set_record_btrace_cpu_cmdlist): New.
8451         (record_btrace_get_cpu): New.
8452         (require_btrace_thread, record_btrace_info)
8453         (record_btrace_resume_thread): Call record_btrace_get_cpu.
8454         (cmd_set_record_btrace_cpu_none): New.
8455         (cmd_set_record_btrace_cpu_auto): New.
8456         (cmd_set_record_btrace_cpu): New.
8457         (cmd_show_record_btrace_cpu): New.
8458         (_initialize_record_btrace): Initialize set/show record btrace cpu
8459         commands.
8460         * record-btrace.h (record_btrace_get_cpu): New.
8461
8462 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8463
8464         * record.c (set_record_command): Fix typo in message.
8465
8466 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8467
8468         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
8469
8470 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8471
8472         * infrun.c (process_event_stop_test): Call
8473         gdbarch_in_indirect_branch_thunk.
8474         * gdbarch.sh (in_indirect_branch_thunk): New.
8475         * gdbarch.c: Regenerated.
8476         * gdbarch.h: Regenerated.
8477         * x86-tdep.h: New.
8478         * x86-tdep.c: New.
8479         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
8480         (HFILES_NO_SRCDIR): Add x86-tdep.h.
8481         (ALLDEPFILES): Add x86-tdep.c.
8482         * arch-utils.h (default_in_indirect_branch_thunk): New.
8483         * arch-utils.c (default_in_indirect_branch_thunk): New.
8484         * i386-tdep: Include x86-tdep.h.
8485         (i386_in_indirect_branch_thunk): New.
8486         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
8487         function.
8488         * amd64-tdep: Include x86-tdep.h.
8489         (amd64_in_indirect_branch_thunk): New.
8490         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
8491
8492 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
8493
8494         PR gdb/23053
8495         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
8496         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
8497         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
8498         regression.
8499
8500 2018-04-12  Tom Tromey  <tom@tromey.com>
8501
8502         * rust-lang.c (rust_print_struct_def): Remove univariant code.
8503         (rust_evaluate_subexp): Likewise.
8504
8505 2018-04-12  Pedro Alves  <palves@redhat.com>
8506
8507         * procfs.c (procfs_detach): Make forward declaration's prototype
8508         match definition's protototype.
8509         (proc_get_LDT_entry): Remove stale do_cleanups call.
8510
8511 2018-04-12  Pedro Alves  <palves@redhat.com>
8512
8513         * target.h (target_ops::to_has_exited): Delete.
8514         (target_has_exited): Delete.
8515         * target-delegates.c: Regenerate.
8516
8517 2018-04-11  Pedro Alves  <palves@redhat.com>
8518
8519         * target.c (fileio_fh_t::t): Add comment.
8520         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8521         (target_fileio_close): Handle a NULL target.
8522         (invalidate_fileio_fh): New.
8523         (target_close): Call it.
8524         * remote.c (remote_hostio_send_command): No longer check whether
8525         remote_desc is open.
8526
8527 2018-04-11  Pedro Alves  <palves@redhat.com>
8528
8529         * target.c (fileio_fh_t): Make it a named struct instead of a
8530         typedef.
8531         (fileio_fh_t::is_closed): New method.
8532         (DEF_VEC_O (fileio_fh_t)): Remove.
8533         (fileio_fhandles): Now a std::vector.
8534         (is_closed_fileio_fh): Delete.
8535         (acquire_fileio_fd): Adjust.  Rename parameters.
8536         (release_fileio_fd): Adjust.
8537         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
8538         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8539         (target_fileio_close): Adjust.
8540
8541 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
8542
8543         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
8544         index.
8545
8546 2018-04-10  Pedro Alves  <palves@redhat.com>
8547
8548         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
8549         (scoped_finish_thread_state): New class.
8550         * infcmd.c (run_command_1): Use it instead of finish_thread_state
8551         cleanup.
8552         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
8553         (fetch_inferior_event, normal_stop): Likewise.
8554         * thread.c (finish_thread_state_cleanup): Delete.
8555
8556 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8557             Pedro Alves  <palves@redhat.com>
8558
8559         * value.c: Include "selftest.h" and "common/array-view.h".
8560         (struct range) <operator ==>: New.
8561         (test_ranges_contain): New.
8562         (check_ranges_vector): New.
8563         (test_insert_into_bit_range_vector): New.
8564         (_initialize_values): Register selftests.
8565         * common/array-view.h (operator==, operator!=): New.
8566
8567 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8568
8569         * common/gdb_vecs.h (unordered_remove): Add overload that takes
8570         an iterator.
8571         * inline-frame.c: Include <algorithm>.
8572         (struct inline_state): Add constructor.
8573         (inline_state_s): Remove.
8574         (DEF_VEC_O(inline_state_s)): Remove.
8575         (inline_states): Change type to std::vector.
8576         (find_inline_frame_state): Adjust to std::vector.
8577         (allocate_inline_frame_state): Remove.
8578         (clear_inline_frame_state): Adjust to std::vector.
8579         (skip_inline_frames): Adjust to std::vector.
8580
8581 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8582
8583         * tracepoint.h (struct trace_state_variable): Add constructor.
8584         <name>: Change type to std::string.
8585         * tracepoint.c (tsv_s): Remove.
8586         (DEF_VEC_O(tsv_s)): Remove.
8587         (tvariables): Change to std::vector.
8588         (create_trace_state_variable): Adjust to std::vector.
8589         (find_trace_state_variable): Likewise.
8590         (find_trace_state_variable_by_number): Likewise.
8591         (delete_trace_state_variable): Likewise.
8592         (trace_variable_command): Adjust to std::string.
8593         (delete_trace_variable_command): Likewise.
8594         (tvariables_info_1): Adjust to std::vector.
8595         (save_trace_state_variables): Likewise.
8596         (start_tracing): Likewise.
8597         (merge_uploaded_trace_state_variables): Adjust to std::vector
8598         and std::string.
8599         * target.h (struct target_ops)
8600         <to_download_trace_state_variable>: Pass reference to
8601         trace_state_variable.
8602         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
8603         * target-delegates.c: Re-generate.
8604         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
8605         (mi_tsv_deleted): Likewise.
8606         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
8607         * remote.c (remote_download_trace_state_variable): Change
8608         pointer to reference and adjust.
8609         * make-target-delegates (parse_argtypes): Handle references.
8610         (write_function_header): Likewise.
8611         (munge_type): Likewise.
8612
8613 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8614
8615         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8616         string_view-selftests.c.
8617         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
8618         testsuite.
8619         * unittests/basic_string_view/cons/char/1.cc: Likewise.
8620         * unittests/basic_string_view/cons/char/2.cc: Likewise.
8621         * unittests/basic_string_view/cons/char/3.cc: Likewise.
8622         * unittests/basic_string_view/element_access/char/1.cc:
8623         Likewise.
8624         * unittests/basic_string_view/element_access/char/empty.cc:
8625         Likewise.
8626         * unittests/basic_string_view/element_access/char/front_back.cc:
8627         Likewise.
8628         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
8629         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
8630         Likewise.
8631         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
8632         Likewise.
8633         * unittests/basic_string_view/modifiers/swap/char/1.cc:
8634         Likewise.
8635         * unittests/basic_string_view/operations/compare/char/1.cc:
8636         Likewise.
8637         * unittests/basic_string_view/operations/compare/char/13650.cc:
8638         Likewise.
8639         * unittests/basic_string_view/operations/copy/char/1.cc:
8640         Likewise.
8641         * unittests/basic_string_view/operations/data/char/1.cc:
8642         Likewise.
8643         * unittests/basic_string_view/operations/find/char/1.cc:
8644         Likewise.
8645         * unittests/basic_string_view/operations/find/char/2.cc:
8646         Likewise.
8647         * unittests/basic_string_view/operations/find/char/3.cc:
8648         Likewise.
8649         * unittests/basic_string_view/operations/find/char/4.cc:
8650         Likewise.
8651         * unittests/basic_string_view/operations/rfind/char/1.cc:
8652         Likewise.
8653         * unittests/basic_string_view/operations/rfind/char/2.cc:
8654         Likewise.
8655         * unittests/basic_string_view/operations/rfind/char/3.cc:
8656         Likewise.
8657         * unittests/basic_string_view/operations/substr/char/1.cc:
8658         Likewise.
8659         * unittests/basic_string_view/operators/char/2.cc: Likewise.
8660         * unittests/string_view-selftests.c: New file.
8661
8662 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8663
8664         * unittests/basic_string_view/capacity/1.cc: New file.
8665         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
8666         * unittests/basic_string_view/cons/char/1.cc: New file.
8667         * unittests/basic_string_view/cons/char/2.cc: New file.
8668         * unittests/basic_string_view/cons/char/3.cc: New file.
8669         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
8670         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
8671         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
8672         * unittests/basic_string_view/element_access/char/1.cc: New file.
8673         * unittests/basic_string_view/element_access/char/2.cc: New file.
8674         * unittests/basic_string_view/element_access/char/empty.cc: New file.
8675         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
8676         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
8677         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
8678         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
8679         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
8680         * unittests/basic_string_view/include.cc: New file.
8681         * unittests/basic_string_view/inserters/char/1.cc: New file.
8682         * unittests/basic_string_view/inserters/char/2.cc: New file.
8683         * unittests/basic_string_view/inserters/char/3.cc: New file.
8684         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
8685         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
8686         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
8687         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
8688         * unittests/basic_string_view/literals/types.cc: New file.
8689         * unittests/basic_string_view/literals/values.cc: New file.
8690         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
8691         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
8692         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
8693         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
8694         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
8695         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
8696         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
8697         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
8698         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
8699         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
8700         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
8701         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
8702         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
8703         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
8704         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
8705         * unittests/basic_string_view/operations/data/char/1.cc: New file.
8706         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
8707         * unittests/basic_string_view/operations/find/char/1.cc: New file.
8708         * unittests/basic_string_view/operations/find/char/2.cc: New file.
8709         * unittests/basic_string_view/operations/find/char/3.cc: New file.
8710         * unittests/basic_string_view/operations/find/char/4.cc: New file.
8711         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
8712         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
8713         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
8714         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
8715         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
8716         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
8717         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
8718         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
8719         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
8720         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
8721         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
8722         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
8723         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
8724         * unittests/basic_string_view/operators/char/2.cc: New file.
8725         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
8726         * unittests/basic_string_view/range_access/char/1.cc: New file.
8727         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
8728         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
8729         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
8730         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
8731         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
8732         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
8733         * unittests/basic_string_view/requirements/typedefs.cc: New file.
8734         * unittests/basic_string_view/typedefs.cc: New file.
8735         * unittests/basic_string_view/types/1.cc: New file.
8736
8737 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8738
8739         * common/gdb_string_view.h: Remove libstdc++ implementation
8740         details, adjust to gdb reality.
8741         * common/gdb_string_view.tcc: Likewise.
8742         * cli/cli-script.c (struct string_view): Remove.
8743         (user_args) <m_args>: Change element type to gdb::string_view.
8744         (user_args::insert_args): Adjust.
8745
8746 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8747
8748         * common/gdb_string_view.h: New file.
8749         * common/gdb_string_view.tcc: New file.
8750
8751 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8752
8753         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
8754         * configure: Re-generate.
8755
8756 2018-04-09  Pedro Alves  <palves@redhat.com>
8757
8758         * gdbarch.sh: Include "observable.h" instead of "observer.h".
8759         (set_target_gdbarch): Call
8760         gdb::observers::architecture_changed.notify instead of
8761         observer_notify_architecture_changed.
8762
8763 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8764
8765         * tracepoint.c (struct current_traceframe_cleanup): Remove.
8766         (do_restore_current_traceframe_cleanup): Remove.
8767         (restore_current_traceframe_cleanup_dtor): Remove.
8768         (make_cleanup_restore_current_traceframe): Remove.
8769         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
8770         New.
8771         * tracepoint.h (struct scoped_restore_current_traceframe): New.
8772         * infrun.c (fetch_inferior_event): Use
8773         scoped_restore_current_traceframe.
8774
8775 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8776
8777         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
8778         Remove.
8779         <n_allocated_type_units>: Remove.
8780         <all_type_units>: Change to std::vector.
8781         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8782         to std::vector change.
8783         (dwarf2_per_objfile::get_cutu): Likewise.
8784         (dwarf2_per_objfile::get_tu): Likewise.
8785         (create_signatured_type_table_from_index): Likewise.
8786         (create_signatured_type_table_from_debug_names): Likewise.
8787         (dw2_symtab_iter_next): Likewise.
8788         (dw2_print_stats): Likewise.
8789         (dw2_expand_all_symtabs): Likewise.
8790         (dw2_expand_marked_cus): Likewise.
8791         (dw2_debug_names_iterator::next): Likewise.
8792         (dwarf2_initialize_objfile): Likewise.
8793         (add_signatured_type_cu_to_table): Likewise.
8794         (create_all_type_units): Likewise.
8795         (add_type_unit): Likewise.
8796         (struct tu_abbrev_offset): Add constructor.
8797         (build_type_psymtabs_1): Adjust to std::vector change.
8798         (print_tu_stats): Likewise.
8799         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
8800         (write_debug_names): Likewise.
8801
8802 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8803
8804         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
8805         Make an std::vector.
8806         <n_comp_units>: Remove.
8807         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8808         to std::vector change.
8809         (dwarf2_per_objfile::get_cutu): Likewise.
8810         (dwarf2_per_objfile::get_cu): Likewise.
8811         (create_cus_from_index): Likewise.
8812         (create_addrmap_from_index): Likewise.
8813         (create_addrmap_from_aranges): Likewise.
8814         (dwarf2_read_index): Likewise.
8815         (dw2_find_last_source_symtab): Likewise.
8816         (dw2_map_symtabs_matching_filename): Likewise.
8817         (dw2_symtab_iter_next): Likewise.
8818         (dw2_print_stats): Likewise.
8819         (dw2_expand_all_symtabs): Likewise.
8820         (dw2_expand_symtabs_with_fullname): Likewise.
8821         (dw2_expand_marked_cus): Likewise.
8822         (dw2_map_symbol_filenames): Likewise.
8823         (create_cus_from_debug_names): Likewise.
8824         (dwarf2_read_debug_names): Likewise.
8825         (dw2_debug_names_iterator::next): Likewise.
8826         (dwarf2_initialize_objfile): Likewise.
8827         (set_partial_user): Likewise.
8828         (dwarf2_build_psymtabs_hard): Likewise.
8829         (read_comp_units_from_section): Remove arguments, adjust to
8830         std::vector change.
8831         (create_all_comp_units): Adjust to std::vector and
8832         read_comp_units_from_section changes.
8833         (dwarf2_find_containing_comp_unit): Adjust to std::vector
8834         change.
8835         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
8836         (psyms_seen_size): Likewise.
8837         (write_gdbindex): Likewise.
8838         (write_debug_names): Likewise.
8839
8840 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8841
8842         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
8843         with dwarf2_per_objfile.
8844         (create_cus_from_index): Likewise.
8845         (create_signatured_type_table_from_index): Likewise.
8846         (dwarf2_read_index): Likewise.
8847         (dwarf2_initialize_objfile): Likewise.
8848         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
8849         per_cu rather than get_dwarf2_per_objfile.
8850
8851 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8852
8853         * dwarf2read.h (struct signatured_type): Forward declare.
8854         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
8855         New methods.
8856         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
8857         (dw2_get_cutu): ...this.
8858         (dwarf2_per_objfile::get_cu): Rename from...
8859         (dw2_get_cu): ...this.
8860         (dwarf2_per_objfile::get_tu): New.
8861         (create_addrmap_from_index): Adjust.
8862         (create_addrmap_from_aranges): Adjust.
8863         (dw2_find_last_source_symtab): Adjust.
8864         (dw2_map_symtabs_matching_filename): Adjust.
8865         (dw2_symtab_iter_next): Adjust.
8866         (dw2_print_stats): Adjust.
8867         (dw2_expand_all_symtabs): Adjust.
8868         (dw2_expand_symtabs_with_fullname): Adjust.
8869         (dw2_expand_marked_cus): Adjust.
8870         (dw_expand_symtabs_matching_file_matcher): Adjust.
8871         (dw2_map_symbol_filenames): Adjust.
8872         (dw2_debug_names_iterator::next): Adjust.
8873         (dwarf2_initialize_objfile): Adjust.
8874         (set_partial_user): Adjust.
8875         (dwarf2_build_psymtabs_hard): Adjust.
8876
8877 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8878
8879         * dwarf2read.c (create_signatured_type_table_from_debug_names):
8880         Remove unused variables.
8881         (dw2_map_symtabs_matching_filename): Likewise.
8882         (dwarf2_record_block_ranges): Likewise.
8883         (dwarf2_read_addr_index): Likewise.
8884         (follow_die_offset): Likewise.
8885
8886 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8887
8888         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
8889         to symbol_file_add_main.
8890
8891 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8892
8893         PR mi/22299
8894         * mi/mi-console.c (do_fputc_async_safe): New.
8895         (mi_console_file::write_async_safe): New.
8896         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
8897         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
8898         New.
8899         * ui-file.c (ui_file::putstrn): Adjust call to
8900         fputstrn_unfiltered.
8901         * utils.c (printchar): Replace do_fputs and do_fprintf
8902         parameters by do_fputc.
8903         (fputstr_filtered): Adjust call to printchar.
8904         (fputstr_unfiltered): Likewise.
8905         (fputstrn_filtered): Likewise.
8906         (fputstrn_unfiltered): Add do_fputc parameter, pass to
8907         printchar.
8908         * utils.h (do_fputc_ftype): New typedef.
8909         (fputstrn_unfiltered): Add do_fputc parameter.
8910
8911 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8912
8913         * regformats/i386/i386-avx.dat: Remove.
8914
8915 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
8916
8917         PR gdb/22979
8918         * amd64-tdep.c (amd64_none_init_abi): New function.
8919         (amd64_x32_none_init_abi): New function.
8920         (_initialize_amd64_tdep): Register handlers for x86-64 and
8921         x64_32 with GDB_OSABI_NONE.
8922         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
8923         GDB_OSABI_NONE osabi.
8924
8925 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
8926
8927         PR gdb/22980
8928         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
8929         GDB_OSABI_NONE.
8930         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
8931         * osabi.c (gdb_osabi_names): Add "unknown" entry.
8932
8933 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
8934
8935         * common/byte-vector.h (char_vector): New type.
8936         * target.h (target_read_alloc): Return
8937         gdb::optional<byte_vector>.
8938         (target_read_stralloc): Return gdb::optional<char_vector>.
8939         (target_get_osdata): Return gdb::optional<char_vector>.
8940         * target.c (target_read_alloc_1): Templatize.  Replacement
8941         manual memory management with vector.
8942         (target_read_alloc): Change return type, adjust.
8943         (target_read_stralloc): Change return type, adjust.
8944         (target_get_osdata): Change return type, adjust.
8945         * auxv.c (struct auxv_info) <length>: Remove.
8946         <data>: Change type to gdb::optional<byte_vector>.
8947         (auxv_inferior_data_cleanup): Free auxv_info with delete.
8948         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
8949         (target_auxv_search): Adjust.
8950         (fprint_target_auxv): Adjust.
8951         * avr-tdep.c (avr_io_reg_read_command): Adjust.
8952         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
8953         (linux_make_corefile_notes): Adjust.
8954         * osdata.c (get_osdata): Adjust.
8955         * remote.c (remote_get_threads_with_qxfer): Adjust.
8956         (remote_memory_map): Adjust.
8957         (remote_traceframe_info): Adjust.
8958         (btrace_read_config): Adjust.
8959         (remote_read_btrace): Adjust.
8960         (remote_pid_to_exec_file): Adjust.
8961         * solib-aix.c (solib_aix_get_library_list): Adjust.
8962         * solib-dsbt.c (decode_loadmap): Don't free buf.
8963         (dsbt_get_initial_loadmaps): Adjust.
8964         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
8965         * solib-target.c (solib_target_current_sos): Adjust.
8966         * tracepoint.c (sdata_make_value): Adjust.
8967         * xml-support.c (xinclude_start_include): Adjust.
8968         (xml_fetch_content_from_file): Adjust.
8969         * xml-support.h (xml_fetch_another): Change return type.
8970         (xml_fetch_content_from_file): Change return type.
8971         * xml-syscall.c (xml_init_syscalls_info): Adjust.
8972         * xml-tdesc.c (file_read_description_xml): Adjust.
8973         (fetch_available_features_from_target): Change return type.
8974         (target_fetch_description_xml): Adjust.
8975         (target_read_description_xml): Adjust.
8976
8977 2018-04-06  Tom Tromey  <tom@tromey.com>
8978
8979         * value.c (~value): Update.
8980         (struct value) <contents>: Now unique_xmalloc_ptr.
8981         (value_contents_bits_eq, allocate_value_contents)
8982         (value_contents_raw, value_contents_all_raw)
8983         (value_contents_for_printing, value_contents_for_printing_const)
8984         (set_value_enclosing_type): Update.
8985
8986 2018-04-06  Tom Tromey  <tom@tromey.com>
8987
8988         * value.c (range_s): Remove typedef, VEC.
8989         (struct range): Add operator<.
8990         (range_lessthan): Remove.
8991         (ranges_contain): Change type.
8992         (~value): Update.
8993         (struct value) <unavailable, optimized_out>: Now std::vector.
8994         (value_entirely_available)
8995         (value_entirely_covered_by_range_vector)
8996         (value_entirely_unavailable, value_entirely_optimized_out):
8997         Update.
8998         (insert_into_bit_range_vector): Change argument type.
8999         (find_first_range_overlap): Likewise.
9000         (struct ranges_and_idx, value_contents_bits_eq)
9001         (require_not_optimized_out, require_available): Update.
9002         (ranges_copy_adjusted): Change argument types.
9003         (value_optimized_out, value_copy, value_fetch_lazy): Update.
9004
9005 2018-04-06  Tom Tromey  <tom@tromey.com>
9006
9007         * value.c (~value): Update.
9008         (struct value) <parent>: Now a value_ref_ptr.
9009         (value_parent, set_value_parent, value_address, value_copy):
9010         Update.
9011
9012 2018-04-06  Tom Tromey  <tom@tromey.com>
9013
9014         * value.c (struct value): Add constructor, destructor, and member
9015         initializers.
9016         (allocate_value_lazy, value_decref): Update.
9017
9018 2018-04-06  Tom Tromey  <tom@tromey.com>
9019
9020         * value.c (struct value) <released, next>: Remove.
9021         (all_values): Now a std::vector.
9022         (allocate_value_lazy): Update.
9023         (value_next): Remove.
9024         (value_mark, value_free_to_mark, release_value)
9025         (value_release_to_mark): Update.
9026
9027 2018-04-06  Tom Tromey  <tom@tromey.com>
9028
9029         * value.h (fetch_subexp_value, value_release_to_mark): Update.
9030         (free_value_chain): Remove.
9031         * value.c (free_value_chain): Remove.
9032         (value_release_to_mark): Return a std::vector.
9033         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
9034         std::vector.
9035         (check_condition): Update.
9036         * eval.c (fetch_subexp_value): Change "val_chain" to a
9037         std::vector.
9038         * breakpoint.c (update_watchpoint): Update.
9039         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
9040
9041 2018-04-06  Tom Tromey  <tom@tromey.com>
9042
9043         * value.h (free_all_values): Remove.
9044         * value.c (free_all_values): Remove.
9045
9046 2018-04-06  Tom Tromey  <tom@tromey.com>
9047
9048         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
9049         (value_history_chain, value_history_count): Remove.
9050         (value_history): New global.
9051         (record_latest_value, access_value_history, show_values)
9052         (preserve_values): Update.
9053
9054 2018-04-06  Tom Tromey  <tom@tromey.com>
9055
9056         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
9057         * varobj.c (varobj_set_display_format, varobj_set_value)
9058         (install_default_visualizer, construct_visualizer)
9059         (install_new_value, ~varobj, varobj_get_value_type)
9060         (my_value_of_variable, varobj_editable_p): Update.
9061         * c-varobj.c (c_describe_child, c_value_of_variable)
9062         (cplus_number_of_children, cplus_describe_child): Update.
9063         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
9064         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
9065         (ada_value_of_variable, ada_value_is_changeable_p): Update.
9066
9067 2018-04-06  Tom Tromey  <tom@tromey.com>
9068
9069         * printcmd.c (last_examine_address): Change type to
9070         value_ref_ptr.
9071         (do_examine, x_command): Update.
9072
9073 2018-04-06  Tom Tromey  <tom@tromey.com>
9074
9075         * value.c (release_value): Update.
9076         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
9077         (struct bpstats) <val>: Now a value_ref_ptr.
9078         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9079         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9080         (~watchpoint, print_it_watchpoint, watch_command_1)
9081         (invalidate_bp_value_on_memory_change): Update.
9082
9083 2018-04-06  Tom Tromey  <tom@tromey.com>
9084
9085         * varobj.c (varobj_clear_saved_item)
9086         (update_dynamic_varobj_children, install_new_value, ~varobj):
9087         Update.
9088         * value.h (value_incref): Move declaration earlier.
9089         (value_decref): Rename from value_free.
9090         (struct value_ref_policy): New.
9091         (value_ref_ptr): New typedef.
9092         (struct value_deleter): Remove.
9093         (gdb_value_up): Remove typedef.
9094         (release_value): Change return type.
9095         (release_value_or_incref): Remove.
9096         * value.c (set_value_parent): Update.
9097         (value_incref): Change return type.
9098         (value_decref): Rename from value_free.
9099         (value_free_to_mark, free_all_values, free_value_chain): Update.
9100         (release_value): Return value_ref_ptr.
9101         (release_value_or_incref): Remove.
9102         (record_latest_value, set_internalvar, clear_internalvar):
9103         Update.
9104         * stack.c (info_frame_command): Don't call value_free.
9105         * python/py-value.c (valpy_dealloc, valpy_new)
9106         (value_to_value_object): Update.
9107         * printcmd.c (do_examine): Update.
9108         * opencl-lang.c (lval_func_free_closure): Update.
9109         * mi/mi-main.c (register_changed_p): Don't call value_free.
9110         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
9111         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
9112         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
9113         value_free.
9114         * guile/scm-value.c (vlscm_free_value_smob)
9115         (vlscm_scm_from_value): Update.
9116         * frame.c (frame_register_unwind, frame_unwind_register_signed)
9117         (frame_unwind_register_unsigned, get_frame_register_bytes)
9118         (put_frame_register_bytes): Don't call value_free.
9119         * findvar.c (address_from_register): Don't call value_free.
9120         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
9121         * dwarf2loc.c (entry_data_value_free_closure)
9122         (value_of_dwarf_reg_entry, free_pieced_value_closure)
9123         (dwarf2_evaluate_loc_desc_full): Update.
9124         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9125         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9126         (~watchpoint, watch_command_1)
9127         (invalidate_bp_value_on_memory_change): Update.
9128         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
9129
9130 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
9131
9132         PR gdb/23022
9133         * warning.m4: Add -Wno-error=deprecated-register.
9134         * configure: Re-generate.
9135
9136 2018-04-05  Tom Tromey  <tom@tromey.com>
9137
9138         * linespec.h: Remove include of "vec.h".
9139
9140 2018-04-05  Tom Tromey  <tom@tromey.com>
9141
9142         * linespec.c (typep): Remove typedef.
9143         (find_methods, find_superclass_methods): Take a std::vector.
9144         (find_method): Use std::vector.
9145
9146 2018-04-05  Tom Tromey  <tom@tromey.com>
9147
9148         * utils.c (compare_strings): Remove.
9149         * utils.h (compare_strings): Remove.
9150         * objc-lang.h (find_imps): Update.
9151         * objc-lang.c (find_methods): Take a std::vector.
9152         (uniquify_strings, find_imps): Likewise.
9153         * linespec.c (find_methods): Take a std::vector.
9154         (decode_objc): Use std::vector.
9155         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
9156         a std::vector.
9157         (find_method, find_function_symbols): Use std::vector.
9158
9159 2018-04-05  Tom Tromey  <tom@tromey.com>
9160
9161         * completer.c (completion_tracker::completion_tracker): Remove
9162         cast.
9163         (completion_tracker::discard_completions): Likewise.
9164         * breakpoint.c (ambiguous_names_p): Remove cast.
9165         * ada-lang.c (_initialize_ada_language): Remove cast.
9166         * utils.h (streq): Update.
9167         (streq_hash): Add new declaration.
9168         * utils.c (streq): Return bool.
9169         (streq_hash): New function.
9170
9171 2018-04-05  Tom Tromey  <tom@tromey.com>
9172
9173         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
9174         Remove a string copy.
9175
9176 2018-04-05  Tom Tromey  <tom@tromey.com>
9177
9178         * linespec.c (filter_results): Use std::vector.
9179         (decode_line_2, decode_line_full): Update.
9180
9181 2018-04-05  Tom Tromey  <tom@tromey.com>
9182
9183         * linespec.c (canonical_to_fullform): Return std::string.
9184         (filter_results): Update.
9185         (struct decode_line_2_item): Add constructor.
9186         <fullform, displayform>: Now std::string.
9187         (decode_line_2_compare_items): Now a std::sort comparator.
9188         (decode_line_2): Update.
9189
9190 2018-04-05  Tom Tromey  <tom@tromey.com>
9191
9192         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
9193         (unexpected_linespec_error): Update.
9194         (linespec_parse_basic, parse_linespec): Update.
9195
9196 2018-04-05  Tom Tromey  <tom@tromey.com>
9197
9198         * linespec.c (linespec_parse_basic): Reindent.
9199
9200 2018-04-05  Tom Tromey  <tom@tromey.com>
9201
9202         * minsyms.h (iterate_over_minimal_symbols): Update.
9203         * minsyms.c (iterate_over_minimal_symbols): Take a
9204         gdb::function_view.
9205         * linespec.c (struct collect_minsyms): Remove.
9206         (compare_msyms): Now a std::sort comparator.
9207         (add_minsym): Add parameters.
9208         (search_minsyms_for_name): Update.  Use std::vector.
9209
9210 2018-04-03  Tom Tromey  <tom@tromey.com>
9211
9212         * mipsread.c (read_alphacoff_dynamic_symtab): Use
9213         gdb::byte_vector.
9214
9215 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
9216
9217         * MAINTAINERS (Write After Approval): Add Weimin Pan.
9218
9219 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
9220
9221         PR gdb/16959
9222         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
9223         printing static type.
9224
9225 2018-04-01  Tom Tromey  <tom@tromey.com>
9226
9227         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
9228         (rs6000_xfer_shared_libraries): Update.
9229
9230 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
9231
9232         * common/gdb_vecs.h (char_ptr): Remove.
9233         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
9234
9235 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
9236
9237         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
9238         with std::vector.
9239         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
9240
9241 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
9242
9243         * tracepoint.h (struct uploaded_tp): Initialize fields.
9244         <actions, step_actions, cmd_strings>: Change type to
9245         std::vector<char *>.
9246         * tracepoint.c (get_uploaded_tp): Allocate with new.
9247         (free_uploaded_tps): Free with delete.
9248         (parse_tracepoint_definition): Adjust to std::vector change.
9249         * breakpoint.c (read_uploaded_action): Likewise.
9250         (create_tracepoint_from_upload): Likewise.
9251         * ctf.c (ctf_write_uploaded_tp): Likewise.
9252         (SET_ARRAY_FIELD): Likewise.
9253         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
9254
9255 2018-03-30  Tom Tromey  <tom@tromey.com>
9256
9257         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
9258         std::unique_ptr.
9259         (svr4_keep_data_in_core): Update.
9260         (svr4_read_so_list): Update.
9261
9262 2018-03-30  Tom Tromey  <tom@tromey.com>
9263
9264         * windows-nat.c (handle_output_debug_string, handle_exception):
9265         Update.
9266         * target.h (target_read_string): Update.
9267         * target.c (target_read_string): Change "string" to
9268         unique_xmalloc_ptr.
9269         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
9270         Update.
9271         * solib-frv.c (frv_current_sos): Update.
9272         * solib-dsbt.c (dsbt_current_sos): Update.
9273         * solib-darwin.c (darwin_current_sos): Update.
9274         * linux-thread-db.c (inferior_has_bug): Update.
9275         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
9276         Update.  Remove alloca.
9277         * ada-lang.c (ada_main_name): Update.
9278
9279 2018-03-30  Tom Tromey  <tom@tromey.com>
9280
9281         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
9282         (struct dwo_file_deleter): New.
9283         (dwo_file_up): New typedef.
9284         (open_and_init_dwo_file): Use dwo_file_up.
9285         (free_dwo_file_cleanup): Remove.
9286
9287 2018-03-30  Tom Tromey  <tom@tromey.com>
9288
9289         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
9290         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
9291
9292 2018-03-30  Tom Tromey  <tom@tromey.com>
9293
9294         * dwarf2read.c (class free_cached_comp_units): New class.
9295         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
9296         (free_cached_comp_units): Remove function.
9297
9298 2018-03-30  Tom Tromey  <tom@tromey.com>
9299
9300         * utils.h (make_cleanup_unpush_target): Remove.
9301         * inf-ptrace.c (struct target_unpusher): New.
9302         (target_unpush_up) New typedef.
9303         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
9304         target_unpush_up.
9305         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
9306
9307 2018-03-27  Tom Tromey  <tom@tromey.com>
9308
9309         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
9310
9311 2018-03-27  Pedro Alves  <palves@redhat.com>
9312             Tom Tromey  <tom@tromey.com>
9313
9314         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
9315         destructor.  Now a class.
9316         (gdb_readline_wrapper_cleanup): Remove function.
9317         (gdb_readline_wrapper): Remove cleanups.
9318
9319 2018-03-27  Tom Tromey  <tom@tromey.com>
9320
9321         * typeprint.h (struct type_print_options) <local_typedefs,
9322         global_typedefs>: Remove "struct" keyword.
9323         (class typedef_hash_table): New class.
9324         (recursively_update_typedef_hash, add_template_parameters)
9325         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
9326         (find_typedef_in_hash): Don't declare.
9327         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
9328         (typedef_hash_table::recursively_update): Rename from
9329         recursively_update_typedef_hash.  Now a member.
9330         (typedef_hash_table::add_template_parameters): Rename from
9331         add_template_parameters.  Now a member.
9332         (typedef_hash_table::typedef_hash_table): Now a constructor;
9333         rename from create_typedef_hash.
9334         (typedef_hash_table::~typedef_hash_table): Now a destructor;
9335         rename from free_typedef_hash.
9336         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
9337         (do_free_global_table): Remove.
9338         (typedef_hash_table::typedef_hash_table): New constructor; renamed
9339         from copy_type_recursive.
9340         (create_global_typedef_table): Remove.
9341         (typedef_hash_table::find_global_typedef): Now a member of
9342         typedef_hash_table.
9343         (typedef_hash_table::find_typedef): Rename from
9344         find_typedef_in_hash; now a member.
9345         (whatis_exp): Update.
9346         * extension.h (struct ext_lang_type_printers): Add constructor and
9347         destructor.
9348         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
9349         declare.
9350         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
9351         Now a constructor; rename from start_ext_lang_type_printers.
9352         (ext_lang_type_printers): Now a destructor; rename from
9353         free_ext_lang_type_printers.
9354         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
9355         Update.
9356         (c_type_print_base_struct_union): Update.  Remove cleanups.
9357
9358 2018-03-27  Tom Tromey  <tom@tromey.com>
9359
9360         * dwarf-index-write.c: Include <cmath>.
9361
9362 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
9363
9364         * NEWS: Add entry describing new "set|show varsize-limit" command.
9365         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
9366         command.
9367         * printcmd.c (_initialize_printcmd): Add "set var" alias of
9368         "set variable".
9369
9370 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
9371
9372         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
9373         dwarf-index-write.c
9374         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
9375         * dwarf-index-common.c: New file.
9376         * dwarf-index-common.h: New file.
9377         * dwarf-index-write.c: New file.
9378         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
9379         (struct dwarf2_section_info): Move from here.
9380         (dwarf2_section_info_def): Likewise.
9381         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
9382         (offset_type): Likewise.
9383         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
9384         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
9385         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
9386         (byte_swap): Likewise.
9387         (MAYBE_SWAP): Likewise.
9388         (dwarf2_per_cu_ptr): Likewise.
9389         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
9390         (struct tu_stats): Likewise.
9391         (struct dwarf2_per_objfile): Likewise.
9392         (struct dwarf2_per_cu_data): Likewise.
9393         (struct signatured_type): Likewise.
9394         (sig_type_ptr): Likewise.
9395         (DEF_VEC_P (sig_type_ptr)): Likewise.
9396         (INDEX4_SUFFIX): Likewise.
9397         (INDEX5_SUFFIX): Likewise.
9398         (DEBUG_STR_SUFFIX): Likewise.
9399         (dwarf2_read_section): Make non-static.
9400         (mapped_index_string_hash): Move from here.
9401         (dwarf5_djb_hash): Likewise.
9402         (file_write): Likewise.
9403         (class data_buf): Likewise.
9404         (struct symtab_index_entry): Likewise.
9405         (struct mapped_symtab): Likewise.
9406         (find_slot): Likewise.
9407         (hash_expand): Likewise.
9408         (add_index_entry): Likewise.
9409         (uniquify_cu_indices): Likewise.
9410         (class c_str_view): Likewise.
9411         (class c_str_view_hasher): Likewise.
9412         (class vector_hasher): Likewise.
9413         (write_hash_table): Likewise.
9414         (psym_index_map): Likewise.
9415         (struct addrmap_index_data): Likewise.
9416         (add_address_entry): Likewise.
9417         (add_address_entry_worker): Likewise.
9418         (write_address_map): Likewise.
9419         (symbol_kind): Likewise.
9420         (write_psymbols): Likewise.
9421         (struct signatured_type_index_data): Likewise.
9422         (write_one_signatured_type): Likewise.
9423         (recursively_count_psymbols): Likewise.
9424         (recursively_write_psymbols): Likewise.
9425         (class debug_names): Likewise.
9426         (check_dwarf64_offsets): Likewise.
9427         (psyms_seen_size): Likewise.
9428         (write_gdbindex): Likewise.
9429         (write_debug_names): Likewise.
9430         (assert_file_size): Likewise.
9431         (write_psymtabs_to_index): Likewise.
9432         (save_gdb_index_command): Likewise.
9433         (_initialize_dwarf2_read): Don't register the "save gdb-index"
9434         command.
9435         * dwarf2read.h: New file.
9436
9437 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
9438
9439         PR gdb/22670
9440         * dwarf2read.c (dwarf2_physname): Do not return the demangled
9441         symbol name if the CU's language stores symbol names in linkage
9442         format.
9443         * language.h (struct language_defn)
9444         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
9445         all instances of this struct.
9446
9447 2018-03-26  Tom Tromey  <tom@tromey.com>
9448
9449         * stack.c (backtrace_command_1): Remove verbose code.
9450
9451 2018-03-26  Tom Tromey  <tom@tromey.com>
9452
9453         * python/py-framefilter.c (py_print_type): Don't catch
9454         exceptions.  Return void.
9455         (py_print_value): Likewise.
9456         (py_print_single_arg): Likewise.
9457         (enumerate_args): Don't catch exceptions.
9458         (py_print_args): Likewise.
9459         (py_print_frame): Likewise.
9460         (gdbpy_apply_frame_filter): Catch exceptions here.
9461
9462 2018-03-26  Tom Tromey  <tom@tromey.com>
9463
9464         * stack.c (_initialize_stack): Remove trailing newlines from help
9465         text.  Add "Usage" line to "backtrace" help.
9466
9467 2018-03-26  Tom Tromey  <tom@tromey.com>
9468
9469         PR python/16486:
9470         * python/py-framefilter.c (py_print_args): Call wrap_hint.
9471
9472 2018-03-26  Tom Tromey  <tom@tromey.com>
9473
9474         * python/py-framefilter.c (py_print_single_arg): Return
9475         EXT_LANG_BT_ERROR from catch.
9476
9477 2018-03-26  Tom Tromey  <tom@tromey.com>
9478
9479         PR backtrace/15584:
9480         * stack.c (backtrace_command_1): Move some code into no-filters
9481         "if".
9482
9483 2018-03-26  Tom Tromey  <tom@tromey.com>
9484
9485         * python/py-framefilter.c (throw_quit_or_print_exception): New
9486         function.
9487         (gdbpy_apply_frame_filter): Use it.
9488
9489 2018-03-26  Tom Tromey  <tom@tromey.com>
9490
9491         PR cli/17716:
9492         * python/py-framefilter.c (py_print_type, py_print_value)
9493         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
9494         RETURN_MASK_ERROR.
9495
9496 2018-03-26  Tom Tromey  <tom@tromey.com>
9497
9498         * python/py-framefilter.c (enumerate_args): Use
9499         gdb::unique_xmalloc_ptr.
9500
9501 2018-03-26  Tom Tromey  <tom@tromey.com>
9502
9503         * python/py-framefilter.c (py_print_frame): Return
9504         EXT_LANG_BT_OK.
9505         (gdbpy_apply_frame_filter): Update comment.
9506         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
9507         Remove.
9508         <EXT_LANG_BT_NO_FILTERS>: Change value.
9509
9510 2018-03-26  Tom Tromey  <tom@tromey.com>
9511
9512         PR backtrace/15582:
9513         * stack.c (backtrace_command): Parse "hide" argument.
9514         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
9515         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
9516         constant.
9517
9518 2018-03-26  Tom Tromey  <tom@tromey.com>
9519
9520         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
9521         add "flags".
9522         (backtrace_command): Remove "fulltrace", add "flags".
9523
9524 2018-03-26  Tom Tromey  <tom@tromey.com>
9525
9526         * stack.c (backtrace_command): Rewrite command line parsing.
9527
9528 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
9529
9530         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
9531
9532 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
9533
9534         * filename-seen-cache.h: Add include guard.
9535
9536 2018-03-26  Keith Seitz  <keiths@redhat.com>
9537
9538         * symfile.c (place_section): Remove "struct" from section_addr_info
9539         in comment.
9540         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
9541         "struct" keyword from section_addr_info.
9542
9543 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
9544
9545         * regformats/regdef.h (reg): Add constructors.
9546
9547 2018-03-25  Pedro Alves  <palves@redhat.com>
9548
9549         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
9550         if then/else bodies in var_func_name extraction.
9551
9552 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
9553
9554         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
9555         lookup_minimal_symbol() to find symbol entry.
9556         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
9557
9558 2018-03-23  Keith Seitz  <keiths@redhat.com>
9559
9560         PR c++/22968
9561         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
9562         nested type definitions for C++, too.
9563
9564 2018-03-23  Tom Tromey  <tom@tromey.com>
9565
9566         * machoread.c (struct oso_el): Add a constructor.  Don't define as
9567         a typedef.
9568         (macho_register_oso): Remove.
9569         (macho_symtab_read): Take a std::vector.
9570         (oso_el_compare_name): Now a std::sort comparator.
9571         (macho_symfile_read_all_oso): Take a std::vector.
9572         (macho_symfile_read): Use std::vector.  Remove cleanups.
9573
9574 2018-03-22  Tom Tromey  <tom@tromey.com>
9575
9576         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
9577         (record_full_goto_bookmark): Use std::string.
9578
9579 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9580
9581         PR tdep/18295
9582         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
9583         a single mask.
9584
9585 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9586
9587         * rs6000-tdep.c (store_insn_p): New function.
9588         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
9589         and cr_reg to their unshifted values. Use store_insn_p to
9590         match LR saves using either R1 or fdata->alloca_reg. Use
9591         store_insn_p to match CR saves. Set alloca_reg_offset
9592         when alloca_reg and framep are set. Remove lr_reg shift
9593         when assigning to fdata->lr_register.
9594
9595 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9596
9597         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
9598         command line args instead of emitting a warning.
9599
9600 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
9601
9602         * tracepoint.h (struct static_tracepoint_marker): Initialize
9603         fields, define default constructor, move constructor and move
9604         assignment, disable the rest.
9605         <str_id, extra>: Make std::string.
9606         (release_static_tracepoint_marker): Remove.
9607         (free_current_marker): Remove.
9608         * tracepoint.c (free_current_marker): Remove.
9609         (parse_static_tracepoint_marker_definition): Adjust to
9610         std::string, use new hex2str overload.
9611         (release_static_tracepoint_marker): Remove.
9612         (print_one_static_tracepoint_marker): Get marker by reference
9613         and adjust to std::string.
9614         (info_static_tracepoint_markers_command): Adjust to std::vector
9615         changes
9616         * target.h (static_tracepoint_marker_p): Remove typedef.
9617         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
9618         (struct target_ops) <to_static_tracepoint_marker_at>: Return
9619         bool.
9620         <to_static_tracepoint_markers_by_strid>: Return std::vector.
9621         * target-debug.h
9622         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
9623         (target_debug_print_std_vector_static_tracepoint_marker): New.
9624         (target_debug_print_struct_static_tracepoint_marker_p): Rename
9625         to...
9626         (target_debug_print_static_tracepoint_marker_p): ... this.
9627         * target-delegates.c: Re-generate.
9628         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
9629         Make std::string.
9630         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
9631         (decode_static_tracepoint_spec): Adjust to std::vector.
9632         (tracepoint_print_one_detail): Adjust to std::string.
9633         (strace_marker_decode_location): Adjust to std::string.
9634         (update_static_tracepoint): Adjust to std::string, remove call
9635         to release_static_tracepoint_marker.
9636         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
9637         Adjust to std::vector.
9638         * remote.c (remote_static_tracepoint_marker_at): Return bool.
9639         (remote_static_tracepoint_markers_by_strid): Adjust to
9640         std::vector.
9641         * common/rsp-low.h (hex2str): New overload with explicit count
9642         of bytes.
9643         * common/rsp-low.c (hex2str): New overload with explicit count
9644         of bytes.
9645         * unittests/rsp-low-selftests.c (test_hex2str): New function.
9646         (_initialize_rsp_low_selftests): Add test_hex2str test.
9647         * unittests/tracepoint-selftests.c
9648         (test_parse_static_tracepoint_marker_definition): Adjust to
9649         std::string.
9650
9651 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
9652
9653         * tracepoint.c (parse_static_tracepoint_marker_definition):
9654         Consider case where the definition is followed by more
9655         definitions.
9656         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9657         tracepoint-selftests.c.
9658         * unittests/tracepoint-selftests.c: New.
9659
9660 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9661
9662         * MAINTAINERS (Write After Approval): Add Pedro Franco de
9663         Carvalho.
9664
9665 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
9666
9667         * symtab.c (find_pc_sect_line): fixed indentation.
9668
9669 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
9670
9671         * symtab.c (find_pc_sect_line): now uses binary search.
9672
9673 2018-03-19  Tom Tromey  <tom@tromey.com>
9674
9675         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
9676         "IDENT" production.
9677
9678 2018-03-19  Pedro Alves  <palves@redhat.com>
9679             Tom Tromey  <tom@tromey.com>
9680
9681         * unittests/observable-selftests.c: New file.
9682         * common/observable.h: New file.
9683         * observable.h: New file.
9684         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
9685         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
9686         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
9687         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
9688         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
9689         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
9690         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
9691         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
9692         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
9693         python/py-breakpoint.c, python/py-finishbreakpoint.c,
9694         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
9695         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
9696         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
9697         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
9698         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
9699         tui/tui-interp.c, valops.c: Update all users.
9700         * tui/tui-hooks.c (tui_bp_created_observer)
9701         (tui_bp_deleted_observer, tui_bp_modified_observer)
9702         (tui_inferior_exit_observer, tui_before_prompt_observer)
9703         (tui_normal_stop_observer, tui_register_changed_observer):
9704         Remove.
9705         (tui_observers_token): New global.
9706         (attach_or_detach, tui_attach_detach_observers): New functions.
9707         (tui_install_hooks, tui_remove_hooks): Use
9708         tui_attach_detach_observers.
9709         * record-btrace.c (record_btrace_thread_observer): Remove.
9710         (record_btrace_thread_observer_token): New global.
9711         * observer.sh: Remove.
9712         * observer.c: Rename to observable.c.
9713         * observable.c (namespace gdb_observers): Define new objects.
9714         (observer_debug): Move into gdb_observers namespace.
9715         (struct observer, struct observer_list, xalloc_observer_list_node)
9716         (xfree_observer_list_node, generic_observer_attach)
9717         (generic_observer_detach, generic_observer_notify): Remove.
9718         (_initialize_observer): Update.
9719         Don't include observer.inc.
9720         * Makefile.in (generated_files): Remove observer.h, observer.inc.
9721         (clean mostlyclean): Likewise.
9722         (observer.h, observer.inc): Remove targets.
9723         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
9724         (COMMON_SFILES): Use observable.c, not observer.c.
9725         * .gitignore: Remove observer.h.
9726
9727 2018-03-18  Tom Tromey  <tom@tromey.com>
9728
9729         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
9730         gdb::def_vector.
9731         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
9732
9733 2018-03-17  Tom Tromey  <tom@tromey.com>
9734
9735         * auto-load.c (auto_load_objfile_script_1): Use std::string.
9736
9737 2018-03-17  Tom Tromey  <tom@tromey.com>
9738
9739         * target.c (class scoped_target_fd): New.
9740         (target_fileio_close_cleanup): Remove.
9741         (target_fileio_read_alloc_1): Use scoped_target_fd.
9742
9743 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
9744
9745         * silent-rules.mk: New.
9746         * Makefile.in: Include silent-rules.mk
9747         (srcdir, VPATH, top_srcdir): Move up.
9748         (COMPILE): Add ECHO_CXX.
9749         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
9750         (init.c): Add ECHO_INIT_C.
9751         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
9752         (version.c): Add ECHO_GEN.
9753         (printcmd.o): Add ECHO_CXX.
9754         (target-float.o): Add ECHO_CXX.
9755         (ada-exp.o): Add ECHO_CXX.
9756         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
9757         (insight$(EXEEXT)): Add ECHO_CXXLD.
9758         * gnulib/configure.ac: Add AM_SILENT_RULES.
9759         * gnulib/aclocal.m4: Re-generate.
9760         * gnulib/configure: Re-generate.
9761         * gnulib/import/Makefile.in: Re-generate.
9762
9763 2018-03-16  Tom Tromey  <tom@tromey.com>
9764
9765         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
9766         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
9767         * utils.c (do_free_section_addr_info)
9768         (make_cleanup_free_section_addr_info): Remove.
9769         * symfile.h (struct other_sections): Add constructor.
9770         (struct section_addr_info): Remove.
9771         (section_addr_info): New typedef.
9772         (struct sym_fns) <sym_offsets>: Change type of parameter.
9773         (build_section_addr_info_from_objfile)
9774         (relative_addr_info_to_section_offsets, addr_info_make_relative)
9775         (default_symfile_offsets, symbol_file_add)
9776         (symbol_file_add_from_bfd)
9777         (build_section_addr_info_from_section_table): Update.
9778         (alloc_section_addr_info, free_section_addr_info): Don't declare.
9779         * symfile.c (alloc_section_addr_info): Remove.
9780         (build_section_addr_info_from_section_table): Change return type.
9781         Update.
9782         (build_section_addr_info_from_bfd)
9783         (build_section_addr_info_from_objfile): Likewise.
9784         (free_section_addr_info): Remove.
9785         (relative_addr_info_to_section_offsets): Change type of "addrs".
9786         (addrs_section_compar): Now a std::sort comparator.
9787         (addrs_section_sort): Change return type.
9788         (addr_info_make_relative): Change type of "addrs".  Update.
9789         (default_symfile_offsets, syms_from_objfile_1)
9790         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
9791         (symbol_file_add_separate): Update.
9792         (symbol_file_add): Change type of "addrs".  Update.
9793         (add_symbol_file_command): Update.  Remove cleanups.
9794         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
9795         cleanups.
9796         * symfile-debug.c (debug_sym_offsets): Change type of "info".
9797         * solib.c (solib_read_symbols): Update.
9798         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
9799         * machoread.c (macho_symfile_offsets): Update.
9800         * jit.c (jit_bfd_try_read_symtab): Update.
9801
9802 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
9803
9804         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9805         unittests/utils-selftests.c.
9806         * unittests/utils-selftests.c: New file.
9807
9808 2018-03-14  Tom Tromey  <tom@tromey.com>
9809
9810         PR cli/14977:
9811         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
9812         for NULL.
9813
9814 2018-03-14  Tom Tromey  <tom@tromey.com>
9815
9816         PR cli/19918:
9817         * printcmd.c (printf_pointer): Allow "-" in format.
9818
9819 2018-03-14  Tom Tromey  <tom@tromey.com>
9820
9821         * printcmd.c (_initialize_printcmd): Add usage to printf.
9822
9823 2018-03-14  Yao Qi  <qiyao@sourceware.org>
9824
9825         * MAINTAINERS: Update my email address.
9826
9827 2018-03-13  Tom Tromey  <tom@tromey.com>
9828
9829         * machoread.c (macho_check_dsym): Change filenamep to a
9830         std::string*.
9831         (macho_symfile_read): Update.
9832         * symfile.c (load_command): Use std::string.
9833
9834 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
9835
9836         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
9837         to error message string.
9838         (riscv_register_name): Use xsnprintf instead of sprintf.
9839         (riscv_insn::fetch_instruction): Use gdb_assert instead of
9840         internal_error.
9841         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
9842         error.
9843         (riscv_push_dummy_call): Likewise.
9844
9845 2018-03-12  Tom Tromey  <tom@tromey.com>
9846
9847         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
9848         Use gdb::byte_vector.
9849         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
9850
9851 2018-03-12  Yao Qi  <yao.qi@linaro.org>
9852
9853         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
9854         parameter type to readable_regcache.
9855         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
9856         the declaration.
9857
9858 2018-03-11  Tom Tromey  <tom@tromey.com>
9859
9860         * dwarf2read.c (struct nextfield): Add initializers.
9861         (struct nextfnfield): Remove.
9862         (struct fnfieldlist): Add initializers.  Remove "length" and
9863         "head", use std::vector.
9864         (struct decl_field_list): Remove.
9865         (struct field_info): Add initializers.
9866         <fields, baseclasses>: Now std::vector.
9867         <nbaseclasses, nfnfields, typedef_field_list_count,
9868         nested_types_list_count>: Remove.
9869         (dwarf2_add_field, dwarf2_add_type_defn)
9870         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
9871         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
9872         (process_structure_scope): Update.
9873
9874 2018-03-11  Tom Tromey  <tom@tromey.com>
9875
9876         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
9877         for use by std::sort.
9878         (build_type_psymtabs_1): Use std::vector.
9879
9880 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
9881
9882         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
9883         and LIBMPFR in the printed configuration.
9884
9885 2018-03-08  Tom Tromey  <tom@tromey.com>
9886
9887         * source.c (get_filename_and_charpos): Use scoped_fd.
9888         * nto-procfs.c (procfs_open_1): Use scoped_fd.
9889         (procfs_pidlist): Likewise.
9890         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
9891         (iterate_over_mappings): Likewise.
9892
9893 2018-03-08  Tom Tromey  <tom@tromey.com>
9894
9895         * infcall.c (struct call_return_meta_info)
9896         <stack_temporaries_enabled>: Remove.
9897         (get_call_return_value, call_function_by_hand_dummy): Update.
9898         * thread.c (disable_thread_stack_temporaries): Remove.
9899         (enable_thread_stack_temporaries): Remove.
9900         (thread_stack_temporaries_enabled_p): Return bool.
9901         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
9902         (get_last_thread_stack_temporary): Update.
9903         * eval.c (evaluate_subexp): Update.
9904         * gdbthread.h (class enable_thread_stack_temporaries): Now a
9905         class, not a function.
9906         (value_ptr, value_vec): Remove typedefs.
9907         (class thread_info) <stack_temporaries_enabled>: Now bool.
9908         <stack_temporaries>: Now a std::vector.
9909         (thread_stack_temporaries_enabled_p)
9910         (value_in_thread_stack_temporaries): Return bool.
9911
9912 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
9913
9914         * remote.c (putpkt_binary): Fix omitted bytes reporting.
9915         (getpkt_or_notif_sane_1): Likewise.
9916
9917 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
9918
9919         * build-id.c (build_id_to_debug_bfd): Use std::string.
9920
9921 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
9922
9923         * build-id.c (find_separate_debug_file_by_buildid): Return
9924         std::string.
9925         * build-id.h (find_separate_debug_file_by_buildid): Return
9926         std::string.
9927         * coffread.c (coff_symfile_read): Adjust to std::string.
9928         * elfread.c (elf_symfile_read): Adjust to std::string.
9929         * symfile.c (separate_debug_file_exists): Change parameter to
9930         std::string.
9931         (find_separate_debug_file): Return std::string.
9932         (find_separate_debug_file_by_debuglink): Return std::string.
9933         * symfile.h (find_separate_debug_file_by_debuglink): Return
9934         std::string.
9935
9936 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
9937
9938         * common/xml-utils.c (xml_escape_text): Move code to...
9939         (xml_escape_text_append): ... this new function.
9940         * common/xml-utils.h (xml_escape_text_append): New declaration.
9941         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
9942         New function.
9943         (_initialize_xml_utils): register test_xml_escape_text_append as
9944         a selftest.
9945
9946 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
9947
9948         * defs.h: Remove MAX_REGISTER_SIZE.
9949         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
9950         asserts.
9951         * python/py-unwind.c (pyuw_sniffer): Likewise.
9952
9953 2018-03-07  Tom Tromey  <tom@tromey.com>
9954
9955         * linux-tdep.c (linux_info_proc): Update.
9956         * target.h (struct target_ops) <to_fileio_readlink>: Return
9957         optional<string>.
9958         (target_fileio_readlink): Return optional<string>.
9959         * remote.c (remote_hostio_readlink): Return optional<string>.
9960         * inf-child.c (inf_child_fileio_readlink): Return
9961         optional<string>.
9962         * target.c (target_fileio_readlink): Return optional<string>.
9963
9964 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
9965
9966         * regcache.c (cooked_read_test): Add riscv to the list of
9967         architectures that have a save_reggroup.
9968
9969 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9970
9971         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
9972         value is not a dynamic class object.
9973
9974 2018-03-06  Tom Tromey  <tom@tromey.com>
9975
9976         * rust-exp.y: Formatting fixes.
9977
9978 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
9979
9980         * riscv-tdep.c (riscv_register_name): Remove target description
9981         support.
9982         (riscv_gdbarch_init): Remove target description check.
9983
9984 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
9985
9986         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
9987         comment.
9988         * riscv-tdep.h: Likewise.
9989
9990 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
9991
9992         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
9993         (riscv_pseudo_register_write): Delete.
9994         (riscv_gdbarch_init): Remove all use of pseudo registers.
9995
9996 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
9997
9998         * record-btrace.c (btrace_print_lines): Replace cleanup
9999         parameter with RAII equivalents.
10000         (btrace_insn_history): Replace cleanup with RAII equivalents.
10001         * ui-out.h (make_cleanup_ui_out_list_begin_end,
10002         make_cleanup_ui_out_tuple_begin_end): Remove.
10003         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
10004         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
10005         make_cleanup_ui_out_list_begin_end): Remove.
10006
10007 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
10008
10009         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
10010         parameter types to std::vector.  Use bool.
10011         (record_btrace_wait): Replace VEC(tp_t) with
10012         std::vector<thread_info *>.
10013         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
10014
10015 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
10016
10017         * record-btrace.c (record_btrace_disable_callback): Remove.
10018         (struct scoped_btrace_disable): New.
10019         (record_btrace_open): Use scoped_btrace_disable.
10020
10021 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10022
10023         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
10024         reading values from registers.
10025
10026 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10027
10028         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
10029         where appropriate.
10030
10031 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10032
10033         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
10034         change parameter type.  Use GDB's print functions, and use
10035         core_addr_to_string where appropriate.
10036         (riscv_push_dummy_call): Use core_addr_to_string where
10037         appropriate, update call to riscv_print_arg_location, and reindent
10038         a few lines.
10039         (riscv_return_value): Update call to riscv_print_arg_location.
10040
10041 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10042             Tim Newsome <tim@sifive.com>
10043             Albert Ou <a0u@eecs.berkeley.edu>
10044             Darius Rad <darius@bluespec.com>
10045
10046         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
10047         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
10048         (ALLDEPFILES): Add riscv-tdep.c
10049         * configure.tgt: Add riscv support.
10050         * riscv-tdep.c: New file.
10051         * riscv-tdep.h: New file.
10052         * NEWS: Mention new target.
10053         * MAINTAINERS: Add entry for riscv.
10054
10055 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10056
10057         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
10058         fields within aggregates.
10059
10060 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
10061
10062         * record-btrace.c (btrace_print_lines): Change type of flags to
10063         gdb_disassembly_flags.
10064
10065 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
10066
10067         * fbsd-nat.c: Include "inf-ptrace.h".
10068         (USE_SIGTRAP_SIGINFO): Conditionally define.
10069         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
10070         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
10071         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
10072         function.
10073         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
10074         Likewise.
10075         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
10076         Likewise.
10077         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
10078         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
10079         "supports_stopped_by_hw_breakpoint" target methods.
10080
10081 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
10082
10083         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
10084         * fbsd-nat.c (debug_fbsd_nat): New variable.
10085         (show_fbsd_nat_debug): New function.
10086         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
10087         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
10088
10089 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
10090
10091         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
10092         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
10093         prototype.
10094         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
10095         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
10096         method.
10097
10098 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10099
10100         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
10101         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
10102
10103 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10104
10105         * charset.c (struct charset_vector): New.
10106         (charsets): Change type to charset_vector.
10107         (find_charset_names): Adjust.
10108         (add_one): Adjust.
10109         (_initialize_charset): Adjust.
10110
10111 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10112
10113         * progspace.h (struct program_space) <deleted_solibs>: Change
10114         type to std::vector<std::string>.
10115         * progspace.c (clear_program_space_solib_cache): Adjust.
10116         * breakpoint.c (print_solib_event): Adjust.
10117         (check_status_catch_solib): Adjust.
10118         * solib.c (update_solib_list): Adjust.
10119         * ui-out.h (class ui_out) <field_string>: New overload.
10120         * ui-out.c (ui_out::field_string): New overload.
10121
10122 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10123
10124         * progspace.h (struct program_space): Add constructor and
10125         destructor, initialize fields.
10126         (add_program_space): Remove.
10127         * progspace.c (add_program_space): Rename to...
10128         (program_space::program_space): ... this.
10129         (release_program_space): Rename to...
10130         (program_space::~program_space): ... this.
10131         (delete_program_space): Use delete to delete program_space.
10132         (initialize_progspace): Use new to allocate program_space.
10133         * inferior.c (add_inferior_with_spaces): Likewise.
10134         (clone_inferior_command): Likewise.
10135         * infrun.c (follow_fork_inferior): Likewise.
10136         (handle_vfork_child_exec_or_exit): Likewise.
10137
10138 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10139
10140         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
10141         (delim_string_to_char_ptr_vec): Return std::vector of
10142         gdb::unique_xmalloc_ptr.
10143         (dirnames_to_char_ptr_vec_append): Take std::vector of
10144         gdb::unique_xmalloc_ptr.
10145         (dirnames_to_char_ptr_vec): Return std::vector of
10146         gdb::unique_xmalloc_ptr.
10147         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
10148         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
10149         (delim_string_to_char_ptr_vec): Return an std::vector of
10150         gdb::unique_xmalloc_ptr, adjust the code.
10151         (dirnames_to_char_ptr_vec_append): Take an std::vector of
10152         gdb::unique_xmalloc_ptr, adjust the code.
10153         (dirnames_to_char_ptr_vec): Return an std::vector of
10154         gdb::unique_xmalloc_ptr, adjust the code.
10155         * auto-load.c (auto_load_safe_path_vec): Change type to
10156         std::vector of gdb::unique_xmalloc_ptr.
10157         (auto_load_expand_dir_vars): Return an std::vector of
10158         gdb::unique_xmalloc_ptr, adjust the code.
10159         (auto_load_safe_path_vec_update): Adjust.
10160         (filename_is_in_auto_load_safe_path_vec): Adjust.
10161         (auto_load_objfile_script_1): Adjust.
10162         * build-id.c (build_id_to_debug_bfd): Adjust.
10163         * linux-thread-db.c (thread_db_load_search): Adjust.
10164         * source.c (add_path): Adjust.
10165         (openp): Adjust.
10166         * symfile.c (find_separate_debug_file): Adjust.
10167         * utils.c (do_free_char_ptr_vec): Remove.
10168         (make_cleanup_free_char_ptr_vec): Remove.
10169
10170 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
10171
10172         PR gdb/22907
10173         * common/pathstuff.c: Conditionally include "<windows.h>".
10174
10175 2018-03-01  Georg Sauthoff  <mail@georg.so>
10176
10177         PR gdb/22888
10178         * gcore.in: Quote variables and switch interpreter to bash.
10179
10180 2018-03-01  Tom Tromey  <tom@tromey.com>
10181
10182         * dwarf2read.c (alloc_discriminant_info): Fix default_index
10183         assertion.  Add assertion for discriminant_index.
10184         (quirk_rust_enum): Use correct base type name in univariant case.
10185
10186 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
10187
10188         * record.c (get_call_history_modifiers): Return a
10189         record_print_flags.
10190         (cmd_record_call_history): Adjust.
10191         * record-btrace.c (record_btrace_call_history): Adjust.
10192         (record_btrace_call_history_range): Adjust.
10193         (record_btrace_call_history_from): Adjust.
10194         * target-debug.h (target_debug_print_record_print_flags): New.
10195         * target-delegates.c: Re-generate.
10196         * target.c (target_call_history): Change flags type.
10197         (target_call_history_from): Likewise.
10198         (target_call_history_range): Likewise.
10199         * target.h (struct target_ops) <target_call_history>: Likewise.
10200         (target_call_history_from): Likewise.
10201         (target_call_history_range): Likewise.
10202
10203 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
10204             Simon Marchi  <simon.marchi@polymtl.ca>
10205
10206         * common/common-utils.c: Include "sys/stat.h".
10207         (is_regular_file): Move here from "source.c"; change return
10208         type to "bool".
10209         * common/common-utils.h (is_regular_file): New prototype.
10210         * common/pathstuff.c (contains_dir_separator): New function.
10211         * common/pathstuff.h (contains_dir_separator): New prototype.
10212         * source.c: Don't include "sys/stat.h".
10213         (is_regular_file): Move to "common/common-utils.c".
10214
10215 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
10216
10217         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
10218         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
10219         * auto-load.c: Include "common/pathstuff.h".
10220         * common/common-def.h (current_directory): Move here.
10221         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
10222         function.
10223         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
10224         prototype.
10225         * common/pathstuff.c: New file.
10226         * common/pathstuff.h: New file.
10227         * compile/compile.c: Include "common/pathstuff.h".
10228         * defs.h (current_directory): Move to "common/common-defs.h".
10229         * dwarf2read.c: Include "common/pathstuff.h".
10230         * exec.c: Likewise.
10231         * guile/scm-safe-call.c: Likewise.
10232         * linux-thread-db.c: Likewise.
10233         * main.c: Likewise.
10234         * nto-tdep.c: Likewise.
10235         * objfiles.c: Likewise.
10236         * source.c: Likewise.
10237         * symtab.c: Likewise.
10238         * utils.c: Include "common/pathstuff.h".
10239         (gdb_realpath): Move to "common/pathstuff.c".
10240         (gdb_realpath_keepfile): Likewise.
10241         (gdb_abspath): Likewise.
10242         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
10243         (gdb_realpath_keepfile): Likewise.
10244         (gdb_abspath): Likewise.
10245
10246 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
10247
10248         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
10249         wildcard process pid for super_resume for kernels with a
10250         specific bug.
10251
10252 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
10253
10254         * compile/compile.c (get_args): Add additional comments
10255         explaining function.
10256
10257 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
10258             Tom Tromey  <tom@tromey.com>
10259
10260         * target.h (memory_write_request_s): Remove typedef.  Don't define
10261         VEC.
10262         (target_write_memory_blocks): Change argument to std::vector.
10263         (struct memory_write_request): Add constructor.
10264         * target-memory.c (compare_block_starting_address): Return bool.
10265         Change argument types.
10266         (claim_memory): Change arguments to use std::vector.
10267         (split_regular_and_flash_blocks, blocks_to_erase)
10268         (compute_garbled_blocks): Likewise.
10269         (cleanup_request_data, cleanup_write_requests_vector): Remove.
10270         (target_write_memory_blocks): Change argument to std::vector.
10271         * symfile.c (struct load_section_data): Add constructor and
10272         destructor.  Use std::vector for "requests".
10273         (struct load_progress_data): Add initializers.
10274         (load_section_callback): Update.  Use "new".
10275         (clear_memory_write_data): Remove.
10276         (generic_load): Update.
10277
10278 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
10279
10280         * arch/aarch64.h: Use common/tdesc.h.
10281
10282 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
10283
10284         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
10285         architecture with a 64-bit ABI.
10286
10287 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
10288
10289         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
10290         ahead of target description loading.
10291
10292 2018-02-26  Tom Tromey  <tom@tromey.com>
10293
10294         * stack.c (backtrace_command_1): Update.
10295         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
10296         of "flags".
10297         * python/py-framefilter.c (py_print_frame)
10298         (gdbpy_apply_frame_filter): Change type of "flags".
10299         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
10300         of "flags".
10301         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
10302         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
10303         * extension.h (enum frame_filter_flag): Rename from
10304         frame_filter_flags.
10305         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
10306         (apply_ext_lang_frame_filter): Change type of "flags".
10307         * extension.c (apply_ext_lang_frame_filter): Change type of
10308         "flags".
10309         * extension-priv.h (struct extension_language_ops)
10310         <apply_frame_filter>: Change type of "flags".
10311
10312 2018-02-26  Tom Tromey  <tom@tromey.com>
10313
10314         PR python/16497:
10315         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
10316         off-by-one in py_end computation.
10317         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
10318         PRINT_MORE_FRAMES.
10319         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
10320         constant.
10321
10322 2018-02-26  Tom Tromey  <tom@tromey.com>
10323
10324         * dwarf2read.c (struct variant_field): New.
10325         (struct nextfield) <variant>: New field.
10326         (dwarf2_add_field): Handle DW_TAG_variant_part.
10327         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
10328         discriminated union.
10329         (read_structure_type): Handle DW_TAG_variant_part.
10330         (handle_struct_member_die): New function, extracted from
10331         process_structure_scope.  Handle DW_TAG_variant.
10332         (process_structure_scope): Handle discriminated unions.  Call
10333         handle_struct_member_die.
10334
10335 2018-02-26  Tom Tromey  <tom@tromey.com>
10336
10337         * rust-lang.h (rust_last_path_segment): Declare.
10338         * rust-lang.c (rust_last_path_segment): Now public.  Change
10339         contract.
10340         (struct disr_info): Remove.
10341         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
10342         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
10343         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
10344         (rust_enum_p, rust_enum_variant): New function.
10345         (rust_underscore_fields): Remove "offset" parameter.
10346         (rust_print_enum): New function.
10347         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
10348         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
10349         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
10350         enums.
10351         (rust_internal_print_type): New function, from rust_print_type.
10352         Remove enum code.
10353         (rust_print_type): Call rust_internal_print_type.
10354         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
10355         Update enum handling.
10356         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
10357         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
10358         (rust_union_quirks): New functions.
10359         (process_full_comp_unit, process_full_type_unit): Call
10360         rust_union_quirks.
10361         (process_structure_scope): Update rust_unions if necessary.
10362
10363 2018-02-26  Tom Tromey  <tom@tromey.com>
10364
10365         * value.h (value_union_variant): Declare.
10366         * valops.c (value_union_variant): New function.
10367         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
10368         (struct discriminant_info): New.
10369         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
10370         enumerator.
10371         (struct main_type) <flag_discriminated_union>: New field.
10372
10373 2018-02-26  Tom Tromey  <tom@tromey.com>
10374
10375         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10376         unittests/unpack-selftests.c.
10377         * unittests/unpack-selftests.c: New file.
10378         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
10379
10380 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10381
10382         * dwarf2read.c (struct partial_die_info) <read>: New method.
10383         (read_partial_die): Remove the declaration.
10384         (load_partial_dies): Update.
10385         (partial_die_info::partial_die_info):
10386         (read_partial_die): Change it to partial_die_info::read.
10387
10388 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10389
10390         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
10391         (fixup_partial_die): Remove declaration.
10392         (scan_partial_symbols): Update.
10393         (partial_die_parent_scope): Likewise.
10394         (partial_die_full_name): Likewise.
10395         (fixup_partial_die): Change it to partial_die_info::fixup.
10396
10397 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10398
10399         * dwarf2read.c (read_partial_die): Update the declaration.
10400         (load_partial_dies): Caller update.
10401         (read_partial_die): Remove one argument abbrev_len.
10402
10403 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10404
10405         * dwarf2read.c (struct partial_die_info): Add ctor, delete
10406         assignment operator.
10407         (load_partial_dies): Use ctor and copy ctor.
10408         (read_partial_die): Update.
10409         (dwarf2_cu::find_partial_die): Use ctor.
10410
10411 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10412
10413         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
10414         (find_partial_die_in_comp_unit): Change it to
10415         dwarf2_cu::find_partial_die.
10416         (find_partial_die): Update.
10417
10418 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10419
10420         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
10421         is NULL.
10422
10423 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10424
10425         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
10426
10427 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
10428
10429         * arch/amd64.h: Use common/tdesc.h.
10430         * arch/i386.c: Likewise.
10431         * arch/i386.h: Likewise.
10432         * arch/tic6x.c: Likewise.
10433         * arch/tdesc.h: Move file from here...
10434         * common/tdesc.h: ...to here.
10435         * features/aarch64-core.c: Regenerate.
10436         * features/aarch64-fpu.c: Regenerate.
10437         * features/i386/32bit-avx.c: Regenerate.
10438         * features/i386/32bit-avx512.c: Regenerate.
10439         * features/i386/32bit-core.c: Regenerate.
10440         * features/i386/32bit-linux.c: Regenerate.
10441         * features/i386/32bit-mpx.c: Regenerate.
10442         * features/i386/32bit-pkeys.c: Regenerate.
10443         * features/i386/32bit-sse.c: Regenerate.
10444         * features/i386/64bit-avx.c: Regenerate.
10445         * features/i386/64bit-avx512.c: Regenerate.
10446         * features/i386/64bit-core.c: Regenerate.
10447         * features/i386/64bit-linux.c: Regenerate.
10448         * features/i386/64bit-mpx.c: Regenerate.
10449         * features/i386/64bit-pkeys.c: Regenerate.
10450         * features/i386/64bit-segments.c: Regenerate.
10451         * features/i386/64bit-sse.c: Regenerate.
10452         * features/i386/x32-core.c: Regenerate.
10453         * features/tic6x-c6xp.c: Regenerate.
10454         * features/tic6x-core.c: Regenerate.
10455         * features/tic6x-gp.c: Regenerate.
10456         * target-descriptions.c: Use common/tdesc.h.
10457         * target-descriptions.h: Likewise.
10458
10459 2018-02-24  Tom Tromey  <tom@tromey.com>
10460
10461         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
10462         (try_thread_db_load_from_dir, thread_db_load_search): Use
10463         std::string.
10464         (info_auto_load_libthread_db_compare): Return bool.  Change
10465         argument types.
10466         (info_auto_load_libthread_db): Use std::vector, std::string.
10467         Remove cleanups.
10468
10469 2018-02-24  Tom Tromey  <tom@tromey.com>
10470
10471         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
10472         std::string.
10473         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
10474         std::string*.
10475         * gdbarch.c: Rebuild.
10476         * gdbarch.h: Rebuild.
10477         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
10478         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
10479         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
10480         std::string*.
10481
10482 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
10483
10484         * gdbtypes.h (sect_offset): Change type to uint64_t.
10485         (sect_offset_str): New function.
10486         * dwarf2read.c (create_addrmap_from_aranges): Use
10487         sect_offset_str.
10488         (error_check_comp_unit_head): Likewise.
10489         (create_debug_type_hash_table): Likewise.
10490         (read_cutu_die_from_dwo): Likewise.
10491         (init_cutu_and_read_dies): Likewise.
10492         (init_cutu_and_read_dies_no_follow): Likewise.
10493         (process_psymtab_comp_unit_reader): Likewise.
10494         (partial_die_parent_scope): Likewise.
10495         (peek_die_abbrev): Likewise.
10496         (process_queue): Likewise.
10497         (dwarf2_physname): Likewise.
10498         (read_namespace_alias): Likewise.
10499         (read_import_statement): Likewise.
10500         (create_dwo_cu_reader): Likewise.
10501         (create_cus_hash_table): Likewise.
10502         (lookup_dwo_cutu): Likewise.
10503         (inherit_abstract_dies): Likewise.
10504         (read_func_scope): Likewise.
10505         (read_call_site_scope): Likewise.
10506         (dwarf2_add_member_fn): Likewise.
10507         (read_common_block): Likewise.
10508         (read_module_type): Likewise.
10509         (read_typedef): Likewise.
10510         (read_subrange_type): Likewise.
10511         (load_partial_dies): Likewise.
10512         (read_partial_die): Likewise.
10513         (find_partial_die): Likewise.
10514         (read_str_index): Likewise.
10515         (dwarf2_string_attr): Likewise.
10516         (build_error_marker_type): Likewise.
10517         (lookup_die_type): Likewise.
10518         (dump_die_shallow): Likewise.
10519         (follow_die_ref): Likewise.
10520         (dwarf2_fetch_die_loc_sect_off): Likewise.
10521         (dwarf2_fetch_constant_bytes): Likewise.
10522         (follow_die_sig): Likewise.
10523         (get_signatured_type): Likewise.
10524         (get_DW_AT_signature_type): Likewise.
10525         (dwarf2_find_containing_comp_unit): Likewise.
10526         (set_die_type): Likewise.
10527
10528 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
10529
10530         * arch/aarch64.c: Include "common-defs.h".
10531         * arch/amd64.c: Likewise.
10532         * arch/i386.c: Likewise.
10533
10534 2018-02-21  Tom Tromey  <tom@tromey.com>
10535
10536         * value.h: (extract_field_op): Update.
10537         * eval.c (extract_field_op): Return a const char *.
10538         * expression.h (parse_expression_for_completion): Update.
10539         * completer.c (complete_expression): Update.
10540         (add_struct_fields): Make fieldname const.
10541         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
10542         (mark_completion_tag, parse_exp_in_context_1): Update.
10543         (parse_expression_for_completion): Change "name" to
10544         unique_xmalloc_ptr*.
10545
10546 2018-02-21  Tom Tromey  <tom@tromey.com>
10547
10548         * infcall.c (call_function_by_hand_dummy): Use std::vector.
10549
10550 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10551
10552         * avr-tdep.c (avr_read_pc): Change parameter type to
10553         readable_regcache.
10554         * gdbarch.sh (read_pc): Likewise.
10555         * gdbarch.c: Re-generated.
10556         * gdbarch.h: Re-generated.
10557         * hppa-tdep.c (hppa_read_pc): Change parameter type to
10558         readable_regcache.
10559         * ia64-tdep.c (ia64_read_pc): Likewise.
10560         * mips-tdep.c (mips_read_pc): Likewise.
10561         * spu-tdep.c (spu_read_pc): Likewise.
10562
10563 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10564
10565         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
10566         * regcache-dump.c: New file.
10567         * regcache.c: Move register_dump to regcache-dump.c.
10568         (maintenance_print_registers): Likewise.
10569         (maintenance_print_raw_registers): Likewise.
10570         (maintenance_print_cooked_registers): Likewise.
10571         (maintenance_print_register_groups): Likewise.
10572         (maintenance_print_remote_registers): Likewise.
10573         (_initialize_regcache): Likewise.
10574         * regcache.h (register_dump): Moved from regcache.c.
10575
10576 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10577
10578         * regcache.c (regcache::regcache): Update.
10579         (regcache::invalidate): Move it to detached_regcache::invalidate.
10580         (get_thread_arch_aspace_regcache): Update.
10581         (regcache::raw_update): Update.
10582         (regcache::cooked_read): Remove some code.
10583         (regcache::cooked_read_value): Likewise.
10584         (regcache::raw_write): Remove assert on m_readonly_p.
10585         (regcache::raw_supply_integer): Move it to
10586         detached_regcache::raw_supply_integer.
10587         (regcache::raw_supply_zeroed): Likewise.
10588         * regcache.h (detached_regcache) <raw_supply_integer>: New
10589         declaration.
10590         <raw_supply_zeroed, invalidate>: Likewise.
10591         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
10592         <invalidate>: Likewise.
10593         <m_readonly_p>: Removed.
10594
10595 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10596
10597         * infcmd.c (get_return_value): Let stop_regs point to
10598         get_current_regcache.
10599         * regcache.c (regcache::regcache): Remove.
10600         (register_dump_reg_buffer): New class.
10601         (regcache_print): Adjust.
10602         * regcache.h (regcache): Remove constructors.
10603
10604 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10605
10606         * regcache.c (class register_dump): New class.
10607         (register_dump_regcache, register_dump_none): New class.
10608         (register_dump_remote, register_dump_groups): New class.
10609         (regcache_print): Update.
10610         * regcache.h (regcache_dump_what): Move it to regcache.c.
10611         (regcache) <dump>: Remove.
10612
10613 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10614
10615         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
10616          reg_buffer_rw *.
10617         (jit_unwind_reg_set_impl): Call raw_supply.
10618         (jit_frame_sniffer): Use reg_buffer_rw.
10619         * record-full.c (record_full_core_regbuf): Change its type.
10620         (record_full_core_open_1): Use reg_buffer_rw.
10621         (record_full_close): Likewise.
10622         (record_full_core_fetch_registers): Use regcache->raw_supply.
10623         (record_full_core_store_registers): Likewise.
10624         * regcache.c (regcache::get_register_status): Move it to
10625         reg_buffer.
10626         (regcache_raw_set_cached_value): Remove.
10627         (regcache::raw_set_cached_value): Remove.
10628         (regcache::raw_write): Call raw_supply.
10629         (regcache::raw_supply): Move it to reg_buffer_rw.
10630         * regcache.h (regcache_raw_set_cached_value): Remove.
10631         (reg_buffer_rw): New class.
10632
10633 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10634
10635         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
10636         readonly_detached_regcache.
10637         (dummy_frame_prev_register): Use regcache->cooked_read.
10638         * frame.c (frame_save_as_regcache): Change return type.
10639         (frame_pop): Update.
10640         * frame.h (frame_save_as_regcache): Update declaration.
10641         * inferior.h (get_infcall_suspend_state_regcache): Update
10642         declaration.
10643         * infrun.c (infcall_suspend_state) <registers>: use
10644         readonly_detached_regcache.
10645         (save_infcall_suspend_state): Don't use regcache_dup.
10646         (get_infcall_suspend_state_regcache): Change return type.
10647         * linux-fork.c (struct fork_info) <savedregs>: Change to
10648         readonly_detached_regcache.
10649         <pc>: New field.
10650         (fork_save_infrun_state): Don't use regcache_dup.
10651         (info_checkpoints_command): Adjust.
10652         * mi/mi-main.c (register_changed_p): Update declaration.
10653         (mi_cmd_data_list_changed_registers): Use
10654         readonly_detached_regcache.
10655         (register_changed_p): Change parameter type to
10656         readonly_detached_regcache.
10657         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
10658         readonly_detached_regcache.
10659         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
10660         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
10661         New.
10662         (regcache::save): Move it to reg_buffer.
10663         (regcache::restore): Change parameter type.
10664         (regcache_dup): Remove.
10665         * regcache.h (reg_buffer) <save>: New method.
10666         (readonly_detached_regcache): New class.
10667         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
10668         readonly_detached_regcache.
10669         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
10670
10671 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10672
10673         * frame.c (frame_save_as_regcache): Use regcache method save.
10674         (frame_pop): Use regcache method restore.
10675         * infrun.c (restore_infcall_suspend_state): Likewise.
10676         * linux-fork.c (fork_load_infrun_state): Likewise.
10677         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
10678         save.
10679         * regcache.c (regcache_save): Remove.
10680         (regcache::restore): More asserts.
10681         (regcache_cpy): Remove.
10682         * regcache.h (regcache_save): Remove the declaration.
10683         (regcache::restore): Move from private to public.
10684         Remove the friend declaration of regcache_cpy.
10685         (regcache_cpy): Remove declaration.
10686
10687 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10688
10689         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
10690         parameter type to 'readable_regcache *'.
10691         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10692         * arm-tdep.c (arm_neon_quad_read): Likewise.
10693         (arm_pseudo_read): Likewise.
10694         * avr-tdep.c (avr_pseudo_register_read): Likewise.
10695         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10696         * frv-tdep.c (frv_pseudo_register_read): Likewise.
10697         * gdbarch.c: Re-generated.
10698         * gdbarch.h: Re-generated.
10699         * gdbarch.sh (pseudo_register_read): Change parameter type to
10700         'readable_regcache *'.
10701         (pseudo_register_read_value): Likewise.
10702         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
10703         (h8300_pseudo_register_read): Likewise.
10704         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
10705         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10706         (i386_pseudo_register_read_into_value): Likewise.
10707         (i386_pseudo_register_read_value): Likewise.
10708         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
10709         declaration.
10710         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
10711         * m32c-tdep.c (m32c_raw_read): Likewise.
10712         (m32c_read_flg): Likewise.
10713         (m32c_banked_register): Likewise.
10714         (m32c_banked_read): Likewise.
10715         (m32c_sb_read): Likewise.
10716         (m32c_part_read): Likewise.
10717         (m32c_cat_read): Likewise.
10718         (m32c_r3r2r1r0_read): Likewise.
10719         (m32c_pseudo_register_read): Likewise.
10720         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10721         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10722         (mep_pseudo_cr64_read): Likewise.
10723         (mep_pseudo_register_read): Likewise.
10724         * mips-tdep.c (mips_pseudo_register_read): Likewise.
10725         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10726         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10727         * regcache.c (regcache::raw_read): Move it to readable_regcache.
10728         (regcache::cooked_read): Likewise.
10729         (regcache::cooked_read_value): Likewise.
10730         (regcache_cooked_read_signed):
10731         (regcache::cooked_read): Likewise.
10732         * regcache.h (readable_regcache): New class.
10733         (regcache): Inherit readable_regcache.  Move some methods to
10734         readable_regcache.
10735         * rl78-tdep.c (rl78_pseudo_register_read): Change
10736         parameter type to 'readable_regcache *'.
10737         * rs6000-tdep.c (do_regcache_raw_read): Remove.
10738         (e500_pseudo_register_read): Change parameter type to
10739         'readable_regcache *'.
10740         (dfp_pseudo_register_read): Likewise.
10741         (vsx_pseudo_register_read): Likewise.
10742         (efpr_pseudo_register_read): Likewise.
10743         * s390-tdep.c (s390_pseudo_register_read): Likewise.
10744         * sh-tdep.c (sh_pseudo_register_read): Likewise.
10745         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
10746         (sh64_pseudo_register_read): Likewise.
10747         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
10748         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10749         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
10750         (spu_pseudo_register_read): Likewise.
10751         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10752         (xtensa_pseudo_register_read): Likewise.
10753
10754 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10755
10756         * regcache.c (regcache::regcache): Call reg_buffer ctor.
10757         (regcache::arch): Move it to reg_buffer::arch.
10758         (regcache::register_buffer): Likewise.
10759         (regcache::assert_regnum): Likewise.
10760         (regcache::num_raw_registers): Likewise.
10761         * regcache.h (reg_buffer): New class.
10762         (regcache): Inherit reg_buffer.
10763
10764 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
10765
10766         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
10767         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
10768
10769 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
10770
10771         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
10772
10773 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
10774
10775         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
10776         (SFILES): Remove common/*.c files.
10777         (COMMON_OBS): Remove some *.o files built from common/*.c files.
10778         * common/common.host: Add common reference.
10779         * configure.ac: Likewise.
10780         * configure: Regenerate.
10781
10782 2018-02-16  Yao Qi  <yao.qi@linaro.org>
10783
10784         * block.c (block_namespace_info): Inherit allocate_on_obstack.
10785         (block_initialize_namespace): Use new.
10786         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
10787         (dwarf2_free_objfile): Use delete.
10788         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
10789         (copy_type_recursive): Use new.
10790         * gdb_obstack.h (allocate_on_obstack): New.
10791
10792 2018-02-15  Yao Qi  <yao.qi@linaro.org>
10793
10794         PR gdb/22849
10795         * inferior.c (exit_inferior_1): Reset inf->control.
10796
10797 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
10798
10799         * ada-lang.c (ada_to_fixed_value_create): Delete advance
10800         declaration.
10801
10802 2018-02-14  Pedro Alves  <palves@redhat.com>
10803
10804         * frame-unwind.c (frame_unwind_try_unwinder): Always call
10805         frame_cleanup_after_sniffer on exception.
10806
10807 2018-02-14  Tom Tromey  <tom@tromey.com>
10808
10809         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
10810         const.
10811         (solib_bfd_open): Make pathname const.
10812         * solib.c (solib_bfd_open): Make pathname const.
10813         * solib-spu.c (spu_bfd_fopen): Make name const.
10814         (spu_bfd_open): Make pathname const.
10815         * solib-darwin.c (darwin_bfd_open): Make pathname const.
10816         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
10817
10818 2018-02-14  Tom Tromey  <tom@tromey.com>
10819
10820         * symfile.c (symfile_bfd_open): Update.
10821         * source.h (openp, source_full_path_of, find_and_open_source):
10822         Change argument type to unique_xmalloc_ptr.
10823         * source.c (openp): Take a unique_xmalloc_ptr.
10824         (source_full_path_of, find_and_open_source): Likewise.
10825         (open_source_file, symtab_to_fullname): Update.
10826         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
10827         unique_xmalloc_ptr.
10828         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
10829         (exec_file_find): Update.
10830         * psymtab.c (psymtab_to_fullname): Update.
10831         * nto-tdep.h (nto_find_and_open_solib): Update.
10832         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
10833         unique_xmalloc_ptr.
10834         * exec.c (exec_file_attach): Update.
10835         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
10836         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
10837
10838 2018-02-14  Tom Tromey  <tom@tromey.com>
10839
10840         * solib.c: Include source.h.
10841         * nto-tdep.c: Include source.h.
10842         * mi/mi-cmd-env.c: Include source.h.
10843         * infcmd.c: Include source.h.
10844         * exec.c: Include source.h.
10845         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
10846         (add_path, directory_switch, source_path, init_source_path): Move
10847         declarations...
10848         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
10849         (add_path, directory_switch, source_path, init_source_path):
10850         ...here.
10851
10852 2018-02-14  Tom Tromey  <tom@tromey.com>
10853
10854         * solist.h (exec_file_find, solib_find): Return
10855         unique_xmalloc_ptr.
10856         (solib_bfd_fopen): Take a const char *.
10857         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
10858         (exec_file_find, solib_find): Likewise.
10859         (solib_bfd_fopen): Do not take ownership of "pathname".
10860         (solib_bfd_open): Use unique_xmalloc_ptr.
10861         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
10862         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
10863         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
10864         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
10865
10866 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
10867
10868         * ada-lang.c (name_match_type_from_name): Remove reference to
10869         ada_name_for_lookup in function's documentation.
10870         * ada-lang.h (ada_name_for_lookup): Delete declaration.
10871
10872 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
10873
10874         * defs.h (enum openp_flags): New enum.
10875         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
10876         Move to enum openp_flags.
10877         (openp_flags): New enum flags.
10878         (openp): Change parameter type to openp_flags.
10879         * source.c (openp): Change parameter type to openp_flags.
10880         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
10881         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
10882
10883 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
10884
10885         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
10886         per-command.
10887
10888 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
10889
10890         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
10891         into...
10892         (class dwarf2_queue_guard): ...the destructor of this new class.
10893         (dw2_do_instantiate_symtab): Create instance of the new class
10894         dwarf2_queue_guard, remove cleanup.
10895
10896 2018-02-09  Tom Tromey  <tom@tromey.com>
10897
10898         * source.c (find_source_lines): Don't reference past the end of
10899         the vector.
10900
10901 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10902
10903         * remote.c (remote_btrace_maybe_reopen): Change error message.
10904         * btrace.c (btrace_enable): Likewise.
10905         (parse_xml_btrace): Likewise.
10906         (parse_xml_btrace_conf): Likewise.
10907
10908 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10909
10910         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
10911         (linux_enable_pt, linux_enable_bts): Call
10912         diagnose_perf_event_open_fail.
10913
10914 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10915
10916         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
10917         Remove parameter and change return type.  Update callers.  Move it.
10918         (linux_enable_bts, linux_enable_pt): Improve error message.
10919         (linux_enable_pt): Remove zero buffer size check.
10920         (linux_enable_btrace): Improve error messages.  Remove NULL return
10921         check.
10922
10923 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10924
10925         * btrace.c (btrace_enable): Remove target_supports_btrace call.
10926         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
10927         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
10928         (linux_supports_pt, linux_supports_btrace): Remove.
10929         (linux_enable_bts): Call cpu_supports_bts.
10930         * nat/linux-btrace.h (linux_supports_btrace): Remove.
10931         * remote.c (remote_supports_btrace): Remove.
10932         (init_remote_ops): Remove remote_supports_btrace.
10933         * target-delegates.c: Regenerated.
10934         * target.c (target_supports_btrace): Remove.
10935         * target.h (target_ops) <to_supports_btrace>: Remove
10936         (target_supports_btrace): Remove.
10937         * x86-linux-nat.c (x86_linux_create_target): Remove
10938         linux_supports_btrace.
10939
10940 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10941
10942         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
10943         btrace failed.
10944         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
10945         exception and use message in own exception.
10946
10947 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10948
10949         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
10950         (perf_event_pt_event_type): Use gdb_file_up.
10951         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
10952         scoped_fd, and scoped_mmap.
10953
10954 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10955
10956         * common/scoped_mmap.h: New.
10957         * unittests/scoped_mmap-selftest.c: New.
10958         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10959         unittests/scoped_mmap-selftest.c.
10960
10961 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10962
10963         * common/scoped_fd.h: New.
10964         * unittests/scoped_fd-selftest.c: New.
10965         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10966         unittests/scoped_fd-selftest.c.
10967
10968 2018-02-09  Tom Tromey  <tom@tromey.com>
10969
10970         * auto-load.c (auto_load_section_scripts): Use
10971         gdb::unique_xmalloc_ptr.
10972
10973 2018-02-09  Tom Tromey  <tom@tromey.com>
10974
10975         * auto-load.c (execute_script_contents): Use std::string.
10976
10977 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
10978
10979         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
10980         Python function, rather than a new command.
10981
10982 2018-02-08  Tom Tromey  <tom@tromey.com>
10983
10984         * solib.c (solib_find_1): Use std::string.
10985         (solib_bfd_fopen): Use unique_xmalloc_ptr.
10986
10987 2018-02-08  Tom Tromey  <tom@tromey.com>
10988
10989         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
10990
10991 2018-02-08  Tom Tromey  <tom@tromey.com>
10992
10993         * source.c (find_source_lines): Use gdb::def_vector.
10994
10995 2018-02-08  Tom Tromey  <tom@tromey.com>
10996
10997         * macrocmd.c (struct temporary_macro_definition): New.
10998         (macro_define_command): Use temporary_macro_definition.  Remove
10999         cleanups.
11000         (free_macro_definition_ptr): Remove.
11001
11002 2018-02-08  Tom Tromey  <tom@tromey.com>
11003
11004         * macroexp.c (maybe_expand): Use std::string.
11005
11006 2018-02-08  Tom Tromey  <tom@tromey.com>
11007
11008         * macroexp.c (struct macro_buffer): Add initializers for some
11009         members.
11010         (init_buffer, init_shared_buffer, free_buffer)
11011         (free_buffer_return_text): Remove.
11012         (macro_buffer): New constructors.
11013         (~macro_buffer): New destructor.
11014         (macro_buffer::set_shared): New method.
11015         (macro_buffer::resize_buffer, macro_buffer::appendc)
11016         (macro_buffer::appendmem): Now methods, not free functions.
11017         (set_token, append_tokens_without_splicing, stringify)
11018         (macro_stringify): Update.
11019         (gather_arguments): Change return type.  Remove argc_p argument,
11020         add args_ptr argument.  Use std::vector.
11021         (substitute_args): Remove argc argument.  Accept std::vector.
11022         (expand): Update.  Use std::vector.
11023         (scan, macro_expand, macro_expand_next): Update.
11024
11025 2018-02-08  Tom Tromey  <tom@tromey.com>
11026
11027         * symtab.c (default_collect_symbol_completion_matches_break_on):
11028         Use unique_xmalloc_ptr.
11029         * macroscope.h: (sal_macro_scope, user_macro_scope)
11030         (default_macro_scope): Return unique_xmalloc_ptr.
11031         * macroscope.c (sal_macro_scope, user_macro_scope)
11032         (default_macro_scope): Return unique_xmalloc_ptr.
11033         * macroexp.h (macro_expand, macro_expand_once): Return
11034         unique_xmalloc_ptr.
11035         * macroexp.c (macro_expand, macro_expand_once): Return
11036         unique_xmalloc_ptr.
11037         * macrocmd.c (macro_expand_command, macro_expand_once_command)
11038         (info_macro_command, info_macros_command): Use
11039         unique_xmalloc_ptr.
11040         * compile/compile-c-support.c (write_macro_definitions): Use
11041         unique_xmalloc_ptr.
11042         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
11043
11044 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
11045
11046         * value.c (value_static_field): Assign field type instead of
11047         containing type when returning an optimized out value.
11048
11049 2018-02-06  Yao Qi  <yao.qi@linaro.org>
11050
11051         * ft32-tdep.c (ft32_read_pc): Remove.
11052         (ft32_write_pc): Remove.
11053         (ft32_gdbarch_init): Update.
11054         * m32r-tdep.c (m32r_read_pc): Remove.
11055         (m32r_gdbarch_init): Update.
11056         * mep-tdep.c (mep_read_pc): Remove.
11057         (mep_gdbarch_init): Update.
11058         * microblaze-tdep.c (microblaze_write_pc): Remove.
11059         (microblaze_gdbarch_init): Update.
11060         * mn10300-tdep.c (mn10300_read_pc): Remove.
11061         (mn10300_write_pc): Remove.
11062         (mn10300_gdbarch_init): Update.
11063         * moxie-tdep.c (moxie_read_pc): Remove.
11064         (moxie_write_pc): Remove.
11065         (moxie_gdbarch_init): Update.
11066
11067 2018-02-06  Yao Qi  <yao.qi@linaro.org>
11068
11069         * expprint.c (print_subexp_standard): Handle
11070         OP_F77_UNDETERMINED_ARGLIST.
11071         (dump_subexp_body_standard): Likewise.
11072
11073 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
11074
11075         * target-descriptions.c (tdesc_element_visitor) Add empty
11076         implementations.
11077         (tdesc_type): Move make_gdb_type from here.
11078         (tdesc_type_builtin): Likewise.
11079         (tdesc_type_vector): Likewise.
11080         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
11081         (make_gdb_type_struct): Move from tdesc_type_with_fields.
11082         (make_gdb_type_union): Likewise.
11083         (make_gdb_type_flags): Likewise.
11084         (make_gdb_type_enum): Likewise.
11085         (make_gdb_type): New function.
11086         (tdesc_register_type): Use static make_gdb_type.
11087
11088 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
11089
11090         * infcmd.c (default_print_one_register_info): Align natural-format
11091         column values consistently one under another.
11092         (pad_to_column): New function.
11093
11094 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
11095
11096         * dwarf2read.c (dwarf2_physname): Move commment.
11097
11098 2018-02-01  Leszek Swirski  <leszeks@google.com>
11099
11100         * varobj.c (varobj_formatted_print_options): Allow recursive
11101         pretty printing if pretty printing is enabled.
11102
11103 2018-02-01  Leszek Swirski  <leszeks@google.com>
11104
11105         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
11106         names after a structop as a filename.
11107
11108 2018-02-01  Yao Qi  <yao.qi@linaro.org>
11109
11110         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
11111         (arm_record_coproc_data_proc): Likewise.
11112
11113 2018-02-01  Yao Qi  <yao.qi@linaro.org>
11114
11115         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
11116
11117 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
11118
11119         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
11120         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
11121
11122 2018-01-31  Pedro Alves  <palves@redhat.com>
11123
11124         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
11125         * inflow.c (child_terminal_save_inferior): Wrap reference to
11126         tcgetpgrp in HAVE_TERMIOS_H.
11127         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
11128         _WIN32.
11129         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
11130         always iterate over all inferiors.
11131         (gdbsim_cntrl_c): Adjust.
11132         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
11133
11134 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
11135
11136         * gdbtypes.c (lookup_array_range_type): Make sure the array's
11137         index type is objfile-owned if the element type is as well.
11138
11139 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
11140
11141         GDB 8.1 released.
11142
11143 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11144
11145         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
11146         "features/s390x-linux64.c".
11147         (_initialize_s390_linux_tdep): Remove initialization of tdescs
11148         s390_linux32 and s390x_linux64.
11149         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
11150         default tdesc.
11151         * s390-tdep.c: Include "features/s390-linux32.c" and
11152         "features/s390x-linux64.c".
11153         (s390_tdesc_valid): Add check for tdesc_has_registers.
11154         (s390_gdbarch_init): Make sure there is always a valid tdesc.
11155         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
11156         tdesc_s390x_linux64.
11157         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
11158         tdesc_s390x_linux64 to...
11159         * s390-tdep.h: ...here.
11160
11161 2018-01-30  Pedro Alves  <palves@redhat.com>
11162
11163         PR gdb/13211
11164         * config.in, configure: Regenerate.
11165         * configure.ac: Check for getpgid.
11166         * go32-nat.c (go32_pass_ctrlc): New.
11167         (go32_target): Install it.
11168         * inf-child.c (inf_child_target): Install
11169         child_terminal_save_inferior, child_pass_ctrlc and
11170         child_interrupt.
11171         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
11172         (inf_ptrace_target): No longer install it.
11173         * infcmd.c (interrupt_target_1): Adjust.
11174         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
11175         (child_interrupt): Declare.
11176         (inferior::terminal_state): New.
11177         * inflow.c (struct terminal_info): Update comments.
11178         (inferior_process_group): Delete.
11179         (terminal_is_ours): Delete.
11180         (gdb_tty_state): New.
11181         (child_terminal_init): Adjust.
11182         (is_gdb_terminal, sharing_input_terminal_1)
11183         (sharing_input_terminal): New functions.
11184         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
11185         Set the process's actual process group in the foreground if
11186         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
11187         mark terminal as the inferior's if not sharing GDB's terminal.
11188         Don't check attach_flag.
11189         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
11190         pass down a target_terminal_state.
11191         (child_terminal_save_inferior): New, factored out from ...
11192         (child_terminal_ours_1): ... this.  Handle
11193         target_terminal_state::is_ours_for_output.
11194         (child_interrupt, child_pass_ctrlc): New.
11195         (inflow_inferior_exit): Clear the inferior's terminal_state.
11196         (copy_terminal_info): Copy the inferior's terminal state.
11197         (_initialize_inflow): Remove reference to terminal_is_ours.
11198         * inflow.h (inferior_process_group): Delete.
11199         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
11200         * procfs.c (procfs_target): Don't install procfs_interrupt.
11201         (procfs_interrupt): Delete.
11202         * remote.c (remote_serial_quit_handler): Adjust.
11203         (remote_interrupt): Remove ptid parameter.  Adjust.
11204         * target-delegates.c: Regenerate.
11205         * target.c: Include "terminal.h".
11206         (target_terminal::terminal_state): Rename to ...
11207         (target_terminal::m_terminal_state): ... this.
11208         (target_terminal::init): Adjust.
11209         (target_terminal::inferior): Adjust to per-inferior
11210         terminal_state.
11211         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
11212         (target_terminal::ours, target_terminal::ours_for_output): Use
11213         target_terminal_is_ours_kind.
11214         (target_interrupt): Remove ptid parameter.  Adjust.
11215         (default_target_pass_ctrlc): Adjust.
11216         * target.h (target_ops::to_terminal_save_inferior): New field.
11217         (target_ops::to_interrupt): Remove ptid_t parameter.
11218         (target_interrupt): Remove ptid_t parameter.  Update comment.
11219         (target_pass_ctrlc): Update comment.
11220         * target/target.h (target_terminal_state): New scoped enum,
11221         factored out of ...
11222         (target_terminal::terminal_state): ... here.
11223         (target_terminal::inferior): Update comments.
11224         (target_terminal::restore_inferior): New.
11225         (target_terminal::is_inferior, target_terminal::is_ours)
11226         (target_terminal::is_ours_for_output): Adjust.
11227         (target_terminal::scoped_restore_terminal_state): Adjust to
11228         rename, and call restore_inferior() instead of inferior().
11229         (target_terminal::scoped_restore_terminal_state::m_state): Change
11230         type.
11231         (target_terminal::terminal_state): Rename to ...
11232         (target_terminal::m_terminal_state): ... this and change type.
11233
11234 2018-01-30  Pedro Alves  <palves@redhat.com>
11235
11236         * linux-nat.c (wait_for_signal): New function.
11237         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
11238         directly.
11239         (async_terminal_is_ours)
11240         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
11241         (linux_nat_add_target): Don't override
11242         to_terminal_inferior/to_terminal_ours.
11243
11244 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
11245
11246         * remote.c (remote_follow_fork): Don't call "detach_inferior".
11247
11248 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
11249
11250         * dwarf2read.c (free_dwo_files): Add forward-declaration.
11251         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
11252         dwarf2_per_objfile_free here.
11253         (dwarf2_per_objfile_free): Remove.
11254         (_initialize_dwarf2_read): Don't register
11255         dwarf2_per_objfile_free as a registry cleanup.
11256
11257 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
11258
11259         Avoid compilation errors in MinGW native builds
11260
11261         The error is triggered by including python-internal.h, and the
11262         error message is:
11263
11264              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
11265                       from build-gnulib/import/math.h:27,
11266                       from d:/usr/Python26/include/pyport.h:235,
11267                       from d:/usr/Python26/include/Python.h:58,
11268                       from python/python-internal.h:94,
11269                       from python/py-arch.c:24:
11270              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
11271         using ::hypot;
11272                 ^~~~~
11273
11274         This happens because Python headers define 'hypot' to expand t
11275         '_hypot' in the Windows builds.
11276         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
11277         'hypoth'.  This avoids a compilation error.
11278
11279 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
11280
11281         * MAINTAINERS (Write After Approval): Fix ordering.
11282
11283 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
11284
11285         * MAINTAINERS (Write After Approval): Add Alan Hayward.
11286
11287 2018-01-26  Alan Modra  <amodra@gmail.com>
11288
11289         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
11290         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
11291         Remove nop.  Make const.  Comment.
11292         (powerpc32_plt_stub_so_2): New.
11293         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
11294         Correct count.  Update uses.
11295         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
11296         Move common code reading PLT entry word.  Correct
11297         powerpc32_plt_stub PLT address calculation.
11298         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
11299         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
11300         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
11301         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
11302         (ppc64_standard_linkage8): Likewise.
11303         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
11304         Correct insns description.
11305         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
11306
11307 2018-01-24  Pedro Alves  <palves@redhat.com>
11308
11309         GCC PR libstdc++/83906
11310         * gdbtypes.c (operator==(const dynamic_prop &,
11311         const dynamic_prop &)): New.
11312         (operator==(const range_bounds &, const range_bounds &)): New.
11313         (check_types_equal): Use them instead of memcmp.
11314         * gdbtypes.h (operator==(const dynamic_prop &,
11315         const dynamic_prop &)): Declare.
11316         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
11317         (operator==(const range_bounds &, const range_bounds &)): Declare.
11318         (operator!=(const range_bounds &, const range_bounds &)): Declare.
11319
11320 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11321
11322         * s390-linux-tdep.c (s390_record_address_mask)
11323         (s390_record_calc_disp_common, s390_record_calc_disp)
11324         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11325         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11326         (s390_process_record): Move to s390-tdep.c.
11327         (s390_linux_init_abi_any): Adjust.
11328         * s390-tdep.c (s390_record_address_mask)
11329         (s390_record_calc_disp_common, s390_record_calc_disp)
11330         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11331         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11332         (s390_process_record): Moved from s390-linux-tdep.c
11333         (s390_gdbarch_init): Adjust.
11334
11335 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11336
11337         * s390-linux-nat.c (s390-tdep.h): New include.
11338         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
11339         (HFILES_NO_SRCDIR): Add s390-tdep.h.
11340         (ALLDEPFILES): Add s390-tdep.c.
11341         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
11342         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
11343         * s390-tdep.h: ...this.  New file.
11344         * s390-linux-tdep.c (s390-tdep.h): New include.
11345         (_initialize_s390_tdep): Rename to...
11346         (_initialize_s390_linux_tdep): ...this and adjust.
11347         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
11348         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
11349         s390-tdep.h.
11350         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
11351         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
11352         (s390_is_partial_instruction, s390_software_single_step)
11353         (is_non_branch_ril, s390_displaced_step_copy_insn)
11354         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
11355         (s390_prologue_data, s390_addr, s390_store, s390_load)
11356         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
11357         (s390_register_call_saved, s390_guess_tracepoint_registers)
11358         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
11359         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
11360         (s390_pseudo_register_name, s390_pseudo_register_type)
11361         (s390_pseudo_register_read, s390_pseudo_register_write)
11362         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
11363         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
11364         (s390_addr_bits_remove, s390_address_class_type_flags)
11365         (s390_address_class_type_flags_to_name)
11366         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
11367         (s390_function_arg_float, s390_function_arg_vector)
11368         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
11369         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
11370         (s390_frame_align, s390_register_return_value, s390_return_value)
11371         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
11372         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
11373         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
11374         (s390_trad_frame_prev_register, s390_unwind_cache)
11375         (s390_prologue_frame_unwind_cache)
11376         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
11377         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
11378         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
11379         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
11380         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
11381         (s390_frame_base_address, s390_local_base_address)
11382         (s390_frame_base, s390_gcc_target_options)
11383         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
11384         (s390_validate_reg_range, s390_tdesc_valid)
11385         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
11386         * s390-tdep.c: ...this.  New file.
11387
11388 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11389
11390         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
11391         (s390_process_record, s390_gdbarch_tdep_alloc)
11392         (s390_linux_init_abi_any): Use/set new hook.
11393
11394 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11395
11396         * s390-linux-tdep.c (osabi.h): New include.
11397         (s390_linux_init_abi_31, s390_linux_init_abi_64)
11398         (s390_linux_init_abi_any): New functions.
11399         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
11400
11401 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11402
11403         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
11404         tdesc_has_registers check
11405
11406 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11407
11408         * s390-linux-tdep.c (s390_tdesc_valid): New function.
11409         (s390_validate_reg_range): New macro.
11410         (s390_gdbarch_init): Adjust.
11411
11412 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11413
11414         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
11415         (s390_gdbarch_tdep_alloc): Adjust.
11416         (s390_gdbarch_init): Adjust.
11417
11418 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11419
11420         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
11421         <have_tdb>: Change type to bool.
11422         (s390_gdbarch_tdep_alloc): Adjust.
11423         (s390_gdbarch_init): Adjust.
11424
11425 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11426
11427         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
11428         (gdbarch_tdep) <have_upper, have_vx>: New fields.
11429         (s390_gdbarch_tdep_alloc): New function.
11430         (s390_gdbarch_init): Allocate tdep at start and use its fields
11431         instead of separate variables.
11432
11433 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11434
11435         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
11436         when looking for cached gdbarch and add comment for remaining.
11437
11438 2018-01-22  Pedro Alves  <palves@redhat.com>
11439             Sergio Durigan Junior  <sergiodj@redhat.com>
11440
11441         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
11442         case.
11443
11444 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
11445
11446         * MAINTAINERS: Update my company e-mail address.
11447
11448 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11449
11450         * regcache.c (cooked_write_test): New function.
11451         (_initialize_regcache): Register the test.
11452
11453 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11454
11455         * ia64-tdep.c (ia64_pseudo_register_read): Call
11456         regcache->cooked_read instead of regcache_cooked_read_unsigned.
11457         * m32c-tdep.c (m32c_cat_read): Likewise.
11458         (m32c_r3r2r1r0_read): Likewise.
11459         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
11460         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
11461
11462 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11463
11464         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
11465         method raw_read instead of regcache_raw_read.
11466         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
11467         * arm-tdep.c (arm_neon_quad_read): Likewise.
11468         * avr-tdep.c (avr_pseudo_register_read): Likewise.
11469         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
11470         * frv-tdep.c (frv_pseudo_register_read): Likewise.
11471         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
11472         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
11473         (i386_pseudo_register_read_into_value): Likewise.
11474         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
11475         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
11476         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
11477         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
11478         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
11479         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
11480         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
11481         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
11482         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
11483
11484 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11485
11486         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
11487         * configure.tgt: Remove target mt.
11488         * mt-tdep.c: Remove.
11489         * regcache.c (cooked_read_test): Remove the check for mt.
11490
11491 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11492
11493         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
11494         instead of gdbarch_pseudo_register_read_value.
11495
11496 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
11497
11498         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
11499         language is Ada.
11500
11501 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
11502
11503         * linespec.c (create_sals_line_offset): Remove code that preserved
11504         the symtab_and_line's line number.
11505
11506 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11507
11508         * varobj.c (varobj_create): Don't set valid_block when creating a
11509         floating varobj.
11510
11511 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11512
11513         * varobj.c (varobj_create): Remove out of date comment.
11514
11515 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11516
11517         PR mi/20395
11518         * ada-exp.y (write_var_from_sym): Pass extra parameter when
11519         updating innermost block.
11520         * parse.c (innermost_block_tracker::update): Take extra type
11521         parameter, and check types match before updating innermost block.
11522         (write_dollar_variable): Update innermost block for registers.
11523         * parser-defs.h (enum innermost_block_tracker_type): New enum.
11524         (innermost_block_tracker::innermost_block_tracker): Initialise
11525         m_types member.
11526         (innermost_block_tracker::reset): Take type parameter.
11527         (innermost_block_tracker::update): Take type parameter, and pass
11528         type through as needed.
11529         (innermost_block_tracker::m_types): New member.
11530         * varobj.c (varobj_create): Pass type when reseting innermost
11531         block.
11532
11533 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11534
11535         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
11536         * ada-lang.c (resolve_subexp): Likewise.
11537         * breakpoint.c (set_breakpoint_condition) Likewise.
11538         (watch_command_1) Likewise.
11539         * c-exp.y (variable): Likewise.
11540         * d-exp.y (PrimaryExpression): Likewise.
11541         * f-exp.y (variable): Likewise.
11542         * go-exp.y (variable): Likewise.
11543         * m2-exp.y (variable): Likewise.
11544         * objfiles.c (objfile::~objfile): Likewise.
11545         * p-exp.y (variable): Likewise.
11546         * parse.c (innermost_block): Change type.
11547         * parser-defs.h (class innermost_block_tracker): New.
11548         (innermost_block): Change to innermost_block_tracker.
11549         * printcmd.c (display_command): Switch to innermost_block API.
11550         (do_one_display): Likewise.
11551         * rust-exp.y (do_one_display): Likewise.
11552         * symfile.c (clear_symtab_users): Likewise.
11553         * varobj.c (varobj_create): Switch to innermost_block API, replace
11554         use of innermost_block with block stored on varobj object.
11555
11556 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11557
11558         * expression.h (innermost_block): Remove declaration.
11559         * varobj.c: Add 'parser-defs.h' include.
11560
11561 2018-01-19  Tom Tromey  <tom@tromey.com>
11562
11563         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
11564         symbols in the static and global blocks.
11565
11566 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
11567
11568         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
11569         gdb_ptrace.h, and move including gdb_wait.h ...
11570         * nat/linux-ptrace.h: ... to here.
11571
11572 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
11573
11574         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
11575         inf_ptrace_detach_success.
11576         (inf_ptrace_detach_success): Add inferior parameter, use it
11577         instead of inferior_ptid, pass it to detach_inferior.
11578         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
11579         parameter.
11580         * inferior.c (detach_inferior): Add overload that takes an
11581         inferior object.
11582         * inferior.h (detach_inferior): Likewise.
11583         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
11584         use inferior_ptid, adjust call to inf_ptrace_detach_success.
11585         * linux-thread-db.c (thread_db_detach): Use inf parameter.
11586
11587 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
11588
11589         * target.h (struct target_ops) <to_detach>: Add inferior
11590         parameter.
11591         (target_detach): Likewise.
11592         * target.c (dispose_inferior): Pass inferior down.
11593         (target_detach): Pass inferior down.  Assert that it is equal to
11594         the current inferior.
11595         * aix-thread.c (aix_thread_detach): Pass inferior down.
11596         * corefile.c (core_file_command): Pass current_inferior() down.
11597         * corelow.c (core_detach): Add inferior parameter.
11598         * darwin-nat.c (darwin_detach): Likewise.
11599         * gnu-nat.c (gnu_detach): Likewise.
11600         * inf-ptrace.c (inf_ptrace_detach): Likewise.
11601         * infcmd.c (detach_command): Pass current_inferior() down to
11602         target_detach.
11603         * infrun.c (follow_fork_inferior): Pass parent_inf to
11604         target_detach.
11605         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
11606         target_detach.
11607         * linux-nat.c (linux_nat_detach): Add inferior parameter.
11608         * linux-thread-db.c (thread_db_detach): Likewise.
11609         * nto-procfs.c (procfs_detach): Likewise.
11610         * procfs.c (procfs_detach): Likewise.
11611         * record.c (record_detach): Likewise.
11612         * record.h (struct inferior): Forward-declare.
11613         (record_detach): Add inferior parameter.
11614         * remote-sim.c (gdbsim_detach): Likewise.
11615         * remote.c (remote_detach_1): Likewise.
11616         (remote_detach): Likewise.
11617         (extended_remote_detach): Likewise.
11618         * sol-thread.c (sol_thread_detach): Likewise.
11619         * target-debug.h (target_debug_print_inferior_p): New macro.
11620         * target-delegates.c: Re-generate.
11621         * top.c (kill_or_detach): Pass inferior down to target_detach.
11622         * windows-nat.c (windows_detach): Add inferior parameter.
11623
11624 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
11625
11626         * target.h (struct target_ops) <to_detach>: Remove args
11627         parameter.
11628         (target_detach): Likewise.
11629         * target.c (dispose_inferior): Adjust.
11630         (target_detach): Remove args parameter, adjust.
11631         * aix-thread.c (aix_thread_detach): Adjust.
11632         * corefile.c (core_file_command): Adjust.
11633         * corelow.c (core_detach): Adjust.
11634         * darwin-nat.c (darwin_detach): Adjust.
11635         * gnu-nat.c (gnu_detach): Adjust.
11636         * inf-ptrace.c (inf_ptrace_detach): Adjust.
11637         * infcmd.c (detach_command): Adjust
11638         * infrun.c (follow_fork_inferior): Adjust.
11639         (handle_vfork_child_exec_or_exit): Adjust.
11640         * linux-fork.c (linux_fork_detach): Remove args parameter.
11641         * linux-fork.h (linux_fork_detach): Likewise.
11642         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
11643         * linux-thread-db.c (thread_db_detach): Likewise.
11644         * nto-procfs.c (procfs_detach): Likewise.
11645         * procfs.c (procfs_detach): Likewise.
11646         (do_detach): Remove signo parameter.
11647         * record.c (record_detach): Remove args parameter.
11648         * record.h (record_detach): Likewise.
11649         * remote-sim.c (gdbsim_detach): Likewise.
11650         * remote.c (remote_detach_1): Likewise.
11651         (remote_detach): Likewise.
11652         (extended_remote_detach): Likewise.
11653         * sol-thread.c (sol_thread_detach): Likewise.
11654         * target-delegates.c: Re-generate.
11655         * top.c (struct qt_args) <args>: Remove field.
11656         (kill_or_detach): Don't pass args.
11657         (quit_force): Don't set args.
11658         * windows-nat.c (windows_detach): Remove args parameter.
11659
11660 2018-01-19  Yao Qi  <yao.qi@linaro.org>
11661
11662         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
11663         (arm_linux_init_abi): Install it.
11664
11665 2018-01-19  Yao Qi  <yao.qi@linaro.org>
11666
11667         * osabi.c (gdb_osabi_names): Extend the regexp for
11668         arm-linux-gnueabihf.
11669
11670 2018-01-18  Yao Qi  <yao.qi@linaro.org>
11671
11672         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
11673         m_abbrevs.
11674         (abbrev_table::add_abbrev): Update.
11675         (abbrev_table::lookup_abbrev): Update.
11676
11677 2018-01-18  Yao Qi  <yao.qi@linaro.org>
11678
11679         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
11680
11681 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
11682
11683         * compile/compile.c (compile_to_object): Convert "triplet_rx"
11684         to "std::string".
11685
11686 2018-01-17  Tom Tromey  <tom@tromey.com>
11687
11688         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
11689
11690 2018-01-17  Tom Tromey  <tom@tromey.com>
11691
11692         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
11693         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
11694         (create_array_type_with_stride): Update.
11695         * dwarf2read.c (set_die_type): Update.
11696
11697 2018-01-17  Tom Tromey  <tom@tromey.com>
11698
11699         * dwarf2read.c (delayed_method_info): Remove typedef.
11700         (dwarf2_cu::method_info): Now a std::vector.
11701         (add_to_method_list): Update.
11702         (free_delayed_list): Remove.
11703         (compute_delayed_physnames): Update.
11704         (process_full_comp_unit, process_full_type_unit): Clear the method
11705         list.  Remove cleanups.
11706         (psymtab_include_file_name): Add name_holder parameter.  Use
11707         unique_xmalloc_ptr.
11708         (dwarf_decode_lines): Update.
11709
11710 2018-01-17  Tom Tromey  <tom@tromey.com>
11711             Simon Marchi  <simon.marchi@ericsson.com>
11712
11713         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
11714         (dwarf2_per_objfile::free_cached_comp_units)
11715         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11716         (init_cutu_and_read_dies_no_follow): Update.
11717         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
11718         (dwarf2_cu::~dwarf2_cu): New.
11719         (free_heap_comp_unit, free_stack_comp_unit): Remove.
11720         (age_cached_comp_units, free_one_cached_comp_unit): Update.
11721
11722 2018-01-17  Tom Tromey  <tom@tromey.com>
11723             Simon Marchi  <simon.marchi@ericsson.com>
11724
11725         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
11726         (struct die_reader_specs) <abbrev_table>: New member.
11727         (struct abbrev_table): Add constructor.
11728         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
11729         <abbrev_obstack>: Now an auto_obstack.
11730         (abbrev_table_up): New typedef.
11731         (init_cu_die_reader): Add abbrev_table parameter.
11732         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
11733         Add result_dwo_abbrev_table.
11734         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11735         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
11736         Update.
11737         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
11738         parameter.
11739         (skip_children): Update.
11740         (abbrev_table::alloc_abbrev): Rename from
11741         abbrev_table_alloc_abbrev.
11742         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
11743         (abbrev_table::lookup_abbrev): Rename from
11744         abbrev_table_lookup_abbrev.
11745         (abbrev_table_read_table): Return abbrev_table_up.
11746         (abbrev_table_free, abbrev_table_free_cleanup)
11747         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
11748         (load_partial_dies): Update.
11749
11750 2018-01-17  Tom Tromey  <tom@tromey.com>
11751
11752         * dwarf2read.c (dwarf2_compute_name): Update comment.
11753         (read_func_scope, read_variable): Update.
11754         (new_symbol): Remove.
11755         (new_symbol_full): Rename to new_symbol.
11756
11757 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
11758
11759         PR gdb/16577
11760         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
11761         a warning instead of throwing an error, set section size to 0 and return
11762         NULL.
11763         * gdb_bfd.h (gdb_bfd_map_section): Update description.
11764
11765 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
11766
11767         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
11768         std::string.
11769         (linux_ptrace_attach_fail_reason_string): Likewise.
11770         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
11771         Likewise.
11772         (linux_ptrace_attach_fail_reason_string): Likewise.
11773         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
11774
11775 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
11776
11777         * linux-nat.c (linux_nat_attach): Remove xstrdup.
11778
11779 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
11780
11781         PR gdb/21559
11782         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
11783         checking for fs_base/gs_base fields in struct user_regs_struct.
11784         * configure: Regenerate.
11785
11786 2018-01-17  Yao Qi  <yao.qi@linaro.org>
11787
11788         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
11789         function.
11790         (aarch64_linux_init_abi): Install it to gdbarch hook
11791         gcc_target_options.
11792
11793 2018-01-15  Pedro Alves  <palves@redhat.com>
11794
11795         * common/signals-state-save-restore.c
11796         (save_original_signals_state): Fix typos.
11797
11798 2017-01-12  Tom Tromey  <tom@tromey.com>
11799             Sergio Durigan Junior  <sergiodj@redhat.com>
11800
11801         * Makefile.in (install-only): Install gdb-add-index.
11802
11803 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
11804
11805         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
11806
11807 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11808
11809         * infrun.c (keep_going_pass_signal): Clear step-over info when
11810         insert_breakpoints fails.
11811
11812 2018-01-11  Pedro Alves  <palves@redhat.com>
11813
11814         PR gdb/22583
11815         * infrun.c (resume): Rename to ...
11816         (resume_1): ... this.
11817         (resume): Reimplement as wrapper around resume_1.
11818
11819 2018-01-11  Pedro Alves  <palves@redhat.com>
11820
11821         PR remote/22597
11822         * remote.c (remote_parse_stop_reply): Default to the last-set
11823         general thread instead of to 'magic_null_ptid'.
11824
11825 2018-01-10  Pedro Alves  <palves@redhat.com>
11826
11827         * language.h (language_get_symbol_name_matcher): Rename ...
11828         (get_symbol_name_matcher): ... this.
11829         * language.c (language_get_symbol_name_matcher): Ditto.
11830         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
11831         callers adjusted.
11832
11833 2018-01-10  Pedro Alves  <palves@redhat.com>
11834
11835         PR gdb/22670
11836         * dwarf2read.c
11837         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
11838         Adjust to use language_get_symbol_name_matcher instead of
11839         language_defn::la_get_symbol_name_matcher.
11840         * language.c (language_get_symbol_name_matcher): If in Ada mode
11841         and the lookup name is a verbatim match, return Ada's matcher.
11842         * language.h (language_get_symbol_name_matcher): Adjust comment.
11843         (ada_lookup_name_info::verbatim_p):: New method.
11844
11845 2018-01-10  Pedro Alves  <palves@redhat.com>
11846
11847         PR gdb/22670
11848         * ada-lang.c (ada_collect_symbol_completion_matches): If the
11849         minsym's language is language_auto or language_cplus, pass down
11850         language_ada instead.
11851         * symtab.c (compare_symbol_name): Don't frob symbol language here.
11852
11853 2018-01-10  Pedro Alves  <palves@redhat.com>
11854
11855         PR gdb/22670
11856         * minsyms.c (linkage_name_str): New function.
11857         (iterate_over_minimal_symbols): Use it.
11858
11859 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11860
11861         * NEWS: Document that 'info proc' now works on FreeBSD.
11862
11863 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11864
11865         * configure.ac: Check for kinfo_getfile in libutil.
11866         * configure: Regenerate.
11867         * config.in: Regenerate.
11868         * fbsd-nat.c: Include "fbsd-tdep.h".
11869         (fbsd_fetch_cmdline): New.
11870         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
11871         rather than calling error.
11872         (fbsd_info_proc): New.
11873         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
11874         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
11875         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
11876
11877 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11878
11879         * fbsd-nat.c (struct free_deleter): Remove.
11880         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
11881
11882 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11883
11884         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
11885         NULL for an empty pathname.
11886
11887 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11888
11889         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
11890         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
11891         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
11892         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
11893         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
11894         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
11895         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
11896         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
11897         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
11898         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
11899         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
11900         (fbsd_core_fetch_timeval, fbsd_print_sigset)
11901         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
11902         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
11903         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
11904
11905 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
11906
11907         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
11908         (gnu_xfer_auxv): New function.
11909         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
11910         TARGET_OBJECT_AUXV.
11911
11912 2018-01-08  Yao Qi  <yao.qi@linaro.org>
11913             Simon Marchi  <simon.marchi@ericsson.com>
11914
11915         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
11916         common/selftest.c.
11917         (COMMON_OBS): Remove selftest.o.
11918         * configure.ac: Append selftest-arch.c and common/selftest.c to
11919         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
11920         * configure: Re-generated.
11921         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
11922         GDB_SELF_TEST.
11923         (maintenance_info_selftests): Likewise.
11924
11925 2018-01-08  Xavier Roirand  <roirand@adacore.com>
11926
11927         * ada-valprint.c (val_print_packed_array_elements): Use
11928         proper number of elements when printing an array indexed
11929         by an enumeration type.
11930
11931 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
11932
11933         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
11934         (dw2_get_file_names_reader): Adjust.
11935         (lookup_dwo_signatured_type): Adjust.
11936         (lookup_dwp_signatured_type): Adjust.
11937         (lookup_signatured_type): Adjust.
11938         (create_type_unit_group): Adjust.
11939         (get_type_unit_group): Adjust.
11940         (process_psymtab_comp_unit_reader): Adjust.
11941         (build_type_psymtabs_reader): Adjust.
11942         (scan_partial_symbols): Adjust.
11943         (add_partial_symbol): Adjust.
11944         (add_partial_subprogram): Adjust.
11945         (peek_die_abbrev): Adjust.
11946         (fixup_go_packaging): Adjust.
11947         (process_imported_unit_die): Adjust.
11948         (dwarf2_compute_name): Adjust.
11949         (dwarf2_physname): Adjust.
11950         (read_import_statement): Adjust.
11951         (handle_DW_AT_stmt_list): Adjust.
11952         (read_file_scope): Adjust.
11953         (read_func_scope): Adjust.
11954         (read_lexical_block_scope): Adjust.
11955         (read_call_site_scope): Adjust.
11956         (read_variable): Adjust.
11957         (dwarf2_rnglists_process): Adjust.
11958         (dwarf2_ranges_process): Adjust.
11959         (dwarf2_ranges_read): Adjust.
11960         (dwarf2_get_pc_bounds): Adjust.
11961         (dwarf2_record_block_ranges): Adjust.
11962         (dwarf2_add_field): Adjust.
11963         (dwarf2_add_member_fn): Adjust.
11964         (read_structure_type): Adjust.
11965         (process_structure_scope): Adjust.
11966         (read_enumeration_type): Adjust.
11967         (read_array_type): Adjust.
11968         (mark_common_block_symbol_computed): Adjust.
11969         (read_common_block): Adjust.
11970         (read_namespace_type): Adjust.
11971         (read_namespace): Adjust.
11972         (read_module_type): Adjust.
11973         (read_tag_pointer_type): Adjust.
11974         (read_tag_ptr_to_member_type): Adjust.
11975         (read_tag_string_type): Adjust.
11976         (read_subroutine_type): Adjust.
11977         (read_typedef): Adjust.
11978         (read_base_type): Adjust.
11979         (attr_to_dynamic_prop): Adjust.
11980         (read_subrange_type): Adjust.
11981         (read_unspecified_type): Adjust.
11982         (dwarf2_read_abbrevs): Adjust.
11983         (load_partial_dies): Adjust.
11984         (read_partial_die): Adjust.
11985         (find_partial_die): Adjust.
11986         (guess_partial_die_structure_name): Adjust.
11987         (fixup_partial_die): Adjust.
11988         (read_attribute_value): Adjust.
11989         (read_addr_index): Adjust.
11990         (read_addr_index_from_leb128): Adjust.
11991         (read_str_index): Adjust.
11992         (dwarf2_string_attr): Adjust.
11993         (get_debug_line_section): Adjust.
11994         (dwarf_decode_line_header): Adjust.
11995         (lnp_state_machine::check_line_address): Adjust.
11996         (dwarf_decode_lines_1): Adjust.
11997         (dwarf_decode_lines): Adjust.
11998         (dwarf2_start_symtab): Adjust.
11999         (var_decode_location): Adjust.
12000         (new_symbol_full): Adjust.
12001         (dwarf2_const_value_data): Adjust.
12002         (dwarf2_const_value_attr): Adjust.
12003         (dwarf2_const_value): Adjust.
12004         (die_type): Adjust.
12005         (die_containing_type): Adjust.
12006         (build_error_marker_type): Adjust.
12007         (lookup_die_type): Adjust.
12008         (guess_full_die_structure_name): Adjust.
12009         (anonymous_struct_prefix): Adjust.
12010         (determine_prefix): Adjust.
12011         (dwarf2_name): Adjust.
12012         (follow_die_ref_or_sig): Adjust.
12013         (follow_die_offset): Adjust.
12014         (follow_die_ref): Adjust.
12015         (follow_die_sig_1): Adjust.
12016         (follow_die_sig): Adjust.
12017         (get_signatured_type): Adjust.
12018         (get_DW_AT_signature_type): Adjust.
12019         (decode_locdesc): Adjust.
12020         (dwarf_decode_macros): Adjust.
12021         (cu_debug_loc_section): Adjust.
12022         (fill_in_loclist_baton): Adjust.
12023         (dwarf2_symbol_mark_computed): Adjust.
12024         (init_one_comp_unit): Don't assign
12025         dwarf2_cu::dwarf2_per_objfile.
12026         (set_die_type): Adjust.
12027
12028 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
12029
12030         * dwarf2read.c (struct mapped_debug_names): Add constructor.
12031         <dwarf2_per_objfile>: New field.
12032         (dwarf2_per_objfile): Remove global.
12033         (get_dwarf2_per_objfile): New function.
12034         (set_dwarf2_per_objfile): New function.
12035         (dwarf2_build_psymtabs_hard): Change objfile parameter to
12036         dwarf2_per_objfile.
12037         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12038         (read_abbrev_offset): Likewise.
12039         (read_indirect_string): Likewise.
12040         (read_indirect_line_string): Likewise.
12041         (read_indirect_string_at_offset): Likewise.
12042         (read_indirect_string_from_dwz): Likewise.
12043         (dwarf2_find_containing_comp_unit): Change objfile parameter to
12044         dwarf2_per_objfile.
12045         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12046         (create_all_comp_units): Change objfile parameter to
12047         dwarf2_per_objfile.
12048         (create_all_type_units): Likewise.
12049         (process_queue): Add dwarf2_per_objfile parameter.
12050         (read_and_check_comp_unit_head): Likewise.
12051         (lookup_dwo_unit_in_dwp): Likewise.
12052         (get_dwp_file): Likewise.
12053         (process_cu_includes): Likewise.
12054         (struct free_dwo_file_cleanup_data): New struct.
12055         (dwarf2_has_info): Use get_dwarf2_per_objfile and
12056         set_dwarf2_per_objfile.
12057         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
12058         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
12059         context, adjust calls.
12060         (dw2_instantiate_symtab): Likewise.
12061         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
12062         (dw2_get_cu): Likewise.
12063         (create_cu_from_index_list): Change objfile parameter to
12064         dwarf2_per_objfile.
12065         (create_cus_from_index_list): Get dwarf2_per_objfile from
12066         context, adjust calls.
12067         (create_cus_from_index): Likewise.
12068         (create_signatured_type_table_from_index): Change objfile
12069         parameter to dwarf2_per_objfile.
12070         (create_signatured_type_table_from_debug_names): Change objfile
12071         parameter to dwarf2_per_objfile.
12072         (create_addrmap_from_index): Likewise.
12073         (create_addrmap_from_aranges): Likewise.
12074         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
12075         (dw2_setup): Remove.
12076         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
12077         context.
12078         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
12079         get_dwarf2_per_objfile.
12080         (dw2_forget_cached_source_info): Likewise.
12081         (dw2_map_symtabs_matching_filename): Likewise.
12082         (struct dw2_symtab_iterator) <index>: Remove.
12083         <dwarf2_per_objfile>: New field.
12084         (dw2_symtab_iter_init): Replace index parameter with
12085         dwarf2_per_objfile.
12086         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
12087         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
12088         (dw2_print_stats): Likewise.
12089         (dw2_dump): Likewise.
12090         (dw2_expand_symtabs_for_function): Likewise.
12091         (dw2_expand_all_symtabs): Likewise.
12092         (dw2_expand_symtabs_with_fullname): Likewise.
12093         (dw2_expand_marked_cus): Replace index and objfile parameters
12094         with dwarf2_per_objfile.
12095         (dw_expand_symtabs_matching_file_matcher): Add
12096         dwarf2_per_objfile parameter and adjust calls.
12097         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
12098         adjust calls.
12099         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
12100         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
12101         adjust calls.
12102         (create_cus_from_debug_names_list): Replace objfile parameter
12103         with dwarf2_per_objfile and adjust calls.
12104         (create_cus_from_debug_names): Likewise.
12105         (dwarf2_read_debug_names): Likewise.
12106         (mapped_debug_names::namei_to_name): Adjust call.
12107         (dw2_debug_names_iterator::next): Likewise.
12108         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
12109         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
12110         (dw2_debug_names_dump): Likewise.
12111         (dw2_debug_names_expand_symtabs_for_function): Likewise.
12112         (dw2_debug_names_expand_symtabs_matching): Likewise.
12113         (dwarf2_initialize_objfile): Likewise.
12114         (dwarf2_build_psymtabs): Likewise.
12115         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
12116         this_cu.
12117         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
12118         (read_and_check_comp_unit_head): Likewise.
12119         (read_abbrev_offset): Likewise.
12120         (create_debug_type_hash_table): Likewise.
12121         (create_debug_types_hash_table): Likewise.
12122         (create_all_type_units): Replace objfile parameter with
12123         dwarf2_per_objfile.
12124         (add_type_unit): Add dwarf2_per_objfile parameter.
12125         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
12126         with dwarf2_per_objfile.
12127         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
12128         (lookup_dwp_signatured_type): Likewise.
12129         (lookup_signatured_type): Likewise.
12130         (read_cutu_die_from_dwo): Likewise.
12131         (init_tu_and_read_dwo_dies): Likewise.
12132         (init_cutu_and_read_dies): Likewise.
12133         (init_cutu_and_read_dies_no_follow): Likewise.
12134         (allocate_type_unit_groups_table): Add objfile parameter.
12135         (create_type_unit_group): Use dwarf2_per_objfile from cu.
12136         (get_type_unit_group): Likewise.
12137         (process_psymtab_comp_unit): Update call.
12138         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
12139         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
12140         (print_tu_stats): Likewise.
12141         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
12142         in void* parameter.
12143         (build_type_psymtabs): Change objfile parameter to
12144         dwarf2_per_objfile.
12145         (process_skeletonless_type_unit): Use dwarf2_per_objfile
12146         passed in void* parameter.
12147         (process_skeletonless_type_units): Change objfile parameter to
12148         dwarf2_per_objfile.
12149         (set_partial_user): Likewise.
12150         (dwarf2_build_psymtabs_hard): Likewise.
12151         (read_comp_units_from_section): Likewise.
12152         (create_all_comp_units): Likewise.
12153         (scan_partial_symbols): Update calls.
12154         (add_partial_symbol): Likewise.
12155         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
12156         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
12157         (process_queue): Add dwarf2_per_objfile parameter.
12158         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
12159         (compute_compunit_symtab_includes): Likewise.
12160         (process_cu_includes): Add dwarf2_per_objfile parameter.
12161         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
12162         (process_full_type_unit): Likewise.
12163         (process_imported_unit_die): Update call.
12164         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
12165         (read_file_scope): Likewise.
12166         (allocate_dwo_file_hash_table): Add objfile parameter.
12167         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
12168         (create_cus_hash_table): Likewise.
12169         (create_dwp_hash_table): Likewise.
12170         (create_dwo_unit_in_dwp_v1): Likewise.
12171         (create_dwp_v2_section): Likewise.
12172         (create_dwo_unit_in_dwp_v2): Likewise.
12173         (lookup_dwo_unit_in_dwp): Likewise.
12174         (try_open_dwop_file): Likewise.
12175         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
12176         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
12177         cleanup to include a reference to dwarf2_per_objfile.
12178         (open_dwp_file): Add dwarf2_per_objfile parameter.
12179         (open_and_init_dwp_file): Likewise.
12180         (get_dwp_file): Likewise.
12181         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
12182         (queue_and_load_all_dwo_tus): Update call.
12183         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
12184         data.
12185         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
12186         (dwarf2_ranges_process): Likewise.
12187         (dwarf2_get_pc_bounds): Likewise.
12188         (mark_common_block_symbol_computed): Likewise.
12189         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12190         (dwarf2_read_abbrevs): Update call.
12191         (read_partial_die): Use dwarf2_per_objfile from cu.
12192         (find_partial_die): Likewise.
12193         (fixup_partial_die): Likewise.
12194         (read_attribute_value): Likewise.
12195         (read_indirect_string_at_offset_from): Add objfile parameter.
12196         (read_indirect_string_at_offset): Add dwarf2_per_objfile
12197         parameter.
12198         (read_indirect_string_from_dwz): Add objfile parameter.
12199         (read_indirect_string): Add objfile parameter.
12200         (read_addr_index_1): Add dwarf2_per_objfile parameter.
12201         (read_addr_index): Use dwarf2_per_objfile from cu.
12202         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
12203         call dw2_setup.
12204         (read_str_index): Use dwarf2_per_objfile from cu.
12205         (get_debug_line_section): Likewise.
12206         (read_formatted_entries): Add dwarf2_per_objfile parameter.
12207         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
12208         (new_symbol_full): Use dwarf2_per_objfile from cu.
12209         (build_error_marker_type): Likewise.
12210         (lookup_die_type): Likewise.
12211         (determine_prefix): Likewise.
12212         (follow_die_offset): Likewise.
12213         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
12214         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
12215         (dwarf2_fetch_die_type_sect_off): Likewise.
12216         (dwarf2_get_die_type): Likewise.
12217         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
12218         (get_signatured_type): Likewise.
12219         (get_DW_AT_signature_type): Likewise.
12220         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
12221         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
12222         (cu_debug_loc_section): Likewise.
12223         (fill_in_loclist_baton): Likewise.
12224         (dwarf2_symbol_mark_computed): Likewise.
12225         (dwarf2_find_containing_comp_unit): Change objfile parameter to
12226         dwarf2_per_objfile.
12227         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
12228         parameter.
12229         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12230         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
12231         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
12232         (set_die_type): Use dwarf2_free_objfile from cu.
12233         (get_die_type_at_offset): Likewise.
12234         (dwarf2_per_objfile_free): Don't assign global variable.
12235         (debug_names) <constructor>: Add dwarf2_per_objfile
12236         parameter, update m_debugstrlookup construction.
12237         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
12238         parameter.
12239         <m_dwarf2_per_objfile>: New field.
12240         <lookup>: Use m_dwarf2_per_objfile.
12241         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
12242         (psyms_seen_size): Likewise.
12243         (write_gdbindex): Replace objfile parameter with
12244         dwarf2_per_objfile.
12245         (write_debug_names): Likewise.
12246         (write_psymtabs_to_index): Likewise.
12247         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
12248         calls.
12249
12250 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
12251
12252         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
12253         <dwarf2_per_objfile>: New field.
12254         (struct dwarf2_per_cu_data) <objfile>: Remove.
12255         <dwarf2_per_objfile>: New field.
12256         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
12257         of objfile.
12258         (create_signatured_type_table_from_index): Likewise.
12259         (create_debug_type_hash_table): Likewise.
12260         (fill_in_sig_entry_from_dwo_entry): Likewise.
12261         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
12262         (create_type_unit_group): Assign dwarf2_per_objfile instead of
12263         objfile.
12264         (create_partial_symtab): Access objfile through
12265         dwarf2_per_objfile.
12266         (process_psymtab_comp_unit_reader): Likewise.
12267         (read_comp_units_from_section): Likewise.
12268         (scan_partial_symbols): Likewise.
12269         (add_partial_symbol): Likewise.
12270         (add_partial_subprogram): Likewise.
12271         (peek_die_abbrev): Likewise.
12272         (fixup_go_packaging): Likewise.
12273         (process_full_comp_unit): Likewise.
12274         (process_full_type_unit): Likewise.
12275         (process_imported_unit_die): Likewise.
12276         (dwarf2_compute_name): Likewise.
12277         (dwarf2_physname): Likewise.
12278         (read_import_statement): Likewise.
12279         (create_cus_hash_table): Assign dwarf2_physname instead of
12280         objfile.
12281         (read_func_scope): Access objfile through dwarf2_per_objfile.
12282         (read_lexical_block_scope): Likewise.
12283         (read_call_site_scope): Likewise.
12284         (read_variable): Likewise.
12285         (dwarf2_rnglists_process): Likewise.
12286         (dwarf2_ranges_process): Likewise.
12287         (dwarf2_ranges_read): Likewise.
12288         (dwarf2_record_block_ranges): Likewise.
12289         (dwarf2_add_field): Likewise.
12290         (dwarf2_add_member_fn): Likewise.
12291         (read_structure_type): Likewise.
12292         (process_structure_scope): Likewise.
12293         (read_enumeration_type): Likewise.
12294         (read_array_type): Likewise.
12295         (read_common_block): Likewise.
12296         (read_namespace_type): Likewise.
12297         (read_namespace): Likewise.
12298         (read_module_type): Likewise.
12299         (read_tag_pointer_type): Likewise.
12300         (read_tag_ptr_to_member_type): Likewise.
12301         (read_tag_string_type): Likewise.
12302         (read_subroutine_type): Likewise.
12303         (read_typedef): Likewise.
12304         (read_base_type): Likewise.
12305         (attr_to_dynamic_prop): Likewise.
12306         (read_subrange_type): Likewise.
12307         (read_unspecified_type): Likewise.
12308         (load_partial_dies): Likewise.
12309         (read_partial_die): Likewise.
12310         (find_partial_die): Likewise.
12311         (guess_partial_die_structure_name): Likewise.
12312         (fixup_partial_die): Likewise.
12313         (read_attribute_value): Likewise.
12314         (read_addr_index_from_leb128): Likewise.
12315         (dwarf2_read_addr_index): Likewise.
12316         (dwarf2_string_attr): Likewise.
12317         (lnp_state_machine::check_line_address): Likewise.
12318         (dwarf_decode_lines_1): Likewise.
12319         (dwarf_decode_lines): Likewise.
12320         (dwarf2_start_symtab): Likewise.
12321         (var_decode_location): Likewise.
12322         (new_symbol_full): Likewise.
12323         (dwarf2_const_value_data): Likewise.
12324         (dwarf2_const_value_attr): Likewise.
12325         (dwarf2_const_value): Likewise.
12326         (die_type): Likewise.
12327         (die_containing_type): Likewise.
12328         (lookup_die_type): Likewise.
12329         (guess_full_die_structure_name): Likewise.
12330         (anonymous_struct_prefix): Likewise.
12331         (dwarf2_name): Likewise.
12332         (follow_die_ref_or_sig): Likewise.
12333         (follow_die_offset): Likewise.
12334         (follow_die_ref): Likewise.
12335         (dwarf2_fetch_die_loc_sect_off): Likewise.
12336         (dwarf2_fetch_constant_bytes): Likewise.
12337         (dwarf2_fetch_die_type_sect_off): Likewise.
12338         (dwarf2_get_die_type): Likewise.
12339         (follow_die_sig): Likewise.
12340         (decode_locdesc): Likewise.
12341         (dwarf2_per_cu_objfile): Likewise.
12342         (dwarf2_per_cu_text_offset): Likewise.
12343         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
12344         objfile.
12345         (set_die_type): Access objfile through
12346         dwarf2_per_objfile.
12347
12348 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
12349
12350         * valprint.c (converted_character_d): Remove typedef.
12351         (DEF_VEC_O (converted_character_d)): Remove.
12352         (count_next_character): Use std::vector.
12353         (print_converted_chars_to_obstack): Likewise.
12354         (generic_printstr): Likewise.
12355
12356 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12357
12358         * xml-support.h (struct gdb_xml_value): Add constructor.
12359         <value>: Change type to unique_xmalloc_ptr.
12360         (gdb_xml_value_s): Remove typedef.
12361         (DEF_VEC_O (gdb_xml_value_s)): Remove.
12362         (gdb_xml_element_start_handler): Change parameter type to
12363         std::vector.
12364         (xml_find_attribute): Likewise.
12365         * xml-support.c (xml_find_attribute): Change parameter type to
12366         std::vector and adjust.
12367         (gdb_xml_values_cleanup): Remove.
12368         (gdb_xml_parser::start_element): Adjust to std::vector.
12369         (xinclude_start_include): Change paraeter type to std::vector
12370         and adjust.
12371         * btrace.c (check_xml_btrace_version): Likewise.
12372         (parse_xml_btrace_block): Likewise.
12373         (parse_xml_btrace_pt_config_cpu): Likewise.
12374         (parse_xml_btrace_pt): Likewise.
12375         (parse_xml_btrace_conf_bts): Likewise.
12376         (parse_xml_btrace_conf_pt): Likewise.
12377         * memory-map.c (memory_map_start_memory): Likewise.
12378         (memory_map_start_property): Likewise.
12379         * osdata.c (osdata_start_osdata): Likewise.
12380         (osdata_start_item): Likewise.
12381         (osdata_start_column): Likewise.
12382         * remote.c (start_thread): Likewise.
12383         * solib-aix.c (library_list_start_library): Likewise.
12384         (library_list_start_list): Likewise.
12385         * solib-svr4.c (library_list_start_library): Likewise.
12386         (svr4_library_list_start_list): Likewise.
12387         * solib-target.c (library_list_start_segment): Likewise.
12388         (library_list_start_section): Likewise.
12389         (library_list_start_library): Likewise.
12390         (library_list_start_list): Likewise.
12391         * tracepoint.c (traceframe_info_start_memory): Likewise.
12392         (traceframe_info_start_tvar): Likewise.
12393         * xml-syscall.c (syscall_start_syscall): Likewise.
12394         * xml-tdesc.c (tdesc_start_target): Likewise.
12395         (tdesc_start_feature): Likewise.
12396         (tdesc_start_reg): Likewise.
12397         (tdesc_start_union): Likewise.
12398         (tdesc_start_struct): Likewise.
12399         (tdesc_start_flags): Likewise.
12400         (tdesc_start_enum): Likewise.
12401         (tdesc_start_field): Likewise.
12402         (tdesc_start_enum_value): Likewise.
12403         (tdesc_start_vector): Likewise.
12404
12405 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12406
12407         * extension.h (struct xmethod_worker) <clone>: Remove.
12408         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
12409         Remove.
12410         (python_xmethod_worker::clone): Remove.
12411         * valops.c (find_overload_match): Use std::move instead of
12412         clone.
12413
12414 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12415
12416         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
12417         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
12418         <free_xmethod_worker_data>: Remove.
12419         <get_matching_xmethod_workers>: Chance VEC to std::vector.
12420         <get_xmethod_arg_types>: Remove.
12421         <get_xmethod_result_type>: Remove.
12422         <invoke_xmethod>: Remove.
12423         * extension.c (new_xmethod_worker): Remove.
12424         (clone_xmethod_worker): Remove.
12425         (get_matching_xmethod_workers): Return void, pass std::vector by
12426         pointer.
12427         (get_xmethod_arg_types): Rename to...
12428         (xmethod_worker::get_arg_types): ... this, and adjust.
12429         (get_xmethod_result_type): Rename to...
12430         (xmethod_worker::get_result_type): ... this, and adjust.
12431         (invoke_xmethod): Remove.
12432         (free_xmethod_worker): Remove.
12433         (free_xmethod_worker_vec): Remove.
12434         * extension.h (enum ext_lang_rc): Move here from
12435         extension-priv.h.
12436         (struct xmethod_worker): Add constructor and destructor.
12437         <data>: Remove.
12438         <value>: Remove.
12439         <invoke, clone, do_get_result_type, do_get_arg_types>: New
12440         virtual pure methods.
12441         <get_arg_types, get_result_type>: New methods.
12442         (xmethod_worker_ptr): Remove typedef.
12443         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
12444         (xmethod_worker_vec): Remove typedef.
12445         (xmethod_worker_up): New typedef.
12446         (invoke_xmethod): Remove.
12447         (clone_xmethod_worker): Remove.
12448         (free_xmethod_worker): Remove.
12449         (free_xmethod_worker_vec): Remove.
12450         (get_xmethod_arg_types): Remove.
12451         (get_xmethod_result_type): Remove.
12452         * valops.c (find_method_list): Use std::vector, don't use
12453         intermediate vector.
12454         (value_find_oload_method_list): Use std::vector.
12455         (find_overload_match): Use std::vector.
12456         (find_oload_champ): Use std::vector.
12457         * value.c (value_free): Use operator delete.
12458         (value_of_xmethod): Rename to...
12459         (value_from_xmethod): ... this.  Don't assign
12460         xmethod_worker::value, take rvalue-reference.
12461         (result_type_of_xmethod): Adjust.
12462         (call_xmethod): Adjust.
12463         * value.h: Include extension.h.
12464         (struct xmethod_worker): Don't forward-declare.
12465         (value_of_xmethod): Rename to...
12466         (value_from_xmethod): ... this, take rvalue-reference.
12467         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
12468         (struct python_xmethod_worker): ... this, add constructor and
12469         destructor.
12470         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
12471         (gdbpy_free_xmethod_worker_data): Rename to...
12472         (python_xmethod_worker::~python_xmethod_worker): ... this and
12473         adjust.
12474         (gdbpy_clone_xmethod_worker_data): Rename to...
12475         (python_xmethod_worker::clone): ... this and adjust.
12476         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
12477         temporary vector.
12478         (gdbpy_get_xmethod_arg_types): Rename to...
12479         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
12480         (gdbpy_get_xmethod_result_type): Rename to...
12481         (python_xmethod_worker::do_get_result_type): ... this and
12482         adjust.
12483         (gdbpy_invoke_xmethod): Rename to...
12484         (python_xmethod_worker::invoke): ... this and adjust.
12485         (new_python_xmethod_worker): Rename to...
12486         (python_xmethod_worker::python_xmethod_worker): ... this and
12487         adjust.
12488         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
12489         Remove.
12490         (gdbpy_free_xmethod_worker_data): Remove.
12491         (gdbpy_get_matching_xmethod_workers): Use std::vector.
12492         (gdbpy_get_xmethod_arg_types): Remove.
12493         (gdbpy_get_xmethod_result_type): Remove.
12494         (gdbpy_invoke_xmethod): Remove.
12495         * python/python.c (python_extension_ops): Remove obsolete
12496         callbacks.
12497
12498 2018-01-05  Pedro Alves  <palves@redhat.com>
12499
12500         PR gdb/18653
12501         * common/signals-state-save-restore.c
12502         (save_original_signals_state): New parameter 'quiet'.  Warn if we
12503         find a custom handler preinstalled, instead of internal erroring.
12504         But only warn if !quiet.
12505         * common/signals-state-save-restore.h
12506         (save_original_signals_state): New parameter 'quiet'.
12507         * main.c (captured_main_1): Move save_original_signals_state call
12508         after option handling, and pass QUIET.
12509
12510 2018-01-05  Pedro Alves  <palves@redhat.com>
12511
12512         * spu-tdep.c (spu_catch_start): Pass
12513         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
12514
12515 2018-01-05  Pedro Alves  <palves@redhat.com>
12516
12517         PR gdb/22670
12518         * ada-lang.c (literal_symbol_name_matcher): New function.
12519         (ada_get_symbol_name_matcher): Use it for
12520         symbol_name_match_type::SEARCH_NAME.
12521         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
12522         it down instead of assuming symbol_name_match_type::FULL.
12523         * block.h (block_lookup_symbol): New parameter 'match_type'.
12524         * c-valprint.c (print_unpacked_pointer): Use
12525         lookup_symbol_search_name instead of lookup_symbol.
12526         * compile/compile-object-load.c (get_out_value_type): Pass down
12527         symbol_name_match_type::SEARCH_NAME.
12528         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
12529         symbol_name_match_type::FULL.
12530         * cp-support.c (cp_get_symbol_name_matcher): Handle
12531         symbol_name_match_type::SEARCH_NAME.
12532         * infrun.c (insert_exception_resume_breakpoint): Use
12533         lookup_symbol_search_name.
12534         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
12535         * psymtab.c (maintenance_check_psymtabs): Use
12536         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
12537         * stack.c (print_frame_args): Use lookup_symbol_search_name and
12538         SYMBOL_SEARCH_NAME.
12539         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
12540         if symbol_name_match_type::SEARCH_NAME.
12541         (lookup_symbol_in_language): Pass down
12542         symbol_name_match_type::FULL.
12543         (lookup_symbol_search_name): New.
12544         (lookup_language_this): Pass down
12545         symbol_name_match_type::SEARCH_NAME.
12546         (lookup_symbol_aux, lookup_local_symbol): New parameter
12547         'match_type'.  Pass it down.
12548         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
12549         (lookup_symbol_search_name): New declaration.
12550         (lookup_symbol_in_block): New 'match_type' parameter.
12551
12552 2018-01-05  Pedro Alves  <palves@redhat.com>
12553
12554         PR gdb/22670
12555         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
12556         ada_lookup_symbol.
12557         (ada_lookup_symbol): Reimplement in terms of
12558         ada_lookup_symbol_list, bits factored out from
12559         ada_lookup_encoded_symbol.
12560
12561 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12562
12563         * ada-exp.y (write_object_renaming): When subscripting an array
12564         using a symbol as the index, pass the block in call to
12565         ada_lookup_encoded_symbol when looking that symbol up.
12566
12567 2018-01-05  Jerome Guitton  <guitton@adacore.com>
12568
12569         * ada-lang.c (ada_array_length): Use ada_index_type instead of
12570         TYPE_INDEX_TYPE.
12571
12572 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12573
12574         * ada-lang.c (ada_to_fixed_value_create): Add handling of
12575         the case where VALUE_LVAL (val0) is not lval_memory.
12576
12577 2018-01-05  Xavier Roirand  <roirand@adacore.com>
12578
12579         * ada-valprint.c (print_optional_low_bound): Handle
12580         character-indexed array printing like boolean-indexed array
12581         printing.
12582
12583 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12584
12585         * NEWS: Create a new section for the next release branch.
12586         Rename the section of the current branch, now that it has
12587         been cut.
12588
12589 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12590
12591         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
12592         * version.in: Bump version to 8.1.50.DATE-git.
12593
12594 2018-01-03  Xavier Roirand  <roirand@adacore.com>
12595
12596         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
12597         Add field.
12598         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
12599         Add field.
12600         (default_exception_support_info) <catch_handlers_sym>: Add field.
12601         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
12602         (ada_exception_name_addr_1): Add "catch handlers" handling.
12603         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
12604         Update all callers.
12605         (create_excep_cond_exprs) <ex>: Add parameter.
12606         (re_set_exception): Update create_excep_cond_exprs call.
12607         (print_it_exception, print_one_exception, print_mention_exception)
12608         (print_recreate_exception): Add "catch handler" handling.
12609         (allocate_location_catch_handlers, re_set_catch_handlers)
12610         (check_status_catch_handlers, print_it_catch_handlers)
12611         (print_one_catch_handlers, print_mention_catch_handlers)
12612         (print_recreate_catch_handlers): New function.
12613         (catch_handlers_breakpoint_ops): New variable.
12614         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
12615         Add parameter.  Add "catch handler" handling.
12616         (ada_exception_sym_name, ada_exception_breakpoint_ops):
12617         Add "catch handler" handling.
12618         (ada_exception_catchpoint_cond_string): Add "catch handler"
12619         handling.
12620         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
12621         call.
12622         (catch_ada_handlers_command): New function.
12623         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
12624         operations structure.
12625         (_initialize_ada_language): Add "catch handlers" command entry.
12626         * NEWS: Document "catch handlers" feature.
12627
12628 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
12629
12630         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
12631         account when creating the array type of the slice.
12632         (ada_value_slice): Likewise.
12633
12634 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
12635
12636         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
12637         New enum value.
12638         (create_array_type_with_stride): Add byte_stride_prop parameter.
12639         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
12640         New parameter.  Update all callers in this file.
12641         (array_type_has_dynamic_stride): New function.
12642         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
12643         of arrays with dynamic byte strides.
12644         * dwarf2read.c (read_array_type): Add support for dynamic
12645         DW_AT_byte_stride attributes.
12646
12647 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
12648
12649         * dwarf2read.c (read_unspecified_type): Treat
12650         DW_TAG_enumeration_type DIEs from Ada units as stubs.
12651
12652 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12653
12654         Update copyright year range in all GDB files.
12655
12656 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12657
12658         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
12659         and gdb/testsuite/gdb.base/step-line.c.
12660
12661 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12662
12663         * copyright.py (main): Dump the contents of
12664         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
12665         even if BY_HAND is empty.
12666
12667 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12668
12669         * top.c (print_gdb_version): Update Copyright year in version
12670         message.
12671
12672 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12673
12674         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
12675
12676 For older changes see ChangeLog-2017.
12677 \f
12678 Local Variables:
12679 mode: change-log
12680 left-margin: 8
12681 fill-column: 74
12682 version-control: never
12683 coding: utf-8
12684 End: