Change get_inferior_args to return const char *
[external/binutils.git] / gdb / ChangeLog
1 2018-09-15  Tom Tromey  <tom@tromey.com>
2
3         * infcmd.c (get_inferior_args): Return const char *.
4         * inferior.h (get_inferior_args): Return type now const.
5         * linux-tdep.c (linux_fill_prpsinfo): Update.
6         * procfs.c (procfs_target::make_corefile_notes): Update.
7
8 2018-09-07  Tom Tromey  <tom@tromey.com>
9
10         * python/python.c (execute_gdb_command): Call bpstat_do_actions
11         inside the TRY.
12
13 2018-09-14  Sandra Loosemore  <sandra@codesourcery.com>
14
15         * nios2-tdep.c (nios2_type_align): New.
16         (nios2_gdb_arch_init): Install type_align hook.
17
18 2018-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
19
20         * eval.c (fake_method::fake_method): Call xzalloc directly for a
21         type that is neither object file owned, nor gdbarch owned.
22         * gdbtypes.c (get_type_gdbarch): Add an assert that returned
23         gdbarch is non-NULL.
24         (alloc_type_instance): Allocate non-objfile owned types on the
25         gdbarch obstack.
26         (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
27         using TYPE_ALLOC to ensure memory is allocated on the correct
28         obstack.
29         * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
30         obstack, or the gdbarch obstack.
31         (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
32
33 2018-09-14  Tom Tromey  <tom@tromey.com>
34
35         * infcall.c (call_function_by_hand_dummy): Remove unnecessary
36         block.
37
38 2018-09-14  Tom Tromey  <tom@tromey.com>
39
40         * nat/fork-inferior.c (get_startup_shell): Remove "static".
41
42 2018-09-13  Tom Tromey  <tom@tromey.com>
43
44         * python/py-inferior.c (infpy_thread_from_thread_handle): Now
45         static.
46
47 2018-09-13  Tom Tromey  <tom@tromey.com>
48
49         * exec.c (try_open_exec_file): Use std::string.
50
51 2018-09-13  Tom Tromey  <tom@tromey.com>
52
53         * utils.h (gdb_bfd_errmsg): Return std::string.
54         * exec.c (exec_file_attach): Update.
55         * compile/compile-object-load.c (compile_object_load): Update.
56         * utils.c (gdb_bfd_errmsg): Return std::string.
57
58 2018-09-13  Tom Tromey  <tom@tromey.com>
59
60         * procfs.c (struct procinfo_deleter): New.
61         (procinfo_up): New typedef.
62         (do_destroy_procinfo_cleanup): Remove.
63         (procfs_target::info_proc): Use procinfo_up.  Remove cleanups.
64
65 2018-09-13  Tom Tromey  <tom@tromey.com>
66
67         * source.c (add_path): Use gdb::unique_xmalloc_ptr.
68
69 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
70 2018-09-13  Tom Tromey  <tom@tromey.com>
71
72         * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
73         (pspy_get_objfiles): New function.
74         (progspace_object_methods): New.
75         (pspace_object_type): Add tp_methods callback.
76         * python/python-internal.h (build_objfiles_list): New
77         declaration.
78         * python/python.c (build_objfiles_list): New function.
79         (gdbpy_objfiles): Implement using build_objfiles_list.
80         * NEWS: Mention the Progspace.objfiles method.
81
82 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
83
84         * python/py-inferior.c (infpy_get_progspace): New function.
85         (inferior_object_getset): Add progspace property.
86         * NEWS: Mention the new property.
87
88 2018-09-13  Tom Tromey  <tom@tromey.com>
89
90         PR rust/23650:
91         * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
92
93 2018-09-13  Tom Tromey  <tom@tromey.com>
94
95         PR rust/23626:
96         * rust-lang.c (rust_enum_variant): Now static.
97         (rust_empty_enum_p): New function.
98         (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
99         Handle empty enum.
100
101 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
102
103         * python/py-inferior.c (infpy_repr): New.
104         (inferior_object_type): Register infpy_repr.
105         * python/py-objfile.c (objfpy_repr): New.
106         (objfile_object_type): Register objfpy_repr.
107
108 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
109
110         * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
111
112 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
113
114         * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
115         typo.
116
117 2018-09-12  Sergio Durigan Junior  <sergiodj@redhat.com>
118
119         * common/common-utils.c: Don't include '<sys/stat.h>'.
120         (is_regular_file): Move to...
121         * common/filestuff.c (is_regular_file): ... here.
122         * common/common-utils.h (is_regular_file): Move to...
123         * common/filestuff.h (is_regular_file): ... here.
124
125 2018-09-12  Simon Marchi  <simon.marchi@ericsson.com>
126
127         * skip.c (debug_skip): New variable.
128         (skiplist_entry::do_skip_file_p): Add debug output.
129         (skiplist_entry::do_skip_gfile_p): Likewise.
130         (skiplist_entry::skip_function_p): Likewise.
131         (_initialize_step_skip): Create debug command.
132         * NEWS: Mention set/show debug skip.
133
134 2018-09-11  Xavier Roirand  <roirand@adacore.com>
135
136         * darwin-nat.c (should_disable_startup_with_shell):
137         New function.
138         (darwin_nat_target::create_inferior): Add call.
139
140 2018-09-11  Xavier Roirand  <roirand@adacore.com>
141
142         * darwin-nat.h (struct darwin_thread_info) <gdb_port,
143         inf_port, msg_state>: Initialize.
144         (struct darwin_thread_info) <signaled, single_step>: Change
145         type and initialize.
146         (struct darwin_thread_info) <event>: Initialize.
147
148 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
149
150         PR gdb/23555
151         PR gdb/23558
152         * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
153         guesses.
154
155 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
156
157         Revert:
158         2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
159
160         PR gdb/23555
161         PR gdb/23558
162         * gnulib/aclocal.m4: Regenerate.
163         * gnulib/config.in: Regenerate.
164         * gnulib/configure: Regenerate.
165         * gnulib/import/Makefile.am: Update.
166         * gnulib/import/Makefile.in: Update.
167         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
168         * gnulib/import/_Noreturn.h: ... this.
169         * gnulib/import/alloca.in.h: Update.
170         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
171         * gnulib/import/arg-nonnull.h: ... this.
172         * gnulib/import/assure.h: Update.
173         * gnulib/import/at-func.c: Update.
174         * gnulib/import/basename-lgpl.c: Update.
175         * gnulib/import/extra/snippet/c++defs.h: Rename to...
176         * gnulib/import/c++defs.h: ... this.
177         * gnulib/import/canonicalize-lgpl.c: Update.
178         * gnulib/import/cdefs.h: Update.
179         * gnulib/import/chdir-long.c: Update.
180         * gnulib/import/chdir-long.h: Update.
181         * gnulib/import/cloexec.c: Update.
182         * gnulib/import/cloexec.h: Update.
183         * gnulib/import/close.c: Update.
184         * gnulib/import/closedir.c: Update.
185         * gnulib/import/config.charset: Update.
186         * gnulib/import/dirent-private.h: Update.
187         * gnulib/import/dirent.in.h: Update.
188         * gnulib/import/dirfd.c: Update.
189         * gnulib/import/dirname-lgpl.c: Update.
190         * gnulib/import/dirname.h: Update.
191         * gnulib/import/dosname.h: Update.
192         * gnulib/import/dup-safer-flag.c: Update.
193         * gnulib/import/dup-safer.c: Update.
194         * gnulib/import/dup.c: Update.
195         * gnulib/import/dup2.c: Update.
196         * gnulib/import/errno.in.h: Update.
197         * gnulib/import/error.c: Update.
198         * gnulib/import/error.h: Update.
199         * gnulib/import/exitfail.c: Update.
200         * gnulib/import/exitfail.h: Update.
201         * gnulib/import/extra/update-copyright: Update.
202         * gnulib/import/fchdir.c: Update.
203         * gnulib/import/fcntl.c: Update.
204         * gnulib/import/fcntl.in.h: Update.
205         * gnulib/import/fd-hook.c: Update.
206         * gnulib/import/fd-hook.h: Update.
207         * gnulib/import/fd-safer-flag.c: Update.
208         * gnulib/import/fd-safer.c: Update.
209         * gnulib/import/fdopendir.c: Update.
210         * gnulib/import/filename.h: Update.
211         * gnulib/import/filenamecat-lgpl.c: Update.
212         * gnulib/import/filenamecat.h: Update.
213         * gnulib/import/flexmember.h: Update.
214         * gnulib/import/float+.h: Update.
215         * gnulib/import/float.c: Update.
216         * gnulib/import/float.in.h: Update.
217         * gnulib/import/fnmatch.c: Update.
218         * gnulib/import/fnmatch.in.h: Update.
219         * gnulib/import/fnmatch_loop.c: Update.
220         * gnulib/import/fpucw.h: Update.
221         * gnulib/import/frexp.c: Update.
222         * gnulib/import/frexpl.c: Update.
223         * gnulib/import/fstat.c: Update.
224         * gnulib/import/fstatat.c: Update.
225         * gnulib/import/getcwd-lgpl.c: Update.
226         * gnulib/import/getcwd.c: Update.
227         * gnulib/import/getdtablesize.c: Update.
228         * gnulib/import/getlogin_r.c: Update.
229         * gnulib/import/getprogname.c: Update.
230         * gnulib/import/getprogname.h: Update.
231         * gnulib/import/gettext.h: Update.
232         * gnulib/import/gettimeofday.c: Update.
233         * gnulib/import/glob-libc.h: Update.
234         * gnulib/import/glob.c: Update.
235         * gnulib/import/glob.in.h: Update.
236         * gnulib/import/glob_internal.h: Update.
237         * gnulib/import/glob_pattern_p.c: Update.
238         * gnulib/import/globfree.c: Update.
239         * gnulib/import/hard-locale.c: Update.
240         * gnulib/import/hard-locale.h: Update.
241         * gnulib/import/intprops.h: Update.
242         * gnulib/import/inttypes.in.h: Update.
243         * gnulib/import/isnan.c: Update.
244         * gnulib/import/isnand-nolibm.h: Update.
245         * gnulib/import/isnand.c: Update.
246         * gnulib/import/isnanl-nolibm.h: Update.
247         * gnulib/import/isnanl.c: Update.
248         * gnulib/import/itold.c: Update.
249         * gnulib/import/libc-config.h: Update.
250         * gnulib/import/limits.in.h: Update.
251         * gnulib/import/localcharset.c: Update.
252         * gnulib/import/localcharset.h: Update.
253         * gnulib/import/localtime-buffer.c: Update.
254         * gnulib/import/localtime-buffer.h: Update.
255         * gnulib/import/lstat.c: Update.
256         * gnulib/import/m4/00gnulib.m4: Update.
257         * gnulib/import/m4/__inline.m4: Update.
258         * gnulib/import/m4/absolute-header.m4: Update.
259         * gnulib/import/m4/alloca.m4: Update.
260         * gnulib/import/m4/builtin-expect.m4: Update.
261         * gnulib/import/m4/canonicalize.m4: Update.
262         * gnulib/import/m4/chdir-long.m4: Update.
263         * gnulib/import/m4/close.m4: Update.
264         * gnulib/import/m4/closedir.m4: Update.
265         * gnulib/import/m4/configmake.m4: Update.
266         * gnulib/import/m4/d-ino.m4: Update.
267         * gnulib/import/m4/d-type.m4: Update.
268         * gnulib/import/m4/dirent_h.m4: Update.
269         * gnulib/import/m4/dirfd.m4: Update.
270         * gnulib/import/m4/dirname.m4: Update.
271         * gnulib/import/m4/double-slash-root.m4: Update.
272         * gnulib/import/m4/dup.m4: Update.
273         * gnulib/import/m4/dup2.m4: Update.
274         * gnulib/import/m4/eealloc.m4: Update.
275         * gnulib/import/m4/environ.m4: Update.
276         * gnulib/import/m4/errno_h.m4: Update.
277         * gnulib/import/m4/error.m4: Update.
278         * gnulib/import/m4/exponentd.m4: Update.
279         * gnulib/import/m4/exponentl.m4: Update.
280         * gnulib/import/m4/extensions.m4: Update.
281         * gnulib/import/m4/extern-inline.m4: Update.
282         * gnulib/import/m4/fchdir.m4: Update.
283         * gnulib/import/m4/fcntl-o.m4: Update.
284         * gnulib/import/m4/fcntl.m4: Update.
285         * gnulib/import/m4/fcntl_h.m4: Update.
286         * gnulib/import/m4/fdopendir.m4: Update.
287         * gnulib/import/m4/filenamecat.m4: Update.
288         * gnulib/import/m4/flexmember.m4: Update.
289         * gnulib/import/m4/float_h.m4: Update.
290         * gnulib/import/m4/fnmatch.m4: Update.
291         * gnulib/import/m4/fnmatch_h.m4: Update.
292         * gnulib/import/m4/fpieee.m4: Update.
293         * gnulib/import/m4/frexp.m4: Update.
294         * gnulib/import/m4/frexpl.m4: Update.
295         * gnulib/import/m4/fstat.m4: Update.
296         * gnulib/import/m4/fstatat.m4: Update.
297         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
298         * gnulib/import/m4/getcwd-path-max.m4: Update.
299         * gnulib/import/m4/getcwd.m4: Update.
300         * gnulib/import/m4/getdtablesize.m4: Update.
301         * gnulib/import/m4/getlogin.m4: Update.
302         * gnulib/import/m4/getlogin_r.m4: Update.
303         * gnulib/import/m4/getpagesize.m4: Update.
304         * gnulib/import/m4/getprogname.m4: Update.
305         * gnulib/import/m4/gettimeofday.m4: Update.
306         * gnulib/import/m4/glibc21.m4: Update.
307         * gnulib/import/m4/glob.m4: Update.
308         * gnulib/import/m4/glob_h.m4: Update.
309         * gnulib/import/m4/gnulib-cache.m4: Update.
310         * gnulib/import/m4/gnulib-common.m4: Update.
311         * gnulib/import/m4/gnulib-comp.m4: Update.
312         * gnulib/import/m4/gnulib-tool.m4: Update.
313         * gnulib/import/m4/hard-locale.m4: Update.
314         * gnulib/import/m4/include_next.m4: Update.
315         * gnulib/import/m4/inttypes-pri.m4: Update.
316         * gnulib/import/m4/inttypes.m4: Update.
317         * gnulib/import/m4/isnand.m4: Update.
318         * gnulib/import/m4/isnanl.m4: Update.
319         * gnulib/import/m4/largefile.m4: Update.
320         * gnulib/import/m4/limits-h.m4: Update.
321         * gnulib/import/m4/localcharset.m4: Update.
322         * gnulib/import/m4/locale-fr.m4: Update.
323         * gnulib/import/m4/locale-ja.m4: Update.
324         * gnulib/import/m4/locale-zh.m4: Update.
325         * gnulib/import/m4/localtime-buffer.m4: Update.
326         * gnulib/import/m4/longlong.m4: Update.
327         * gnulib/import/m4/lstat.m4: Update.
328         * gnulib/import/m4/malloc.m4: Update.
329         * gnulib/import/m4/malloca.m4: Update.
330         * gnulib/import/m4/math_h.m4: Update.
331         * gnulib/import/m4/mbrtowc.m4: Update.
332         * gnulib/import/m4/mbsinit.m4: Update.
333         * gnulib/import/m4/mbsrtowcs.m4: Update.
334         * gnulib/import/m4/mbstate_t.m4: Update.
335         * gnulib/import/m4/memchr.m4: Update.
336         * gnulib/import/m4/memmem.m4: Update.
337         * gnulib/import/m4/mempcpy.m4: Update.
338         * gnulib/import/m4/memrchr.m4: Update.
339         * gnulib/import/m4/mkdir.m4: Update.
340         * gnulib/import/m4/mkstemp.m4: Update.
341         * gnulib/import/m4/mmap-anon.m4: Update.
342         * gnulib/import/m4/mode_t.m4: Update.
343         * gnulib/import/m4/msvc-inval.m4: Update.
344         * gnulib/import/m4/msvc-nothrow.m4: Update.
345         * gnulib/import/m4/multiarch.m4: Update.
346         * gnulib/import/m4/nocrash.m4: Update.
347         * gnulib/import/m4/off_t.m4: Update.
348         * gnulib/import/m4/onceonly.m4: Update.
349         * gnulib/import/m4/open-cloexec.m4: Update.
350         * gnulib/import/m4/open.m4: Update.
351         * gnulib/import/m4/openat.m4: Update.
352         * gnulib/import/m4/opendir.m4: Update.
353         * gnulib/import/m4/pathmax.m4: Update.
354         * gnulib/import/m4/rawmemchr.m4: Update.
355         * gnulib/import/m4/readdir.m4: Update.
356         * gnulib/import/m4/readlink.m4: Update.
357         * gnulib/import/m4/realloc.m4: Update.
358         * gnulib/import/m4/rename.m4: Update.
359         * gnulib/import/m4/rewinddir.m4: Update.
360         * gnulib/import/m4/rmdir.m4: Update.
361         * gnulib/import/m4/save-cwd.m4: Update.
362         * gnulib/import/m4/secure_getenv.m4: Update.
363         * gnulib/import/m4/setenv.m4: Update.
364         * gnulib/import/m4/signal_h.m4: Update.
365         * gnulib/import/m4/ssize_t.m4: Update.
366         * gnulib/import/m4/stat-time.m4: Update.
367         * gnulib/import/m4/stat.m4: Update.
368         * gnulib/import/m4/std-gnu11.m4: Update.
369         * gnulib/import/m4/stdbool.m4: Update.
370         * gnulib/import/m4/stddef_h.m4: Update.
371         * gnulib/import/m4/stdint.m4: Update.
372         * gnulib/import/m4/stdio_h.m4: Update.
373         * gnulib/import/m4/stdlib_h.m4: Update.
374         * gnulib/import/m4/strchrnul.m4: Update.
375         * gnulib/import/m4/strdup.m4: Update.
376         * gnulib/import/m4/strerror.m4: Update.
377         * gnulib/import/m4/string_h.m4: Update.
378         * gnulib/import/m4/strstr.m4: Update.
379         * gnulib/import/m4/strtok_r.m4: Update.
380         * gnulib/import/m4/sys_socket_h.m4: Update.
381         * gnulib/import/m4/sys_stat_h.m4: Update.
382         * gnulib/import/m4/sys_time_h.m4: Update.
383         * gnulib/import/m4/sys_types_h.m4: Update.
384         * gnulib/import/m4/tempname.m4: Update.
385         * gnulib/import/m4/time_h.m4: Update.
386         * gnulib/import/m4/unistd-safer.m4: Update.
387         * gnulib/import/m4/unistd_h.m4: Update.
388         * gnulib/import/m4/warn-on-use.m4: Update.
389         * gnulib/import/m4/wchar_h.m4: Update.
390         * gnulib/import/m4/wchar_t.m4: Update.
391         * gnulib/import/m4/wctype_h.m4: Update.
392         * gnulib/import/m4/wint_t.m4: Update.
393         * gnulib/import/malloc.c: Update.
394         * gnulib/import/malloc/scratch_buffer.h: Update.
395         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
396         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
397         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
398         * gnulib/import/malloca.c: Update.
399         * gnulib/import/malloca.h: Update.
400         * gnulib/import/malloca.valgrind: Update.
401         * gnulib/import/math.in.h: Update.
402         * gnulib/import/mbrtowc.c: Update.
403         * gnulib/import/mbsinit.c: Update.
404         * gnulib/import/mbsrtowcs-impl.h: Update.
405         * gnulib/import/mbsrtowcs-state.c: Update.
406         * gnulib/import/mbsrtowcs.c: Update.
407         * gnulib/import/memchr.c: Update.
408         * gnulib/import/memmem.c: Update.
409         * gnulib/import/mempcpy.c: Update.
410         * gnulib/import/memrchr.c: Update.
411         * gnulib/import/mkdir.c: Update.
412         * gnulib/import/mkstemp.c: Update.
413         * gnulib/import/msvc-inval.c: Update.
414         * gnulib/import/msvc-inval.h: Update.
415         * gnulib/import/msvc-nothrow.c: Update.
416         * gnulib/import/msvc-nothrow.h: Update.
417         * gnulib/import/open.c: Update.
418         * gnulib/import/openat-die.c: Update.
419         * gnulib/import/openat-priv.h: Update.
420         * gnulib/import/openat-proc.c: Update.
421         * gnulib/import/openat.c: Update.
422         * gnulib/import/openat.h: Update.
423         * gnulib/import/opendir.c: Update.
424         * gnulib/import/pathmax.h: Update.
425         * gnulib/import/pipe-safer.c: Update.
426         * gnulib/import/rawmemchr.c: Update.
427         * gnulib/import/readdir.c: Update.
428         * gnulib/import/readlink.c: Update.
429         * gnulib/import/realloc.c: Update.
430         * gnulib/import/ref-add.sin: Update.
431         * gnulib/import/ref-del.sin: Update.
432         * gnulib/import/rename.c: Update.
433         * gnulib/import/rewinddir.c: Update.
434         * gnulib/import/rmdir.c: Update.
435         * gnulib/import/same-inode.h: Update.
436         * gnulib/import/save-cwd.c: Update.
437         * gnulib/import/save-cwd.h: Update.
438         * gnulib/import/scratch_buffer.h: Update.
439         * gnulib/import/secure_getenv.c: Update.
440         * gnulib/import/setenv.c: Update.
441         * gnulib/import/signal.in.h: Update.
442         * gnulib/import/stat-time.c: Update.
443         * gnulib/import/stat-time.h: Update.
444         * gnulib/import/stat-w32.c: Update.
445         * gnulib/import/stat-w32.h: Update.
446         * gnulib/import/stat.c: Update.
447         * gnulib/import/stdbool.in.h: Update.
448         * gnulib/import/stddef.in.h: Update.
449         * gnulib/import/stdint.in.h: Update.
450         * gnulib/import/stdio.in.h: Update.
451         * gnulib/import/stdlib.in.h: Update.
452         * gnulib/import/str-two-way.h: Update.
453         * gnulib/import/strchrnul.c: Update.
454         * gnulib/import/strdup.c: Update.
455         * gnulib/import/streq.h: Update.
456         * gnulib/import/strerror-override.c: Update.
457         * gnulib/import/strerror-override.h: Update.
458         * gnulib/import/strerror.c: Update.
459         * gnulib/import/string.in.h: Update.
460         * gnulib/import/stripslash.c: Update.
461         * gnulib/import/strnlen1.c: Update.
462         * gnulib/import/strnlen1.h: Update.
463         * gnulib/import/strstr.c: Update.
464         * gnulib/import/strtok_r.c: Update.
465         * gnulib/import/sys_stat.in.h: Update.
466         * gnulib/import/sys_time.in.h: Update.
467         * gnulib/import/sys_types.in.h: Update.
468         * gnulib/import/tempname.c: Update.
469         * gnulib/import/tempname.h: Update.
470         * gnulib/import/time.in.h: Update.
471         * gnulib/import/unistd--.h: Update.
472         * gnulib/import/unistd-safer.h: Update.
473         * gnulib/import/unistd.in.h: Update.
474         * gnulib/import/unsetenv.c: Update.
475         * gnulib/import/verify.h: Update.
476         * gnulib/import/extra/snippet/warn-on-use.h: Update.
477         * gnulib/import/wchar.in.h: Update.
478         * gnulib/import/wctype.in.h: Update.
479         * gnulib/import/xalloc-oversized.h: Update.
480         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
481         "53e2c179f26a890fa6685af4b6c1397ee370433b".
482
483 2018-09-10  Simon Marchi  <simon.marchi@ericsson.com>
484
485         * record-btrace.c (get_thread_current_frame): Remove
486         old_inferior_ptid.
487
488 2018-09-10  Jerome Guitton  <guitton@adacore.com>
489
490         * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
491         with check_tag to 1 if and only if the type is tagged and the
492         component being searched cannot been found in the current
493         view. Otherwise, always call ada_to_fixed_type with
494         check_tag to 0.
495
496 2018-09-10  Xavier Roirand  <roirand@adacore.com>
497
498         * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
499         declaration.
500         * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
501         * ada-varobj.c (ada_varobj_get_number_of_children,
502         ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
503
504 2018-09-10  Xavier Roirand  <roirand@adacore.com>
505
506         * ada-valprint.c (ada_value_print): Use type instead of
507         enclosing type.
508
509 2018-09-10  Xavier Roirand  <roirand@adacore.com>
510
511         * ada-lang.c (ada_value_subscript): Handle case when parameter is
512         an array of access to unconstrained array.
513
514 2018-09-10  Xavier Roirand  <roirand@adacore.com>
515
516         * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
517         (ada_check_typedef): Use it.
518
519 2018-09-10  Xavier Roirand  <roirand@adacore.com>
520
521         * ada-varobj.c (ada_varobj_describe_struct_child)
522         (ada_varobj_describe_child): Handle union case like struct one.
523
524 2018-09-10  Tom Tromey  <tom@tromey.com>
525
526         PR python/18380:
527         * python/python.c (_initialize_python): Make example in "python"
528         help work in Python 3.
529
530 2018-09-10  Eli Zaretskii  <eliz@gnu.org>
531
532         * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
533         INSTALL_PROGRAM to install gdb-add-index.sh.  Don't append
534         $(EXEEXT) to the script, as it is not a program.
535
536 2018-09-09  Simon Marchi  <simon.marchi@ericsson.com>
537
538         * python/py-prettyprint.c (pretty_print_one_value): Return
539         gdbpy_ref<>.
540         (print_string_repr): Adjust.
541         (apply_varobj_pretty_printer): Return gdbpy_ref<>.
542         * python/python-internal.h (apply_varobj_pretty_printer): Return
543         gdbpy_ref<>.
544         * varobj.c (varobj_value_get_print_value): Adjust.
545
546 2018-09-08  Tom Tromey  <tom@tromey.com>
547
548         PR python/16047:
549         * python/py-prettyprint.c (pretty_print_one_value): Check for
550         to_string method.
551
552 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
553
554         * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
555         replace_operator_with_call.
556
557 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
558
559         * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
560
561 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
562
563         * ada-typeprint.c (print_range): Print the bounds using TYPE
564         rather than its TYPE_TARGET_TYPE.
565
566 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
567
568         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
569         call to ada_to_fixed_value_create.
570
571 2018-09-08  Jerome Guitton  <guitton@adacore.com>
572
573         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
574
575 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
576
577         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
578         by calls to error.
579
580 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
581
582         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
583         Move update of loop variable "fi".
584
585 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
586
587         * ada-lang.c (value_assign_to_component): In the case of
588         big-endian targets, extract the bits of the given VAL
589         using an src_offset of zero if container is not a scalar.
590
591 2018-09-06  Simon Ser  <contact@emersion.fr>
592
593         PR gdb/23105
594         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
595         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
596         * fbsd-tdep.c (fbsd_make_note_desc): New.
597         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
598         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
599         * target.h (enum target_object) Add FreeBSD-specific
600         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
601
602 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
603
604         * compile/compile-c.h (generate_c_for_variable_locations):
605         Change reference to pointer.
606         * compile/compile-c-support.c (compile_program) <compute>:
607         Likewise.
608         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
609         (generate_c_for_for_one_variable): Likewise
610         (generate_c_for_variable_locations): Likewise
611         * compile/compile-c-types.c (compile_c_instance::convert_type):
612         Likewise
613         * compile/compile-cplus-symbols.c (convert_one_symbol):
614         std::move the scope passed to enter_scope.
615         * compile/compile-cplus-types.c
616         (compile_cplus_instance::enter_scope): Make parameter
617         rvalue-reference.
618         (compile_cplus_instance::new_scope): Change reference to
619         pointer.
620         (compile_cplus_instance::convert_type): Likewise
621         (compile_cplus_convert_typedef): std::move the scope passed to
622         enter_scope.
623         (compile_cplus_convert_struct_or_union): Likewise.
624         (compile_cplus_convert_enum): Likewise.
625         (compile_cplus_convert_namespace): Likewise.
626         * compile/compile-cplus.h (compile_cplus_instance)
627         <enter_scope>: Make parameter rvalue-reference.
628         * compile/compile-internal.h (compile_instance)
629         <get_cached_type>: Likewise
630         * compile/compile-loc2c.c (push): Likewise
631         (pushf): Likewise
632         (unary): Likewise
633         (binary): Likewise
634         (print_label): Likewise
635         (pushf_register_address): Likewise
636         (pushf_register): Likewise
637         (do_compile_dwarf_expr_to_c): Likewise
638         (compile_dwarf_expr_to_c): Likewise
639         (compile_dwarf_bounds_to_c): Likewise
640         * compile/compile.c (compile_instance::get_cached_type):
641         Likewise
642         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
643         (compile_dwarf_bounds_to_c): Likewise
644         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
645         (dwarf2_compile_property_to_c): Likewise
646         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
647         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
648         Likewise
649
650 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
651
652         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
653         * tui/tui-data.c (init_content_element): Don't initialize it.
654
655 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
656
657         * tui/tui-data.h (struct tui_win_info)
658         <detail::opaque>: Remove.
659         * tui/tui-data.c (init_win_info): Remove assignment.
660
661 2018-09-05  Tom Tromey  <tom@tromey.com>
662
663         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
664         -Wformat-nonliteral.
665         * target-float.c (host_float_ops<T>::to_string)
666         (host_float_ops<T>::from_string): Use
667         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
668         * configure: Rebuild.
669
670 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
671
672         * printcmd.c (printf_c_string): Use
673         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
674         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
675
676 2018-09-05  Tom Tromey  <tom@tromey.com>
677
678         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
679
680 2018-09-05  Tom de Vries  <tdevries@suse.de>
681
682         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
683         with resolve_abstract_p == true.
684         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
685         defaulting to false. Propagate resolve_abstract_p to
686         dwarf2_fetch_die_loc_sect_off.
687         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
688         parameter, defaulting to false.
689         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
690         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
691         parameter.
692         * dwarf2read.h (struct die_info): Forward-declare.
693         (die_info_ptr): New typedef.
694         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
695
696 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
697
698         GDB 8.2 released.
699
700 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
701             Pedro Alves  <palves@redhat.com>
702
703         * gnulib/Makefile.in (aclocal_m4_deps): Move to
704         "aclocal-m4-deps.mk".  Include file here.
705         $(srcdir)/aclocal.m4: Add "configure.ac".
706         * gnulib/aclocal-m4-deps.mk: New file.
707         * gnulib/update-gnulib.sh: Automatically update
708         "aclocal-m4-deps.mk".
709
710 2018-09-04  Tom Tromey  <tom@tromey.com>
711
712         * configure: Rebuild.
713         * configure.ac: Remove multi-ice code.
714
715 2018-09-04  Tom Tromey  <tom@tromey.com>
716
717         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
718         (ada-exp.o): Update.
719
720 2018-09-04  Tom Tromey  <tom@tromey.com>
721
722         * Makefile.in (printcmd.o, target-float.o): Remove.
723         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
724
725 2018-09-04  Tom Tromey  <tom@tromey.com>
726
727         * gnulib/Makefile.in: Remove obsolete comment.
728         * Makefile.in: Remove obsolete comment.
729
730 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
731
732         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
733         line with '+'.
734
735 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
736
737         * riscv-tdep.c: Add 'prologue-value.h' include.
738         (struct riscv_unwind_cache): New struct.
739         (riscv_debug_unwinder): New global.
740         (riscv_scan_prologue): Update arguments, capture register details
741         from prologue scan.
742         (riscv_skip_prologue): Reformat arguments line, move end of
743         prologue calculation into riscv_scan_prologue.
744         (riscv_frame_cache): Update return type, create
745         riscv_unwind_cache, scan the prologue, and fill in remaining cache
746         details.
747         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
748         (riscv_frame_prev_register): Use the trad_frame within the
749         riscv_unwind_cache.
750         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
751         flag.
752
753 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
754
755         * trad-frame.h (trad_frame_set_realreg): Declare.
756         (trad_frame_set_addr): Declare.
757         * trad-frame.c (trad_frame_set_realreg): Define new function.
758         (trad_frame_set_addr): Define new function.
759         (trad_frame_set_reg_realreg): Use new function.
760         (trad_frame_set_reg_addr): Use new function.
761
762 2018-09-01  Keith Seitz  <keiths@redhat.com>
763
764         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
765         pulongest instead of "%lld".
766         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
767         ATTRIBUTE_UNUSED.
768
769 2018-08-31  Tom Tromey  <tom@tromey.com>
770
771         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
772         variant part type.
773
774 2018-08-31  Pedro Alves  <palves@redhat.com>
775
776         * gdbarch.h: Regenerate.
777
778 2018-08-31  Pedro Alves  <palves@redhat.com>
779
780         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
781         * target.h (Hardware watchpoint interfaces): Describe
782         continuable/steppable/non-steppable watchpoints.
783         * gdbarch.h, gdbarch.c: Regenerate.
784
785 2018-08-31  Pedro Alves  <palves@redhat.com>
786
787         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
788         Delete.
789         * s390-linux-nat.c
790         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
791         * target.h (target_ops::have_continuable_watchpoint): Delete.
792         (target_have_continuable_watchpoint): Delete.
793         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
794         * target-delegates.c: Regenerate.
795
796 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
797
798         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
799         the files present in "gnulib/import/m4/".
800
801 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
802
803         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
804         c.sw, c.swsp, and c.sdsp.
805
806 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
807
808         * riscv-tdep.c (struct riscv_inferior_data): Delete.
809         (riscv_read_misa_reg): Don't cache value read into inferior data.
810         (riscv_new_inferior_data): Delete.
811         (riscv_inferior_data_cleanup): Delete.
812         (riscv_inferior_data): Delete.
813         (riscv_invalidate_inferior_data): Delete.
814         (_initialize_riscv_tdep): Remove initialisation of inferior data.
815
816 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
817
818         * compile/compile-cplus-types.c
819         (compile_cplus_instance::leave_scope): Take the address of scope
820         object.
821         (compile_cplus_instance::convert_qualified_base): Compare quals
822         to 0.
823
824 2018-08-30  Keith Seitz  <keiths@redhat.com>
825
826         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
827         Use "%s" and host_address_to_string instead of "%p" in printf.
828
829 2018-08-29  Keith Seitz  <keiths@redhat.com>
830
831         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
832         and compile-cplus-types.c.
833         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
834         * c-lang.c (cplus_language_defn): Set C++ compile functions.
835         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
836         Declare.
837         * compile/compile-c-support.c: Include compile-cplus.h.
838         (load_libcompile): Templatize.
839         (get_compile_context): "New" function.
840         (c_get_compile_context): Use get_compile_context.
841         (cplus_get_compile_context): New function.
842         (cplus_push_user_expression, cplus_pop_user_expression)
843         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
844         (cplus_compute_program): Define new structs/functions.
845         * compile/compile-cplus-symmbols.c: New file.
846         * compile/compile-cplus-types.c: New file.
847         * compile/compile-cplus.h: New file.
848         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
849         Declare.
850         * compile/compile-object-load.c (get_out_value_type): Use
851         strncmp_iw when comparing symbol names.
852         (compile_object_load): Add mst_bss and mst_data.
853         * compile/compile.c (_initialize_compile): Remove
854         -Wno-implicit-function-declaration from `compile_args'.
855         * compile/gcc-cp-plugin.h: New file.
856         * NEWS: Mention C++ compile support and new debug options.
857
858 2018-08-29  Keith Seitz  <keiths@redhat.com>
859
860         * linespec.c (collect_info::add_symbol): Make virtual.
861         (struct symbol_searcher_collect_info): New struct.
862         (symbol_searcher::find_all_symbols): New method.
863         * symtab.h (class symbol_searcher): New class.
864
865 2018-08-29  Keith Seitz  <keiths@redhat.com>
866
867         * linespec.c (struct linespec) <function_symbols, label_symbols>:
868         Change to vector of block_symbol.  Update all users.
869         (struct collect_info) <symbols>: Likewise.
870         (collect_info::add_symbol): Take block_symbol as argument.
871         Update all callers.
872         (decode_compound_collector) <m_symbols>: Change type to vector
873         of block_symbol.  Update all users.
874         (decode_compound_collector::operator ()): Change parameter type
875         to block_symbol.
876         (find_method, find_function_symbols, find_linespec_symbols)
877         (find_label_symbols_in_block, find_label_symbols): Change symbol
878         vectors to block_symbol vectors.
879         * symtab.h (symbol_found_callback_ftype): Change parameter type to
880         block_symbol.
881
882 2018-08-29  Keith Seitz  <keiths@redhat.com>
883
884         * linespec.c (symbolp): Remove typedef and VEC definitions.
885         (bound_minimal_symbol_d): Likewise.
886
887 2018-08-29  Keith Seitz  <keiths@redhat.com>
888
889         * linespec.c (decode_compound_collector::decode_compound_collector):
890         Remove initialization for `m_symtabs'.
891         (decode_compound_collector::release_symbols): Change return type
892         to std::vector.  Update all callers.
893         (class decode_compound_collector) <m_symbols>: Change type to
894         std::vector.
895         (lookup_prefix_sym): Change return type to std::vector.  Update all
896         callers.
897         (compare_symbols): Remove.
898         (std_compare_symbols): Rename to `compare_symbols'.
899         (find_method): Change `sym_classes' parameter to std::vector.
900         Update all callers.  Use std::sort to sort sym_classes.
901         (find_linespec_symbols): Remove cleanup.
902
903 2018-08-29  Keith Seitz  <keiths@redhat.com>
904
905         * linespec.c (struct linespec) <minimal_symbols>: Change type to
906         std::vector.  Update all users.
907         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
908         (struct collect_info) <minimal_symbols>: Likewise.
909         (compare_msymbols): Return bool.  Change parameters to const
910         bound_minimal_symbol references.
911         (find_method, find_function_symbols, find_linespec_symbols): Change
912         `minsyms' parameter to std::vector.  Update all callers.
913
914 2018-08-29  Keith Seitz  <keiths@redhat.com>
915
916         * linespec.c (struct linespec) <label_symbols>: Change type to
917         std::vector.  Update all users.
918         (find_label_symbols_in_block): Change `result' parameter to
919         std::vector.  Update all callers.
920         (find_label_symbols): Return std::vector.  Update all callers.
921
922 2018-08-29  Keith Seitz  <keiths@redhat.com>
923
924         * linespec.c (struct linespec) <function_symbols>: Change type to
925         std::vector.  Update all users.
926         (struct collect_info) <function_symbols>: Likewise.
927         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
928         (std_compare_symbols): New function.
929         (find_method, find_function_symbols, find_linespec_symbols)
930         (find_label_symbols_in_block): Change `symbols' parameter to
931         std::vector.  Update all callers.
932         (find_label_symbols): Likewise for `function_symbols' and
933         `label_funcs_ret'.
934
935 2018-08-29  Keith Seitz  <keiths@redhat.com>
936
937         * linespec.c (symtab_vector_up): Define.
938         (struct linespec) <file_symtabs>: Change type to std::vector *.
939         Update all uses.
940         (struct collect_info) <file_symtabs>: Likewise.
941         (collect_symtabs_from_filename): Return symtab_vector_up.
942         Update all callers.
943         (decode_objc): Remove cleanup.
944         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
945         (symtab_collector::release_symtabs): Return symtab_vector_up.
946         Update all callers.
947         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
948         Update all users.
949         (collect_symtabs_from_filename, symtabs_from_filename): Return
950         symtab_vector_up.  Update all callers.
951
952 2018-08-29  Tom Tromey  <tom@tromey.com>
953
954         * csky-tdep.c (csky_analyze_prologue): Use
955         core_addr_to_string_nz.
956
957 2018-08-29  Tom Tromey  <tom@tromey.com>
958
959         * windows-nat.c (struct xlate_exception) <them>: Change type to
960         DWORD.
961         (xlate): Fix formatting.  Remove last entry.
962         (struct xlate_exception, xlate): Comment out.
963         (windows_nat_target::resume): Use ranged for.
964
965 2018-08-29  Jim Wilson  <jimw@sifive.com>
966
967         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
968         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
969         of NT_PRFPREG.
970         (riscv_linux_nat_target::store_registers): Likewise.
971
972 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
973
974         PR gdb/23555
975         PR gdb/23558
976         * gnulib/aclocal.m4: Regenerate.
977         * gnulib/config.in: Regenerate.
978         * gnulib/configure: Regenerate.
979         * gnulib/import/Makefile.am: Update.
980         * gnulib/import/Makefile.in: Update.
981         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
982         * gnulib/import/_Noreturn.h: ... this.
983         * gnulib/import/alloca.in.h: Update.
984         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
985         * gnulib/import/arg-nonnull.h: ... this.
986         * gnulib/import/assure.h: Update.
987         * gnulib/import/at-func.c: Update.
988         * gnulib/import/basename-lgpl.c: Update.
989         * gnulib/import/extra/snippet/c++defs.h: Rename to...
990         * gnulib/import/c++defs.h: ... this.
991         * gnulib/import/canonicalize-lgpl.c: Update.
992         * gnulib/import/cdefs.h: Update.
993         * gnulib/import/chdir-long.c: Update.
994         * gnulib/import/chdir-long.h: Update.
995         * gnulib/import/cloexec.c: Update.
996         * gnulib/import/cloexec.h: Update.
997         * gnulib/import/close.c: Update.
998         * gnulib/import/closedir.c: Update.
999         * gnulib/import/config.charset: Update.
1000         * gnulib/import/dirent-private.h: Update.
1001         * gnulib/import/dirent.in.h: Update.
1002         * gnulib/import/dirfd.c: Update.
1003         * gnulib/import/dirname-lgpl.c: Update.
1004         * gnulib/import/dirname.h: Update.
1005         * gnulib/import/dosname.h: Update.
1006         * gnulib/import/dup-safer-flag.c: Update.
1007         * gnulib/import/dup-safer.c: Update.
1008         * gnulib/import/dup.c: Update.
1009         * gnulib/import/dup2.c: Update.
1010         * gnulib/import/errno.in.h: Update.
1011         * gnulib/import/error.c: Update.
1012         * gnulib/import/error.h: Update.
1013         * gnulib/import/exitfail.c: Update.
1014         * gnulib/import/exitfail.h: Update.
1015         * gnulib/import/extra/update-copyright: Update.
1016         * gnulib/import/fchdir.c: Update.
1017         * gnulib/import/fcntl.c: Update.
1018         * gnulib/import/fcntl.in.h: Update.
1019         * gnulib/import/fd-hook.c: Update.
1020         * gnulib/import/fd-hook.h: Update.
1021         * gnulib/import/fd-safer-flag.c: Update.
1022         * gnulib/import/fd-safer.c: Update.
1023         * gnulib/import/fdopendir.c: Update.
1024         * gnulib/import/filename.h: Update.
1025         * gnulib/import/filenamecat-lgpl.c: Update.
1026         * gnulib/import/filenamecat.h: Update.
1027         * gnulib/import/flexmember.h: Update.
1028         * gnulib/import/float+.h: Update.
1029         * gnulib/import/float.c: Update.
1030         * gnulib/import/float.in.h: Update.
1031         * gnulib/import/fnmatch.c: Update.
1032         * gnulib/import/fnmatch.in.h: Update.
1033         * gnulib/import/fnmatch_loop.c: Update.
1034         * gnulib/import/fpucw.h: Update.
1035         * gnulib/import/frexp.c: Update.
1036         * gnulib/import/frexpl.c: Update.
1037         * gnulib/import/fstat.c: Update.
1038         * gnulib/import/fstatat.c: Update.
1039         * gnulib/import/getcwd-lgpl.c: Update.
1040         * gnulib/import/getcwd.c: Update.
1041         * gnulib/import/getdtablesize.c: Update.
1042         * gnulib/import/getlogin_r.c: Update.
1043         * gnulib/import/getprogname.c: Update.
1044         * gnulib/import/getprogname.h: Update.
1045         * gnulib/import/gettext.h: Update.
1046         * gnulib/import/gettimeofday.c: Update.
1047         * gnulib/import/glob-libc.h: Update.
1048         * gnulib/import/glob.c: Update.
1049         * gnulib/import/glob.in.h: Update.
1050         * gnulib/import/glob_internal.h: Update.
1051         * gnulib/import/glob_pattern_p.c: Update.
1052         * gnulib/import/globfree.c: Update.
1053         * gnulib/import/hard-locale.c: Update.
1054         * gnulib/import/hard-locale.h: Update.
1055         * gnulib/import/intprops.h: Update.
1056         * gnulib/import/inttypes.in.h: Update.
1057         * gnulib/import/isnan.c: Update.
1058         * gnulib/import/isnand-nolibm.h: Update.
1059         * gnulib/import/isnand.c: Update.
1060         * gnulib/import/isnanl-nolibm.h: Update.
1061         * gnulib/import/isnanl.c: Update.
1062         * gnulib/import/itold.c: Update.
1063         * gnulib/import/libc-config.h: Update.
1064         * gnulib/import/limits.in.h: Update.
1065         * gnulib/import/localcharset.c: Update.
1066         * gnulib/import/localcharset.h: Update.
1067         * gnulib/import/localtime-buffer.c: Update.
1068         * gnulib/import/localtime-buffer.h: Update.
1069         * gnulib/import/lstat.c: Update.
1070         * gnulib/import/m4/00gnulib.m4: Update.
1071         * gnulib/import/m4/__inline.m4: Update.
1072         * gnulib/import/m4/absolute-header.m4: Update.
1073         * gnulib/import/m4/alloca.m4: Update.
1074         * gnulib/import/m4/builtin-expect.m4: Update.
1075         * gnulib/import/m4/canonicalize.m4: Update.
1076         * gnulib/import/m4/chdir-long.m4: Update.
1077         * gnulib/import/m4/close.m4: Update.
1078         * gnulib/import/m4/closedir.m4: Update.
1079         * gnulib/import/m4/configmake.m4: Update.
1080         * gnulib/import/m4/d-ino.m4: Update.
1081         * gnulib/import/m4/d-type.m4: Update.
1082         * gnulib/import/m4/dirent_h.m4: Update.
1083         * gnulib/import/m4/dirfd.m4: Update.
1084         * gnulib/import/m4/dirname.m4: Update.
1085         * gnulib/import/m4/double-slash-root.m4: Update.
1086         * gnulib/import/m4/dup.m4: Update.
1087         * gnulib/import/m4/dup2.m4: Update.
1088         * gnulib/import/m4/eealloc.m4: Update.
1089         * gnulib/import/m4/environ.m4: Update.
1090         * gnulib/import/m4/errno_h.m4: Update.
1091         * gnulib/import/m4/error.m4: Update.
1092         * gnulib/import/m4/exponentd.m4: Update.
1093         * gnulib/import/m4/exponentl.m4: Update.
1094         * gnulib/import/m4/extensions.m4: Update.
1095         * gnulib/import/m4/extern-inline.m4: Update.
1096         * gnulib/import/m4/fchdir.m4: Update.
1097         * gnulib/import/m4/fcntl-o.m4: Update.
1098         * gnulib/import/m4/fcntl.m4: Update.
1099         * gnulib/import/m4/fcntl_h.m4: Update.
1100         * gnulib/import/m4/fdopendir.m4: Update.
1101         * gnulib/import/m4/filenamecat.m4: Update.
1102         * gnulib/import/m4/flexmember.m4: Update.
1103         * gnulib/import/m4/float_h.m4: Update.
1104         * gnulib/import/m4/fnmatch.m4: Update.
1105         * gnulib/import/m4/fnmatch_h.m4: Update.
1106         * gnulib/import/m4/fpieee.m4: Update.
1107         * gnulib/import/m4/frexp.m4: Update.
1108         * gnulib/import/m4/frexpl.m4: Update.
1109         * gnulib/import/m4/fstat.m4: Update.
1110         * gnulib/import/m4/fstatat.m4: Update.
1111         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
1112         * gnulib/import/m4/getcwd-path-max.m4: Update.
1113         * gnulib/import/m4/getcwd.m4: Update.
1114         * gnulib/import/m4/getdtablesize.m4: Update.
1115         * gnulib/import/m4/getlogin.m4: Update.
1116         * gnulib/import/m4/getlogin_r.m4: Update.
1117         * gnulib/import/m4/getpagesize.m4: Update.
1118         * gnulib/import/m4/getprogname.m4: Update.
1119         * gnulib/import/m4/gettimeofday.m4: Update.
1120         * gnulib/import/m4/glibc21.m4: Update.
1121         * gnulib/import/m4/glob.m4: Update.
1122         * gnulib/import/m4/glob_h.m4: Update.
1123         * gnulib/import/m4/gnulib-cache.m4: Update.
1124         * gnulib/import/m4/gnulib-common.m4: Update.
1125         * gnulib/import/m4/gnulib-comp.m4: Update.
1126         * gnulib/import/m4/gnulib-tool.m4: Update.
1127         * gnulib/import/m4/hard-locale.m4: Update.
1128         * gnulib/import/m4/include_next.m4: Update.
1129         * gnulib/import/m4/inttypes-pri.m4: Update.
1130         * gnulib/import/m4/inttypes.m4: Update.
1131         * gnulib/import/m4/isnand.m4: Update.
1132         * gnulib/import/m4/isnanl.m4: Update.
1133         * gnulib/import/m4/largefile.m4: Update.
1134         * gnulib/import/m4/limits-h.m4: Update.
1135         * gnulib/import/m4/localcharset.m4: Update.
1136         * gnulib/import/m4/locale-fr.m4: Update.
1137         * gnulib/import/m4/locale-ja.m4: Update.
1138         * gnulib/import/m4/locale-zh.m4: Update.
1139         * gnulib/import/m4/localtime-buffer.m4: Update.
1140         * gnulib/import/m4/longlong.m4: Update.
1141         * gnulib/import/m4/lstat.m4: Update.
1142         * gnulib/import/m4/malloc.m4: Update.
1143         * gnulib/import/m4/malloca.m4: Update.
1144         * gnulib/import/m4/math_h.m4: Update.
1145         * gnulib/import/m4/mbrtowc.m4: Update.
1146         * gnulib/import/m4/mbsinit.m4: Update.
1147         * gnulib/import/m4/mbsrtowcs.m4: Update.
1148         * gnulib/import/m4/mbstate_t.m4: Update.
1149         * gnulib/import/m4/memchr.m4: Update.
1150         * gnulib/import/m4/memmem.m4: Update.
1151         * gnulib/import/m4/mempcpy.m4: Update.
1152         * gnulib/import/m4/memrchr.m4: Update.
1153         * gnulib/import/m4/mkdir.m4: Update.
1154         * gnulib/import/m4/mkstemp.m4: Update.
1155         * gnulib/import/m4/mmap-anon.m4: Update.
1156         * gnulib/import/m4/mode_t.m4: Update.
1157         * gnulib/import/m4/msvc-inval.m4: Update.
1158         * gnulib/import/m4/msvc-nothrow.m4: Update.
1159         * gnulib/import/m4/multiarch.m4: Update.
1160         * gnulib/import/m4/nocrash.m4: Update.
1161         * gnulib/import/m4/off_t.m4: Update.
1162         * gnulib/import/m4/onceonly.m4: Update.
1163         * gnulib/import/m4/open-cloexec.m4: Update.
1164         * gnulib/import/m4/open.m4: Update.
1165         * gnulib/import/m4/openat.m4: Update.
1166         * gnulib/import/m4/opendir.m4: Update.
1167         * gnulib/import/m4/pathmax.m4: Update.
1168         * gnulib/import/m4/rawmemchr.m4: Update.
1169         * gnulib/import/m4/readdir.m4: Update.
1170         * gnulib/import/m4/readlink.m4: Update.
1171         * gnulib/import/m4/realloc.m4: Update.
1172         * gnulib/import/m4/rename.m4: Update.
1173         * gnulib/import/m4/rewinddir.m4: Update.
1174         * gnulib/import/m4/rmdir.m4: Update.
1175         * gnulib/import/m4/save-cwd.m4: Update.
1176         * gnulib/import/m4/secure_getenv.m4: Update.
1177         * gnulib/import/m4/setenv.m4: Update.
1178         * gnulib/import/m4/signal_h.m4: Update.
1179         * gnulib/import/m4/ssize_t.m4: Update.
1180         * gnulib/import/m4/stat-time.m4: Update.
1181         * gnulib/import/m4/stat.m4: Update.
1182         * gnulib/import/m4/std-gnu11.m4: Update.
1183         * gnulib/import/m4/stdbool.m4: Update.
1184         * gnulib/import/m4/stddef_h.m4: Update.
1185         * gnulib/import/m4/stdint.m4: Update.
1186         * gnulib/import/m4/stdio_h.m4: Update.
1187         * gnulib/import/m4/stdlib_h.m4: Update.
1188         * gnulib/import/m4/strchrnul.m4: Update.
1189         * gnulib/import/m4/strdup.m4: Update.
1190         * gnulib/import/m4/strerror.m4: Update.
1191         * gnulib/import/m4/string_h.m4: Update.
1192         * gnulib/import/m4/strstr.m4: Update.
1193         * gnulib/import/m4/strtok_r.m4: Update.
1194         * gnulib/import/m4/sys_socket_h.m4: Update.
1195         * gnulib/import/m4/sys_stat_h.m4: Update.
1196         * gnulib/import/m4/sys_time_h.m4: Update.
1197         * gnulib/import/m4/sys_types_h.m4: Update.
1198         * gnulib/import/m4/tempname.m4: Update.
1199         * gnulib/import/m4/time_h.m4: Update.
1200         * gnulib/import/m4/unistd-safer.m4: Update.
1201         * gnulib/import/m4/unistd_h.m4: Update.
1202         * gnulib/import/m4/warn-on-use.m4: Update.
1203         * gnulib/import/m4/wchar_h.m4: Update.
1204         * gnulib/import/m4/wchar_t.m4: Update.
1205         * gnulib/import/m4/wctype_h.m4: Update.
1206         * gnulib/import/m4/wint_t.m4: Update.
1207         * gnulib/import/malloc.c: Update.
1208         * gnulib/import/malloc/scratch_buffer.h: Update.
1209         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
1210         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
1211         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
1212         * gnulib/import/malloca.c: Update.
1213         * gnulib/import/malloca.h: Update.
1214         * gnulib/import/malloca.valgrind: Update.
1215         * gnulib/import/math.in.h: Update.
1216         * gnulib/import/mbrtowc.c: Update.
1217         * gnulib/import/mbsinit.c: Update.
1218         * gnulib/import/mbsrtowcs-impl.h: Update.
1219         * gnulib/import/mbsrtowcs-state.c: Update.
1220         * gnulib/import/mbsrtowcs.c: Update.
1221         * gnulib/import/memchr.c: Update.
1222         * gnulib/import/memmem.c: Update.
1223         * gnulib/import/mempcpy.c: Update.
1224         * gnulib/import/memrchr.c: Update.
1225         * gnulib/import/mkdir.c: Update.
1226         * gnulib/import/mkstemp.c: Update.
1227         * gnulib/import/msvc-inval.c: Update.
1228         * gnulib/import/msvc-inval.h: Update.
1229         * gnulib/import/msvc-nothrow.c: Update.
1230         * gnulib/import/msvc-nothrow.h: Update.
1231         * gnulib/import/open.c: Update.
1232         * gnulib/import/openat-die.c: Update.
1233         * gnulib/import/openat-priv.h: Update.
1234         * gnulib/import/openat-proc.c: Update.
1235         * gnulib/import/openat.c: Update.
1236         * gnulib/import/openat.h: Update.
1237         * gnulib/import/opendir.c: Update.
1238         * gnulib/import/pathmax.h: Update.
1239         * gnulib/import/pipe-safer.c: Update.
1240         * gnulib/import/rawmemchr.c: Update.
1241         * gnulib/import/readdir.c: Update.
1242         * gnulib/import/readlink.c: Update.
1243         * gnulib/import/realloc.c: Update.
1244         * gnulib/import/ref-add.sin: Update.
1245         * gnulib/import/ref-del.sin: Update.
1246         * gnulib/import/rename.c: Update.
1247         * gnulib/import/rewinddir.c: Update.
1248         * gnulib/import/rmdir.c: Update.
1249         * gnulib/import/same-inode.h: Update.
1250         * gnulib/import/save-cwd.c: Update.
1251         * gnulib/import/save-cwd.h: Update.
1252         * gnulib/import/scratch_buffer.h: Update.
1253         * gnulib/import/secure_getenv.c: Update.
1254         * gnulib/import/setenv.c: Update.
1255         * gnulib/import/signal.in.h: Update.
1256         * gnulib/import/stat-time.c: Update.
1257         * gnulib/import/stat-time.h: Update.
1258         * gnulib/import/stat-w32.c: Update.
1259         * gnulib/import/stat-w32.h: Update.
1260         * gnulib/import/stat.c: Update.
1261         * gnulib/import/stdbool.in.h: Update.
1262         * gnulib/import/stddef.in.h: Update.
1263         * gnulib/import/stdint.in.h: Update.
1264         * gnulib/import/stdio.in.h: Update.
1265         * gnulib/import/stdlib.in.h: Update.
1266         * gnulib/import/str-two-way.h: Update.
1267         * gnulib/import/strchrnul.c: Update.
1268         * gnulib/import/strdup.c: Update.
1269         * gnulib/import/streq.h: Update.
1270         * gnulib/import/strerror-override.c: Update.
1271         * gnulib/import/strerror-override.h: Update.
1272         * gnulib/import/strerror.c: Update.
1273         * gnulib/import/string.in.h: Update.
1274         * gnulib/import/stripslash.c: Update.
1275         * gnulib/import/strnlen1.c: Update.
1276         * gnulib/import/strnlen1.h: Update.
1277         * gnulib/import/strstr.c: Update.
1278         * gnulib/import/strtok_r.c: Update.
1279         * gnulib/import/sys_stat.in.h: Update.
1280         * gnulib/import/sys_time.in.h: Update.
1281         * gnulib/import/sys_types.in.h: Update.
1282         * gnulib/import/tempname.c: Update.
1283         * gnulib/import/tempname.h: Update.
1284         * gnulib/import/time.in.h: Update.
1285         * gnulib/import/unistd--.h: Update.
1286         * gnulib/import/unistd-safer.h: Update.
1287         * gnulib/import/unistd.in.h: Update.
1288         * gnulib/import/unsetenv.c: Update.
1289         * gnulib/import/verify.h: Update.
1290         * gnulib/import/extra/snippet/warn-on-use.h: Update.
1291         * gnulib/import/wchar.in.h: Update.
1292         * gnulib/import/wctype.in.h: Update.
1293         * gnulib/import/xalloc-oversized.h: Update.
1294         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
1295         "53e2c179f26a890fa6685af4b6c1397ee370433b".
1296
1297 2018-08-16  Gary Benson <gbenson@redhat.com>
1298
1299         PR gdb/13000:
1300         * gdb/main.c (captured_main_1): Exit with nonzero status
1301         in batch mode if the last command to be executed failed.
1302         * NEWS: Mention the above.
1303
1304 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
1305
1306         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
1307         end of warning message.
1308
1309 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
1310
1311         PR gdb/22943:
1312         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
1313         (aarch64_extract_return_value): Use
1314         aapcs_is_vfp_call_or_return_candidate.
1315         (aarch64_return_in_memory): Likewise.
1316         (aarch64_store_return_value): Likewise.
1317
1318 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
1319
1320         * aarch64-tdep.c
1321         (aapcs_is_vfp_call_or_return_candidate): Make static
1322         (pass_in_v_or_stack): Remove function.
1323         (pass_in_v_vfp_candidate): New function.
1324         (aarch64_push_dummy_call): Check for float register candidates.
1325
1326 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
1327
1328         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
1329         (aapcs_is_vfp_call_or_return_candidate_1): New function.
1330         (aapcs_is_vfp_call_or_return_candidate): Likewise.
1331
1332 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
1333
1334         PR build/23399
1335         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
1336         (struct ipa_sym_addresses): Rename to...
1337         (struct ipa_sym_addresses_common): ... this.
1338         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
1339
1340 2018-08-28  Tom Tromey  <tom@tromey.com>
1341
1342         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1343         (token_fifo): Now a std::vector.
1344         (yylex, c_parse): Update.
1345         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1346         (token_fifo): Now a std::vector.
1347         (yylex, d_parse): Update.
1348         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1349         (token_fifo): Now a std::vector.
1350         (yylex, go_parse): Update.
1351
1352 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
1353
1354         * parser-defs.h (struct type_stack) <elements>: Change type to
1355         std::vector<union type_stack_elt>.
1356         <depth, size>: Remove.
1357         * parse.c (parse_exp_in_context_1): Adjust.
1358         (type_stack_reserve): Remove.
1359         (check_type_stack_depth): Remove.
1360         (insert_into_type_stack): Adjust to std::vector.
1361         (insert_type): Likewise.
1362         (push_type): Likewise.
1363         (push_type_int): Likewise.
1364         (insert_type_address_space): Likewise.
1365         (pop_type): Likewise.
1366         (pop_type_int): Likewise.
1367         (pop_typelist): Likewise.
1368         (pop_type_stack): Likewise.
1369         (append_type_stack): Likewise.
1370         (push_type_stack): Likewise.
1371         (get_type_stack): Likewise.
1372         (type_stack_cleanup): Likewise.
1373         (push_typelist): Likewise.
1374         (follow_types): Likewise.
1375         (_initialize_parse): Likewise.
1376
1377 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
1378
1379         * NEWS: Mention csky target.
1380
1381 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
1382             Hafiz Abid Qadeer  <abidh@codesourcery.com>
1383             Don Breazeal  <donb@codesourcery.com>
1384
1385         * csky-linux-tdep.c: New file.
1386         * csky-tdep.c: Likewise.
1387         * csky-tdep.h: Likewise.
1388         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
1389         csky-tdep.o.
1390         (HFILES_NO_SRCDIR): Add csky-tdep.h.
1391         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
1392         * configure.tgt: Add csky support.
1393
1394 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
1395
1396         * python/py-framefilter.c (py_print_frame): Print frame architecture
1397         when printing on an MI output.
1398
1399 2018-08-27  Tom Tromey  <tom@tromey.com>
1400
1401         PR build/23087:
1402         * configure: Rebuild.
1403         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
1404
1405 2018-08-27  Tom Tromey  <tom@tromey.com>
1406
1407         * aarch64-linux-tdep.c
1408         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
1409         casts to int.
1410
1411 2018-08-27  Tom Tromey  <tom@tromey.com>
1412
1413         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
1414         unsigned.
1415         (ppc64_standard_linkage1, ppc64_standard_linkage2)
1416         (ppc64_standard_linkage3, ppc64_standard_linkage4)
1417         (ppc64_standard_linkage5, ppc64_standard_linkage6)
1418         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
1419         unsigned.
1420
1421 2018-08-27  Tom Tromey  <tom@tromey.com>
1422
1423         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
1424         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
1425
1426 2018-08-27  Tom Tromey  <tom@tromey.com>
1427
1428         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
1429         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
1430         ULONGEST_MAX.
1431         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
1432         ULONGEST_MAX.
1433         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
1434         ULONGEST_MAX.
1435         * sparc-linux-tdep.c (sparc32_linux_sigframe)
1436         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
1437         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
1438         ULONGEST_MAX.
1439         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
1440         (ppc64_linux_sigaction_tramp_frame)
1441         (ppc32_linux_sighandler_tramp_frame)
1442         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
1443         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
1444         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
1445         * mn10300-linux-tdep.c (am33_linux_sigframe)
1446         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
1447         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
1448         * mips-linux-tdep.c (mips_linux_o32_sigframe)
1449         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
1450         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
1451         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
1452         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
1453         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
1454         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
1455         * microblaze-linux-tdep.c
1456         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
1457         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
1458         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
1459         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
1460         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
1461         * common/common-types.h (ULONGEST_MAX): New define.
1462         (CORE_ADDR_MAX): Fix formatting.
1463         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
1464         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
1465         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
1466         (arm_linux_rt_sigreturn_tramp_frame)
1467         (arm_eabi_linux_sigreturn_tramp_frame)
1468         (arm_eabi_linux_rt_sigreturn_tramp_frame)
1469         (thumb2_eabi_linux_sigreturn_tramp_frame)
1470         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
1471         (arm_linux_restart_syscall_tramp_frame)
1472         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
1473         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
1474         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
1475         ULONGEST_MAX.
1476         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
1477
1478 2018-08-27  Tom Tromey  <tom@tromey.com>
1479
1480         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
1481         CORE_ADDR_MAX.
1482         * mips-tdep.c (mips_deal_with_atomic_sequence)
1483         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
1484         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
1485         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
1486         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
1487         CORE_ADDR_MAX.
1488         * aarch64-tdep.c (aarch64_software_single_step): Use
1489         CORE_ADDR_MAX.
1490
1491 2018-08-27  Tom Tromey  <tom@tromey.com>
1492
1493         * linespec.c (complete_linespec_component): Add cast to "char".
1494         * completer.c (completion_tracker::build_completion_result): Add
1495         cast to "char".
1496
1497 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
1498
1499         * solist.h (struct solist, struct target_so_ops): Fix
1500         indentation.
1501
1502 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
1503
1504         * ada-tasks.c (ada_task_info_s): Remove typedef.
1505         (DEF_VEC_O(ada_task_info_s)): Remove.
1506         (struct ada_tasks_inferior_data): Initialize fields.
1507         <task_list>: Make an std::vector.
1508         (get_ada_tasks_inferior_data): Allocate with new.
1509         (ada_get_task_number): Adjust.
1510         (get_task_number_from_id): Likewise.
1511         (valid_task_id): Likewise.
1512         (ada_get_task_info_from_ptid): Likewise.
1513         (iterate_over_live_ada_tasks): Likewise.
1514         (add_ada_task): Likewise.
1515         (read_known_tasks): Likewise.
1516         (ada_build_task_list): Likewise.
1517         (print_ada_task_info): Likewise.
1518         (info_task): Likewise.
1519         (task_command_1): Likewise.
1520
1521 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
1522
1523         * ada-lang.c (add_angle_brackets): Return std::string.
1524
1525 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
1526
1527         * python/py-threadevent.c (py_get_event_thread): Initialize
1528         pythread.
1529
1530 2018-08-24  Pedro Alves  <palves@redhat.com>
1531
1532         * python/py-bpevent.c (create_breakpoint_event_object): Use
1533         copy-initialization.
1534         * python/py-continueevent.c (emit_continue_event): Use
1535         copy-initialization.
1536         * python/py-exitedevent.c (create_exited_event_object): Return a
1537         gdbpy_ref<>.
1538         (emit_exited_event): Use copy-initialization.
1539         * python/py-inferior.c (python_new_inferior)
1540         (python_inferior_deleted, add_thread_object): Use
1541         copy-initialization.
1542         * python/py-infevents.c (create_inferior_call_event_object)
1543         (create_register_changed_event_object)
1544         (create_memory_changed_event_object): Return a gdbpy_ref<>.
1545         (emit_inferior_call_event, emit_memory_changed_event)
1546         (emit_register_changed_event): Use copy-initialization.
1547         * python/py-newobjfileevent.c (create_new_objfile_event_object):
1548         Return a gdbpy_ref<>.
1549         (emit_new_objfile_event): Use copy-initialization.
1550         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
1551         (emit_clear_objfiles_event): Use copy-initialization.
1552         * python/py-signalevent.c (create_signal_event_object): Use
1553         copy-initialization.
1554         * python/py-threadevent.c (create_thread_event_object): Use
1555         copy-initialization.
1556
1557 2018-08-24  Pedro Alves  <palves@redhat.com>
1558             Simon Marchi  <simon.marchi@ericsson.com>
1559
1560         PR gdb/23379
1561         * python/py-continueevent.c: Include "gdbthread.h".
1562         (create_continue_event_object): Add intro comment.  Add 'ptid'
1563         parameter.  Use it to find thread to pass to
1564         create_thread_event_object.
1565         (emit_continue_event): Pass PTID down to
1566         create_continue_event_object.
1567         * python/py-event.h (py_get_event_thread): Declare.
1568         (create_thread_event_object): Remove default from 'thread'
1569         parameter.
1570         * python/py-stopevent.c (create_stop_event_object): Use
1571         py_get_event_thread.
1572         * python/py-threadevent.c (get_event_thread): Rename to ...
1573         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
1574         and use it to find the thread.
1575         (create_thread_event_object): Assert that THREAD isn't null.
1576         Don't find the event thread here.
1577
1578 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
1579
1580         * block.h (blockrange, blockranges): New struct declarations.
1581         (struct block): Add new field named `ranges'.
1582         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
1583         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
1584         macros for accessing ranges in struct block.
1585         (make_blockranges): New declaration.
1586         block.c (make_blockranges): New function.
1587         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
1588         for block.
1589         * symtab.h (find_pc_partial_function): Add new parameter `block'.
1590         * blockframe.c (cache_pc_function_block): New static global.
1591         (clear_pc_function_cache): Clear cache_pc_function_block.
1592         (find_pc_partial_function): Move comment to symtab.h.  Add
1593         support for non-contiguous blocks.
1594         * cli/cli-cmds.c (block.h): Include.
1595         (print_disassembly): Handle printing of non-contiguous blocks.
1596         (disassemble_current_function): Likewise.
1597         (disassemble_command): Likewise.
1598
1599         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
1600         BLOCK_START.
1601         * blockframe.c (get_pc_function_start): Likewise.
1602         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
1603         (gcc_symbol_address): Likewise.
1604         * compile/compile-object-run.c (compile_object_run): Likewise.
1605         * compile/compile.c (get_expr_block_and_pc): Likewise.
1606         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
1607         (func_addr_to_tail_call_list): Likewise.
1608         * findvar.c (default_read_var_value): Likewise.
1609         * inline-frame.c (inline_frame_this_id): Likewise.
1610         (skip-inline_frames): Likewise.
1611         * infcmd.c (until_next_command): Likewise.
1612         * linespec.c (convert_linespec_to_sals): Likewise.
1613         * parse.c (parse_exp_in_context_1): Likewise.
1614         * printcmd.c (build_address_symbolic): likewise.
1615         (info_address_command): Likewise.
1616         symtab.c (find_function_start_sal): Likewise.
1617         (skip_prologue_sal): Likewise.
1618         (find_function_alias_target): Likewise.
1619         (find_gnu_ifunc): Likewise.
1620         * stack.c (find_frame_funname): Likewise.
1621         * symtab.c (fixup_symbol_section): Likewise.
1622         (find_function_start_sal): Likewise.
1623         (skip_prologue_sal): Likewsie.
1624         (find_function_alias_target): Likewise.
1625         (find_gnu_ifunc): Likewise.
1626         * tracepoint.c (info_scope_command): Likewise.
1627         * value.c (value_fn_field): Likewise.
1628
1629         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
1630         in place of find_pc_partial_function.
1631         * blockframe.c (find_function_entry_range_from_pc): New function.
1632         * symtab.h (find_function_entry_range_from_pc): Declare and document.
1633         * objfiles.c (objfile_relocate1): Relocate start and end addresses
1634         for each range in a block.
1635
1636
1637 2018-08-23  Xavier Roirand  <roirand@adacore.com>
1638
1639         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
1640         incrementation.
1641
1642 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
1643
1644         * solib-svr4.c (read_program_headers_from_bfd): Return
1645         gdb::optional<gdb::byte_vector>.
1646         (svr4_exec_displacement): Adjust.
1647
1648 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
1649
1650         * solib-svr4.c (read_program_header): Return
1651         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
1652         (find_program_interpreter): Return
1653         gdb::optional<gdb::byte_vector>.
1654         (scan_dyntag_auxv): Adjust.
1655         (enable_break): Adjust.
1656         (svr4_exec_displacement): Adjust.
1657
1658 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
1659
1660         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
1661         * inf-child.c (inf_child_target::terminal_save_inferior): New.
1662
1663 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
1664
1665         * guile/scm-string.c (gdbscm_scm_from_printf): Use
1666         string_vprintf.
1667         * guile/scm-utils.c (gdbscm_printf): Likewise.
1668         * serial.c (serial_printf): Likewise.
1669         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
1670
1671 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
1672
1673         * stack.c (print_frame): Print frame architecture when printing on
1674         an MI output.
1675         * NEWS: Mention new "arch" attribute in frame output.
1676
1677 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
1678
1679         * arch/aarch64.h (aarch64_regnum): Update comment.
1680
1681 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
1682
1683         * NEWS: Add SVE to 8.2 section.
1684
1685 2018-08-21  Pedro Alves  <palves@redhat.com>
1686
1687         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
1688         out from gdbscm_parse_function_args.
1689         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
1690         gdbscm_parse_function_args_1.
1691
1692 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
1693
1694         PR gdb/17816
1695         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
1696         operator.
1697
1698 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
1699
1700         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
1701
1702 2018-08-19  Michael Spang  <spang@google.com>
1703
1704         PR gdb/11786
1705         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
1706         for PT_TLS segments.
1707
1708 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
1709
1710         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
1711         dwarf_variable_value.
1712         * dwarf2-frame.c (class dwarf_expr_executor):
1713         Add override for dwarf_variable_value.
1714         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
1715         (class symbol_needs_eval_context): Likewise.
1716         (indirect_synthetic_pointer): Add forward declaration.
1717         (sect_variable_value): New function.
1718         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
1719         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
1720         for DW_OP_GNU_variable_value.
1721
1722 2018-08-16  Tom Tromey  <tom@tromey.com>
1723
1724         * top.c (read_command_file): Update.
1725         (command_line_input): Remove "repeat" argument.
1726         * ada-lang.c (get_selections): Update.
1727         * linespec.c (decode_line_2): Update.
1728         * defs.h (command_line_input): Remove argument.
1729         * cli/cli-script.c (read_next_line): Update.
1730         * python/py-gdb-readline.c: Update.
1731
1732 2018-08-17  Tom Tromey  <tom@tromey.com>
1733
1734         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
1735         command_line_input.
1736
1737 2018-08-15  Tom Tromey  <tom@tromey.com>
1738
1739         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
1740
1741 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
1742
1743         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
1744         If used, use find_pc_partial_function to find address range
1745         to disassemble.
1746         * mi/mi-main.c (mi_cmd_list_features): Report
1747         "data-disassemble-a-option" feature.
1748         * NEWS: Mention new -data-disassemble option -a.
1749
1750 2018-08-13  Tom Tromey  <tom@tromey.com>
1751
1752         * common/common-defs.h (_FORTIFY_SOURCE): Define.
1753
1754 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
1755
1756         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
1757         (aarch64_linux_collect_sve_regset): Likewise.
1758         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
1759         * regcache.h (regcache_map_entry_size): New function.
1760
1761 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
1762
1763         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
1764         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
1765         (SVE_HEADER_VL_LENGTH): Likewise.
1766         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
1767         (SVE_HEADER_FLAGS_LENGTH): Likewise.
1768         (SVE_HEADER_RESERVED_LENGTH): Likewise.
1769         (SVE_HEADER_SIZE_OFFSET): Likewise.
1770         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
1771         (SVE_HEADER_VL_OFFSET): Likewise.
1772         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
1773         (SVE_HEADER_FLAGS_OFFSET): Likewise.
1774         (SVE_HEADER_RESERVED_OFFSET): Likewise.
1775         (SVE_HEADER_SIZE): Likewise.
1776         (aarch64_linux_core_read_vq): Add function.
1777         (aarch64_linux_core_read_description): Check for SVE section.
1778
1779 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
1780
1781         * aarch64-fbsd-tdep.c
1782         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
1783         collect_size.
1784         * aarch64-linux-tdep.c
1785         (aarch64_linux_iterate_over_regset_sections): Likewise.
1786         * alpha-linux-tdep.c
1787         (alpha_linux_iterate_over_regset_sections):
1788         * alpha-nbsd-tdep.c
1789         (alphanbsd_iterate_over_regset_sections): Likewise.
1790         * amd64-fbsd-tdep.c
1791         (amd64fbsd_iterate_over_regset_sections): Likewise.
1792         * amd64-linux-tdep.c
1793         (amd64_linux_iterate_over_regset_sections): Likewise.
1794         * arm-bsd-tdep.c
1795         (armbsd_iterate_over_regset_sections): Likewise.
1796         * arm-fbsd-tdep.c
1797         (arm_fbsd_iterate_over_regset_sections): Likewise.
1798         * arm-linux-tdep.c
1799         (arm_linux_iterate_over_regset_sections): Likewise.
1800         * corelow.c (get_core_registers_cb): Likewise.
1801         (core_target::fetch_registers): Likewise.
1802         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
1803         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
1804         * gdbarch.h (void): Regenerate.
1805         * gdbarch.sh: Add supply_size and collect_size.
1806         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
1807         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
1808         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
1809         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
1810         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
1811         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
1812         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
1813         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
1814         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
1815         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
1816         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
1817         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
1818         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
1819         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
1820         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
1821         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
1822         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
1823         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
1824         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
1825         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
1826         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
1827         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
1828         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
1829         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
1830         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
1831         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
1832         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
1833         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
1834         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
1835         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
1836
1837 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
1838
1839         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
1840         with string_printf.
1841
1842 2018-08-10  Keith Seitz  <keiths@redhat.com>
1843
1844         * compile/compile-c-support.c (add_code_header, add_code_footer):
1845         Move into policy class.
1846         (c_push_user_expression, pop_user_expression_nop)
1847         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
1848         (compile_program): New host class.
1849         (c_compile_program): New typedef.
1850         (c_compute_porgram): Use c_compile_program.
1851
1852 2018-08-10  Keith Seitz  <keiths@redhat.com>
1853
1854         * compile/compile-internal.h (compile_instance::~compile_instance):
1855         Remove calls to htab_delete.
1856         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
1857         * compile.c (compile_instance::compile_instance): Initialize
1858         htab unique pointers.
1859         (compile_instance::get_cached_type, compile_instance::insert_type)
1860         (compile_instance::error_symbol_once): Update for unique_ptr.
1861
1862 2018-08-10  Keith Seitz  <keiths@redhat.com>
1863
1864         * compile/compile-c-symbols.c (struct symbol_error)
1865         (hash_symbol_error, eq_symbol_error, del_symbol_error)
1866         (compile_instance::insert_symbol_error)
1867         (compile_instance::error_symbol_once): Move to ...
1868         * compile/compile.c: ... here.
1869
1870 2018-08-10  Keith Seitz  <keiths@redhat.com>
1871
1872         * compile/compile-c-support.c (c_get_compile_context): Use `new'
1873         instead of `new_compile_instance'.
1874         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
1875         Update description.
1876         If the symbol error map is not initialized, create it.
1877         (generate_c_for_for_one_symbol): Do not check/initialize
1878         the symbol error map.
1879         * compile/compile-c-types.c (compile_c_instance): Make a class.
1880         Update all callers.
1881         (compile_instance::compile_instance): Initialize the type cache.
1882         (get_cached_type): New function.
1883         (insert_type): Update description.
1884         (compile_c_instance::m_default_cflags): Define.
1885         (convert_type): Update description.  Use get_cached_type.
1886         (delete_instance): Moved to destructor.
1887         (new_compile_instance): Moved to constructor.
1888         * compile/compile-c.h (compile_c_instance): Make class inheriting
1889         from compile_instance.
1890         <base>: Remove field.
1891         <type_map, symbol_err_map>: Move to base class.
1892         <c_plugin>: Rename to `m_plugin' and remove pointer type.
1893         * compile/compile-internal.h (compile_instance): Make class.
1894         <type_map_t, symbol_err_map_t>: Define.
1895         <fe>: Rename to `m_gcc_fe'.
1896         <scope, block, gcc_target_options>: Add `m_' prefix.
1897         <m_type_map, m_symbol_err_map>: New fields, moved from
1898         compile_c_instance.
1899         <destroy>: Remove.
1900         (convert_type, new_compile_instance): Remove.
1901         * compile/compile.c (cleanup_compile_instance): Remove.
1902         (compile_to_object): Use unique_ptr to eliminate cleanups.
1903         (compile_instance::set_print_callback, compile_instance::version)
1904         (compile_instance::set_verbose)
1905         (compile_instance::set_driver_filename)
1906         (compile_instance::set_triplet_regexp)
1907         (compile_instance::set_arguments)
1908         (compile_instance::set_source_file)
1909         (compile_instance::compile): Define.
1910
1911 2018-08-10  Keith Seitz  <keiths@redhat.com>
1912
1913         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
1914         * compile/compile-c-types.c: Define GCC_METHODN macros and include
1915         gcc-c-fe.def to define C plugin.
1916         (delete_instance): Delete `c_plugin'.
1917         (new_compile_instance): Initialize `c_plugin'.
1918         * compile/compile-c.h: Include gcc_c_plugin.h.
1919         (struct compile_c_instance) <c_plugin>: New member.
1920         * gcc-c-plugin.h: New file.
1921         Update all callers with API change.
1922
1923 2018-08-10  Keith Seitz  <keiths@redhat.com>
1924
1925         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
1926         (HFILES_NO_SRCDIR): ... to here.
1927         Add compile-internal.h and compile-c.h.
1928         * compile/compile-c-support.c: Include compile-c.h.
1929         * compile/compile-c-symbols.c: Include compile-c.h.
1930         (generate_c_for_variable_locations): Update comment.
1931         * compile/compile-c-types.c: Include compile-c.h.
1932         * compile/compile-c.h: New file -- moved C language declarations
1933         from other files here.
1934         * compile/compile-internal.h: Do not include hashtab.h or
1935         common/enum-flags.h.
1936         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
1937         (gcc_convert_symbol, gcc_symbol_address)
1938         (generate_c_for_variable_locations, c_get_mode_for_size)
1939         (c_get_range_decl_name): Definitions moved to compile-c.h.
1940         * compile/compile-loc2c.c: Include compile-c.h.
1941
1942 2018-08-10  Keith Seitz  <keiths@redhat.com>
1943
1944         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
1945         (c_symbol_substitution_name): ... this.
1946         Update all callers.
1947
1948 2018-08-10  Keith Seitz  <keiths@redhat.com>
1949
1950         * compile/compile-c-support.c (c_compute_program): Use
1951         unique_xmalloc_ptr to eliminate cleanup.
1952         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
1953         Return a unique_xmalloc_ptr and eliminate cleanup.
1954         * compile/compile-internal.h (generate_c_for_variable_locations):
1955         Return unique_xmalloc_ptr and update description.
1956
1957 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
1958
1959         * corelow.c (core_target::get_core_register_section): Rename
1960         min_size to section_min_size.
1961
1962 2018-08-09  Jim Wilson  <jimw@sifive.com>
1963
1964         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
1965         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
1966         * NEWS: Mention new GNU/Linux RISC-V target.
1967         * configure.host: Add riscv*-*-linux*.
1968         * configure.nat: Add riscv*.
1969         * configure.tgt: Add riscv*-*-linux*.
1970         * riscv-linux-nat.c: New file.
1971         * riscv-linux-tdep.c: New file.
1972
1973 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
1974
1975         * infrun.c (resume): Make static, add forward declaration.
1976         (proceed): Update header comment.
1977         * infrun.h (resume): Delete declaration.
1978
1979 2018-08-09  Tom Tromey  <tom@tromey.com>
1980
1981         * riscv-tdep.h: Minor formatting fixes.
1982
1983 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
1984
1985         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
1986         * dwarf-index-cache.c (create_dir_and_check): Likewise.
1987         (test_mkdir_recursive): Likewise.
1988         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
1989
1990 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
1991
1992         * valarith.c (value_subscripted_rvalue): If an array is not in
1993         memory, and we don't know the upper bound, then we can't know that
1994         the requested element exists or not.
1995
1996 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
1997
1998         * target.c (str_comma_list_concat_elem): Fix typo in comment.
1999         (target_options_to_string): Add comment.
2000
2001 2018-08-08  Tom Tromey  <tom@tromey.com>
2002
2003         * unittests/scoped_mmap-selftests.c: Check result of "write".
2004
2005 2018-08-08  Jim Wilson  <jimw@sifive.com>
2006
2007         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
2008         (decode_register_index_short): New.
2009         (decode_j_type_insn, decode_cj_type_insn): New.
2010         (decode_b_type_insn, decode_cb_type_insn): New.
2011         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
2012         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
2013         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
2014         is_c_sw_insn instead of is_sw_insn.
2015         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
2016         (riscv_software_single_step): New.
2017         * riscv-tdep.h (riscv_software_single_step): Declare.
2018
2019         * riscv-tdep.c (riscv_isa_xlen): Drop static.
2020         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
2021
2022 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
2023
2024         PR gdb/18050:
2025         * target.c (dispose_inferior): Don't dispose of inferiors that are
2026         already killed.
2027
2028 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
2029
2030         * remote.c (remote_target::download_tracepoint): Change char* to
2031         const char*.
2032
2033 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
2034
2035         * target.h (target_options_to_string): Return an std::string.
2036         * target.c (str_comma_list_concat_elem): Return void, use
2037         std::string.
2038         (do_option): Likewise.
2039         (target_options_to_string): Return an std::string.
2040         * linux-nat.c (linux_nat_target::wait): Adjust.
2041         * target-debug.h (target_debug_print_options): Adjust.
2042
2043 2018-08-07  Tom Tromey  <tom@tromey.com>
2044
2045         * Makefile.in (CPPFLAGS): New variable.
2046         (INTERNAL_CPPFLAGS): Use it.
2047
2048 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2049
2050         * NEWS: Mention the index cache.
2051
2052 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2053
2054         * common/pathstuff.h (get_standard_cache_dir): New.
2055         * common/pathstuff.c (get_standard_cache_dir): New.
2056         * build-id.h (build_id_to_string): New.
2057         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
2058         DEBUG_STR_SUFFIX): Move to here.
2059         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
2060         DEBUG_STR_SUFFIX): Move from there.
2061         (write_psymtabs_to_index): Make non-static, add basename
2062         parameter.  Write to temporary files, rename when done.
2063         (save_gdb_index_command): Adjust call to
2064         write_psymtabs_to_index.
2065         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
2066         field.
2067         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
2068         (get_gdb_index_contents_from_cache): New.
2069         (get_gdb_index_contents_from_cache_dwz): New.
2070         (dwarf2_initialize_objfile): Read index from cache.
2071         (dwarf2_build_psymtabs): Save to index.
2072         * dwarf-index-cache.h: New file.
2073         * dwarf-index-cache.c: New file.
2074         * dwarf-index-write.h: New file.
2075
2076 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2077
2078         * gnulib/aclocal.m4: Re-generate.
2079         * gnulib/config.in: Re-generate.
2080         * gnulib/configure: Re-generate.
2081         * gnulib/import/Makefile.am: Re-generate.
2082         * gnulib/import/Makefile.in: Re-generate.
2083         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
2084         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2085         * gnulib/import/m4/mkdir.m4: New file.
2086         * gnulib/import/mkdir.c: New file.
2087         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
2088         module.
2089
2090 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2091
2092         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
2093         * common/scoped_mmap.c: New file.
2094         * common/scoped_mmap.h (destroy): New method.
2095         (~scoped_mmap, reset): Use destroy.
2096         (scoped_mmap): New move constructor.
2097         (mmap_file): New declaration.
2098         * unittests/scoped_mmap-selftests.c (test_normal,
2099         test_invalid_filename, run_tests): New functions.
2100         (_initialize_scoped_mmap_selftests): Register selftest.
2101
2102 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2103
2104         * dwarf2read.c (read_gdb_index_from_section): Rename to...
2105         (read_gdb_index_from_buffer): ... this.  Remove section
2106         parameter, add buffer parameter.
2107         (get_gdb_index_contents_ftype,
2108         get_gdb_index_contents_dwz_ftype): New typedefs.
2109         (dwarf2_read_gdb_index): Add callback parameters to get the
2110         index contents.
2111         (get_gdb_index_contents_from_section): New.
2112         (dwarf2_initialize_objfile): Update call to
2113         dwarf2_read_gdb_index.
2114
2115 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2116
2117         * common/filestuff.h (gdb_fopen_cloexec): New overload.
2118         (gdb_open_cloexec): Likewise.
2119         * nat/linux-osdata.c (command_from_pid): Use string_printf.
2120         (commandline_from_pid): Likewise.
2121         (linux_xfer_osdata_threads): Likewise.
2122         (linux_xfer_osdata_fds): Likewise.
2123         * ada-lang.c (is_package_name): Likewise.
2124         * auxv.c (procfs_xfer_auxv): Likewise.
2125         * breakpoint.c (print_one_breakpoint_location): Use
2126         uiout::field_fmt.
2127         (print_one_catch_solib): Use string_printf.
2128         * coff-pe-read.c (add_pe_exported_sym): Likewise.
2129         (add_pe_forwarded_sym): Likewise.
2130         * dwarf2read.c (create_type_unit_group): Likewise.
2131         (build_error_marker_type): Likewise.
2132         * infcall.c (get_function_name): Likewise.
2133         * valprint.c (print_converted_chars_to_obstack): Likewise.
2134         * xtensa-tdep.c (xtensa_register_type): Likewise.
2135
2136 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
2137
2138         * remote.c (remote_target::download_tracepoint): Fix format
2139         string errors.
2140
2141 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2142
2143         * tracefile.c: Include common/byte-vector.h.
2144         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
2145         with trace_regblock_size if needed.  Update uses of buf.
2146
2147 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2148
2149         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
2150         std::vector<unsigned char>.
2151         * tracepoint.c (collection_list::collection_list): Remove
2152         m_regs_mask initializer from initializer list.  Resize
2153         m_regs_mask using the largest remote register number.
2154         (collection_list::add_remote_register): Remove size check on
2155         m_regs_mask.  Use at to access element.
2156         (collection_list::stringify): Change type of temp_buf to
2157         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
2158         stringify the register mask.  Use pack_hex_byte for the register
2159         mask.
2160
2161 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2162
2163         * tracepoint.h (class collection_list) <add_register>: Remove.
2164         <add_remote_register, add_ax_registers, add_local_register>:
2165         Declare.
2166         <add_memrange>: Add scope parameter.
2167         * tracepoint.c (encode_actions_1): Likewise.
2168         (collection_list::add_register): Rename to ...
2169         (collection_list::add_remote_register): ... this.  Update
2170         comment.
2171         (collection_list::add_ax_registers, add_local_register): New
2172         methods.
2173         (collection_list::add_memrange): Add scope parameter.  Call
2174         add_local_register instead of add_register.
2175         (finalize_tracepoint_aexpr): New function.
2176         (collection_list::collect_symbol): Update calls to add_memrange.
2177         Call add_local_register instead of add_register.  Call
2178         add_ax_registers.  Call finalize_tracepoint_aexpr.
2179         (encode_actions_1): Get remote regnos for $reg action.  Call
2180         add_remote_register, add_ax_registers, and add_local_register.
2181         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
2182         (validate_actionline): Call finalize_tracepoint_aexpr.
2183
2184 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2185
2186         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
2187         Replace array buf with gdb::char_vector buf, of size
2188         get_remote_packet_size ().  Replace references to buf and
2189         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
2190         and xsnprintf with snprintf.  Raise errors if the buffer is too
2191         small.
2192
2193 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2194
2195         * remote.c (remote_target::download_tracepoint): Fix the has_more
2196         predicate in the QTDP action list iteration.
2197
2198 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2199
2200         * remote.c (remote_target::download_tracepoint): Fix indentation
2201         in for block.
2202
2203 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2204
2205         * proc-api.c (_initialize_proc_api): Remove c, unused.
2206         * procfs.c (procfs_init_inferior): Remove signals, unused.
2207         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
2208         unused.
2209
2210 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
2211             Andrew Burgess  <andrew.burgess@embecosm.com>
2212
2213         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
2214         'W_STOPCODE (0)' as this could be ambiguous.
2215
2216 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
2217
2218         * ser-tcp.c (net_open): Fix thinko when deciding whether to
2219         disable TCP's Nagle algorithm (use "ai_protocol" instead of
2220         "ai_socktype").
2221
2222 2018-08-02  Tom Tromey  <tom@tromey.com>
2223
2224         PR symtab/16842.
2225         * dwarf2read.c (read_func_scope): Set symtab on template parameter
2226         symbols.
2227         (process_structure_scope): Likewise.
2228
2229 2018-08-02  Xavier Roirand  <roirand@adacore.com>
2230
2231         PR gdb/22629:
2232         * darwin-nat.c (darwin_kill_inferior): Fix handling of
2233         kill inferior.
2234
2235 2018-08-02  Tom Tromey  <tom@tromey.com>
2236
2237         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
2238         (darwin_suspend_inferior, darwin_resume_inferior)
2239         (darwin_decode_notify_message, darwin_resume_inferior_threads)
2240         (darwin_check_new_threads): Check result of get_darwin_inferior.
2241
2242 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
2243
2244         GDB 8.1.1 released.
2245
2246 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
2247
2248         * varobj.c (varobj_get_path_expr_parent): Report an error if
2249         parent is a dynamic varobj.
2250
2251 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
2252
2253         * gnulib/aclocal.m4: Re-generate.
2254         * gnulib/config.in: Re-generate.
2255         * gnulib/configure: Re-generate.
2256         * gnulib/import/Makefile.in: Re-generate.
2257         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2258         * gnulib/import/m4/onceonly.m4: Re-generate.
2259
2260 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
2261
2262         * target-descriptions.c (struct xml_test_tdesc): New.
2263         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
2264         (record_xml_tdesc): Update.
2265         (maintenance_check_xml_descriptions): Update.
2266         * target-descriptions.h (record_xml_tdesc): Update comment.
2267
2268 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
2269
2270         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
2271         checking array bounds are defined.
2272
2273 2018-07-30  Tom Tromey  <tom@tromey.com>
2274
2275         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
2276         irreflexivity violation.
2277
2278 2018-07-30  Tom Tromey  <tom@tromey.com>
2279
2280         * cli/cli-decode.c (lookup_cmd): Remove lint code.
2281         * value.c (unpack_long): Remove lint code.
2282         * valops.c (value_ind): Remove lint code.
2283         * valarith.c (value_x_binop, value_x_unop, value_equal)
2284         (value_pos): Remove lint code.
2285
2286 2018-07-28  Tom de Vries  <tdevries@suse.de>
2287
2288         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
2289         with undefined upper bound as <optimized out>.
2290
2291 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
2292
2293         * gcore.in: Rename variable "name" to "prefix".  Expand
2294         "usage" text.
2295
2296 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
2297
2298         * windows-nat.c (windows_nat_target::create_inferior): Update to
2299         call close() in global namespace.
2300
2301 2018-07-26  Tom Tromey  <tom@tromey.com>
2302
2303         * dwarf-index-write.c (add_address_entry): Don't add objfile
2304         offsets.
2305         * dbxread.c (find_stab_function): Rename from
2306         find_stab_function_addr.  Return a bound_minimal_symbol.
2307         (read_dbx_symtab): Use raw_text_low, raw_text_high.
2308         Don't add objfile offsets.
2309         (end_psymtab): Use raw_text_low, raw_text_high,
2310         MSYMBOL_VALUE_RAW_ADDRESS.
2311         (read_ofile_symtab): Update.
2312         (process_one_symbol): Update.
2313         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
2314         offsets.
2315         (dw2_relocate): Remove.
2316         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
2317         searching addrmap.
2318         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
2319         Update.
2320         (process_psymtab_comp_unit_reader, add_partial_symbol)
2321         (add_partial_subprogram, dwarf2_ranges_read): Update.
2322         (load_partial_dies): Update.
2323         (add_address_entry): Don't add objfile offsets.
2324         (dwarf2_build_include_psymtabs): Update.
2325         (create_addrmap_from_aranges): Don't add objfile offsets.
2326         (dw2_find_pc_sect_compunit_symtab): Update.
2327         * mdebugread.c (parse_symbol): Don't add objfile offsets.
2328         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
2329         Update.
2330         (parse_partial_symbols): Don't add objfile offsets.  Use
2331         raw_text_low, raw_text_high.  Update.
2332         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
2333         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
2334         or call 'relocate' quick function.  Clear psymbol_map.
2335         * psympriv.h (struct partial_symbol) <address>: Add section
2336         offset.
2337         <set_unrelocated_address>: Rename from set_address.
2338         <raw_text_low, raw_text_high>: New methods.
2339         <text_low, text_high>: Add objfile parameter.
2340         (add_psymbol_to_bcache): Add 'section' parameter.  Call
2341         set_unrelocated_address.
2342         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2343         (find_pc_psymbol): Update.
2344         (fixup_psymbol_section, relocate_psymtabs): Remove.
2345         (dump_psymtab, psym_functions): Update.
2346         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
2347         parameter.
2348         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
2349         (start_psymtab_common): Update.
2350         * symfile-debug.c (debug_qf_relocate): Remove.
2351         (debug_sym_quick_functions): Update.
2352         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
2353         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
2354         Update.
2355
2356 2018-07-26  Tom Tromey  <tromey@redhat.com>
2357
2358         * dbxread.c (end_psymtab): Use text_high_valid and
2359         text_low_valid.
2360         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
2361         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
2362         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
2363         Update comment.
2364         <text_low_valid, text_high_valid>: New fields.
2365         <set_text_low, set_text_high>: Update.
2366         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
2367
2368 2018-07-26  Tom Tromey  <tom@tromey.com>
2369
2370         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
2371         Update.
2372         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
2373         textlow and texthigh fields.
2374         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
2375         Update.
2376         * mdebugread.c (parse_lines, parse_partial_symbols)
2377         (psymtab_to_symtab_1): Update.
2378         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
2379         Rename fields.  Update comment.  Now private.
2380         <text_low, text_high, set_text_low, set_text_high>: New methods.
2381         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2382         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
2383         (start_psymtab_common, maintenance_info_psymtabs)
2384         (maintenance_check_psymtabs): Update.
2385         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
2386         texthigh fields.
2387         (scan_xcoff_symtab): Update.
2388
2389 2018-07-26  Tom Tromey  <tromey@redhat.com>
2390
2391         * psympriv.h (struct partial_symbol) <unrelocated_address,
2392         address, set_address>: New methods.
2393         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
2394         (fixup_psymbol_section, relocate_psymtabs): Update.
2395         (print_partial_symbols): Add 'objfile' parameter.  Update.
2396         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
2397         Update.
2398
2399 2018-07-26  Tom Tromey  <tom@tromey.com>
2400
2401         * dwarf-index-write.c (write_psymbols, debug_names::insert)
2402         (debug_names::write_psymbols): Update.
2403         * psympriv.h (struct partial_symbol): Derive from
2404         general_symbol_info.
2405         <obj_section>: New method.
2406         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
2407         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2408         (find_pc_sect_psymbol, fixup_psymbol_section)
2409         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
2410         (print_partial_symbols, recursively_search_psymtabs)
2411         (compare_psymbols, psymbol_hash, psymbol_compare)
2412         (add_psymbol_to_bcache, maintenance_check_psymtabs)
2413         (psymbol_name_matches, psym_fill_psymbol_map): Update.
2414
2415 2018-07-26  Tom Tromey  <tromey@redhat.com>
2416
2417         * dbxread.c (end_psymtab): Remove dead code.
2418
2419 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
2420
2421         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
2422         DWARF unwinders are disabled.
2423         * dwarf2-frame.c: Add dwarf2read.h include.
2424         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
2425         disabled.
2426         (dwarf2_frame_unwinders_enabled_p): Define.
2427         (show_dwarf_unwinders_enabled_p): New function.
2428         (_initialize_dwarf2_frame): Register switch to control DWARF
2429         unwinder use.
2430         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
2431         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
2432         (show_dwarf_cmdlist): Remove static keyword.
2433         * dwarf2read.h (set_dwarf_cmdlist): Declare.
2434         (show_dwarf_cmdlist): Declare.
2435         * NEWS: Document new feature.
2436
2437 2018-07-26  Tom de Vries  <tdevries@suse.de>
2438
2439         PR breakpoints/23366
2440         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
2441
2442 2018-07-26  Tom de Vries  <tdevries@suse.de>
2443
2444         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
2445         DW_AT_count can't be translated to a dynamic prop.
2446
2447 2018-07-25  Tom de Vries  <tdevries@suse.de>
2448
2449         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
2450         try/catch.
2451
2452 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
2453
2454         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
2455
2456 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
2457
2458         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
2459
2460 2018-07-24  Keith Seitz  <keiths@redhat.comt
2461
2462         PR symtab/23010
2463         * dwarf2read.c (dw2_add_symbol_to_list): New function.
2464         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
2465         instead of add_symbol_to_list.
2466         (read_file_scope): Call prepare_one_comp_unit before reading
2467         any other DIEs.
2468
2469 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
2470
2471         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
2472
2473 2018-07-24  Tom Tromey  <tom@tromey.com>
2474
2475         * utils.c (malloc, realloc, free): Don't declare.
2476         * configure, config.in: Rebuild.
2477         * configure.ac: Don't check for declarations of free, malloc, or
2478         realloc.
2479
2480 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
2481
2482         * aarch64-linux-nat.c
2483         (aarch64_linux_nat_target::stopped_data_address): Remove unused
2484         variable.
2485         * arm-linux-nat.c (fetch_regs): Likewise.
2486         (store_regs): Likewise.
2487         (fetch_vfp_regs): Likewise.
2488         (store_vfp_regs): Likewise.
2489         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
2490         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
2491         (arm_linux_nat_target::insert_watchpoint): Likewise.
2492         (arm_linux_nat_target::remove_watchpoint): Likewise.
2493         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
2494         Likewise.
2495         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
2496         Likewise.
2497         * ppc-linux-nat.c (fetch_register): Likewise.
2498         (fetch_all_gp_regs): Likewise.
2499         (fetch_ppc_registers): Likewise.
2500         (store_all_gp_regs): Likewise.
2501         (store_ppc_registers): Likewise.
2502         (hwdebug_insert_point): Likewise.
2503         (can_use_watchpoint_cond_accel): Likewise.
2504         * remote-sim.c (gdb_os_write_stdout): Likewise.
2505
2506 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
2507             Tom Tromey  <tom@tromey.com>
2508
2509         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
2510         test for it.
2511         * configure: Rebuild.
2512
2513 2018-07-22  Tom Tromey  <tom@tromey.com>
2514
2515         * regformats/regdat.sh: Define xmltarget_${name} inside
2516         #ifndef IN_PROCESS_AGENT.
2517
2518 2018-07-22  Tom Tromey  <tom@tromey.com>
2519
2520         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
2521
2522 2018-07-22  Tom Tromey  <tom@tromey.com>
2523
2524         * symfile.c (reread_symbols): Notify iter, not objfile.
2525
2526 2018-07-22  Tom Tromey  <tom@tromey.com>
2527
2528         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
2529         Use arch_ops.
2530         (ravenscar_thread_target::prepare_to_store): Likewise.
2531
2532 2018-07-22  Tom Tromey  <tom@tromey.com>
2533
2534         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
2535         unused variable.  Call value_fetch_lazy when needed.
2536         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
2537         Remove unused variable.  Call value_fetch_lazy when needed.
2538
2539 2018-07-22  Tom Tromey  <tom@tromey.com>
2540
2541         * m32c-tdep.c (mark_dma): Return void.
2542         (make_regs): Remove unused declarations.
2543
2544 2018-07-22  Tom Tromey  <tom@tromey.com>
2545
2546         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
2547         cmdscm_get_valid_command_smob_arg_unsafe for effect.
2548         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
2549         bkscm_get_valid_block_smob_arg_unsafe for effect.
2550
2551 2018-07-22  Tom Tromey  <tom@tromey.com>
2552
2553         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
2554         value_type.
2555
2556 2018-07-22  Tom Tromey  <tom@tromey.com>
2557
2558         * windows-nat.c (saved_context): Conditionally define.
2559         * remote.c (remote_target::remote_btrace_maybe_reopen):
2560         Conditionally declare "warned".
2561         * inflow.c (sigquit_ours): Conditionally define.
2562         (new_tty): Move "tty" declaration inside #if.
2563         * guile/guile.c (guile_datadir): Conditionally define.
2564         * charset.c (set_be_le_names): Move some declarations inside #if.
2565         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
2566         #if.
2567         (parse_xml_btrace_conf): Likewise.
2568
2569 2018-07-22  Tom Tromey  <tom@tromey.com>
2570
2571         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
2572
2573 2018-07-22  Tom Tromey  <tom@tromey.com>
2574
2575         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
2576         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
2577         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
2578         * buildsym-legacy.c (get_macro_table): Remove unused variable.
2579         * stack.c (frame_apply_level_command): Remove unused variable.
2580         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
2581         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
2582         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
2583         unused variable.
2584         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
2585         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
2586         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
2587         variable.
2588         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
2589         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
2590         variable.
2591         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
2592         Remove unused variable.
2593         * cli/cli-script.c (recurse_read_control_structure): Remove unused
2594         variable.
2595         * common/tdesc.c (print_xml_feature::visit): Remove unused
2596         variable.
2597         * compile/compile-object-load.c (store_regs): Remove unused
2598         variables.
2599         * complaints.c (clear_complaints): Remove unused variable.
2600         * corelow.c (core_target_open): Remove unused variable.
2601         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
2602         variable.
2603         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
2604         variable.
2605         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
2606         variable.
2607         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
2608         variable.
2609         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
2610         variable.
2611         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
2612         variable.
2613         * ia64-tdep.c (examine_prologue): Remove unused variable.
2614         * infcall.c (run_inferior_call): Remove unused variable.
2615         * inferior.c (exit_inferior): Remove unused variable.
2616         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
2617         * linespec.c (decode_line_2): Remove unused variable.
2618         * linux-nat.c (super_close): Remove.
2619         * linux-tdep.c (linux_info_proc): Remove unused variable.
2620         * mi/mi-main.c (mi_execute_command): Remove unused variable.
2621         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
2622         Remove unused variable.
2623         * parse.c (find_minsym_type_and_address): Remove unused variable.
2624         * printcmd.c (info_symbol_command, printf_floating): Remove unused
2625         variable.
2626         * python/py-breakpoint.c (bppy_set_commands): Remove unused
2627         variable.
2628         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
2629         variables.
2630         * record-btrace.c (record_btrace_target::store_registers): Remove
2631         unused variable.
2632         (cmd_show_record_btrace_cpu): Remove unused variable.
2633         * riscv-tdep.c (riscv_register_reggroup_p)
2634         (riscv_push_dummy_call, riscv_return_value): Remove unused
2635         variable.
2636         * rust-exp.y (literal): Remove unused variable.
2637         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
2638         unused variable.
2639         <STRUCTOP_ANONYMOUS>: Likewise.
2640         * s390-linux-tdep.c (s390_linux_init_abi_31)
2641         (s390_linux_init_abi_64): Remove unused variable.
2642         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
2643         (file_select_thread, net_windows_open, _initialize_ser_windows):
2644         Remove unused variables.
2645         * symtab.c (find_pc_sect_line): Remove unused variable.
2646         * target-memory.c (compute_garbled_blocks): Remove unused
2647         variable.
2648         (target_write_memory_blocks): Remove unused variable.
2649         * target.c (target_stack::unpush): Remove unused variables.
2650         * tracepoint.c (start_tracing, all_tracepoint_actions)
2651         (merge_uploaded_trace_state_variables)
2652         (print_one_static_tracepoint_marker): Remove unused variable.
2653         * unittests/basic_string_view/element_access/char/1.cc (test01):
2654         Remove unused variable.
2655         * windows-nat.c (windows_continue, windows_add_all_dlls)
2656         (do_initial_windows_stuff, windows_nat_target::create_inferior):
2657         Remove unused variables.
2658
2659 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
2660
2661         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
2662         attr_profile in HAVE_ELF.
2663         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
2664         HAVE_ELF.
2665
2666 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
2667
2668         * frame.c (frame_register_unwind): Change parameter name.
2669         (frame_unwind_register): Likewise.
2670         (frame_unwind_register_value): Likewise.
2671         (frame_unwind_register_signed): Likewise.
2672         (frame_unwind_register_unsigned): Likewise.
2673         * frame.h (frame_register_unwind): Likewise.
2674         (frame_unwind_register): Likewise.
2675         (frame_unwind_register_value): Likewise.
2676         (frame_unwind_register_signed): Likewise.
2677         (frame_unwind_register_unsigned): Likewise.
2678         (frame_unwind_arch): Likewise.
2679
2680 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
2681
2682         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
2683         ISA maintenance.
2684
2685 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
2686
2687         * mips-linux-nat.c (mips_linux_nat_target::read_description):
2688         Call `get_ptrace_pid' rather than extracting the ptrace PID by
2689         hand.
2690
2691 2018-07-20  Keith Seitz  <keiths@redhat.com>
2692
2693         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
2694         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
2695         m_compunit_symtab, m_language>: Add "m_" prefix.
2696         Update all uses.
2697         * buildsym.c: Update all uses.
2698
2699 2018-07-20  Tom Tromey  <tom@tromey.com>
2700
2701         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
2702         * buildsym.h (record_line_ftype): Remove typedef.
2703
2704 2018-07-20  Tom Tromey  <tom@tromey.com>
2705
2706         * buildsym-legacy.h (augment_type_symtab): Don't declare.
2707         (end_expandable_symtab): Likewise.
2708         (end_symtab_get_static_block): Likewise.
2709         (end_symtab_from_static_block): Likewise.
2710         * buildsym-legacy.c (augment_type_symtab): Remove.
2711         (end_expandable_symtab): Remove.
2712         (end_symtab_get_static_block): Remove.
2713         (end_symtab_from_static_block): Remove.
2714
2715 2018-07-20  Tom Tromey  <tom@tromey.com>
2716
2717         * dwarf2read.c: Include buildsym.h.
2718         (struct dwarf2_cu) <builder>: New method.
2719         (fixup_go_packaging): Update.
2720         (process_full_comp_unit, process_full_type_unit): Update.  Don't
2721         use scoped_free_pendings.
2722         (using_directives): Add "cu" parameter, remove "language".
2723         (read_import_statement, setup_type_unit_groups, )
2724         (read_func_scope, read_lexical_block_scope)
2725         (dwarf2_record_block_ranges, read_namespace): Update.
2726         (lnp_state_machine::lnp_state_machine): Add cu parameter.
2727         (lnp_state_machine::handle_end_sequence): Update.
2728         (class lnp_state_machine) <m_cu>: New member.
2729         <m_record_line_callback>: Remove.
2730         <m_currently_recording_lines>: New member.
2731         (lnp_state_machine::handle_set_file): Update.
2732         (noop_record_line): Remove.
2733         (dwarf_record_line_p): Add cu parameter.
2734         (dwarf_record_line_1, dwarf_finish_line): Likewise.
2735         (lnp_state_machine::record_line)
2736         (lnp_state_machine::lnp_state_machine)
2737         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
2738         (dwarf_decode_lines): Update.
2739         (dwarf2_start_subfile): Add cu parameter.
2740         (dwarf2_start_symtab, new_symbol): Update.
2741         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
2742         Remove dwarf2_per_objfile parameter.
2743         (dwarf_decode_macros): Update.
2744
2745 2018-07-20  Tom Tromey  <tom@tromey.com>
2746
2747         * stabsread.c (define_symbol): Update.
2748         * buildsym-legacy.h (get_buildsym_compunit): Declare.
2749         * dwarf2read.c (new_symbol): Update.
2750         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
2751         * cp-namespace.c: Include buildsym.h.
2752         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
2753         * buildsym-legacy.c (get_buildsym_compunit): New function.
2754
2755 2018-07-20  Tom Tromey  <tom@tromey.com>
2756
2757         * xcoffread.c: Include buildsym-legacy.h.
2758         * windows-nat.c: Include buildsym-legacy.h.
2759         * stabsread.c: Include buildsym-legacy.h.
2760         * mdebugread.c: Include buildsym-legacy.h.
2761         * buildsym-legacy.h: New file.
2762         * buildsym-legacy.c: New file, from buildsym.c.
2763         * go32-nat.c: Include buildsym-legacy.h.
2764         * dwarf2read.c: Include buildsym-legacy.h.
2765         * dbxread.c: Include buildsym-legacy.h.
2766         * cp-namespace.c: Include buildsym-legacy.h.
2767         * coffread.c: Include buildsym-legacy.h.
2768         * buildsym.h: Move some contents to buildsym-legacy.h.
2769         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
2770         buildsym-legacy.c.
2771         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
2772
2773 2018-07-20  Tom Tromey  <tom@tromey.com>
2774
2775         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
2776         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
2777         (buildsym_compunit::buildsym_compunit)
2778         (buildsym_compunit::~buildsym_compunit)
2779         (buildsym_compunit::get_macro_table): Define.
2780
2781 2018-07-20  Tom Tromey  <tom@tromey.com>
2782
2783         * buildsym.c (reset_symtab_globals): Remove.
2784         (buildsym_compunit::end_symtab_from_static_block): Update.
2785         (buildsym_compunit::augment_type_symtab): Update.
2786         (end_symtab_from_static_block): Call free_buildsym_compunit.
2787         (augment_type_symtab, end_symtab, end_expandable_symtab):
2788         Likewise.
2789
2790 2018-07-20  Tom Tromey  <tom@tromey.com>
2791
2792         * arch-utils.c: Do not include buildsym.h.
2793         * mipsread.c: Do not include buildsym.h.
2794         * machoread.c: Do not include buildsym.h.
2795         * elfread.c: Do not include buildsym.h.
2796
2797 2018-07-20  Tom Tromey  <tom@tromey.com>
2798
2799         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
2800         initialization.
2801         (buildsym_compunit): Add new constructor.
2802         (struct buildsym_compunit) <get_last_source_file, finish_block,
2803         record_block_range, start_subfile, patch_subfile_names,
2804         push_subfile, pop_subfile, record_line, get_compunit_symtab,
2805         set_last_source_start_addr, get_last_source_start_addr,
2806         get_local_using_directives, set_local_using_directives,
2807         get_global_using_directives, outermost_context_p,
2808         get_current_context_stack, get_context_stack_depth,
2809         get_current_subfile, get_local_symbols, get_file_symbols,
2810         get_global_symbols, record_debugformat, record_producer,
2811         push_context, pop_context, end_symtab_get_static_block,
2812         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
2813         New public methods.
2814         <record_pending_block, finish_block_internal, make_blockvector,
2815         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
2816         private methods.
2817         Update all users.
2818
2819 2018-05-22  Tom Tromey  <tom@tromey.com>
2820
2821         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
2822         parameter.
2823         (finish_block_internal): Update.
2824
2825 2018-07-20  Tom Tromey  <tom@tromey.com>
2826
2827         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
2828         parameter.
2829         (finish_block_internal): Update.
2830
2831 2018-07-20  Tom Tromey  <tom@tromey.com>
2832
2833         * buildsym.h (EXTERN): Don't define or undef.
2834         * buildsym.c (EXTERN): Don't define.
2835
2836 2018-07-20  Tom Tromey  <tom@tromey.com>
2837
2838         * buildsym.c: Remove TODO comment.
2839
2840 2018-07-20  Tom Tromey  <tom@tromey.com>
2841
2842         * coffread.c (coff_symtab_read): Update.
2843         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
2844         (xcoff_new_init): Update.
2845         * mipsread.c (mipscoff_new_init): Update.
2846         * mdebugread.c (mdebug_build_psymtabs): Update.
2847         * elfread.c (elf_new_init): Update.
2848         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
2849         Update.
2850         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
2851         (coffstab_build_psymtabs, elfstab_build_psymtabs)
2852         (stabsect_build_psymtabs): Update.
2853         * buildsym.h (buildsym_init): Don't declare.
2854         * buildsym.c: Update comment.
2855         (prepare_for_building): Remove.
2856         (start_symtab, restart_symtab): Update.
2857         (reset_symtab_globals): Update comment.
2858         (buildsym_init): Remove.
2859
2860 2018-07-20  Tom Tromey  <tom@tromey.com>
2861
2862         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
2863         * stabsread.c (patch_block_stabs, define_symbol, read_type)
2864         (read_enum_type, common_block_start, common_block_end)
2865         (cleanup_undefined_types_1, finish_global_stabs): Update.
2866         * mdebugread.c (psymtab_to_symtab_1): Update.
2867         * dwarf2read.c (fixup_go_packaging, read_func_scope)
2868         (read_lexical_block_scope, new_symbol): Update.
2869         * dbxread.c (process_one_symbol): Update.
2870         * coffread.c (coff_symtab_read, process_coff_symbol)
2871         (coff_read_enum_type): Update.
2872         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
2873         declare.
2874         (get_local_symbols, get_file_symbols, get_global_symbols): New
2875         functions.
2876         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
2877         m_global_symbols.
2878         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
2879         (~scoped_free_pendings): Update.
2880         (finish_block, prepare_for_building, reset_symtab_globals)
2881         (end_symtab_get_static_block, end_symtab_with_blockvector)
2882         (augment_type_symtab, push_context): Update.
2883         (get_local_symbols, get_file_symbols, get_global_symbols): New
2884         functions.
2885         (buildsym_init): Update.
2886
2887 2018-07-20  Tom Tromey  <tom@tromey.com>
2888
2889         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
2890         (process_full_type_unit): Likewise.
2891         (dwarf2_start_symtab): Set list_in_scope.
2892
2893 2018-07-20  Tom Tromey  <tom@tromey.com>
2894
2895         * dwarf2read.c (process_psymtab_comp_unit_reader)
2896         (build_type_psymtabs_reader): Do not set list_in_scope.
2897
2898 2018-07-20  Tom Tromey  <tom@tromey.com>
2899
2900         * buildsym.c (free_pendings): Remove.
2901         (add_symbol_to_list, scoped_free_pendings)
2902         (finish_block_internal, buildsym_init): Update.
2903
2904 2018-07-20  Tom Tromey  <tom@tromey.com>
2905
2906         * xcoffread.c (read_xcoff_symtab): Update.
2907         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
2908         Update.
2909         * dbxread.c (process_one_symbol): Update.
2910         * coffread.c (coff_symtab_read): Update.
2911         * buildsym.h (finish_block): Update.
2912         * buildsym.c (finish_block): Remove "listhead" argument.
2913         (end_symtab_get_static_block): Update.
2914
2915 2018-07-20  Tom Tromey  <tom@tromey.com>
2916
2917         * buildsym.h (class scoped_free_pendings): Remove constructor.
2918         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
2919         method.
2920         <m_pending_block_obstack, m_pending_blocks>: New members.
2921         (pending_block_obstack, pending_blocks): Remove.
2922         (scoped_free_pendings::scoped_free_pendings): Default.
2923         (~scoped_free_pendings): Update.
2924         (free_pending_blocks): Remove.
2925         (finish_block_internal, record_pending_block, make_blockvector)
2926         (end_symtab_get_static_block, augment_type_symtab, push_context)
2927         (buildsym_init): Update.
2928
2929 2018-07-20  Tom Tromey  <tom@tromey.com>
2930
2931         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
2932         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
2933         members.
2934         (pending_addrmap, pending_addrmap_obstack)
2935         (pending_addrmap_interesting): Remove.
2936         (scoped_free_pendings, record_block_range, make_blockvector)
2937         (prepare_for_building, reset_symtab_globals, buildsym_init):
2938         Update.
2939
2940 2018-07-20  Tom Tromey  <tom@tromey.com>
2941
2942         * xcoffread.c (process_linenos): Update.
2943         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
2944         * mdebugread.c (psymtab_to_symtab_1): Update.
2945         * dwarf2read.c (setup_type_unit_groups)
2946         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
2947         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
2948         * dbxread.c (process_one_symbol): Update.
2949         * coffread.c (coff_symtab_read, enter_linenos)
2950         (process_coff_symbol): Update.
2951         * buildsym.h (current_subfile): Don't declare.
2952         (get_current_subfile): Declare.
2953         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
2954         member.
2955         (start_subfile, free_buildsym_compunit, push_subfile)
2956         (prepare_for_building, start_symtab): Update.
2957         (get_current_subfile): New function.
2958
2959 2018-07-20  Tom Tromey  <tom@tromey.com>
2960
2961         * coffread.c (coff_symtab_read): Update.
2962         * xcoffread.c (read_xcoff_symtab): Update.
2963         * dwarf2read.c (new_symbol): Update.
2964         (read_func_scope, read_lexical_block_scope): Update.
2965         * dbxread.c (process_one_symbol): Update.
2966         * buildsym.h (context_stack, context_stack_depth): Don't declare.
2967         (outermost_context_p): Remove macro.
2968         (outermost_context_p, get_current_context_stack)
2969         (get_context_stack_depth): Declare.
2970         (pop_context): Return struct context_stack.
2971         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
2972         member.
2973         (context_stack_size): Remove.
2974         (INITIAL_CONTEXT_STACK_SIZE): Remove.
2975         (prepare_for_building, end_symtab_get_static_block)
2976         (augment_type_symtab, push_context): Update.
2977         (pop_context): Return struct context_stack.
2978         (outermost_context_p, get_current_context_stack)
2979         (get_context_stack_depth): New functions.
2980         (buildsym_init): Update.
2981
2982 2018-07-20  Tom Tromey  <tom@tromey.com>
2983
2984         * rust-exp.y: Now a pure parser.  Update all rules.
2985         (%union): Move earlier.
2986         (current_parser, work_obstack): Remove globals.
2987         (rust_parser, ~rust_parser): Update.
2988         (class rust_parser) <copy_name, concat3, crate_name, super_name,
2989         lex_character, lex_number, lex_string, lex_identifier,
2990         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
2991         convert_name, convert_params_to_expression,
2992         convert_ast_to_expression, ast_basic_type, ast_operation,
2993         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
2994         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
2995         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
2996         ast_array_type, ast_slice_type, ast_reference_type,
2997         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
2998         (rust_parse): Update.
2999         (rustyyerror, rustyylex): Add parser parameter.
3000         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
3001         (rust_lex_stringish_test, rust_lex_test_sequence)
3002         (rust_lex_test_trailing_dot, rust_lex_test_completion)
3003         (rust_lex_test_push_back, rust_lex_tests): Update.
3004
3005 2018-07-19  Pedro Alves  <palves@redhat.com>
3006
3007         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
3008         gdb::unique_xmalloc_ptr.
3009         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
3010         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
3011         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
3012         copy-initialization.
3013         * guile/scm-pretty-print.c (ppscm_print_children): Use
3014         gdb::unique_xmalloc_ptr instead of cleanups.
3015         (gdbscm_apply_val_pretty_printer): Remove cleanups.
3016         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
3017         gdb::unique_xmalloc_ptr.
3018         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
3019         Adjust to use gdb::unique_xmalloc_ptr.
3020         * guile/scm-utils.c (extract_arg): Adjust.
3021         * guile/scm-value.c (gdbscm_value_field): Adjust to use
3022         gdb::unique_xmalloc_ptr instead of a cleanup.
3023
3024 2018-07-19  Tom Tromey  <tom@tromey.com>
3025
3026         * utils.c (do_value_free_to_mark)
3027         (make_cleanup_value_free_to_mark): Remove.
3028         * utils.h (make_cleanup_value_free_to_mark): Remove.
3029
3030 2018-07-19  Pedro Alves  <palves@redhat.com>
3031
3032         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
3033         forwarding reference.
3034
3035 2018-07-18  Pedro Alves  <palves@redhat.com>
3036
3037         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
3038         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
3039         cleanup.
3040
3041 2018-07-18  Pedro Alves  <palves@redhat.com>
3042
3043         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
3044         exceptions.
3045         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
3046         (gdbscm_wrap): New.
3047         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
3048         directly instead of a cleanup.
3049         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
3050         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
3051         (vlscm_binop_gdbthrow): New, factored out from ...
3052         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
3053         (vlscm_rich_compare): Use gdbscm_wrap.
3054         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
3055         instead of a cleanup.
3056         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
3057         cleanup.
3058         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
3059         Use xfree directly instead of a cleanup.
3060         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
3061         Adjust to use gdbscm_wrap and scoped_value_mark.
3062         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
3063         (gdbscm_value_address, gdbscm_value_dereference)
3064         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
3065         scoped_value_mark.
3066         (gdbscm_value_dynamic_type): Use scoped_value_mark.
3067         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
3068         scoped_value_mark.
3069         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
3070         gdbscm_wrap and scoped_value_mark.
3071         (gdbscm_value_to_string): Use xfree directly instead of a
3072         cleanup.  Move 'buffer' unique_ptr to TRY scope.
3073         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
3074         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
3075         scoped_value_mark.
3076         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
3077         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
3078         scoped_value_mark.
3079         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
3080         gdbscm_wrap.
3081
3082 2018-07-18  Tom de Vries  <tdevries@suse.de>
3083
3084         * findvar.c (default_read_var_value): Also resolve dynamic type for
3085         LOC_OPTIMIZED_OUT vars.
3086
3087 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
3088
3089         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
3090         decoding.
3091
3092 2018-07-17  Tom Tromey  <tom@tromey.com>
3093
3094         * guile/scm-param.c (pascm_set_func, pascm_show_func)
3095         (compute_enum_list, pascm_set_param_value_x)
3096         (gdbscm_parameter_value): Update.
3097         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
3098         (gdbscm_scm_to_host_string): Update.
3099         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
3100         Update.
3101         * guile/scm-cmd.c (cmdscm_add_completion): Update.
3102         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
3103         * guile/scm-string.c (gdbscm_scm_to_string): Return
3104         unique_xmalloc_ptr.
3105         (gdbscm_scm_to_host_string): Likewise.
3106
3107 2018-07-17  Tom Tromey  <tom@tromey.com>
3108
3109         * guile/guile.c (gdbscm_eval_from_control_command): Update.
3110         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
3111         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
3112         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
3113         unique_xmalloc_ptr.
3114
3115 2018-07-17  Tom Tromey  <tom@tromey.com>
3116
3117         * guile/scm-param.c (pascm_signal_setshow_error): Update.
3118         * guile/guile-internal.h (gdbscm_exception_message_to_string):
3119         Update.
3120         * guile/scm-cmd.c (cmdscm_function): Update.
3121         * guile/scm-pretty-print.c
3122         (ppscm_print_exception_unless_memory_error): Update.
3123         * guile/scm-exception.c (gdbscm_exception_message_to_string):
3124         Return unique_xmalloc_ptr.
3125
3126 2018-07-17  Tom Tromey  <tom@tromey.com>
3127
3128         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
3129         Use string_printf.
3130
3131 2018-07-17  Jim Wilson  <jimw@sifive.com>
3132
3133         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
3134         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
3135         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
3136         unecessary braces after EF_RISCV_RVC test.  Delete call to
3137         set_gdbarch_decr_pc_after_break.
3138
3139         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
3140         RISCV_LAST_FP_REGNUM + 1.
3141         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
3142
3143 2018-07-17  Tom Tromey  <tom@tromey.com>
3144
3145         * configure.ac: Remove --disable-gdbcli.
3146         * configure: Rebuild.
3147         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
3148         (SUBDIR_CLI_CFLAGS): Remove.
3149         (SFILES): Use SUBDIR_CLI_SRCS.
3150         (COMMON_OBS): Use SUBDIR_CLI_OBS.
3151
3152 2018-07-17  Tom Tromey  <tom@tromey.com>
3153
3154         PR gdb/18624:
3155         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
3156
3157 2018-07-16  Jim Wilson  <jimw@sifive.com>
3158
3159         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
3160
3161 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
3162
3163         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
3164         variable.
3165         (libunwind_frame_sniffer): Likewise.
3166         (libunwind_frame_prev_register): Likewise.
3167         (libunwind_sigtramp_frame_sniffer): Likewise.
3168         * ia64-tdep.c (ia64_access_reg): Likewise.
3169         (ia64_access_rse_reg): Likewise.
3170         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
3171         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
3172
3173 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
3174
3175         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
3176
3177 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
3178
3179         * remote-sim.c (gdbsim_target::close,
3180         gdbsim_target::mourn_inferior): Remove unused variables.
3181
3182 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
3183
3184         * ia64-tdep.c (ktab_buf): New global.
3185         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
3186         (get_kernel_table): Adjust.
3187
3188 2018-07-16  Tom Tromey  <tom@tromey.com>
3189
3190         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
3191         * dwarf2read.c (using_directives, new_symbol): Use
3192         outermost_context_p.
3193         * dbxread.c (process_one_symbol): Use outermost_context_p.
3194         * coffread.c (coff_symtab_read): Use outermost_context_p.
3195
3196 2018-07-16  Tom Tromey  <tom@tromey.com>
3197
3198         * dwarf2read.c (using_directives, read_func_scope)
3199         (read_lexical_block_scope): Update.
3200         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
3201         * buildsym.h (local_using_directives, global_using_directives):
3202         Don't declare.
3203         (get_local_using_directives, set_local_using_directives)
3204         (get_global_using_directives): Declare.
3205         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
3206         m_global_using_directives>: New members.
3207         (finish_block_internal, prepare_for_building)
3208         (reset_symtab_globals, end_symtab_get_static_block)
3209         (push_context): Update.
3210         (get_local_using_directives, set_local_using_directives)
3211         (get_global_using_directives): New functions.
3212         (buildsym_init): Update.
3213
3214 2018-07-16  Tom Tromey  <tom@tromey.com>
3215
3216         * xcoffread.c (xcoff_initial_scan): Don't call
3217         free_pending_blocks.
3218         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
3219         * buildsym.h (class scoped_free_pendings): Add constructor.
3220         (free_pending_blocks): Don't declare.
3221         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
3222         (free_pending_blocks): Now static.
3223
3224 2018-07-16  Tom Tromey  <tom@tromey.com>
3225
3226         * buildsym.h (push_subfile, pop_subfile): Update declarations.
3227         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
3228         member.
3229         (struct subfile_stack): Remove.
3230         (subfile_stack): Remove.
3231         (push_subfile, pop_subfile, buildsym_init): Update.
3232
3233 2018-07-16  Tom Tromey  <tom@tromey.com>
3234
3235         * buildsym.c (push_subfile): Use gdb_assert.
3236         (pop_subfile): Use gdb_assert.
3237
3238 2018-07-16  Tom Tromey  <tom@tromey.com>
3239
3240         * buildsym.h (merge_symbol_lists): Remove.
3241         * buildsym.c (merge_symbol_lists): Remove.
3242
3243 2018-07-16  Tom Tromey  <tom@tromey.com>
3244
3245         * stabsread.c (scan_file_globals): Update comment.
3246         * stabsread.h (scan_file_globals): Move from buildsym.h.
3247         * buildsym.h (scan_file_globals): Move to stabsread.h.
3248
3249 2018-07-16  Tom Tromey  <tom@tromey.com>
3250
3251         * xcoffread.c (xcoff_new_init): Update.
3252         * mipsread.c (mipscoff_new_init): Update.
3253         * mdebugread.c (mdebug_build_psymtabs): Update.
3254         * elfread.c (elf_new_init): Update.
3255         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
3256         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
3257         * buildsym.h (buildsym_new_init): Don't declare.
3258         * buildsym.c (buildsym_new_init): Remove.
3259
3260 2018-07-16  Tom Tromey  <tom@tromey.com>
3261
3262         * stabsread.h (within_function): Move from buildsym.h.
3263         * stabsread.c (start_stabs): Clear within_function.
3264         * coffread.c (coff_start_symtab): Clear within_function.
3265         * buildsym.h (within_function): Move to stabsread.h.
3266         * buildsym.c (prepare_for_building): Update.
3267
3268 2018-07-16  Tom Tromey  <tom@tromey.com>
3269
3270         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
3271         * dwarf2read.c (dwarf2_start_symtab): Don't set
3272         processing_gcc_compilation.
3273         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
3274
3275 2018-07-16  Tom Tromey  <tom@tromey.com>
3276
3277         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
3278         (next_symbol_text_func): Move from buildsym.h.
3279         * stabsread.c (hashname): Move from buildsym.c.
3280         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
3281         (next_symbol_text_func, hashname): Move to stabsread.h.
3282         * buildsym.c: Don't include bcache.h
3283         (hashname): Move to stasbread.c.
3284
3285 2018-07-16  Tom Tromey  <tom@tromey.com>
3286
3287         * buildsym.h (context_stack_size): Don't declare.
3288         * buildsym.c (context_stack_size): New global.
3289
3290 2018-07-16  Tom Tromey  <tom@tromey.com>
3291
3292         * dbxread.c (processing_acc_compilation): New global.
3293         * buildsym.h (processing_acc_compilation): Don't declare.
3294
3295 2018-07-16  Tom Tromey  <tom@tromey.com>
3296
3297         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
3298         * dbxread.c (read_ofile_symtab): Update.
3299         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
3300         * buildsym.h (last_source_start_addr): Remove.
3301         (set_last_source_start_addr, get_last_source_start_addr):
3302         Declare.
3303         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
3304         parameter.
3305         (struct buildsym_compunit) <m_last_source_start_addr>: New
3306         member.
3307         (prepare_for_building): Remove start_addr parameter.
3308         (start_symtab, restart_symtab, end_symtab_get_static_block)
3309         (end_symtab_with_blockvector): Update.
3310         (set_last_source_start_addr, get_last_source_start_addr): New
3311         functions.
3312
3313 2018-07-16  Tom Tromey  <tom@tromey.com>
3314
3315         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
3316         member.
3317         (have_line_numbers): Remove.
3318         (record_line, prepare_for_building, end_symtab_get_static_block)
3319         (augment_type_symtab): Update.
3320
3321 2018-07-16  Tom Tromey  <tom@tromey.com>
3322
3323         * buildsym.c (~buildsym_compunit): Free the macro table.
3324         (struct buildsym_compunit) <get_macro_table, release_macros>: New
3325         methods.
3326         <m_pending_macros>: New member.
3327         (pending_macros): Remove.
3328         (~scoped_free_pendings, get_macro_table, prepare_for_building)
3329         (reset_symtab_globals, end_symtab_get_static_block)
3330         (end_symtab_with_blockvector, augment_type_symtab)
3331         (buildsym_init): Update.
3332
3333 2018-07-16  Tom Tromey  <tom@tromey.com>
3334
3335         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
3336         parameter.
3337         (buildsym_compunit::set_last_source_file): New method.
3338         <m_last_source_file>: New member.
3339         (prepare_for_building): Remove "name" parameter.
3340         (start_symtab, restart_symtab, reset_symtab_globals): Update.
3341         (last_source_file): Remove.
3342         (set_last_source_file, get_last_source_file): Update.
3343
3344 2018-07-16  Tom Tromey  <tom@tromey.com>
3345
3346         * buildsym.c (prepare_for_building): Add assert.
3347
3348 2018-07-16  Tom Tromey  <tom@tromey.com>
3349
3350         * buildsym.c (~buildsym_compunit): Update.
3351         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
3352         (start_subfile, patch_subfile_names)
3353         (end_symtab_with_blockvector): Update.
3354
3355 2018-07-16  Tom Tromey  <tom@tromey.com>
3356
3357         * buildsym.c (struct buildsym_compunit): Add constructor,
3358         destructor, initializers.
3359         (start_buildsym_compunit): Remove.
3360         (free_buildsym_compunit): Use "delete".
3361         (start_symtab, restart_symtab): Use "new".
3362
3363 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
3364
3365         * symfile.c (set_objfile_default_section_offset): Remove struct
3366         keyword.
3367
3368 2018-07-14  Stafford Horne  <shorne@gmail.com>
3369
3370         * (Responsible Maintainers): Add myself as or1k maintainer.
3371
3372 2018-07-13  Tom Tromey  <tom@tromey.com>
3373
3374         * symfile.c (set_objfile_default_section_offset): Use extra braces
3375         around initializer.
3376
3377 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3378
3379         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
3380         non-branching basr.
3381
3382 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3383
3384         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3385         unittests/cli-utils-selftests.c
3386         * unittests/cli-utils-selftests.c: New file.
3387
3388 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3389
3390         * NEWS: Mention new commands. Mention change to 'thread apply'.
3391
3392 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3393
3394         * thread.c (thr_try_catch_cmd): New function.
3395         (thread_apply_all_command): Handle qcs flags.
3396         (thread_apply_command): Handle qcs flags.
3397         (taas_command): New function.
3398         (tfaas_command): New function.
3399         (_initialize_thread): Update to setup the new commands 'taas
3400         and 'tfaas'. Change doc string for 'thread apply'.
3401
3402 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3403
3404         * stack.c: (trailing_outermost_frame): New function, mostly
3405         extracted from backtrace_command_1.
3406         (leading_innermost_frame): New function.
3407         (backtrace_command_1): Update to call trailing_outermost_frame.
3408         (frame_apply_command_count): New function.
3409         (frame_apply_level_command): New function.
3410         (frame_apply_all_command): New function.
3411         (frame_apply_command): New function.
3412         (faas_command): New function.
3413         (frame_cmd_list): New variable.
3414         (_initialize_stack): Update to setup the new commands 'frame apply'
3415         and 'faas'.
3416
3417 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3418
3419         * cli-utils.c (number_or_range_parser::get_number): Only handle
3420         numbers or convenience var as numbers.
3421         (parse_flags): New function.
3422         (parse_flags_qcs): New function.
3423         (number_or_range_parser::finished): Ensure parsing end is detected
3424         before end of string.
3425         * cli-utils.h (parse_flags): New function.
3426         (parse_flags_qcs): New function.
3427         (number_or_range_parser): Remove m_finished bool.
3428         (number_or_range_parser::skip_range): Set m_in_range to false.
3429
3430 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
3431
3432         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
3433         on Windows.
3434
3435 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
3436             Jan Kratochvil  <jan.kratochvil@redhat.com>
3437             Paul Fertser  <fercerpav@gmail.com>
3438             Tsutomu Seki  <sekiriki@gmail.com>
3439             Pedro Alves  <palves@redhat.com>
3440
3441         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3442         'unittests/parse-connection-spec-selftests.c'.
3443         (COMMON_SFILES): Add 'common/netstuff.c'.
3444         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
3445         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
3446         * common/netstuff.c: New file.
3447         * common/netstuff.h: New file.
3448         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
3449         (wait_for_connect): Update comment.  New parameter
3450         'gdb::optional<int> sock' instead of 'struct serial *scb'.
3451         Use 'sock' directly instead of 'scb->fd'.
3452         (try_connect): New function, with code from 'net_open'.
3453         (net_open): Rewrite main loop to deal with multiple
3454         sockets/addresses.  Handle IPv6-style hostnames; implement
3455         support for IPv6 connections.
3456         * unittests/parse-connection-spec-selftests.c: New file.
3457
3458 2018-07-11  Pedro Alves  <palves@redhat.com>
3459
3460         PR gdb/23377
3461         * remote.c (remote_target::remote_detach_pid): Call
3462         set_current_process.
3463
3464 2018-07-11  Pedro Alves  <palves@redhat.com>
3465
3466         * h8300-tdep.c (h8300_gdbarch_init): Remove
3467         set_gdbarch_ecoff_reg_to_regnum calls.
3468
3469 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
3470
3471         PR c++/23373
3472         * c-typeprint.c (c_type_print_base_struct_union): Don't print
3473         offsets/sizes for static members of a class/struct.
3474
3475 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
3476
3477         * target-descriptions.c (tdesc_register_bitsize): Rename.
3478         * target-descriptions.h (tdesc_register_bitsize): Likewise.
3479         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
3480         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
3481
3482 2018-07-10  Tom Tromey  <tom@tromey.com>
3483
3484         * breakpoint.c (moribund_locations): Now static and a
3485         std::vector.
3486         (breakpoint_init_inferior, moribund_breakpoint_here_p)
3487         (build_bpstat_chain, update_global_location_list)
3488         (breakpoint_retire_moribund): Update.
3489         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
3490         VEC.
3491
3492 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
3493
3494         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
3495         (riscv_register_reggroup_p): Use new function, remove unneeded
3496         parenthesis.
3497         (riscv_push_dummy_call): Extend assert to compare against xlen or
3498         flen based on register type.
3499
3500 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
3501
3502         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
3503
3504 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
3505
3506         * remote.c (show_hardware_watchpoint_limit): New function.
3507         (show_hardware_watchpoint_length_limit): New function.
3508         (show_hardware_breakpoint_limit): New function.
3509         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
3510         where appropriate, update help text.
3511
3512 2018-07-09  Tom Tromey  <tom@tromey.com>
3513
3514         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
3515         (CLIBS): Don't mention NAT_CLIBS.
3516
3517 2018-07-09  Tom Tromey  <tom@tromey.com>
3518
3519         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
3520         (LIBGDB_OBS, clean mostlyclean): Update.
3521         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
3522
3523 2018-07-09  Tom Tromey  <tom@tromey.com>
3524
3525         * Makefile.in (%.c: %.y): Use ECHO_YACC.
3526         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
3527         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
3528
3529 2018-07-09  Tom Tromey  <tom@tromey.com>
3530
3531         * Makefile.in (ALLDEPFILES): Remove exec.c.
3532         (COMMON_OBS): Remove exec.o.
3533         (COMMON_SFILES): Add exec.c.
3534
3535 2018-07-09  Tom Tromey  <tom@tromey.com>
3536
3537         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
3538
3539 2018-07-09  Tom Tromey  <tom@tromey.com>
3540
3541         * Makefile.in (clean mostlyclean): Remove stamp-version.
3542         (version.c): Depend on stamp-version.
3543         (stamp-version): New rule, from version.c rule.
3544
3545 2018-07-09  Tom Tromey  <tom@tromey.com>
3546
3547         * Makefile.in (init.c): Depend on stamp-init.
3548         (stamp-init): New rule, from init.c rule.
3549         (clean mostlyclean): Remove stamp-init.
3550
3551 2018-07-09  Tom Tromey  <tom@tromey.com>
3552
3553         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
3554         SUBDIR_GCC_COMPILE_SRCS.
3555
3556 2018-07-09  Tom Tromey  <tom@tromey.com>
3557
3558         * Makefile.in (init.c): Remove some unused sed rules.
3559
3560 2018-07-09  Tom Tromey  <tom@tromey.com>
3561
3562         * Makefile.in (TSOBS): Remove.
3563         (INIT_FILES): Update.
3564         (LIBGDB_OBS): Update.
3565         (COMMON_SFILES): Add inflow.c.
3566         (SFILES): Remove inflow.c.
3567
3568 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
3569
3570         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
3571
3572 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
3573
3574         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
3575         get_saveloc_name, is_signal_frame_name, step_name,
3576         init_remote_name, create_addr_space_name,
3577         destroy_addr_space_name, search_unwind_table_name,
3578         find_dyn_list_name): Constify.
3579
3580 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
3581
3582         * darwin-nat.c (darwin_pthread_kill): New function.
3583         (darwin_resume_thread): Use darwin_pthread_kill.
3584
3585 2018-07-05  Tom de Vries  <tdevries@suse.de>
3586
3587         * macroexp.c (macro_buffer) <operator=>: New member function.
3588
3589 2018-07-04  Tom Tromey  <tom@tromey.com>
3590
3591         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
3592
3593 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
3594
3595         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
3596         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
3597         * maint.c: Likewise.
3598         * top.c: Likewise.
3599
3600 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
3601
3602         * NEWS: Create a new section for the next release branch.
3603         Rename the section of the current branch, now that it has
3604         been cut.
3605
3606 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
3607
3608         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
3609         * version.in: Bump version to 8.2.50.DATE-git.
3610
3611 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
3612             Pedro Alves  <palves@redhat.com>
3613
3614         * linux-nat.c (linux_init_ptrace): Rename to ...
3615         (linux_init_ptrace_procfs): ... this.  Call
3616         linux_proc_init_warnings.
3617         (linux_nat_target::post_attach)
3618         (linux_nat_target::post_startup_inferior): Adjust.
3619         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
3620         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
3621
3622 2018-07-04  Tom de Vries  <tdevries@suse.de>
3623
3624         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
3625         check ...
3626         (read_comp_unit_head): ... here.
3627
3628 2018-07-03  Tom Tromey  <tom@tromey.com>
3629
3630         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
3631         (stop_tracing, tstatus_command)
3632         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
3633         (print_one_static_tracepoint_marker): Update.
3634         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
3635         std::vector.
3636         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
3637         VEC.
3638         (all_tracepoints, static_tracepoints_here): Return std::vector.
3639
3640 2018-07-03  Tom Tromey  <tom@tromey.com>
3641
3642         * common/ptid.c (ptid_equal): Remove.
3643         * common/ptid.h (ptid_equal): Don't declare.
3644         * ada-tasks.c: Update.
3645         * breakpoint.c: Update.
3646         * common/agent.c: Update.
3647         * corelow.c: Update.
3648         * darwin-nat-info.c: Update.
3649         * darwin-nat.c: Update.
3650         * dcache.c: Update.
3651         * dtrace-probe.c: Update.
3652         * dummy-frame.c: Update.
3653         * fbsd-nat.c: Update.
3654         * frame.c: Update.
3655         * gdbthread.h: Update.
3656         * gnu-nat.c: Update.
3657         * go32-nat.c: Update.
3658         * inf-loop.c: Update.
3659         * inf-ptrace.c: Update.
3660         * infcall.c: Update.
3661         * infcmd.c: Update.
3662         * inflow.c: Update.
3663         * infrun.c: Update.
3664         * linux-fork.c: Update.
3665         * linux-nat.c: Update.
3666         * linux-thread-db.c: Update.
3667         * mi/mi-cmd-var.c: Update.
3668         * mi/mi-interp.c: Update.
3669         * mi/mi-main.c: Update.
3670         * nto-procfs.c: Update.
3671         * ppc-linux-tdep.c: Update.
3672         * procfs.c: Update.
3673         * python/py-inferior.c: Update.
3674         * python/py-record-btrace.c: Update.
3675         * python/py-record.c: Update.
3676         * ravenscar-thread.c: Update.
3677         * regcache.c: Update.
3678         * remote-sim.c: Update.
3679         * remote.c: Update.
3680         * sol-thread.c: Update.
3681         * solib.c: Update.
3682         * target.c: Update.
3683         * tui/tui-stack.c: Update.
3684         * varobj.c: Update.
3685         * windows-nat.c: Update.
3686         * windows-tdep.c: Update.
3687
3688 2018-07-03  Tom Tromey  <tom@tromey.com>
3689
3690         * common/ptid.c (ptid_match): Remove.
3691         * common/ptid.h (ptid_match): Don't declare.
3692         * fbsd-nat.c: Update.
3693         * infcmd.c: Update.
3694         * infrun.c: Update.
3695         * linux-nat.c: Update.
3696         * record-btrace.c: Update.
3697         * regcache.c: Update.
3698         * remote.c: Update.
3699
3700 2018-07-03  Tom Tromey  <tom@tromey.com>
3701
3702         * common/ptid.c (ptid_tid_p): Remove.
3703         * common/ptid.h (ptid_tid_p): Don't declare.
3704         * sol-thread.c: Update.
3705
3706 2018-07-03  Tom Tromey  <tom@tromey.com>
3707
3708         * common/ptid.c (ptid_lwp_p): Remove.
3709         * common/ptid.h (ptid_lwp_p): Don't declare.
3710         * fbsd-nat.c: Update.
3711         * linux-nat.c: Update.
3712         * nat/linux-procfs.c: Update.
3713         * nat/x86-linux-dregs.c: Update.
3714         * sol-thread.c: Update.
3715
3716 2018-07-03  Tom Tromey  <tom@tromey.com>
3717
3718         * common/ptid.c (ptid_is_pid): Remove.
3719         * common/ptid.h (ptid_is_pid): Don't declare.
3720         * infrun.c: Update.
3721         * linux-nat.c: Update.
3722         * mi/mi-interp.c: Update.
3723         * remote.c: Update.
3724         * thread.c: Update.
3725
3726 2018-07-03  Tom Tromey  <tom@tromey.com>
3727
3728         * common/ptid.c (ptid_get_tid): Remove.
3729         * common/ptid.h (ptid_get_tid): Don't declare.
3730         * ada-tasks.c: Update.
3731         * aix-thread.c: Update.
3732         * bsd-uthread.c: Update.
3733         * darwin-nat.c: Update.
3734         * fbsd-nat.c: Update.
3735         * i386-darwin-nat.c: Update.
3736         * infrun.c: Update.
3737         * linux-tdep.c: Update.
3738         * nto-procfs.c: Update.
3739         * ppc-ravenscar-thread.c: Update.
3740         * python/py-infthread.c: Update.
3741         * ravenscar-thread.c: Update.
3742         * sol-thread.c: Update.
3743         * sparc-ravenscar-thread.c: Update.
3744         * windows-nat.c: Update.
3745
3746 2018-07-03  Tom Tromey  <tom@tromey.com>
3747
3748         * common/ptid.c (ptid_get_lwp): Remove.
3749         * common/ptid.h (ptid_get_lwp): Don't declare.
3750         * aarch64-linux-nat.c: Update.
3751         * ada-tasks.c: Update.
3752         * aix-thread.c: Update.
3753         * amd64-linux-nat.c: Update.
3754         * arm-linux-nat.c: Update.
3755         * corelow.c: Update.
3756         * fbsd-nat.c: Update.
3757         * fbsd-tdep.c: Update.
3758         * gnu-nat.c: Update.
3759         * i386-cygwin-tdep.c: Update.
3760         * i386-gnu-nat.c: Update.
3761         * i386-linux-nat.c: Update.
3762         * ia64-linux-nat.c: Update.
3763         * inf-ptrace.c: Update.
3764         * infrun.c: Update.
3765         * linux-fork.c: Update.
3766         * linux-nat.c: Update.
3767         * linux-tdep.c: Update.
3768         * linux-thread-db.c: Update.
3769         * mips-linux-nat.c: Update.
3770         * nat/aarch64-linux-hw-point.c: Update.
3771         * nat/aarch64-linux.c: Update.
3772         * nat/linux-btrace.c: Update.
3773         * nat/linux-osdata.c: Update.
3774         * nat/linux-procfs.c: Update.
3775         * nat/x86-linux-dregs.c: Update.
3776         * obsd-nat.c: Update.
3777         * ppc-fbsd-nat.c: Update.
3778         * ppc-linux-nat.c: Update.
3779         * procfs.c: Update.
3780         * python/py-infthread.c: Update.
3781         * ravenscar-thread.c: Update.
3782         * remote.c: Update.
3783         * s390-linux-nat.c: Update.
3784         * sol-thread.c: Update.
3785         * sol2-tdep.c: Update.
3786         * spu-linux-nat.c: Update.
3787         * x86-linux-nat.c: Update.
3788         * xtensa-linux-nat.c: Update.
3789
3790 2018-07-03  Tom Tromey  <tom@tromey.com>
3791
3792         * common/ptid.c (ptid_get_pid): Remove.
3793         * common/ptid.h (ptid_get_pid): Don't declare.
3794         * aarch64-linux-nat.c: Update.
3795         * ada-lang.c: Update.
3796         * aix-thread.c: Update.
3797         * alpha-bsd-nat.c: Update.
3798         * amd64-fbsd-nat.c: Update.
3799         * amd64-linux-nat.c: Update.
3800         * arm-linux-nat.c: Update.
3801         * arm-nbsd-nat.c: Update.
3802         * auxv.c: Update.
3803         * break-catch-syscall.c: Update.
3804         * breakpoint.c: Update.
3805         * bsd-uthread.c: Update.
3806         * corelow.c: Update.
3807         * ctf.c: Update.
3808         * darwin-nat.c: Update.
3809         * fbsd-nat.c: Update.
3810         * fbsd-tdep.c: Update.
3811         * gcore.c: Update.
3812         * gnu-nat.c: Update.
3813         * hppa-nbsd-nat.c: Update.
3814         * hppa-obsd-nat.c: Update.
3815         * i386-fbsd-nat.c: Update.
3816         * ia64-linux-nat.c: Update.
3817         * inf-ptrace.c: Update.
3818         * infcmd.c: Update.
3819         * inferior.c: Update.
3820         * inferior.h: Update.
3821         * inflow.c: Update.
3822         * infrun.c: Update.
3823         * linux-fork.c: Update.
3824         * linux-nat.c: Update.
3825         * linux-tdep.c: Update.
3826         * linux-thread-db.c: Update.
3827         * m68k-bsd-nat.c: Update.
3828         * mi/mi-interp.c: Update.
3829         * mi/mi-main.c: Update.
3830         * mips-linux-nat.c: Update.
3831         * mips-nbsd-nat.c: Update.
3832         * mips64-obsd-nat.c: Update.
3833         * nat/aarch64-linux-hw-point.c: Update.
3834         * nat/aarch64-linux.c: Update.
3835         * nat/linux-btrace.c: Update.
3836         * nat/linux-osdata.c: Update.
3837         * nat/linux-procfs.c: Update.
3838         * nat/x86-linux-dregs.c: Update.
3839         * nto-procfs.c: Update.
3840         * obsd-nat.c: Update.
3841         * ppc-linux-nat.c: Update.
3842         * ppc-nbsd-nat.c: Update.
3843         * ppc-obsd-nat.c: Update.
3844         * proc-service.c: Update.
3845         * procfs.c: Update.
3846         * python/py-inferior.c: Update.
3847         * python/py-infthread.c: Update.
3848         * ravenscar-thread.c: Update.
3849         * record.c: Update.
3850         * remote-sim.c: Update.
3851         * remote.c: Update.
3852         * rs6000-nat.c: Update.
3853         * s390-linux-nat.c: Update.
3854         * sh-nbsd-nat.c: Update.
3855         * sol-thread.c: Update.
3856         * sparc-nat.c: Update.
3857         * sparc64-tdep.c: Update.
3858         * spu-linux-nat.c: Update.
3859         * spu-tdep.c: Update.
3860         * target-debug.h: Update.
3861         * target.c: Update.
3862         * thread.c: Update.
3863         * tid-parse.c: Update.
3864         * tracefile-tfile.c: Update.
3865         * vax-bsd-nat.c: Update.
3866         * windows-nat.c: Update.
3867         * x86-linux-nat.c: Update.
3868         * x86-nat.c: Update.
3869
3870 2018-07-03  Tom Tromey  <tom@tromey.com>
3871
3872         * common/ptid.c (pid_to_ptid): Remove.
3873         * common/ptid.h (pid_to_ptid): Don't declare.
3874         * aix-thread.c: Update.
3875         * arm-linux-nat.c: Update.
3876         * common/ptid.c: Update.
3877         * common/ptid.h: Update.
3878         * corelow.c: Update.
3879         * ctf.c: Update.
3880         * darwin-nat.c: Update.
3881         * fbsd-nat.c: Update.
3882         * fork-child.c: Update.
3883         * gnu-nat.c: Update.
3884         * go32-nat.c: Update.
3885         * inf-ptrace.c: Update.
3886         * infcmd.c: Update.
3887         * inferior.c: Update.
3888         * infrun.c: Update.
3889         * linux-fork.c: Update.
3890         * linux-nat.c: Update.
3891         * nat/aarch64-linux-hw-point.c: Update.
3892         * nat/fork-inferior.c: Update.
3893         * nat/x86-linux-dregs.c: Update.
3894         * nto-procfs.c: Update.
3895         * obsd-nat.c: Update.
3896         * procfs.c: Update.
3897         * progspace.c: Update.
3898         * remote.c: Update.
3899         * rs6000-nat.c: Update.
3900         * s390-linux-nat.c: Update.
3901         * sol-thread.c: Update.
3902         * spu-linux-nat.c: Update.
3903         * target.c: Update.
3904         * top.c: Update.
3905         * tracefile-tfile.c: Update.
3906         * windows-nat.c: Update.
3907
3908 2018-07-03  Tom Tromey  <tom@tromey.com>
3909
3910         * common/ptid.h (ptid_build): Don't declare.
3911         * common/ptid.c (ptid_build): Remove.
3912         * aix-thread.c: Update.
3913         * bsd-kvm.c: Update.
3914         * bsd-uthread.c: Update.
3915         * common/agent.c: Update.
3916         * common/ptid.c: Update.
3917         * common/ptid.h: Update.
3918         * corelow.c: Update.
3919         * darwin-nat.c: Update.
3920         * fbsd-nat.c: Update.
3921         * gnu-nat.c: Update.
3922         * linux-fork.c: Update.
3923         * linux-nat.c: Update.
3924         * linux-thread-db.c: Update.
3925         * nat/linux-osdata.c: Update.
3926         * nat/linux-procfs.c: Update.
3927         * nto-procfs.c: Update.
3928         * obsd-nat.c: Update.
3929         * proc-service.c: Update.
3930         * procfs.c: Update.
3931         * ravenscar-thread.c: Update.
3932         * remote-sim.c: Update.
3933         * remote.c: Update.
3934         * sol-thread.c: Update.
3935         * target.c: Update.
3936         * windows-nat.c: Update.
3937
3938 2018-07-03  Tom Tromey  <tom@tromey.com>
3939
3940         * infrun.c (follow_exec): Use exit_inferior_silent.
3941         * inferior.c (exit_inferior_num_silent): Remove.
3942         * inferior.h (exit_inferior_num_silent): Don't declare.
3943
3944 2018-07-03  Tom Tromey  <tom@tromey.com>
3945
3946         PR cli/23340:
3947         * darwin-nat.c (darwin_attach_pid): Reset inferior and
3948         inferior_ptid on error.
3949
3950 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
3951             Simon Marchi  <simon.marchi@polymtl.ca>
3952
3953         PR tdep/8282
3954         * disasm.h (gdb_disassembler): Add
3955         `m_disassembler_options_holder'. member
3956         * disasm.c (get_all_disassembler_options): New function.
3957         (gdb_disassembler::gdb_disassembler): Use it.
3958         (gdb_buffered_insn_length_init_dis): Likewise.
3959         (gdb_buffered_insn_length): Adjust accordingly.
3960         (set_disassembler_options): Handle options with arguments.
3961         (show_disassembler_options_sfunc): Likewise.  Add a leading new
3962         line if showing options with descriptions.
3963         (disassembler_options_completer): Adapt to using the
3964         `disasm_options_and_args_t' structure.
3965         * mips-tdep.c (mips_disassembler_options): New variable.
3966         (mips_disassembler_options_o32): Likewise.
3967         (mips_disassembler_options_n32): Likewise.
3968         (mips_disassembler_options_n64): Likewise.
3969         (gdb_print_insn_mips): Don't set `disassembler_options'.
3970         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
3971         functions.
3972         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
3973         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
3974         `gdbarch_disassembler_options_implicit' and
3975         `gdbarch_valid_disassembler_options'.
3976         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
3977         `disasm_options_and_args_t' structure.
3978         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
3979         method.
3980         (valid_disassembler_options): Switch from `disasm_options_t' to
3981         the `disasm_options_and_args_t' structure.
3982         * NEWS: Document `set disassembler-options' support for the MIPS
3983         target.
3984         * gdbarch.h: Regenerate.
3985         * gdbarch.c: Regenerate.
3986
3987 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
3988
3989         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
3990
3991 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
3992
3993         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
3994         parameter in call to amd64_target_description.
3995         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
3996         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
3997         (amd64fbsd_init_abi): Likewise.
3998         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
3999         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
4000         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
4001         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
4002
4003 2018-06-29  Pedro Alves  <palves@redhat.com>
4004
4005         * gdb/amd64-tdep.h (amd64_create_target_description): Add
4006         "segments" parameter.
4007         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
4008         (_initialize_amd64_tdep): Update call to
4009         amd64_create_target_description.
4010         (amd64_target_description): Add "segments" parameter.  Adjust
4011         the implementation to use it.
4012         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
4013         call to amd64_create_target_description.
4014         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
4015         * gdb/arch/amd64.h (amd64_create_target_description): Add
4016         "segments" register.
4017         * gdb/arch/amd64.c (amd64_create_target_description): Add
4018         "segments" parameter.  Call create_feature_i386_64bit_segments
4019         only if SEGMENTS is true.
4020         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
4021         call to amd64_create_target_description.
4022
4023 2018-06-29  Pedro Alves  <palves@redhat.com>
4024
4025         * thread.c (thread_target_id_str): New, factored out from ...
4026         (print_thread_info_1): ... here.  Use it to compute the max
4027         "Target Id" column width.
4028
4029 2018-06-29  Pedro Alves  <palves@redhat.com>
4030
4031         * remote.c (remote_target::extra_thread_info): Delete
4032         'display_buf' and 'n' locals.  from the cache, regardless of
4033         packet mechanims is in use.  Use cache for qThreadExtra and qP
4034         methods too.
4035
4036 2018-06-29  Pedro Alves  <palves@redhat.com>
4037
4038         * blockframe.c (find_pc_sect_containing_function): New function.
4039         * breakpoint.c (print_breakpoint_location): Don't call
4040         find_pc_sect_function.
4041         * linespec.c (create_sals_line_offset): Record the location's
4042         symbol in the sal.
4043         * linespec.c (convert_address_location_to_sals): Fill in sal's
4044         symbol with find_pc_sect_containing_function.
4045         * symtab.c (find_function_start_sal): Rename to ...
4046         (find_function_start_sal_1): ... this.
4047         (find_function_start_sal): Reimplement as wrapper around
4048         find_function_start_sal_1, and use
4049         find_pc_sect_containing_function to fill in the sal's symbol.
4050         (find_function_start_sal(symbol*, bool)): Adjust.
4051         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
4052         comments.
4053         (find_pc_sect_containing_function): Declare.
4054
4055 2018-06-29  Pedro Alves  <palves@redhat.com>
4056
4057         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
4058         true if the the location has no symbol.
4059
4060 2018-06-28  Tom Tromey  <tom@tromey.com>
4061
4062         * NEWS: Mention --enable-codesign.
4063         * silent-rules.mk (ECHO_SIGN): New variable.
4064         * configure.ac: Add --enable-codesign.
4065         * configure: Rebuild.
4066         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
4067         (gdb$(EXEEXT)): Optionally invoke codesign.
4068
4069 2018-06-28  Pedro Alves  <palves@redhat.com>
4070
4071         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
4072         comments.
4073         (switch_to_thread_no_regs): Adjust comment.
4074         * infcmd.c (stop_pc): Delete.
4075         (post_create_inferior, info_program_command): Replace references
4076         to stop_pc with references to thread_info->suspend.stop_pc.
4077         * inferior.h (stop_pc): Delete declaration.
4078         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
4079         (handle_inferior_event_1, handle_signal_stop)
4080         (process_event_stop_test, keep_going_stepped_thread)
4081         (handle_step_into_function, handle_step_into_function_backward)
4082         (print_stop_location): Replace references to stop_pc with
4083         references to thread_info->suspend.stop_pc.
4084         (struct infcall_suspend_state) <stop_pc>: Delete field.
4085         (save_infcall_suspend_state, restore_infcall_suspend_state):
4086         Remove references to inf_stat->stop_pc.
4087         * linux-fork.c (fork_load_infrun_state): Likewise.
4088         * record-btrace.c (record_btrace_set_replay): Likewise.
4089         * record-full.c (record_full_goto_entry): Likewise.
4090         * remote.c (print_one_stopped_thread): Likewise.
4091         * target.c (target_resume): Extend comment.
4092         * thread.c (set_executing_thread): New.
4093         (set_executing): Use it.
4094         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
4095         Remove references to stop_pc.
4096
4097 2018-06-28  Pedro Alves  <palves@redhat.com>
4098
4099         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
4100         Moving fetching stop_pc until after ecs->event_thread is refreshed.
4101
4102 2018-06-28  Tom Tromey  <tom@tromey.com>
4103
4104         * coffread.c (coff_symfile_finish): Update.
4105         * xcoffread.c (xcoff_symfile_finish): Update.
4106         * elfread.c (elf_symfile_finish): Update.
4107         * symfile.h (dwarf2_free_objfile): Don't declare.
4108         * dwarf2read.c (_initialize_dwarf2_read): Use
4109         register_objfile_data_with_cleanup.
4110         (dwarf2_free_objfile): Now static.  Change signature.
4111
4112 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4113
4114         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
4115         option "-o" to add-symbol-file-load to add an offset to each
4116         section's load address.
4117         * symfile.c (set_objfile_default_section_offset): New function.
4118
4119 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4120
4121         * symfile.c (add_symbol_file_command): Make sure that sections
4122         with the same name are sorted in the same order.
4123
4124 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4125
4126         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
4127         require the second argument.  If omitted, load sections at the
4128         addresses specified in the file.
4129
4130 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4131
4132         * symfile.c (symbol_file_command, symbol_file_add_main_1)
4133         (_initialize_symfile): Add option "-o" to symbol-file to add an
4134         offset to each section of the symbol file.
4135
4136 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4137
4138         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
4139
4140 2018-06-27  Tom Tromey  <tom@tromey.com>
4141
4142         * stack.c (_initialize_stack): Update "func" help text.
4143
4144 2018-06-27  Tom Tromey  <tom@tromey.com>
4145
4146         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
4147         std::vector.
4148         (unwind_infopy_str, pyuw_create_unwind_info)
4149         (unwind_infopy_add_saved_register, pyuw_sniffer)
4150         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
4151         Update.
4152         (struct saved_reg): Add constructor.
4153         <value>: Now a gdbpy_ref<>.
4154
4155 2018-06-27  Tom Tromey  <tom@tromey.com>
4156
4157         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
4158
4159 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4160
4161         * gdb-gdb.py.in: Format using autopep8.
4162
4163 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4164
4165         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
4166         (type_lookup_function): Recognize CORE_ADDR values.
4167
4168 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4169
4170         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
4171         print tag_name.
4172
4173 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4174
4175         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
4176         <__lt__>: Add.
4177
4178 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4179
4180         * gdb-gdb.py: Move to...
4181         * gdb-gdb.py.in: ... here.
4182         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
4183         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
4184         dependencies.
4185         (distclean): Remove gdb-gdb.py when cleaning.
4186         (gdb-gdb.py, gdb-gdb.gdb): New rules.
4187         * configure: Re-generate.
4188
4189 2018-06-27  Pedro Alves  <palves@redhat.com>
4190
4191         * proc-service.c (get_ps_regcache): New.
4192         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4193         (ps_lsetfpregs): Use it.
4194
4195 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
4196
4197         PR gdb/21695
4198         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
4199         (dwarf_decode_lines_1): Adjust.
4200
4201 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4202
4203         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
4204         override.
4205         <info_proc>: Likewise.
4206
4207 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
4208
4209         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
4210         to windows_fetch_one_register, and only handle the case of
4211         fetching one register.  Move the code that reloads the context
4212         and iterates over all registers if R is negative to...
4213         (windows_nat_target::fetch_registers): ... here.
4214         (do_windows_store_inferior_registers): Rename to
4215         windows_store_one_register, and only handle the case of storing
4216         one register.  Move the code that handles the case where r is
4217         negative to...
4218         (windows_nat_target::store_registers) ... here.
4219
4220 2018-06-26  Tom Tromey  <tom@tromey.com>
4221
4222         PR rust/22574:
4223         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
4224         * rust-lang.c (rust_print_struct_def): Add podata parameter.
4225         Update.
4226         (rust_internal_print_type): Add podata parameter.
4227         (rust_print_type): Update.
4228
4229 2018-06-26  Tom Tromey  <tom@tromey.com>
4230
4231         * typeprint.h (struct print_offset_data) <update, finish,
4232         maybe_print_hole>: New methods.
4233         <indentation>: New constant.
4234         * typeprint.c (print_offset_data::indentation): Define.
4235         (print_offset_data::maybe_print_hole, print_offset_data::update)
4236         (print_offset_data::finish): Move from c-typeprint.c and rename.
4237         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
4238         (print_spaces_filtered_with_print_options): Update.
4239         (c_print_type_union_field_offset, maybe_print_hole)
4240         (c_print_type_struct_field_offset): Move to typeprint.c and
4241         rename.
4242         (c_type_print_base_struct_union): Update.
4243
4244 2018-06-25  Pedro Alves  <palves@redhat.com>
4245
4246         * gdbthread.h (thread_info_ref, delete_thread)
4247         (delete_thread_silent, first_thread_of_inferior)
4248         (any_thread_of_inferior, switch_to_thread)
4249         (enable_thread_stack_temporaries)
4250         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4251         (get_last_thread_stack_temporary)
4252         (value_in_thread_stack_temporaries, can_access_registers_thread):
4253         Spell out "struct thread_info" instead of just "thread_info".
4254         * inferior.h (notice_new_inferior): Likewise.
4255
4256 2018-06-25  Pedro Alves  <palves@redhat.com>
4257
4258         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
4259         pass thread_info pointer to delete_thread.
4260         (windows_nat_target::detach): Pass inferior pointer to
4261         detach_inferior.
4262         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
4263         delete_thread.
4264         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
4265         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
4266         and pass a thread_info pointer to delete_thread.
4267         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
4268         pass thread_info pointer to delete_thread.
4269         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
4270         delete_thread_silent call.
4271         * procfs.c (procfs_target::detach): Pass inferior pointer to
4272         detach_inferior.
4273         (procfs_target::wait): Pass thread_info pointer to delete_thread.
4274         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
4275         delete_thread_silent call.
4276         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
4277         pass thread_info pointer to delete_thread.
4278         (windows_nat_target::detach): Pass inferior pointer to
4279         delete_inferior.
4280
4281 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
4282
4283         * regcache.c (readable_regcache::read_part): Fix asserts.
4284         (reg_buffer::raw_collect_part): New function.
4285         (regcache::write_part): Fix asserts.
4286         (reg_buffer::raw_supply_part): New function.
4287         (regcache::transfer_regset_register): New helper function.
4288         (regcache::transfer_regset): Call new functions.
4289         (regcache_supply_regset): Use gdb_byte*.
4290         (regcache::supply_regset): Likewise.
4291         (regcache_collect_regset): Likewise.
4292         (regcache::collect_regset): Likewise.
4293         * regcache.h (reg_buffer::raw_collect_part): New declaration.
4294         (reg_buffer::raw_supply_part): Likewise.
4295         (regcache::transfer_regset_register): Likewise.
4296         (regcache::transfer_regset): Use gdb_byte*.
4297
4298 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
4299
4300         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
4301
4302 2018-06-21  Pedro Alves  <palves@redhat.com>
4303
4304         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
4305         instead of a ptid_t.  All callers adjusted.
4306         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
4307         adjusted.
4308         (print_ada_task_info, display_current_task_id, task_command_1):
4309         Adjust.
4310         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
4311         inferior_thread.
4312         (breakpoint_kind): Adjust.
4313         (remove_breakpoints_pid): Rename to ...
4314         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
4315         pointer.  All callers adjusted.
4316         (bpstat_clear_actions): Use inferior_thread.
4317         (get_bpstat_thread): New.
4318         (bpstat_do_actions): Use it.
4319         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
4320         to take a thread_info pointer.  All callers adjusted.
4321         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
4322         (breakpoint_re_set_thread): Use inferior_thread.
4323         * breakpoint.h (struct inferior): Forward declare.
4324         (bpstat_stop_status): Update.
4325         (remove_breakpoints_pid): Delete.
4326         (remove_breakpoints_inf): New.
4327         * bsd-uthread.c (bsd_uthread_target::wait)
4328         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
4329         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
4330         (maint_btrace_packet_history_cmd)
4331         (maint_btrace_clear_packet_history_cmd): Adjust.
4332         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
4333         inferior_thread.
4334         * cli/cli-interp.c: Include "inferior.h".
4335         * common/refcounted-object.h (struct
4336         refcounted_object_ref_policy): New.
4337         * compile/compile-object-load.c: Include gdbthread.h.
4338         (store_regs): Use inferior_thread.
4339         * corelow.c (core_target::close): Use current_inferior.
4340         (core_target_open): Adjust to use first_thread_of_inferior and use
4341         the current inferior.
4342         * ctf.c (ctf_target::close): Adjust to use current_inferior.
4343         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
4344         <thread>: ... this new field.  All references adjusted.
4345         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
4346         Take a thread_info pointer instead of a ptid_t.
4347         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
4348         (dummy_frame_discard, register_dummy_frame_dtor): Take a
4349         thread_info pointer instead of a ptid_t.
4350         * elfread.c: Include "inferior.h".
4351         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
4352         Use inferior_thread.
4353         * eval.c (evaluate_subexp): Likewise.
4354         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
4355         inferior_thread.
4356         * gdb_proc_service.h (struct thread_info): Forward declare.
4357         (struct ps_prochandle) <ptid>: Delete, replaced by ...
4358         <thread>: ... this new field.  All references adjusted.
4359         * gdbarch.h, gdbarch.c: Regenerate.
4360         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
4361         'thread' parameter.  All implementations and callers adjusted.
4362         * gdbthread.h (thread_info) <set_running>: New method.
4363         (delete_thread, delete_thread_silent): Take a thread_info pointer
4364         instead of a ptid.
4365         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
4366         (first_thread_of_process): Delete, replaced by ...
4367         (first_thread_of_inferior): ... this new function.  All callers
4368         adjusted.
4369         (any_live_thread_of_process): Delete, replaced by ...
4370         (any_live_thread_of_inferior): ... this new function.  All callers
4371         adjusted.
4372         (switch_to_thread, switch_to_no_thread): Declare.
4373         (is_executing): Delete.
4374         (enable_thread_stack_temporaries): Update comment.
4375         <enable_thread_stack_temporaries>: Take a thread_info pointer
4376         instead of a ptid_t.  Incref the thread.
4377         <~enable_thread_stack_temporaries>: Decref the thread.
4378         <m_ptid>: Delete
4379         <m_thr>: New.
4380         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4381         (get_last_thread_stack_temporary)
4382         (value_in_thread_stack_temporaries, can_access_registers_thread):
4383         Take a thread_info pointer instead of a ptid_t.  All callers
4384         adjusted.
4385         * infcall.c (get_call_return_value): Use inferior_thread.
4386         (run_inferior_call): Work with thread pointers instead of ptid_t.
4387         (call_function_by_hand_dummy): Work with thread pointers instead
4388         of ptid_t.  Use thread_info_ref.
4389         * infcmd.c (proceed_thread_callback): Access thread's state
4390         directly.
4391         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
4392         access thread's state directly.
4393         (continue_command): Use inferior_thread.
4394         (info_program_command): Use find_thread_ptid and access thread
4395         state directly.
4396         (proceed_after_attach_callback): Use thread state directly.
4397         (notice_new_inferior): Take a thread_info pointer instead of a
4398         ptid_t.  All callers adjusted.
4399         (exit_inferior): Take an inferior pointer instead of a pid.  All
4400         callers adjusted.
4401         (exit_inferior_silent): New.
4402         (detach_inferior): Delete.
4403         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
4404         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
4405         (detach_inferior_command, kill_inferior_command): Use
4406         find_inferior_id instead of valid_gdb_inferior_id and
4407         gdb_inferior_id_to_pid.
4408         (inferior_command): Use inferior and thread pointers.
4409         * inferior.h (struct thread_info): Forward declare.
4410         (notice_new_inferior): Take a thread_info pointer instead of a
4411         ptid_t.  All callers adjusted.
4412         (detach_inferior): Delete declaration.
4413         (exit_inferior, exit_inferior_silent): Take an inferior pointer
4414         instead of a pid.  All callers adjusted.
4415         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
4416         (valid_gdb_inferior_id): Delete.
4417         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
4418         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
4419         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
4420         ...
4421         <inf>: ... this new field.
4422         <step_ptid>: Delete, replaced by ...
4423         <step_thread>: ... this new field.
4424         (get_displaced_stepping_state): Take an inferior pointer instead
4425         of a pid.  All callers adjusted.
4426         (displaced_step_in_progress_any_inferior): Adjust.
4427         (displaced_step_in_progress_thread): Take a thread pointer instead
4428         of a ptid_t.  All callers adjusted.
4429         (displaced_step_in_progress, add_displaced_stepping_state): Take
4430         an inferior pointer instead of a pid.  All callers adjusted.
4431         (get_displaced_step_closure_by_addr): Adjust.
4432         (remove_displaced_stepping_state): Take an inferior pointer
4433         instead of a pid.  All callers adjusted.
4434         (displaced_step_prepare_throw, displaced_step_prepare)
4435         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
4436         All callers adjusted.
4437         (start_step_over): Adjust.
4438         (infrun_thread_ptid_changed): Remove bit updating ptids in the
4439         displaced step queue.
4440         (do_target_resume): Adjust.
4441         (fetch_inferior_event): Use inferior_thread.
4442         (context_switch, get_inferior_stop_soon): Take an
4443         execution_control_state pointer instead of a ptid_t.  All callers
4444         adjusted.
4445         (switch_to_thread_cleanup): Delete.
4446         (stop_all_threads): Use scoped_restore_current_thread.
4447         * inline-frame.c: Include "gdbthread.h".
4448         (inline_state) <inline_state>: Take a thread pointer instead of a
4449         ptid_t.  All callers adjusted.
4450         <ptid>: Delete, replaced by ...
4451         <thread>: ... this new field.
4452         (find_inline_frame_state): Take a thread pointer instead of a
4453         ptid_t.  All callers adjusted.
4454         (skip_inline_frames, step_into_inline_frame)
4455         (inline_skipped_frames, inline_skipped_symbol): Take a thread
4456         pointer instead of a ptid_t.  All callers adjusted.
4457         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
4458         (inline_skipped_frames, inline_skipped_symbol): Likewise.
4459         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
4460         pointers directly.
4461         * linux-nat.c (get_detach_signal): Likewise.
4462         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
4463         (thread_db_notice_clone): Adjust.
4464         (thread_db_find_new_threads_silently)
4465         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
4466         a thread pointer instead of a ptid_t.  All callers adjusted.
4467         * mi/mi-cmd-var.c: Include "inferior.h".
4468         (mi_cmd_var_update_iter): Update to use thread pointers.
4469         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
4470         inferior directly.
4471         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
4472         out to ...
4473         (mi_output_running): ... this new function.
4474         (mi_on_resume_1): Adjust to use it.
4475         (mi_user_selected_context_changed): Adjust to use inferior_thread.
4476         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
4477         directly.
4478         (interrupt_thread_callback): : Adjust to use thread and inferior
4479         pointers.
4480         * proc-service.c: Include "gdbthread.h".
4481         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
4482         * progspace-and-thread.c: Include "inferior.h".
4483         * progspace.c: Include "inferior.h".
4484         * python/py-exitedevent.c (create_exited_event_object): Adjust to
4485         hold a reference to an inferior_object.
4486         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
4487         inferior_thread.
4488         * python/py-inferior.c (struct inferior_object): Give the type a
4489         tag name instead of a typedef.
4490         (python_on_normal_stop): No need to check if the current thread is
4491         listed.
4492         (inferior_to_inferior_object): Change return type to
4493         inferior_object.  All callers adjusted.
4494         (find_thread_object): Delete, bits factored out to ...
4495         (thread_to_thread_object): ... this new function.
4496         * python/py-infthread.c (create_thread_object): Use
4497         inferior_to_inferior_object.
4498         (thpy_is_stopped): Use thread pointer directly.
4499         (gdbpy_selected_thread): Use inferior_thread.
4500         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
4501         field, replaced with ...
4502         <thread>: ... this new field.  All users adjusted.
4503         (btpy_insn_or_gap_new): Drop const.
4504         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
4505         callers adjusted.
4506         * python/py-record.c: Include "gdbthread.h".
4507         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
4508         a ptid_t.  All callers adjusted.
4509         (gdbpy_current_recording): Use inferior_thread.
4510         * python/py-record.h (recpy_record_object) <ptid>: Delete
4511         field, replaced with ...
4512         <thread>: ... this new field.  All users adjusted.
4513         (recpy_element_object) <ptid>: Delete
4514         field, replaced with ...
4515         <thread>: ... this new field.  All users adjusted.
4516         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
4517         a ptid_t.  All callers adjusted.
4518         * python/py-threadevent.c: Include "gdbthread.h".
4519         (get_event_thread): Use thread_to_thread_object.
4520         * python/python-internal.h (struct inferior_object): Forward
4521         declare.
4522         (find_thread_object, find_inferior_object): Delete declarations.
4523         (thread_to_thread_object, inferior_to_inferior_object): New
4524         declarations.
4525         * record-btrace.c: Include "inferior.h".
4526         (require_btrace_thread): Use inferior_thread.
4527         (record_btrace_frame_sniffer)
4528         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
4529         (get_thread_current_frame): Use scoped_restore_current_thread and
4530         switch_to_thread.
4531         (get_thread_current_frame): Use thread pointer directly.
4532         (record_btrace_replay_at_breakpoint): Use thread's inferior
4533         pointer directly.
4534         * record-full.c: Include "inferior.h".
4535         * regcache.c: Include "gdbthread.h".
4536         (get_thread_arch_regcache): Use the inferior's address space
4537         directly.
4538         (get_thread_regcache, registers_changed_thread): New.
4539         * regcache.h (get_thread_regcache(thread_info *thread)): New
4540         overload.
4541         (registers_changed_thread): New.
4542         (remote_target) <remote_detach_1>: Swap order of parameters.
4543         (remote_add_thread): <remote_add_thread>: Return the new thread.
4544         (get_remote_thread_info(ptid_t)): New overload.
4545         (remote_target::remote_notice_new_inferior): Use thread pointers
4546         directly.
4547         (remote_target::process_initial_stop_replies): Use
4548         thread_info::set_running.
4549         (remote_target::remote_detach_1, remote_target::detach)
4550         (extended_remote_target::detach): Adjust.
4551         * stack.c (frame_show_address): Use inferior_thread.
4552         * target-debug.h (target_debug_print_thread_info_pp): New.
4553         * target-delegates.c: Regenerate.
4554         * target.c (default_thread_address_space): Delete.
4555         (memory_xfer_partial_1): Use current_inferior.
4556         (target_detach): Use current_inferior.
4557         (target_thread_address_space): Delete.
4558         (generic_mourn_inferior): Use current_inferior.
4559         * target.h (struct target_ops) <thread_address_space>: Delete.
4560         (target_thread_address_space): Delete.
4561         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
4562         pointers directly.
4563         (delete_thread_1, delete_thread, delete_thread_silent): Take a
4564         thread pointer instead of a ptid_t.  Adjust all callers.
4565         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
4566         (first_thread_of_process): Delete, replaced by ...
4567         (first_thread_of_inferior): ... this new function.  All callers
4568         adjusted.
4569         (any_thread_of_process): Rename to ...
4570         (any_thread_of_inferior): ... this, and take an inferior pointer.
4571         (any_live_thread_of_process): Rename to ...
4572         (any_live_thread_of_inferior): ... this, and take an inferior
4573         pointer.
4574         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4575         (value_in_thread_stack_temporaries)
4576         (get_last_thread_stack_temporary): Take a thread pointer instead
4577         of a ptid_t.  Adjust all callers.
4578         (thread_info::set_running): New.
4579         (validate_registers_access): Use inferior_thread.
4580         (can_access_registers_ptid): Rename to ...
4581         (can_access_registers_thread): ... this, and take a thread
4582         pointer.
4583         (print_thread_info_1): Adjust to compare thread pointers instead
4584         of ptids.
4585         (switch_to_no_thread, switch_to_thread): Make extern.
4586         (scoped_restore_current_thread::~scoped_restore_current_thread):
4587         Use m_thread pointer directly.
4588         (scoped_restore_current_thread::scoped_restore_current_thread):
4589         Use inferior_thread.
4590         (thread_command): Use thread pointer directly.
4591         (thread_num_make_value_helper): Use inferior_thread.
4592         * top.c (execute_command): Use inferior_thread.
4593         * tui/tui-interp.c: Include "inferior.h".
4594         * varobj.c (varobj_create): Use inferior_thread.
4595         (value_of_root_1): Use find_thread_global_id instead of
4596         global_thread_id_to_ptid.
4597
4598 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
4599
4600         * regcache.c (readable_regcache::read_part): Avoid memcpy when
4601         possible.
4602         (regcache::write_part): Likewise.
4603         (readable_regcache::cooked_read_part): Update comment.
4604         (readable_regcache::cooked_write_part): Likewise.
4605         * regcache.h: (readable_regcache::read_part): Likewise.
4606         (regcache::write_part): Likewise.
4607
4608 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
4609             Dirk Schubert  <dirk.schubert@arm.com>
4610
4611         * aarch64-linux-nat.c (post_attach): New.
4612         (aarch64_linux_nat_target::post_attach): Override post_attach to
4613         record the number of hardware debug registers.
4614
4615 2018-06-20  Tom Tromey  <tom@tromey.com>
4616
4617         * python/py-param.c (add_setshow_generic): Make parameters const.
4618         (parmpy_init): Update.
4619
4620 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
4621
4622         * regcache.h (regcache_cooked_read_ftype): Rename to...
4623         (register_read_ftype): ...this, change type to function_view.
4624         (class reg_buffer) <save>: Remove src parameter.
4625         (readonly_detached_regcache) <readonly_detached_regcache>: Make
4626         parameter non-const in first overload.  Remove src parameter in
4627         second overload.
4628         * regcache.c (do_cooked_read): Remove.
4629         (readonly_detached_regcache::readonly_detached_regcache): Make
4630         parameter non-const, adjust call to other constructor.
4631         (reg_buffer::save): Remove src parameter.
4632         * frame.c (do_frame_register_read): Remove.
4633         (frame_save_as_regcache): Use lambda function.
4634         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
4635         parameter to ppu2spu_data *.
4636         (ppu2spu_sniffer): Use lambda function.
4637
4638 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
4639
4640         * record-full.c (record_full_target::insert_breakpoint): Remove
4641         "struct" keyword, add const.
4642
4643 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
4644
4645         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
4646         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
4647         * configure.ac: Remove AC_PREREQ, add missing quoting.
4648         * gnulib/configure.ac: Modernize usage of
4649         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
4650         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
4651         (AUTOMAKE_VERSION): Bump to 1.15.1.
4652         * configure: Re-generate.
4653         * config.in: Re-generate.
4654         * aclocal.m4: Re-generate.
4655         * gnulib/aclocal.m4: Re-generate.
4656         * gnulib/config.in: Re-generate.
4657         * gnulib/configure: Re-generate.
4658         * gnulib/import/Makefile.in: Re-generate.
4659
4660 2018-06-19  Pedro Alves  <palves@redhat.com>
4661
4662         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
4663         (lookup_minimal_symbol_by_pc_section): ... here with
4664         gdb_assert_not_reached added.
4665
4666 2018-06-19  Pedro Alves  <palves@redhat.com>
4667
4668         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
4669         parameter with a block parameter.  Compare location's block symbol
4670         with the frame's block instead of addresses.
4671         (skip_inline_frames): Pass the current block instead of the
4672         frame's address.  Break out as soon as we determine the frame
4673         should not be skipped.
4674
4675 2018-06-18  Tom Tromey  <tom@tromey.com>
4676
4677         * solib-aix.c (solib_aix_get_section_offsets): Return
4678         unique_xmalloc_ptr.
4679         (solib_aix_solib_create_inferior_hook): Update.
4680
4681 2018-06-18  Tom Tromey  <tom@tromey.com>
4682
4683         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
4684
4685 2018-06-18  Tom Tromey  <tom@tromey.com>
4686
4687         * solib-frv.c (frv_relocate_main_executable): Use
4688         unique_xmalloc_ptr.
4689         * solib-dsbt.c (dsbt_relocate_main_executable): Use
4690         unique_xmalloc_ptr.
4691
4692 2018-06-18  Tom Tromey  <tom@tromey.com>
4693
4694         * objfiles.h (inhibit_section_map_updates): Update.
4695         (resume_section_map_updates, resume_section_map_updates_cleanup):
4696         Remove.
4697         * solib-svr4.c (svr4_handle_solib_event): Update.
4698         * objfiles.c (inhibit_section_map_updates): Return
4699         scoped_restore_tmpl<int>.
4700         (resume_section_map_updates, resume_section_map_updates_cleanup):
4701         Remove.
4702
4703 2018-06-18  Tom Tromey  <tom@tromey.com>
4704
4705         * valprint.h (read_string): Update.
4706         * valprint.c (read_string): Change type of "buffer".
4707         (val_print_string): Update.
4708         * python/py-value.c (valpy_string): Update.
4709         * language.h (struct language_defn) <la_get_string>: Change
4710         type of "buffer".
4711         (default_get_string, c_get_string): Update.
4712         * language.c (default_get_string): Change type of "buffer".
4713         * guile/scm-value.c (gdbscm_value_to_string): Update.
4714         * c-lang.c (c_get_string): Change type of "buffer".
4715
4716 2018-06-18  Tom Tromey  <tom@tromey.com>
4717
4718         * ser-mingw.c (struct pipe_state_destroyer): New.
4719         (pipe_state_up): New typedef.
4720         (cleanup_pipe_state): Remove.
4721         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
4722
4723 2018-06-18  Tom Tromey  <tom@tromey.com>
4724
4725         * rust-lang.h (rust_yyerror): Don't declare.
4726         * rust-lang.c (rust_language_defn): Update.
4727         * rust-exp.y (yyerror): Now static.
4728         * parse.c (parse_exp_in_context_1): Update.
4729         * p-lang.h (p_yyerror): Don't declare.
4730         * p-lang.c (p_language_defn): Update.
4731         * p-exp.y (yyerror): Now static.
4732         * opencl-lang.c (opencl_language_defn): Update.
4733         * objc-lang.c (objc_language_defn): Update.
4734         * m2-lang.h (m2_yyerror): Don't declare.
4735         * m2-lang.c (m2_language_defn): Update.
4736         * m2-exp.y (yyerror): Now static.
4737         * language.h (struct language_defn) <la_error>: Remove.
4738         * language.c (unk_lang_error): Remove.
4739         (unknown_language_defn, auto_language_defn): Remove.
4740         * go-lang.h (go_yyerror): Don't declare.
4741         * go-lang.c (go_language_defn): Update.
4742         * go-exp.y (yyerror): Now static.
4743         * f-lang.h (f_yyerror): Don't declare.
4744         * f-lang.c (f_language_defn): Update.
4745         * f-exp.y (yyerror): Now static.
4746         * d-lang.h (d_yyerror): Don't declare.
4747         * d-lang.c (d_language_defn): Update.
4748         * d-exp.y (yyerror): Now static.
4749         * c-lang.h (c_yyerror): Don't declare.
4750         * c-lang.c (c_language_defn, cplus_language_defn)
4751         (asm_language_defn, minimal_language_defn): Update.
4752         * c-exp.y (yyerror): Now static.
4753         * ada-lang.h (ada_yyerror): Don't declare.
4754         * ada-lang.c (ada_language_defn): Update.
4755         * ada-exp.y (yyerror): Now static.
4756
4757 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
4758
4759         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
4760         (store_sveregs_to_thread): Likewise.
4761         (aarch64_linux_fetch_inferior_registers): Check for SVE.
4762         (aarch64_linux_store_inferior_registers): Likewise.
4763         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
4764         function.
4765         (aarch64_sve_regs_copy_to_regcache): Likewise.
4766         (aarch64_sve_regs_copy_from_regcache): Likewise.
4767         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
4768         declaration.
4769         (aarch64_sve_regs_copy_to_regcache): Likewise.
4770         (aarch64_sve_regs_copy_from_regcache): Likewise.
4771         (sve_context): Structure from Linux headers.
4772         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
4773         (SVE_SIG_ZREG_SIZE): Likewise.
4774         (SVE_SIG_PREG_SIZE): Likewise.
4775         (SVE_SIG_FFR_SIZE): Likewise.
4776         (SVE_SIG_REGS_OFFSET): Likewise.
4777         (SVE_SIG_ZREGS_OFFSET): Likewise.
4778         (SVE_SIG_ZREG_OFFSET): Likewise.
4779         (SVE_SIG_ZREGS_SIZE): Likewise.
4780         (SVE_SIG_PREGS_OFFSET): Likewise.
4781         (SVE_SIG_PREG_OFFSET): Likewise.
4782         (SVE_SIG_PREGS_SIZE): Likewise.
4783         (SVE_SIG_FFR_OFFSET): Likewise.
4784         (SVE_SIG_REGS_SIZE): Likewise.
4785         (SVE_SIG_CONTEXT_SIZE): Likewise.
4786         (SVE_PT_REGS_MASK): Likewise.
4787         (SVE_PT_REGS_FPSIMD): Likewise.
4788         (SVE_PT_REGS_SVE): Likewise.
4789         (SVE_PT_VL_INHERIT): Likewise.
4790         (SVE_PT_VL_ONEXEC): Likewise.
4791         (SVE_PT_REGS_OFFSET): Likewise.
4792         (SVE_PT_FPSIMD_OFFSET): Likewise.
4793         (SVE_PT_FPSIMD_SIZE): Likewise.
4794         (SVE_PT_SVE_ZREG_SIZE): Likewise.
4795         (SVE_PT_SVE_PREG_SIZE): Likewise.
4796         (SVE_PT_SVE_FFR_SIZE): Likewise.
4797         (SVE_PT_SVE_FPSR_SIZE): Likewise.
4798         (SVE_PT_SVE_FPCR_SIZE): Likewise.
4799         (__SVE_SIG_TO_PT): Likewise.
4800         (SVE_PT_SVE_OFFSET): Likewise.
4801         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
4802         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
4803         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
4804         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
4805         (SVE_PT_SVE_PREG_OFFSET): Likewise.
4806         (SVE_PT_SVE_PREGS_SIZE): Likewise.
4807         (SVE_PT_SVE_FFR_OFFSET): Likewise.
4808         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
4809         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
4810         (SVE_PT_SVE_SIZE): Likewise.
4811         (SVE_PT_SIZE): Likewise.
4812         (HAS_SVE_STATE): New define.
4813
4814 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
4815
4816         * nat/aarch64-sve-linux-sigcontext.h: New file.
4817         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
4818         new files.
4819         (SVE_VQ_MIN): Likewise.
4820         (SVE_VQ_MAX): Likewise.
4821         (SVE_VL_MIN): Likewise.
4822         (SVE_VL_MAX): Likewise.
4823         (SVE_NUM_ZREGS): Likewise.
4824         (SVE_NUM_PREGS): Likewise.
4825         (sve_vl_valid): Likewise.
4826         (struct user_sve_header): Likewise.
4827
4828 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
4829             Richard Bunt <Richard.Bunt@arm.com>
4830
4831         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
4832         was requested by GDB.
4833
4834 2018-06-15  Tom de Vries  <tdevries@suse.de>
4835
4836         * MAINTAINERS (Write After Approval): Add Tom de Vries.
4837
4838 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
4839
4840         * gnulib/update-gnulib.sh: Print expected versions of
4841         autoconf/aclocal.
4842
4843 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
4844
4845         * arch-utils.c (default_type_align): Use type_length_units.
4846         * gdbtypes.c (type_align): Use type_length_units.
4847
4848 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4849
4850         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
4851         of 'define' command.
4852
4853 2018-06-14  Tom de Vries  <tdevries@suse.de>
4854
4855         PR cli/22573
4856         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
4857         get_no_prettyformat_print_options.
4858
4859 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
4860
4861         * sparc-nat.h: Include target.h.
4862         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
4863         <fetch_registers>: Remove this argument in function call.
4864         <store_registers>: Remove this argument in function call, remove
4865         extra semicolon.
4866         <low_forget_process>: Call sparc64_forget_process instead of
4867         sparc_forget_process.
4868
4869 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4870
4871         * procfs.c (_initialize_procfs): Use add_inf_child_target.
4872         (procfs_target::make_corefile_notes): Adjust to new
4873         target_read_alloc return type.
4874
4875 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
4876             Stephen Roberts  <stephen.roberts@arm.com>
4877
4878         PR gdb/22882
4879         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
4880         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
4881         Move should_notify_stop local into more inner scope.
4882
4883 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
4884             Stephen Roberts  <stephen.roberts@arm.com>
4885
4886         PR gdb/22882
4887         * infrun.c (resume_1): Add call to mark_async_event_handler.
4888
4889 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
4890
4891         * infrun.c (do_target_wait): Change old version of $pc printed.
4892
4893 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
4894
4895         * dwarf2read.c (read_index_from_section): Rename to...
4896         (read_gdb_index_from_section): ... this, update all callers.
4897         (dwarf2_read_index): Rename to...
4898         (dwarf2_read_gdb_index): ... this, update all callers.
4899
4900 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
4901
4902         * gdb/hppa-linux-nat.c
4903         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
4904         hppa_linux_nat_target::fetch_registers.
4905
4906 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
4907
4908         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
4909         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
4910         (AARCH64_DWARF_SVE_FFR): Likewise.
4911         (AARCH64_DWARF_SVE_P0): Likewise.
4912         (AARCH64_DWARF_SVE_Z0): Likewise.
4913
4914 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
4915
4916         * common/common-regcache.h (raw_compare): New function.
4917         * regcache.c (regcache::raw_compare): Likewise.
4918         * regcache.h (regcache::raw_compare): New declaration.
4919
4920 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
4921
4922         * common/common-regcache.h (reg_buffer_common): New structure.
4923         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
4924         (reg_buffer::raw_supply): Likewise.
4925         (reg_buffer::raw_supply_integer): Likewise.
4926         (reg_buffer::raw_supply_zeroed): Likewise.
4927         (reg_buffer::raw_collect): Likewise.
4928         (reg_buffer::raw_collect_integer): Likewise.
4929         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
4930         (reg_buffer::raw_supply): Likewise.
4931         (reg_buffer::raw_supply_integer): Likewise.
4932         (reg_buffer::raw_supply_zeroed): Likewise.
4933         (reg_buffer::raw_collect): Likewise.
4934         (reg_buffer::raw_collect_integer): Likewise.
4935
4936 2018-06-10  Tom Tromey  <tom@tromey.com>
4937
4938         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
4939         (class remote_state) <stop_reply_queue>: Now std::vector.
4940         (remote_state::~remote_state)
4941         (remote_target::stop_reply_queue_length): Update.
4942         (struct queue_iter_param, remove_child_of_pending_fork)
4943         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
4944         (check_pending_event_prevents_wildcard_vcont_callback)
4945         (remove_stop_reply_for_inferior)
4946         (remove_stop_reply_of_remote_state)
4947         (remote_notif_remove_once_on_match)
4948         (stop_reply_match_ptid_and_ws)
4949         (remote_kill_child_of_pending_fork): Remove.
4950         (remote_target::remove_new_fork_children)
4951         (remote_target::check_pending_events_prevent_wildcard_vcont)
4952         (remote_target::discard_pending_stop_replies)
4953         (remote_target::discard_pending_stop_replies_in_queue)
4954         (remote_target::remote_notif_remove_queued_reply)
4955         (remote_target::queued_stop_reply)
4956         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
4957         (remote_target::wait, remote_target::kill_new_fork_children)
4958         (remote_target::async): Update.
4959
4960 2018-06-10  Tom Tromey  <tom@tromey.com>
4961
4962         * record-full.c (record_full_arch_list_cleanups): Remove.
4963         (record_full_message): Use try/catch.
4964         (record_full_wait_cleanups): Remove.
4965         (record_full_wait_1): Use try/catch.
4966         (record_full_restore): Likewise.
4967
4968 2018-06-10  Tom Tromey  <tom@tromey.com>
4969
4970         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
4971         declare VEC.  Add constructor.
4972         <in_target_beneath>: Now bool.
4973         (record_full_breakpoints): Now a std::vector, static.
4974         (record_full_sync_record_breakpoints)
4975         (record_full_init_record_breakpoints)
4976         (record_full_target::insert_breakpoint)
4977         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
4978
4979 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
4980
4981         * dwarf2read.c (process_cu_includes): Remove struct keyword.
4982         * serial.c (serial_interface_lookup): Remove struct keyword.
4983
4984 2018-06-10  Tom Tromey  <tom@tromey.com>
4985
4986         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
4987         method.
4988         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
4989         a method.
4990         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
4991         method.
4992         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
4993         "beneath" as a method.
4994         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
4995         Use "beneath" as a method.
4996
4997 2018-06-10  Tom Tromey  <tom@tromey.com>
4998
4999         * tracefile.c (struct trace_file_writer_deleter): New.
5000         <operator()>: Rename from trace_file_writer_xfree.
5001         (trace_file_writer_up): New typedef.
5002         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
5003
5004 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
5005
5006         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
5007         <m_registers, m_register_status>: Change type to
5008         std::unique_ptr.
5009         * regcache.c (reg_buffer::reg_buffer): Use new instead of
5010         XCNEWVEC.
5011
5012 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
5013
5014         * common/common-regcache.h (enum register_status): Add
5015         underlying type "signed char".
5016         * regcache.h (reg_buffer) <m_register_status>: Change type to
5017         register_status *.
5018         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
5019         register_status instead of signed char.
5020         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
5021         (reg_buffer::get_register_status): Remove cast.
5022         (readable_regcache::raw_read): Remove cast.
5023         (readable_regcache::cooked_read): Remove cast.
5024
5025 2018-06-09  Tom Tromey  <tom@tromey.com>
5026
5027         * source.c (reverse_search_command, forward_search_command): Use
5028         scoped_fd.
5029
5030 2018-06-09  Tom Tromey  <tom@tromey.com>
5031
5032         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
5033         (serial_ops_list): Now static, std::vector.
5034         (serial_interface_lookup, serial_add_interface): Update.
5035
5036 2018-06-09  Tom Tromey  <tom@tromey.com>
5037
5038         * dwarf2read.c (process_cu_includes): Update.
5039         (process_full_comp_unit): Update.
5040         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
5041         std::vector.
5042
5043 2018-06-08  Paul Koning  <paul_koning@dell.com>
5044
5045         PR gdb/23252
5046
5047         * python/python.c (do_start_initialization):
5048         Avoid call to internal Python API.
5049         (init__gdb_module): New function.
5050
5051 2018-06-08  Gary Benson <gbenson@redhat.com>
5052
5053         * linux-thread-db.c (valprint.h): New include.
5054         (struct check_thread_db_info): New structure.
5055         (check_thread_db_on_load, tdb_testinfo): New static globals.
5056         (check_thread_db, check_thread_db_callback): New functions.
5057         (try_thread_db_load_1): Run integrity checks if requested.
5058         (maintenance_check_libthread_db): New function.
5059         (_initialize_thread_db): Register "maint check libthread-db"
5060         and "maint set/show check-libthread-db".
5061         * NEWS: Mention the above new commands.
5062
5063 2018-06-08  Tom Tromey  <tom@tromey.com>
5064
5065         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
5066         now a method.
5067
5068 2018-06-08  Tom Tromey  <tom@tromey.com>
5069
5070         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
5071
5072 2018-06-08  Tom Tromey  <tom@tromey.com>
5073
5074         * common/btrace-common.h (struct btrace_data): Add constructor,
5075         destructor, move assignment operator.
5076         <empty, clear, fini>: New methods.
5077         <format>: Initialize.
5078         (btrace_data_init, btrace_data_fini, btrace_data_clear)
5079         (btrace_data_empty): Don't declare.
5080         * common/btrace-common.c (btrace_data_init): Remove.
5081         (btrace_data::fini): Rename from btrace_data_fini.
5082         (btrace_data::empty): Rename from btrace_data_empty.
5083         (btrace_data::clear): Rename from btrace_data_clear.  Return
5084         bool.
5085         * btrace.h (make_cleanup_btrace_data): Don't declare.
5086         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
5087         (parse_xml_btrace): Update.
5088         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
5089         (maint_btrace_clear_packet_history_cmd): Update.
5090
5091 2018-06-07  Pedro Alves  <palves@redhat.com>
5092
5093         * target.h (target_ops) <beneath>: Now a method.  All references
5094         updated.
5095         (class target_stack): New.
5096         * target.c (g_target_stack): New.
5097         (g_current_top_target): Delete.
5098         (current_top_target): Get the top target out of g_target_stack.
5099         (target_stack::push, target_stack::unpush): New.
5100         (push_target, unpush_target): Reimplement.
5101         (target_is_pushed): Reimplement in terms of g_target_stack.
5102         (target_ops::beneath, target_stack::find_beneath): New.
5103
5104 2018-06-07  Pedro Alves  <palves@redhat.com>
5105
5106         * target.h (find_target_beneath): Delete declaration.
5107         * target.c (find_target_beneath): Delete definition.
5108         * aix-thread.c: All callers of find_target_beneath adjusted to
5109         call target_ops::beneath instead.
5110         * bsd-uthread.c: Likewise.
5111         * linux-thread-db.c: Likewise.
5112         * ravenscar-thread.c: Likewise.
5113         * sol-thread.c: Likewise.
5114         * spu-multiarch.c: Likewise.
5115
5116 2018-06-07  Pedro Alves  <palves@redhat.com>
5117
5118         * target.h (target_ops) <beneath>: Now a method.  All references
5119         updated.
5120         (target_ops) <m_beneath>: New.
5121         * target.c (target_ops::beneath): New.
5122         * corelow.c: Adjust all references to target_ops::beneath.
5123         * linux-thread-db.c: Likewise.
5124         * make-target-delegates: Likewise.
5125         * record-btrace.c: Likewise.
5126         * record-full.c: Likewise.
5127         * remote.c: Likewise.
5128         * target.c: Likewise.
5129         * target-delegates.c: Regenerate.
5130
5131 2018-06-07  Pedro Alves  <palves@redhat.com>
5132
5133         * target.h (target_stack): Delete.
5134         (current_top_target): Declare function.
5135         * target.c (target_stack): Delete.
5136         (g_current_top_target): New.
5137         (current_top_target): New function.
5138         * auxv.c: Use current_top_target instead of target_stack
5139         throughout.
5140         * avr-tdep.c: Likewise.
5141         * breakpoint.c: Likewise.
5142         * corefile.c: Likewise.
5143         * elfread.c: Likewise.
5144         * eval.c: Likewise.
5145         * exceptions.c: Likewise.
5146         * frame.c: Likewise.
5147         * gdbarch-selftests.c: Likewise.
5148         * gnu-v3-abi.c: Likewise.
5149         * ia64-tdep.c: Likewise.
5150         * ia64-vms-tdep.c: Likewise.
5151         * infcall.c: Likewise.
5152         * infcmd.c: Likewise.
5153         * infrun.c: Likewise.
5154         * linespec.c: Likewise.
5155         * linux-tdep.c: Likewise.
5156         * minsyms.c: Likewise.
5157         * ppc-linux-nat.c: Likewise.
5158         * ppc-linux-tdep.c: Likewise.
5159         * procfs.c: Likewise.
5160         * regcache.c: Likewise.
5161         * remote.c: Likewise.
5162         * rs6000-tdep.c: Likewise.
5163         * s390-linux-nat.c: Likewise.
5164         * s390-tdep.c: Likewise.
5165         * solib-aix.c: Likewise.
5166         * solib-darwin.c: Likewise.
5167         * solib-dsbt.c: Likewise.
5168         * solib-spu.c: Likewise.
5169         * solib-svr4.c: Likewise.
5170         * solib-target.c: Likewise.
5171         * sparc-tdep.c: Likewise.
5172         * sparc64-tdep.c: Likewise.
5173         * spu-tdep.c: Likewise.
5174         * symfile.c: Likewise.
5175         * symtab.c: Likewise.
5176         * target-descriptions.c: Likewise.
5177         * target-memory.c: Likewise.
5178         * target.c: Likewise.
5179         * target.h: Likewise.
5180         * tracefile-tfile.c: Likewise.
5181         * tracepoint.c: Likewise.
5182         * valops.c: Likewise.
5183         * valprint.c: Likewise.
5184         * value.c: Likewise.
5185         * windows-tdep.c: Likewise.
5186         * mi/mi-main.c: Likewise.
5187
5188 2018-06-07  Tom Tromey  <tom@tromey.com>
5189
5190         * valprint.h (build_address_symbolic): Declare.
5191         * printcmd.c (print_address_symbolic): Update.
5192         (build_address_symbolic): Change "name" and "filename" to
5193         std::string.
5194         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
5195         Update.
5196         * defs.h (build_address_symbolic): Remove declaration.
5197
5198 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
5199
5200         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
5201         (aarch64_vnv_type): Add function.
5202         (aarch64_pseudo_register_name): Add V regs for SVE.
5203         (aarch64_pseudo_register_type): Likewise.
5204         (aarch64_pseudo_register_reggroup_p): Likewise.
5205         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
5206         (aarch64_pseudo_read_value): Add V regs for SVE.
5207         (aarch64_pseudo_write_2): Use V0 offset for SVE
5208         (aarch64_pseudo_write): Add V regs for SVE.
5209         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
5210
5211 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
5212
5213         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
5214         (sve_vl_from_vq): Likewise.
5215
5216 2018-06-05  Tom Tromey  <tom@tromey.com>
5217
5218         * cli/cli-cmds.c (show_version): Update.
5219         * top.c (print_gdb_version): Add "interactive" parameter.
5220         Update.
5221         * main.c (captured_main_1): Update.
5222         * top.h (print_gdb_version): Add "interactive" parameter and a
5223         comment.
5224
5225 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
5226
5227         * common/enum-flags.h: Add trailing semicolon to example in
5228         comment.
5229
5230 2018-06-05  Tom Tromey  <tom@tromey.com>
5231
5232         PR cli/12326:
5233         * NEWS: Add entry about pager.
5234         * utils.c (pagination_disabled_for_command): New global.
5235         (prompt_for_continue): Allow "c" response to prompt.
5236         (reinitialize_more_filter): Clear
5237         pagination_disabled_for_command.
5238         (fputs_maybe_filtered): Check pagination_disabled_for_command.
5239
5240 2018-06-04  Tom Tromey  <tom@tromey.com>
5241
5242         * ada-lang.h (ada_lookup_symbol_list): Update.
5243         * ada-lang.c (resolve_subexp): Update.
5244         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
5245         parameter.
5246         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
5247         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
5248         results parameter to std::vector.
5249         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
5250         Update.
5251         * ada-exp.y (block_lookup): Update.
5252         (select_possible_type_sym): Change type of syms.  Remove nsyms
5253         parameter.
5254         (write_var_or_type, write_name_assoc): Update.
5255
5256 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
5257
5258         * windows-nat.c (windows_nat_target::xfer_partial): Return
5259         TARGET_XFER_E_IO if we need to delegate to the target beneath
5260         but BENEATH is NULL.
5261
5262 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
5263
5264         * Makefile.in (config.status): Add configure.nat as a
5265         dependency.
5266
5267 2018-06-04  Tom Tromey  <tom@tromey.com>
5268
5269         * cp-name-parser.y (cpname_state): Add method declarations.
5270         (HANDLE_QUAL): Update.
5271         (cpname_state::d_grab, cpname_state::fill_comp)
5272         (cpname_state::make_operator, cpname_state::make_dtor)
5273         (cpname_state::make_builtin_type, cpname_state::make_name)
5274         (cpname_state::d_qualify, cpname_state::d_int_type)
5275         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
5276         (%union): Move earlier.
5277
5278 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5279
5280         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
5281
5282 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5283
5284         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
5285         (aarch64_pseudo_write_1): Likewise.
5286         (aarch64_pseudo_read_value): Use helper.
5287         (aarch64_pseudo_write): Likewise.
5288
5289 2018-06-04  Pedro Alves  <palves@redhat.com>
5290
5291         * darwin-nat.c (darwin_ops): Delete.
5292         (darwin_attach_pid): Use get_native_target.
5293
5294 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5295
5296         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
5297         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
5298
5299 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5300
5301         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
5302         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
5303         (aarch64_gdbarch_init): Check for SVE.
5304         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
5305
5306 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5307
5308         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
5309         * aarch64-tdep.h (aarch64_read_description): Likewise.
5310         * arch/aarch64.c (aarch64_create_target_description): Likewise.
5311         * arch/aarch64.h (aarch64_create_target_description): Likewise.
5312         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
5313         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
5314         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
5315
5316 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
5317
5318         * value.c (value_fetch_lazy_bitfield): New.
5319         (value_fetch_lazy_memory): New.
5320         (value_fetch_lazy_register): New.
5321         (value_fetch_lazy): Factor out to smaller functions.
5322
5323 2018-06-01  Tom Tromey  <tom@tromey.com>
5324
5325         * cp-name-parser.y (backslashable, represented): Now const.
5326
5327 2018-06-01  Tom Tromey  <tom@tromey.com>
5328
5329         * cp-name-parser.y: Include parser-defs.h.
5330         (parser_fprintf): Remove declaration.
5331
5332 2018-06-01  Tom Tromey  <tom@tromey.com>
5333
5334         * cp-name-parser.y: Use %pure-parser, %lex-param, and
5335         %parse-param.
5336         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
5337         (global_result): Remove globals.
5338         (struct cpname_state): New.
5339         (yyparse): Don't declare.
5340         (yylex, yyerror): Move declarations after %union.
5341         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
5342         (make_name): Add state parameter.
5343         Update all callers.
5344         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
5345         parameter.
5346         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
5347         Update.
5348         (yylex): Add lvalp, state parameters.
5349         (yyerror): Add state parameter.
5350         (cp_demangled_name_to_comp): Update.
5351
5352 2018-06-01  Tom Tromey  <tom@tromey.com>
5353
5354         * cp-name-parser.y (parser_fprintf): Declare.
5355         (GDB_YY_REMAP_PREFIX): Define.
5356         Include yy-remap.h.  Don't redefine yy* identifiers.
5357
5358 2018-06-01  Tom Tromey  <tom@tromey.com>
5359
5360         * python/py-type.c (typy_legacy_template_argument): Update.
5361         * cp-support.h (cp_demangled_name_to_comp): Update.
5362         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
5363         parameter to be a "std::string *".
5364         (main): Update.
5365
5366 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
5367
5368         * ada-lex.l: Include "diagnostics.h" instead of
5369         "common/diagnostics.h".
5370         * unittests/environ-selftests.c: Likewise.
5371         * common/diagnostics.h: Moved to ../include.
5372
5373 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
5374
5375         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
5376         to language_mode_manual while calling breakpoint_re_set_one.
5377
5378 2018-06-01  Tom Tromey  <tom@tromey.com>
5379
5380         * valops.c (value_cast_structs, destructor_name_p): Update.
5381         * symtab.c (gdb_mangle_name): Update.
5382         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
5383         Update.
5384         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
5385         (pascal_object_print_value_fields, pascal_object_print_value):
5386         Update.
5387         * p-typeprint.c (pascal_type_print_derivation_info): Update.
5388         * linespec.c (find_methods): Update.
5389         * gdbtypes.h (type_name_no_tag): Remove.
5390         (type_name_or_error): Rename from type_name_no_tag_or_error.
5391         * gdbtypes.c (type_name_no_tag): Remove.
5392         (type_name_or_error): Rename from type_name_no_tag_or_error.
5393         (lookup_struct_elt_type, check_typedef): Update.
5394         * expprint.c (print_subexp_standard): Update.
5395         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
5396         * d-namespace.c (d_lookup_nested_symbol): Update.
5397         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
5398         (cp_print_class_member): Update.
5399         * cp-namespace.c (cp_lookup_nested_symbol): Update.
5400         * completer.c (add_struct_fields): Update.
5401         * c-typeprint.c (cp_type_print_derivation_info)
5402         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
5403         Update.
5404         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
5405         (ada_prefer_type, ada_is_exception_sym): Update.
5406
5407 2018-06-01  Tom Tromey  <tom@tromey.com>
5408
5409         * valops.c (enum_constant_from_type, value_namespace_elt)
5410         (value_maybe_namespace_elt): Update.
5411         * valarith.c (find_size_for_pointer_math): Update.
5412         * target-descriptions.c (make_gdb_type): Update.
5413         * symmisc.c (print_symbol): Update.
5414         * stabsread.c (define_symbol, read_type)
5415         (complain_about_struct_wipeout, add_undefined_type)
5416         (cleanup_undefined_types_1): Update.
5417         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
5418         (rust_range_type_p, val_print_struct, rust_print_struct_def)
5419         (rust_internal_print_type, rust_composite_type)
5420         (rust_evaluate_funcall, rust_evaluate_subexp)
5421         (rust_inclusive_range_type_p): Update.
5422         * python/py-type.c (typy_get_tag): Update.
5423         * p-typeprint.c (pascal_type_print_base): Update.
5424         * mdebugread.c (parse_symbol, parse_type): Update.
5425         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
5426         Update.
5427         * guile/scm-type.c (gdbscm_type_tag): Update.
5428         * go-lang.c (sixg_string_p): Update.
5429         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
5430         Update.
5431         * gdbtypes.h (struct main_type) <tag_name>: Remove.
5432         (TYPE_TAG_NAME): Remove.
5433         * gdbtypes.c (type_name_no_tag): Simplify.
5434         (check_typedef, check_types_equal, recursive_dump_type)
5435         (copy_type_recursive, arch_composite_type): Update.
5436         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
5437         in summary mode when needed.
5438         * eval.c (evaluate_funcall): Update.
5439         * dwarf2read.c (fixup_go_packaging, read_structure_type)
5440         (process_structure_scope, read_enumeration_type)
5441         (read_namespace_type, read_module_type, determine_prefix): Update.
5442         * cp-support.c (inspect_type): Update.
5443         * coffread.c (process_coff_symbol, decode_base_type): Update.
5444         * c-varobj.c (c_is_path_expr_parent): Update.
5445         * c-typeprint.c (c_type_print_base_struct_union): Update.
5446         (c_type_print_base_1): Update.  Print struct/class/union/enum in
5447         summary when using C language.
5448         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
5449         (gen_maybe_namespace_elt): Update.
5450         * ada-lang.c (ada_type_name): Simplify.
5451         (empty_record, ada_template_to_fixed_record_type_1)
5452         (template_to_static_fixed_type)
5453         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
5454
5455 2018-06-01  Tom Tromey  <tom@tromey.com>
5456
5457         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
5458         c_print_type.
5459         * c-typeprint.c (c_print_type_1): Add "language" parameter.
5460         (c_print_type): Update.
5461         (c_print_type): New overload.
5462         (c_type_print_varspec_prefix, c_type_print_args)
5463         (c_type_print_varspec_suffix, c_print_type_no_offsets)
5464         (c_type_print_base_struct_union, c_type_print_base_1)
5465         (cp_type_print_method_args): Add "language" parameter.
5466         (c_type_print_base): Update.
5467         * c-lang.h (c_print_type): Add new overload.
5468
5469 2018-06-01  Tom Tromey  <tom@tromey.com>
5470
5471         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
5472         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
5473
5474 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
5475
5476         * aarch64-tdep.c (aarch64_sve_register_names): New const
5477         var.
5478         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
5479         (AARCH64_SVE_Z_REGS_NUM): New define.
5480         (AARCH64_SVE_P_REGS_NUM): Likewise.
5481         (AARCH64_SVE_NUM_REGS): Likewise.
5482
5483 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
5484
5485         * nat/linux-ptrace.h [__alpha__]
5486         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
5487         definitions.
5488
5489 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
5490
5491         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
5492         the endianness selected.
5493         * NEWS: Document `set endian auto' mode operation update.
5494
5495 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
5496
5497         * Makefile.in: Add new header.
5498         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
5499         (sve_vl_from_vg): Likewise.
5500         (sve_vq_from_vl): Likewise.
5501         (sve_vl_from_vq): Likewise.
5502         (sve_vq_from_vg): Likewise.
5503         (sve_vg_from_vq): Likewise.
5504         * configure.nat: Add new c file.
5505         * nat/aarch64-sve-linux-ptrace.c: New file.
5506         * nat/aarch64-sve-linux-ptrace.h: New file.
5507
5508 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
5509
5510         * aarch64-linux-nat.c (aarch64_linux_read_description):
5511         Add parmeter zero.
5512         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
5513         Likewise.
5514         * aarch64-tdep.c (tdesc_aarch64_list): Add.
5515         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
5516         (aarch64_gdbarch_init): Add parmeter zero.
5517         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
5518         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
5519         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
5520         parmeter.
5521         * doc/gdb.texinfo: Describe SVE feature
5522         * features/aarch64-sve.c: New file.
5523
5524 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
5525
5526         PR gdb/23210
5527         * gdbarch.sh (significant_addr_bit): Default to zero when
5528         not set by target architecture.
5529         * gdbarch.c: Re-generated.
5530         * utils.c (address_significant): Update.
5531
5532 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
5533
5534         * stack.c (func_command): Remove trailing newline in call to error.
5535
5536 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5537
5538         * regcache.h (regcache_raw_collect): Remove, update callers to
5539         use regcache::raw_collect.
5540         * regcache.c (regcache_raw_collect): Remove.
5541
5542 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5543
5544         * regcache.h (regcache_raw_supply): Remove, update callers to
5545         use detached_regcache::raw_supply.
5546         * regcache.c (regcache_raw_supply): Remove.
5547
5548 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5549
5550         * regcache.h (regcache_cooked_write_part): Remove, update
5551         callers to use regcache::cooked_write_part.
5552         * regcache.c (regcache_cooked_write_part): Remove.
5553
5554 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5555
5556         * regcache.h (regcache_cooked_read_part): Remove, update callers
5557         to use readable_regcache::cooked_read_part.
5558         * regcache.c (regcache_cooked_read_part): Remove.
5559
5560 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5561
5562         * regcache.h (regcache_cooked_read_value): Remove, update
5563         callers to use readable_regcache::cooked_read_value.
5564         * regcache.c (regcache_cooked_read_value): Remove.
5565
5566 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5567
5568         * regcache.h (regcache_cooked_write): Remove, update callers to
5569         use regcache::cooked_write.
5570         * regcache.c (regcache_cooked_write): Remove.
5571
5572 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5573
5574         * regcache.h (regcache_invalidate): Remove, update callers to
5575         use detached_regcache::invalidate instead.
5576         * regcache.c (regcache_invalidate): Remove.
5577
5578 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5579
5580         * regcache.h (regcache_raw_write_part): Remove, update callers
5581         to use regcache::raw_write_part instead.
5582         * regcache.c (regcache_raw_write_part): Remove.
5583
5584 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5585
5586         * regcache.h (regcache_raw_read_part): Remove, update callers to
5587         use readable_regcache::raw_read_part instead.
5588         * regcache.c (regcache_raw_read_part): Remove.
5589
5590 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5591
5592         * regcache.h (regcache_cooked_read): Remove, update callers to
5593         use readable_regcache::cooked_read instead.
5594         * regcache.c (regcache_cooked_read): Remove.
5595
5596 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5597
5598         * regcache.h (regcache_raw_write): Remove, update callers to use
5599         regcache::raw_write instead.
5600         * regcache.c (regcache_raw_write): Remove.
5601
5602 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5603
5604         * regcache.h (regcache_raw_read): Remove, update callers to use
5605         readable_regcache::raw_read instead.
5606         * regcache.c (regcache_raw_read): Remove.
5607
5608 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5609
5610         * regcache.h (regcache_raw_update): Remove, update callers to
5611         use readable_regcache::raw_update instead.
5612         * regcache.c (regcache_raw_update): Remove.
5613
5614 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5615
5616         * regcache.h (regcache_register_status): Remove, update callers
5617         to use reg_buffer::get_register_status directly instead.
5618         * regcache.c (regcache_register_status): Remove.
5619
5620 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5621
5622         * regcache.h (regcache_get_ptid): Remove, update all callers to
5623         call regcache::ptid instead.
5624         * regcache.c (regcache_get_ptid): Remove.
5625
5626 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5627
5628         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
5629
5630 2018-05-30  Pedro Alves  <palves@redhat.com>
5631
5632         * common/common-exceptions.h (exception_rethrow): Use
5633         ATTRIBUTE_NORETURN.
5634
5635 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
5636
5637         * breakpoint.c (print_solib_event, check_status_catch_solib):
5638         Remove struct keyword in range-based for loops.
5639         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
5640         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
5641         Likewise.
5642         * linespec.c (find_superclass_methods, search_minsyms_for_name):
5643         Likewise.
5644         * symfile.c (addr_info_make_relative): Likewise.
5645         * thread.c (value_in_thread_stack_temporaries): Likewise.
5646
5647 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
5648
5649         PR gdb/16841
5650         * valops.c (value_struct_elt_for_reference): Call check_typedef on
5651         aggregate type to get its real type before accessing it.
5652
5653 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
5654
5655         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
5656         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
5657         * coff-pe-read.c (add_pe_forwarded_sym): Replace
5658         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
5659         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
5660         * jit.c (jit_breakpoint_re_set_internal): Likewise.
5661         * printcmd.c (info_address_command): Likewise.
5662
5663 2018-05-29  Tom Tromey  <tom@tromey.com>
5664
5665         * windows-nat.c (handle_exception): Update fall-through comment.
5666
5667 2018-05-29  Tom Tromey  <tom@tromey.com>
5668
5669         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
5670         (struct program_space) <added_solibs>: Now a std::vector.
5671         * breakpoint.c (print_solib_event): Update.
5672         (check_status_catch_solib): Update.
5673         * progspace.c (clear_program_space_solib_cache): Update.
5674         * solib.c (update_solib_list): Update.
5675
5676 2018-05-29  Tom Tromey  <tom@tromey.com>
5677
5678         * python/py-type.c (typy_richcompare): Update.
5679         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
5680         * gdbtypes.h (types_deeply_equal): Return bool.
5681         (types_equal): Likewise.
5682         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
5683         declare VEC.
5684         (check_types_equal): Change worklist to std::vector.  Return
5685         bool.
5686         (struct type_equality_entry): Add constructor.
5687         (compare_maybe_null_strings): Return bool.
5688         (check_types_worklist): Return bool.  Change worklist to
5689         std::vector.
5690         (types_deeply_equal): Use std::vector.
5691         (types_equal): Return bool.
5692         (compare_maybe_null_strings): Simplify.
5693
5694 2018-05-29  Tom Tromey  <tom@tromey.com>
5695
5696         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
5697
5698 2018-05-29  Tom Tromey  <tom@tromey.com>
5699
5700         * objc-lang.h: Don't include cp-support.h.
5701         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
5702         declare VEC.
5703
5704 2018-05-27  Tom Tromey  <tom@tromey.com>
5705
5706         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
5707
5708 2018-05-25  Tom Tromey  <tom@tromey.com>
5709
5710         * value.c (value::location): Initialize.
5711
5712 2018-05-25  Tom Tromey  <tom@tromey.com>
5713
5714         * dbxread.c (init_bincl_list): Remove.
5715         (bincl_list): Now a std::vector.
5716         (bincls_allocated, next_bincl): Remove.
5717         (free_bincl_list, do_free_bincl_list_cleanup)
5718         (make_cleanup_free_bincl_list): Remove.
5719         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
5720         unique_xmalloc_ptr.
5721         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
5722         (struct header_file_location): Add constructor.
5723         (add_bincl_to_list): Remove.
5724
5725 2018-05-25  Tom Tromey  <tom@tromey.com>
5726
5727         * tui/tui.c (tui_enable): Update.
5728         * mi/mi-interp.c (mi_interp::init): Update.
5729         * interps.h (class interp) <name>: New method.
5730         <m_name>: Rename from name.
5731         (~scoped_restore_interp): Update.
5732         * interps.c (interp::interp): Update.
5733         (interp_add, interp_set, interp_lookup_existing)
5734         (current_interp_named_p): Update.
5735
5736 2018-05-25  Tom Tromey  <tom@tromey.com>
5737
5738         * interps.c (interp_name): Remove.
5739         * mi/mi-interp.c (mi_interp::init): Update.
5740         * interps.h (interp_name): Remove.
5741         (~scoped_restore_interp): Update.
5742         * tui/tui.c (tui_enable): Update.
5743
5744 2018-05-25  Tom Tromey  <tom@tromey.com>
5745
5746         * utils.c (fputs_maybe_filtered): Update.
5747         * linespec.c (decode_line_full): Update.
5748         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
5749         (mi_print_breakpoint_for_event, mi_solib_loaded)
5750         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
5751         (mi_user_selected_context_changed): Update.
5752         * mi/mi-main.c (mi_execute_command): Update.
5753         * cli/cli-script.c (execute_control_command): Update.
5754         * python/python.c (execute_gdb_command): Update.
5755         * solib.c (info_sharedlibrary_command): Update.
5756         * interps.c (interp_ui_out): Remove.
5757         * interps.h (interp_ui_out): Remove.
5758
5759 2018-05-25  Tom Tromey  <tom@tromey.com>
5760
5761         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
5762         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
5763         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
5764
5765 2018-05-25  Tom Tromey  <tom@tromey.com>
5766
5767         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
5768         * interps.c (interp_exec): Use scoped_restore.
5769
5770 2018-05-25  Tom Tromey  <tom@tromey.com>
5771
5772         * remote.c (remote_target::remote_file_get): Use
5773         gdb::byte_vector.
5774         (remote_target::remote_file_put): Likewise.
5775
5776 2018-05-25  Tom Tromey  <tom@tromey.com>
5777
5778         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
5779         a std::string.
5780         (get_pe_section_index, add_pe_exported_sym): Update.
5781         (read_pe_exported_syms): Use gdb::def_vector.
5782
5783 2018-05-25  Tom Tromey  <tom@tromey.com>
5784
5785         * frame.c (remove_prev_frame): Remove.
5786         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
5787
5788 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
5789
5790         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
5791         Remove prototypes.
5792         * mips-linux-nat.c (supply_fpregset): Always call
5793         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
5794         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
5795         `mips_fill_fpregset'.
5796         * mips-linux-tdep.c (mips_supply_fpregset)
5797         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
5798         (mips_fill_fpregset_wrapper): Remove functions.
5799         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
5800         (mips_linux_fpregset): Remove variable.
5801         (mips_linux_iterate_over_regset_sections): Use
5802         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
5803         (mips_linux_o32_sigframe_init): Remove comment.
5804
5805 2018-05-25  Pedro Alves  <palves@redhat.com>
5806
5807         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
5808         (struct readahead_cache, struct packet_reg, struct
5809         remote_arch_state, class remote_state): Move higher up in the
5810         file.
5811         (remote_target::m_remote_state): Now an object instead of a pointer.
5812         (remote_target::get_remote_state): Adjust.
5813
5814 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
5815
5816         * stack.c (select_and_print_frame): Delete.
5817         (struct function_bounds): Move struct within function.
5818         (func_command): Most content moved into new function
5819         find_frame_for_function, use new function, print result, add
5820         function comment.
5821         (find_frame_for_function): New function, now returns a result.
5822
5823 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5824
5825         * stack.c (iterate_over_block_arg_vars): Fix comment.
5826         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
5827
5828 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
5829
5830         PR gdb/23203
5831         * frame.c
5832         (scoped_restore_selected_frame::scoped_restore_selected_frame):
5833         Define.
5834         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
5835         Define.
5836         * frame.h (class scoped_restore_selected_frame): New class.
5837         * stack.c (print_frame_local_vars): Remove catching and rethrowing
5838         of any exception, use scoped_restore_selected_frame to restore the
5839         frame instead.
5840
5841 2018-05-24  Pedro Alves  <palves@redhat.com>
5842
5843         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
5844         override.
5845
5846 2018-05-23  Tom Tromey  <tom@tromey.com>
5847
5848         * complaints.c (struct complaints): Remove.
5849         (symfile_complaint_book): Remove.
5850         (series): New global.
5851         (complaint_internal): Update.
5852         (clear_complaints): Update.
5853
5854 2018-05-23  Tom Tromey  <tom@tromey.com>
5855
5856         * complaints.c (counters): New global.
5857         (struct complain): Remove.
5858         (struct complaints) <root>: Remove.
5859         (complaint_sentinel): Remove.
5860         (symfile_complaint_book): Update.
5861         (find_complaint) Remove.
5862         (complaint_internal, clear_complaints): Update.
5863
5864 2018-05-23  Tom Tromey  <tom@tromey.com>
5865
5866         * complaints.c (struct complain) <file, line>: Remove.
5867         (find_complaint): Remove file, line parameters.
5868         (complaint_internal): Update.
5869
5870 2018-05-23  Tom Tromey  <tom@tromey.com>
5871
5872         * complaints.c (vcomplaint): Remove.
5873         (complaint_internal) Merge in contents of vcomplaint.
5874
5875 2018-05-23  Tom Tromey  <tom@tromey.com>
5876
5877         * complaints.c (struct complaints) <explanation>: Remove.
5878         (symfile_explanations): Remove.
5879         (symfile_complaint_book): Update.
5880         (vcomplaint): Update.
5881         (struct explanation): Remove.
5882
5883 2018-05-23  Tom Tromey  <tom@tromey.com>
5884
5885         * complaints.c (symfile_complaints): Remove.
5886         (complaint_internal): Remove "complaints" parameter.
5887         (clear_complaints, vcomplaint): Remove "c" parameter.
5888         (get_complaints): Remove.
5889         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
5890         (dwarf2_debug_line_missing_file_complaint)
5891         (dwarf2_debug_line_missing_end_sequence_complaint)
5892         (dwarf2_complex_location_expr_complaint)
5893         (dwarf2_const_value_length_mismatch_complaint)
5894         (dwarf2_section_buffer_overflow_complaint)
5895         (dwarf2_macro_malformed_definition_complaint)
5896         (dwarf2_invalid_attrib_class_complaint)
5897         (create_addrmap_from_index, dw2_symtab_iter_next)
5898         (dw2_expand_marked_cus)
5899         (dw2_debug_names_iterator::find_vec_in_debug_names)
5900         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
5901         (create_debug_type_hash_table, init_cutu_and_read_dies)
5902         (partial_die_parent_scope, add_partial_enumeration)
5903         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
5904         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
5905         (read_import_statement, read_file_scope, create_dwo_cu_reader)
5906         (create_cus_hash_table, create_dwp_hash_table)
5907         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
5908         (dwarf2_rnglists_process, dwarf2_ranges_process)
5909         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
5910         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
5911         (handle_struct_member_die, process_structure_scope)
5912         (read_array_type, read_common_block, read_module_type)
5913         (read_tag_pointer_type, read_typedef, read_base_type)
5914         (read_subrange_type, load_partial_dies, partial_die_info::read)
5915         (partial_die_info::read, partial_die_info::read)
5916         (partial_die_info::read, read_checked_initial_length_and_offset)
5917         (dwarf2_string_attr, read_formatted_entries)
5918         (dwarf_decode_line_header)
5919         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
5920         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
5921         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
5922         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5923         (get_signatured_type, get_DW_AT_signature_type)
5924         (decode_locdesc, file_file_name, consume_improper_spaces)
5925         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
5926         (dwarf_decode_macro_bytes, dwarf_decode_macros)
5927         (dwarf2_symbol_mark_computed, set_die_type)
5928         (read_attribute_value): Update.
5929         * stap-probe.c (handle_stap_probe, get_stap_base_address):
5930         Update.
5931         * dbxread.c (unknown_symtype_complaint)
5932         (lbrac_mismatch_complaint, repeated_header_complaint)
5933         (set_namestring, function_outside_compilation_unit_complaint)
5934         (read_dbx_symtab, process_one_symbol): Update.
5935         * gdbtypes.c (stub_noname_complaint): Update.
5936         * windows-nat.c (handle_unload_dll): Update.
5937         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
5938         (decode_base_type): Update.
5939         * xcoffread.c (bf_notfound_complaint, ef_complaint)
5940         (eb_complaint, record_include_begin, record_include_end)
5941         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
5942         (process_xcoff_symbol, read_symbol)
5943         (function_outside_compilation_unit_complaint)
5944         (scan_xcoff_symtab): Update.
5945         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
5946         * buildsym.c (finish_block_internal, make_blockvector)
5947         (end_symtab_get_static_block, augment_type_symtab): Update.
5948         * dtrace-probe.c (dtrace_process_dof)
5949         (dtrace_static_probe_ops::get_probes): Update.
5950         * complaints.h (struct complaint): Don't declare.
5951         (symfile_complaints): Remove.
5952         (complaint_internal): Remove "complaints" parameter.
5953         (complaint): Likewise.
5954         (clear_complaints): Likewise.
5955         * symfile.c (syms_from_objfile_1, finish_new_objfile)
5956         (reread_symbols): Update.
5957         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
5958         (dwarf2_frame_cache, decode_frame_entry): Update.
5959         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
5960         * objc-lang.c (lookup_objc_class, lookup_child_selector)
5961         (info_selectors_command): Update.
5962         * macrotab.c (macro_include, check_for_redefinition)
5963         (macro_undef): Update.
5964         * objfiles.c (filter_overlapping_sections): Update.
5965         * stabsread.c (invalid_cpp_abbrev_complaint)
5966         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
5967         (define_symbol, error_type, read_type, rs6000_builtin_type)
5968         (stabs_method_name_from_physname, read_member_functions)
5969         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
5970         (attach_fields_to_type, complain_about_struct_wipeout)
5971         (read_range_type, read_args, common_block_start)
5972         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
5973         Update.
5974         * mdebugread.c (index_complaint, unknown_ext_complaint)
5975         (basic_type_complaint, bad_tag_guess_complaint)
5976         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
5977         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
5978         (parse_procedure, parse_lines)
5979         (function_outside_compilation_unit_complaint)
5980         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
5981         (bad_tag_guess_complaint, reg_value_complaint): Update.
5982         * cp-support.c (demangled_name_complaint): Update.
5983         * macroscope.c (sal_macro_scope): Update.
5984         * dwarf-index-write.c (class debug_names): Update.
5985
5986 2018-05-23  Tom Tromey  <tom@tromey.com>
5987
5988         * complaints.c (clear_complaints): Remove "noisy" parameter.
5989         * complaints.h (clear_complaints): Update.
5990         * symfile.c (syms_from_objfile_1, finish_new_objfile)
5991         (reread_symbols): Update.
5992
5993 2018-05-23  Tom Tromey  <tom@tromey.com>
5994
5995         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
5996         SUBSEQUENT_MESSAGE.
5997         (vcomplaint, clear_complaints): Update.
5998         (symfile_explanations): Remove some messages.
5999
6000 2018-05-23  Tom Tromey  <tom@tromey.com>
6001
6002         * complaints.c (internal_complaint): Remove.
6003         * complaints.h (internal_complaint): Remove.
6004
6005 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
6006
6007         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
6008
6009 2018-05-22  Pedro Alves  <palves@redhat.com>
6010
6011         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
6012         (remote_fileio_badfd, remote_fileio_return_errno)
6013         (remote_fileio_return_success, remote_fileio_func_open)
6014         (remote_fileio_func_open, remote_fileio_func_close)
6015         (remote_fileio_func_read, remote_fileio_func_write)
6016         (remote_fileio_func_lseek, remote_fileio_func_rename)
6017         (remote_fileio_func_unlink, remote_fileio_func_stat)
6018         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
6019         (remote_fileio_func_isatty, remote_fileio_func_system): Add
6020         remote_target parameter.
6021         (remote_fio_func_map) <func>: Add remote_target parameter.
6022         (do_remote_fileio_request, remote_fileio_request):
6023         * remote-fileio.h (remote_fileio_request):
6024         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
6025         remote_target parameter.
6026         (remote_notif_process, handle_notification): Adjust to pass down
6027         the remote.
6028         (remote_notif_state_allocate): Add remote_target parameter.  Save
6029         it.
6030         * remote-notif.h (struct remote_target): Forward declare.
6031         (struct notif_client) <parse, ack, can_get_pending_events>: Add
6032         remote_target parameter.
6033         (struct remote_notif_state) <remote>: New field.
6034         (remote_notif_ack, remote_notif_parse): Add remote_target
6035         parameter.
6036         (remote_notif_state_allocate, remote_notif_state_allocate): Add
6037         remote_target parameter.
6038         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
6039         (threads_listing_context, rmt_thread_action, protocol_feature)
6040         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
6041         (packet_result, struct threads_listing_context, remote_state):
6042         Move definitions and declarations higher up.
6043         (remote_target) <~remote_target>: Declare.
6044         (remote_download_command_source, remote_file_put, remote_file_get)
6045         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
6046         (remote_hostio_pread_vFile, remote_hostio_send_command)
6047         (remote_hostio_set_filesystem, remote_hostio_open)
6048         (remote_hostio_close, remote_hostio_unlink, remote_state)
6049         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
6050         (get_memory_write_packet_size, get_memory_read_packet_size)
6051         (append_pending_thread_resumptions, remote_detach_1)
6052         (append_resumption, remote_resume_with_vcont)
6053         (add_current_inferior_and_thread, wait_ns, wait_as)
6054         (process_stop_reply, remote_notice_new_inferior)
6055         (process_initial_stop_replies, remote_add_thread)
6056         (btrace_sync_conf, remote_btrace_maybe_reopen)
6057         (remove_new_fork_children, kill_new_fork_children)
6058         (discard_pending_stop_replies, stop_reply_queue_length)
6059         (check_pending_events_prevent_wildcard_vcont)
6060         (discard_pending_stop_replies_in_queue, stop_reply)
6061         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
6062         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
6063         (remote_interrupt_as, remote_interrupt_ns)
6064         (remote_get_noisy_reply, remote_query_attached)
6065         (remote_add_inferior, remote_current_thread, get_current_thread)
6066         (set_thread, set_general_thread, set_continue_thread)
6067         (set_general_process, write_ptid)
6068         (remote_unpack_thread_info_response, remote_get_threadinfo)
6069         (parse_threadlist_response, remote_get_threadlist)
6070         (remote_threadlist_iterator, remote_get_threads_with_ql)
6071         (remote_get_threads_with_qxfer)
6072         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
6073         (get_offsets, remote_check_symbols, remote_supported_packet)
6074         (remote_query_supported, remote_packet_size)
6075         (remote_serial_quit_handler, remote_detach_pid)
6076         (remote_vcont_probe, remote_resume_with_hc)
6077         (send_interrupt_sequence, interrupt_query)
6078         (remote_notif_get_pending_events, fetch_register_using_p)
6079         (send_g_packet, process_g_packet, fetch_registers_using_g)
6080         (store_register_using_P, store_registers_using_G)
6081         (set_remote_traceframe, check_binary_download)
6082         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
6083         (remote_xfer_live_readonly_partial, remote_read_bytes)
6084         (remote_send_printf, remote_flash_write, readchar)
6085         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
6086         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
6087         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
6088         (extended_remote_disable_randomization, extended_remote_run)
6089         (send_environment_packet, extended_remote_environment_support)
6090         (extended_remote_set_inferior_cwd, remote_write_qxfer)
6091         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
6092         (packet_command): Now methods of ...
6093         (remote_target): ... this class.
6094         (m_remote_state) <remote_target>: New field.
6095         (struct remote_state) <stop_reply_queue,
6096         remote_async_inferior_event_token, wait_forever_enabled_p>: New
6097         fields.
6098         (remote_state::remote_state): Allocate stop_reply_queue.
6099         (remote_state): Delete global.
6100         (get_remote_state_raw): Delete.
6101         (remote_target::get_remote_state): Allocate m_remote_state on
6102         demand.
6103         (get_current_remote_target): New.
6104         (remote_ops, extended_remote_ops): Delete.
6105         (wait_forever_enabled_p, remote_async_inferior_event_token):
6106         Delete, moved to struct remote_state.
6107         (remote_target::close): Delete self.  Destruction bits split to
6108         ...
6109         (remote_target::~remote_target): ... this.
6110         (show_memory_packet_size): Adjust to use
6111         get_current_remote_target.
6112         (struct protocol_feature) <func>: Add remote_target parameter.
6113         All callers adjusted.
6114         (curr_quit_handler_target): New.
6115         (remote_serial_quit_handler): Reimplement.
6116         (remote_target::open_1): Adjust to use get_current_remote_target.
6117         Heap-allocate remote_target/extended_remote_target instances.
6118         (vcont_builder::vcont_builder): Add remote_target parameter, and
6119         save it in m_remote.  All callers adjusted.
6120         (vcont_builder::m_remote): New field.
6121         (vcont_builder::restart, vcont_builder::flush)
6122         (vcont_builder::push_action): Use it.
6123         (remote_target::commit_resume): Use it.
6124         (struct queue_iter_param) <remote>: New field.
6125         (remote_target::remove_new_fork_children): Fill in 'remote' field.
6126         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
6127         (check_pending_event_prevents_wildcard_vcont_callback)
6128         (remote_target::check_pending_events_prevent_wildcard_vcont)
6129         (remote_target::discard_pending_stop_replies)
6130         (remote_target::discard_pending_stop_replies_in_queue)
6131         (remote_target::remote_notif_remove_queued_reply): Fill in
6132         'remote' field.
6133         (remote_notif_get_pending_events): New.
6134         (remote_target::readchar, remote_target::remote_serial_write):
6135         Save/restore curr_quit_handler_target.
6136         (putpkt): New.
6137         (kill_new_fork_children): Fill in 'remote' field.
6138         (packet_command): Use get_current_remote_target, defer to
6139         remote_target method of same name.
6140         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
6141         parameter, and save it in m_remote.  All callers adjusted.
6142         (scoped_remote_fd::release): Use m_remote.
6143         (scoped_remote_fd::m_remote): New field.
6144         (remote_file_put, remote_file_get, remote_file_delete): Use
6145         get_current_remote_target, defer to remote_target method of same
6146         name.
6147         (remote_btrace_reset): Add remote_state paremeter.  Update all
6148         callers.
6149         (remote_async_inferior_event_handler). Pass down 'data'.
6150         (remote_new_objfile): Use get_current_remote_target.
6151         (remote_target::vcont_r_supported): New.
6152         (set_range_stepping): Use get_current_remote_target and
6153         remote_target::vcont_r_supported.
6154         (_initialize_remote): Don't allocate 'remote_state' and
6155         'stop_reply_queue' globals.
6156         * remote.h (struct remote_target): Forward declare.
6157         (getpkt, putpkt, remote_notif_get_pending_events): Add
6158         'remote_target' parameter.
6159
6160 2018-05-22  Pedro Alves  <palves@redhat.com>
6161
6162         * remote.c (vcont_builder): Now a class.  Make all data members
6163         private.
6164         (vcont_builder) <vcont_builder, restart, flush, push_action>:
6165         Declare methods.
6166         (vcont_builder_restart): Rename to ...
6167         (vcont_builder::restart): ... this.
6168         (vcont_builder_flush): Rename to ...
6169         (vcont_builder::flush): ... this.
6170         (vcont_builder_push_action): Rename to ...
6171         (vcont_builder::push_action): ... this.
6172         (remote_target::commit_resume): Adjust.
6173
6174 2018-05-22  Pedro Alves  <palves@redhat.com>
6175
6176         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
6177         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
6178         (get_fixed_memory_packet_size): New.
6179         (get_memory_packet_size): Use it.
6180         (set_memory_packet_size): Don't override the config size with
6181         DEFAULT_MAX_MEMORY_PACKET_SIZE.
6182         (show_memory_packet_size): Use get_fixed_memory_packet_size.
6183         Don't refer to get_memory_packet_size if not connected to a remote
6184         target.  Show "(default)" if configured size is 0.
6185
6186 2018-05-22  Pedro Alves  <palves@redhat.com>
6187
6188         * remote.c (remote_target::mourn_inferior): Move
6189         discard_pending_stop_replies call here from ...
6190         (_initialize_remote): ... here.
6191
6192 2018-05-22  Pedro Alves  <palves@redhat.com>
6193
6194         * remote.c (compare_section_command): Remove set_general_process
6195         call.
6196
6197 2018-05-22  Pedro Alves  <palves@redhat.com>
6198
6199         * remote.c (struct packet_reg, struct remote_arch_state):
6200         Move higher up in the file.
6201         (remote_state) <m_arch_states>: Store remote_arch_state values
6202         instead of remote_arch_state pointers.
6203         (remote_state::get_remote_arch_state): Adjust.
6204
6205 2018-05-22  Pedro Alves  <palves@redhat.com>
6206
6207         * remote.c: Include <unordered_map>.
6208         (remote_state): Now a class.
6209         (remote_state) <get_remote_arch_state>: Declare method.
6210         <get_remote_arch_state>: New field.
6211         (remote_arch_state) <remote_arch_state>: Declare ctor.
6212         <regs>: Now a unique_ptr.
6213         (remote_gdbarch_data_handle): Delete.
6214         (get_remote_arch_state): Delete.
6215         (remote_state::get_remote_arch_state): New.
6216         (get_remote_state): Adjust to call remote_state's
6217         get_remote_arch_state method.
6218         (init_remote_state): Delete, bits factored out to ...
6219         (remote_arch_state::remote_arch_state): ... this new method.
6220         (get_remote_packet_size, get_memory_packet_size)
6221         (process_g_packet, remote_target::fetch_registers)
6222         (remote_target::prepare_to_store, store_registers_using_G)
6223         (remote_target::store_registers, remote_target::get_trace_status):
6224         Adjust to call remote_state's method.
6225         (_initialize_remote): Remove reference to
6226         remote_gdbarch_data_handle.
6227
6228 2018-05-22  Pedro Alves  <palves@redhat.com>
6229
6230         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
6231         pread>: New method declarations.
6232         (remote_target::open_1): Adjust.
6233         (readahead_cache_invalidate): Rename to ...
6234         (readahead_cache::invalidate): ... this, and adjust to be a class
6235         method.
6236         (readahead_cache_invalidate_fd): Rename to ...
6237         (readahead_cache::invalidate_fd): ... this, and adjust to be a
6238         class method.
6239         (remote_hostio_pwrite): Adjust.
6240         (remote_hostio_pread_from_cache): Rename to ...
6241         (readahead_cache::pread): ... this, and adjust to be a class
6242         method.
6243         (remote_hostio_close): Adjust.
6244
6245 2018-05-22  Pedro Alves  <palves@redhat.com>
6246
6247         * remote.c (remote_hostio_close_cleanup): Delete.
6248         (class scoped_remote_fd): New.
6249         (remote_file_put, remote_file_get): Use it.
6250
6251 2018-05-22  Pedro Alves  <palves@redhat.com>
6252
6253         (struct vCont_action_support): Use bool and initialize all fields.
6254         (struct readahead_cache): Initialize all fields.
6255         (remote_state): Use bool and initialize all fields.
6256         (remote_state::remote_state, remote_state::~remote_state): New.
6257         (new_remote_state): Delete.
6258         (_initialize_remote): Use new to allocate remote_state.
6259
6260 2018-05-22  Pedro Alves  <palves@redhat.com>
6261             張俊芝  <zjz@zjz.name>
6262
6263         PR gdb/22973
6264         * c-exp.y: Include "c-support.h".
6265         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
6266         of tolower.  Use c_ident_is_alpha to scan names.
6267         * c-lang.c: Include "c-support.h".
6268         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
6269         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
6270         * c-support.h: New file, with bits factored out from ...
6271         * cp-name-parser.y: ... this file.
6272         Include "c-support.h".
6273         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
6274         c-support.h and renamed.
6275         (symbol_end, yylex): Adjust.
6276
6277 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6278
6279         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
6280         parameter type to CORE_ADDR.
6281         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
6282         parameter type in declaration to CORE_ADDR.
6283         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
6284         target_auxv_search to get AT_HWCAP and use the result to get the
6285         target description.
6286         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
6287         to CORE_ADDR. Remove the cast of the return value to unsigned
6288         long. Fix error predicate of target_auxv_search.
6289         (ppc_linux_nat_target::read_description): Change the type of the
6290         hwcap variable to CORE_ADDR.
6291
6292 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6293
6294         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
6295         if the size of fpscr is larger than 32 bits.
6296
6297 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6298
6299         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
6300         (ppc32_linux_vsxregmap): New global.
6301         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
6302         regcache_supply_regset, and regcache_collect_regset.
6303         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
6304         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
6305         (fetch_vsx_register, store_vsx_register): Remove.
6306         (fetch_vsx_registers): Add regno parameter. Get regset using
6307         ppc_linux_vsxregset. Use regset to supply registers.
6308         (store_vsx_registers): Add regno parameter. Get regset using
6309         ppc_linux_vsxregset. Use regset to collect registers.
6310         (fetch_register): Call fetch_vsx_registers instead of
6311         fetch_vsx_register.
6312         (store_register): Call store_vsx_registers instead of
6313         store_vsx_register.
6314         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
6315         new regno parameter.
6316         (store_ppc_registers): Call store_vsx_registers with -1 for the
6317         new regno parameter.
6318         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
6319         (ppc_collect_vsxregset): Remove.
6320
6321 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6322
6323         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
6324         offset fields.
6325         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
6326         for vector register offset fields.
6327         (ppc64_fbsd_reg_offsets): Likewise.
6328         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
6329         to vector register offset fields.
6330         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
6331         to vector register offset fields.
6332         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
6333         vector register offset fields.
6334         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
6335         initializers for vector register offset fields.
6336         (rs6000_aix64_reg_offsets): Likewise.
6337         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
6338         (ppc_supply_vrregset): Remove.
6339         (ppc_collect_vrregset): Remove.
6340         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
6341         (ppc_linux_vrregset) : New function.
6342         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
6343         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
6344         (ppc32_linux_vrregset): Remove.
6345         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
6346         and use result instead of ppc32_linux_vrregset.
6347         (ppc32_linux_reg_offsets): Remove initializers for vector register
6348         offset fields.
6349         (ppc64_linux_reg_offsets): Likewise.
6350         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
6351         * ppc-linux-nat.c: Include regset.h.
6352         (gdb_vrregset_t): Adjust comment to account for little-endian
6353         mode.
6354         (supply_vrregset, fill_vrregset): Remove.
6355         (fetch_altivec_register, store_altivec_register): Remove.
6356         (fetch_altivec_registers): Add regno parameter. Get regset using
6357         ppc_linux_vrregset. Use regset to supply registers.
6358         (store_altivec_registers): Add regno parameter. Get regset using
6359         ppc_linux_vrregset. Use regset to collect registers.
6360         (fetch_register): Call fetch_altivec_registers instead of
6361         fetch_altivec_register.
6362         (store_register): Call store_altivec_registers instead of
6363         store_altivec_register.
6364         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
6365         the new regno parameter.
6366         (store_ppc_registers): Call store_altivec_registers with -1 for
6367         the new regno parameter.
6368
6369 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6370
6371         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
6372         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
6373         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
6374         (gdb_vrregset_t): Change array type size to
6375         PPC_LINUX_SIZEOF_VRREGSET.
6376         (gdb_vsxregset_t): Change array type size to
6377         PPC_LINUX_SIZEOF_VSXREGSET.
6378         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
6379         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
6380         PPC_LINUX_SIZEOF_VSXREGSET.
6381
6382 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6383
6384         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
6385         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
6386         nat/ppc-linux.c.
6387         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
6388         ppc_linux_target_wordsize with tid.
6389         (ppc_linux_nat_target::read_description): Call ppc_linux_target
6390         wordsize with tid.
6391         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
6392         (ppc64_64bit_inferior_p): Add static and inline specifiers.
6393         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
6394         tid parameter. Remove static specifier.
6395         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
6396         (ppc_linux_target_wordsize): New declaration.
6397
6398 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6399
6400         * arch/ppc-linux-common.c: New file.
6401         * arch/ppc-linux-common.h: New file.
6402         * arch/ppc-linux-tdesc.h: New file.
6403         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
6404         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
6405         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
6406         arch/ppc-linux-tdesc.h.
6407         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
6408         arch/ppc-linux-tdesc.h.
6409         (ppc_linux_nat_target::read_description): Remove target
6410         description matching code. Fill a ppc_linux_features struct and
6411         call ppc_linux_match_description with it. Move comment about ISA
6412         2.05 to ppc-linux-common.c.
6413         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
6414         arch/ppc-linux-tdesc.h.
6415         (ppc_linux_core_read_description): Remove target description
6416         matching code. Fill a ppc_linux_features struct and call
6417         ppc_linux_match_description with it.
6418         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
6419         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
6420         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
6421         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
6422         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
6423         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
6424         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
6425         (tdesc_powerpc_e500l): Remove.
6426
6427 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
6428
6429         * ada-lang.c (catch_assert_command): Pass empty string instead
6430         of NULL for excep_string argument.
6431
6432 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
6433
6434         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
6435         the width of the requested register exceeds the width of the
6436         `ptrace' data type.
6437
6438 2018-05-21  Tom Tromey  <tom@tromey.com>
6439
6440         * printcmd.c (output_command): Remove.
6441         (output_command_const): Rename to output_command.
6442         * valprint.h (output_command): Rename from output_command_const.
6443         * tracepoint.c (trace_dump_actions): Call output_command.
6444
6445 2018-05-21  Tom Tromey  <tom@tromey.com>
6446
6447         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
6448         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
6449         * ada-lang.h (create_ada_exception_catchpoint): Update.
6450         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
6451         std::string.
6452         (create_excep_cond_exprs, ~ada_catchpoint)
6453         (should_stop_exception, print_one_exception)
6454         (print_mention_exception, print_recreate_exception): Update.
6455         (ada_get_next_arg): Remove.
6456         (catch_ada_exception_command_split): Use std::string.  Change type
6457         of "excep_string", "cond_string".
6458         (catch_ada_exception_command): Update.
6459         (create_ada_exception_catchpoint): Change type of excep_string.
6460         (ada_exception_sal): Remove excep_string parameter.
6461         (~ada_catchpoint): Remove.
6462
6463 2018-05-21  Tom Tromey  <tom@tromey.com>
6464
6465         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
6466         cleanup.
6467
6468 2018-05-21  Tom Tromey  <tom@tromey.com>
6469
6470         * ada-lang.c (ada_exception_message_1, ada_exception_message):
6471         Return unique_xmalloc_ptr.
6472         (print_it_exception): Update.
6473
6474 2018-05-21  Tom Tromey  <tom@tromey.com>
6475
6476         * tracepoint.c (trace_dump_actions): Use std::string.
6477
6478 2018-05-21  Tom Tromey  <tom@tromey.com>
6479
6480         * symfile.c (reread_symbols): Use std::string for original_name.
6481
6482 2018-05-21  Tom Tromey  <tom@tromey.com>
6483
6484         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
6485         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
6486         constructor.
6487
6488 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
6489
6490         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
6491         instance to...
6492         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
6493         * objfiles.c (get_objfile_bfd_data): Allocate
6494         objfile_per_bfd_storage with obstack_new when allocating on
6495         obstack.
6496
6497 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
6498
6499         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
6500         OBSTACK_ZALLOC.
6501         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
6502         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
6503         * mdebugread.c (mdebug_build_psymtabs): Likewise.
6504         (add_pending): Likewise.
6505         (parse_symbol): Likewise.
6506         (parse_partial_symbols): Likewise.
6507         (psymtab_to_symtab_1): Likewise.
6508         (new_psymtab): Likewise.
6509         (elfmdebug_build_psymtabs): Likewise.
6510         * minsyms.c (terminate_minimal_symbol_table): Likewise.
6511         * objfiles.c (get_objfile_bfd_data): Likewise.
6512         (objfile_register_static_link): Likewise.
6513         * psymtab.c (allocate_psymtab): Likewise.
6514         * stabsread.c (read_member_functions): Likewise.
6515         * xcoffread.c (xcoff_end_psymtab): Likewise.
6516
6517 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
6518
6519         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
6520         compiler supports std::is_trivially_constructible.
6521         * common/poison.h: Include obstack.h.
6522         (IsMallocable): Define to is_trivially_constructible if the
6523         compiler supports it, define to true_type otherwise.
6524         (xobnew): New.
6525         (XOBNEW): Redefine.
6526         (xobnewvec): New.
6527         (XOBNEWVEC): Redefine.
6528         * gdb_obstack.h (obstack_zalloc): New.
6529         (OBSTACK_ZALLOC): Redefine.
6530         (obstack_calloc): New.
6531         (OBSTACK_CALLOC): Redefine.
6532         (obstack_new): New.
6533         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
6534         (gdbarch_obstack): New declaration in gdbarch.h, definition in
6535         gdbarch.c.
6536         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
6537         obstack_calloc/obstack_zalloc.
6538         (gdbarch_obstack_zalloc): Remove.
6539         * target-descriptions.c (tdesc_data_init): Use obstack_new.
6540
6541 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6542
6543         * stack.c (backtrace_command_1): Remove useless variable int i.
6544
6545 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6546
6547         * stack.c (print_frame_info): Fix comment.
6548
6549 2018-05-18  Tom Tromey  <tom@tromey.com>
6550
6551         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
6552         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
6553         (~dwarf2_per_objfile): Update
6554         (dwarf2_get_dwz_file): Use new.
6555         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
6556         unique_ptr.
6557
6558 2018-05-18  Tom Tromey  <tom@tromey.com>
6559
6560         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
6561         unique_ptr.
6562         * dwarf2read.c (struct dwp_file): Add constructor and
6563         initializers.
6564         (open_and_init_dwp_file): Return a unique_ptr.
6565         (dwarf2_per_objfile, create_dwp_hash_table)
6566         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
6567         (lookup_dwo_unit_in_dwp): Update.
6568         (open_and_init_dwp_file, get_dwp_file): Update.
6569
6570 2018-05-18  Tom Tromey  <tom@tromey.com>
6571
6572         * dwarf2read.c (dwarf2_per_objfile): Update.
6573         (struct mapped_index): Add initializers.
6574         (dwarf2_read_index): Use new.
6575         (dw2_symtab_iter_init): Update.
6576         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
6577         unique_ptr.
6578
6579 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
6580
6581         * dwarf2read.c (mapped_index) <total_size>: Remove.
6582
6583 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
6584
6585         * unittests/format_pieces-selftests.c (test_format_specifier):
6586         Add ARI comments.
6587
6588 2018-05-18  Tom Tromey  <tom@tromey.com>
6589
6590         * c-typeprint.c (maybe_print_hole): New function.
6591         (c_print_type_struct_field_offset): Update.
6592         (c_type_print_base_struct_union): Call maybe_print_hole.
6593
6594 2018-05-17  Keith Seitz  <keiths@redhat.com>
6595
6596         * breakpoint.c (build_bpstat_chain): New function, moved from
6597         bpstat_stop_status.
6598         (bpstat_stop_status): Add optional parameter, `stop_chain'.
6599         If no stop chain is passed, call build_bpstat_chain to build it.
6600         * breakpoint.h (build_bpstat_chain): Declare.
6601         (bpstat_stop_status): Move documentation here from breakpoint.c.
6602         * infrun.c (handle_signal_stop): Before eliding inlined frames,
6603         build the stop chain and pass it to skip_inline_frames.
6604         Pass this stop chain to bpstat_stop_status.
6605         * inline-frame.c: Include breakpoint.h.
6606         (stopped_by_user_bp_inline_frame): New function.
6607         (skip_inline_frames): Add parameter `stop_chain'.
6608         Move documention to inline-frame.h.
6609         If non-NULL, use stopped_by_user_bp_inline_frame to determine
6610         whether the frame should be elided.
6611         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
6612         Add moved documentation and update for new parameter.
6613
6614 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
6615
6616         PR cli/14975
6617         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6618         unittests/format_pieces-selftests.c.
6619         * common/format.h (format_piece) <operator==>: New.
6620         (format_pieces) <operator[]>: Remove.
6621         * common/format.c (format_pieces::format_pieces): Handle \e.
6622         * unittests/format_pieces-selftests.c: New.
6623
6624 2018-05-17  Tom Tromey  <tom@tromey.com>
6625
6626         PR symtab/23010:
6627         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
6628         (dw2_instantiate_symtab): Add skip_partial parameter.
6629         (dw2_find_last_source_symtab, dw2_map_expand_apply)
6630         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
6631         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
6632         (dw2_expand_symtabs_matching_one)
6633         (dw2_find_pc_sect_compunit_symtab)
6634         (dw2_debug_names_lookup_symbol)
6635         (dw2_debug_names_expand_symtabs_for_function): Update.
6636         (init_cutu_and_read_dies): Add skip_partial parameter.
6637         (process_psymtab_comp_unit, build_type_psymtabs_1)
6638         (process_skeletonless_type_unit, load_partial_comp_unit)
6639         (psymtab_to_symtab_1): Update.
6640         (load_full_comp_unit): Add skip_partial parameter.
6641         (process_imported_unit_die, dwarf2_read_addr_index)
6642         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
6643         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
6644         (read_signatured_type): Update.
6645
6646 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
6647
6648         * value.c (release_value): Remove unused variable.
6649         (record_latest_value): Likewise.
6650         (access_value_history): Likewise.
6651         (preserve_values): Likewise.
6652
6653 2018-05-17  Tom Tromey  <tom@tromey.com>
6654
6655         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
6656         Initialize.
6657
6658 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
6659
6660         PR gdb/22286
6661         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
6662         Also handle registers whose width is not a multiple of
6663         PTRACE_TYPE_RET.
6664         (linux_nat_trad_target::store_register): Likewise.
6665
6666 2018-05-16  Tom Tromey  <tom@tromey.com>
6667
6668         * gdbcore.h (core_bfd): Redefine.
6669         * corelow.c (core_target::close): Update.
6670         (core_target_open): Update.
6671         * progspace.h (struct program_space) <cbfd>: Now a
6672         gdb_bfd_ref_ptr.
6673
6674 2018-05-16  Tom Tromey  <tom@tromey.com>
6675
6676         PR cli/19551:
6677         * symfile-add-flags.h (enum symfile_add_flags)
6678         <SYMFILE_NOT_FILENAME>: New constant.
6679         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
6680         objfile name from BFD.
6681         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
6682         * minidebug.c (find_separate_debug_file_in_section): Put
6683         ".gnu_debugdata" into BFD's file name.
6684
6685 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
6686
6687         * regcache.c (regcache_read_ftype, regcache_write_ftype):
6688         Remove.
6689
6690 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
6691
6692         PR binutils/21446
6693         * aarch64-tdep.c (aarch64_analyze_prologue,
6694         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
6695         Indicate not interested in errors.
6696
6697 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
6698
6699         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
6700         Supply the MIPS_ZERO_REGNUM register.
6701
6702 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
6703
6704         * mips-tdep.c (mask_address_var): Make variable static.
6705
6706 2018-05-14  Tom Tromey  <tom@tromey.com>
6707
6708         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
6709
6710 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
6711
6712         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
6713         FXSAVE_ADDR for the mxcsr register.
6714
6715 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
6716
6717         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
6718
6719 2018-05-11  Pedro Alves  <palves@redhat.com>
6720
6721         * corelow.c (core_target) <core_target>: No longer inline.
6722         Initialize m_core_gdbarch, m_core_vec and build the section table
6723         here.
6724         <~core_target>: New.
6725         <core_gdbarch, get_core_register_section>: New methods.
6726         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
6727         factored out from ...
6728         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
6729         (core_ops): Delete.
6730         (sniff_core_bfd): Add gdbarch parameter.
6731         (core_close): Delete, merged into ...
6732         (core_target::close): ... here.  Delete self.
6733         (core_close_cleanup): Delete.
6734         (core_target_open): Allocate a core_target on the heap.  Use a
6735         unique_ptr instead of a cleanup.  Bits moved into the core_target
6736         ctor.  Adjust to use core_target methods instead of globals.
6737         (get_core_register_section): Rename to ...
6738         (core_target::get_core_register_section): ... this and adjust.
6739         (struct get_core_registers_cb_data): New.
6740         (get_core_registers_cb): Use it.  Use bool.
6741         (core_target::fetch_registers, core_target::files_info)
6742         (core_target::xfer_partial, core_target::read_description)
6743         (core_target::pid_to, core_target::thread_name): Adjust to
6744         reference class fields instead of globals.
6745         * target.h (struct target_ops_deleter, target_ops_up): New.
6746
6747 2018-05-11  Pedro Alves  <palves@redhat.com>
6748
6749         * corefile.c (core_file_command): Move to corelow.c.
6750         * corelow.c (the_core_target): Delete.
6751         (core_file_command): Moved from corefile.c.  Check exec_bfd
6752         instead of the_core_target.  Use target_detach instead of calling
6753         into the_core_target directly.
6754         (maybe_say_no_core_file_now): New.
6755         (core_target::detach): Use it.
6756         (_initialize_corelow): Remove references to the_core_target.
6757         * gdbcore.h (the_core_target): Delete.
6758
6759 2018-05-11  Tom Tromey  <tromey@redhat.com>
6760             Pedro Alves  <palves@redhat.com>
6761
6762         * corefile.c (core_bfd): Remove.
6763         * gdbcore.h (core_bfd): Now a macro.
6764         * progspace.h (struct program_space) <cbfd>: New field.
6765
6766 2018-05-11  Tom Tromey  <tom@tromey.com>
6767
6768         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
6769         gdb::def_vector.
6770
6771 2018-05-10  Tom Tromey  <tom@tromey.com>
6772
6773         * configure: Rebuild.
6774         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
6775
6776 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
6777
6778         PR server/23158:
6779         * regformats/regdat.sh: Adjust script, following the addition
6780         of the new expedite_regs parameter to init_target_desc.
6781
6782 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
6783     
6784         PR gdb/23127
6785         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
6786         set_gdbarch_significant_addr_bit.
6787         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
6788         set_gdbarch_significant_addr_bit.
6789         * utils.c (address_significant): Update to sign extend addr.
6790
6791 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
6792
6793         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
6794         (xtensa_linux_init_abi): Limit tdep->num_regs by
6795         tdep->num_nopriv_regs.
6796         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
6797         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
6798         not initialized.
6799
6800 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
6801
6802         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
6803
6804 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
6805
6806         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
6807         (I387_MXCSR_INIT_VAL): New constant.
6808         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
6809         buffer if it was supplied by the inferior.
6810         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
6811         (i387_xsave_get_clear_bv): New function.
6812         (i387_supply_xsave): Only read x87 control registers from the
6813         xsave buffer if the feature is enabled, and the state will have
6814         been written, otherwise, provide a suitable default.
6815         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
6816         including x87 control registers.  Update control registers if they
6817         have changed from the default value, and mark features as enabled
6818         as required.
6819         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
6820
6821 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
6822
6823         * spu-tdep.c (info_spu_event_command): Fix output formatting.
6824
6825 2018-05-07  Tom Tromey  <tom@tromey.com>
6826
6827         * configure: Rebuild.
6828         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
6829
6830 2018-05-07  Tom Tromey  <tom@tromey.com>
6831
6832         PR tdep/20362:
6833         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
6834         bit.  Use correct value for VDIV.
6835
6836 2018-05-04  Tom Tromey  <tom@tromey.com>
6837
6838         * configure: Rebuild.
6839         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
6840
6841 2018-05-04  Tom Tromey  <tom@tromey.com>
6842
6843         * linux-record.c (record_linux_system_call) <case
6844         RECORD_SYS_RECVFROM>: Add "break".
6845
6846 2018-05-04  Tom Tromey  <tom@tromey.com>
6847
6848         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
6849         Add missing "break".
6850         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
6851         Add missing "break".
6852
6853 2018-05-04  Tom Tromey  <tom@tromey.com>
6854
6855         * rs6000-tdep.c (ppc_process_record_op4)
6856         (ppc_process_record_op63): Add fall-through comment.
6857
6858 2018-05-04  Tom Tromey  <tom@tromey.com>
6859
6860         * i386-tdep.c (i386_process_record): Add fall-through comment.
6861
6862 2018-05-04  Tom Tromey  <tom@tromey.com>
6863
6864         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
6865         comment.
6866
6867 2018-05-04  Tom Tromey  <tom@tromey.com>
6868
6869         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
6870         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
6871         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
6872         comment.
6873         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
6874         comment.
6875         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
6876         comment.
6877
6878 2018-05-04  Tom Tromey  <tom@tromey.com>
6879
6880         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
6881
6882 2018-05-04  Tom Tromey  <tom@tromey.com>
6883
6884         * s390-tdep.c (s390_process_record): Fix fall-through comments.
6885         * xcoffread.c (scan_xcoff_symtab): Move comment later.
6886         * symfile.c (section_is_mapped): Fix fall-through comment.
6887         * stabsread.c (define_symbol, read_member_functions): Fix
6888         fall-through comment.
6889         * s390-linux-tdep.c (s390_process_record): Fix fall-through
6890         comment.
6891         * remote.c (remote_wait_as): Fix fall-through comment.
6892         * p-exp.y (yylex): Fix fall-through comment.
6893         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
6894         comment.
6895         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
6896         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
6897         * jv-exp.y (yylex): Fix fall-through comment.
6898         * go-exp.y (lex_one_token): Fix fall-through comment.
6899         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
6900         fall-through comment.
6901         * f-exp.y (yylex): Fix fall-through comment.
6902         * dwarf2read.c (process_die): Fix fall-through comments.
6903         * dbxread.c (process_one_symbol): Fix fall-through comment.
6904         * d-exp.y (lex_one_token): Fix fall-through comment.
6905         * cp-name-parser.y (yylex): Fix fall-through comment.
6906         * coffread.c (coff_symtab_read): Fix fall-through comment.
6907         * c-exp.y (lex_one_token): Fix fall-through comment.
6908         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
6909         comment.
6910         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
6911         comment.
6912
6913 2018-05-04  Tom Tromey  <tom@tromey.com>
6914
6915         PR python/22730:
6916         * NEWS: Mention gdb.execute change.
6917         * gdbcmd.h (execute_control_command): Don't declare.
6918         * python/python.c (execute_gdb_command): Use read_command_lines_1,
6919         execute_control_commands, execute_control_commands_to_string.
6920         * cli/cli-script.h (execute_control_commands)
6921         (execute_control_commands_to_string): Declare.
6922         (execute_control_command): Add from_tty parameter.
6923         * cli/cli-script.c (execute_control_commands)
6924         (execute_control_commands_to_string): New functions.
6925         (execute_user_command): Use execute_control_commands.
6926         (execute_control_command_1): Add "from_tty" parameter.  Update.
6927         (execute_control_command): Likewise.
6928
6929 2018-05-04  Tom Tromey  <tom@tromey.com>
6930
6931         PR python/22731:
6932         * NEWS: Mention that breakpoint commands are writable.
6933         * python/py-breakpoint.c (bppy_set_commands): New function.
6934         (breakpoint_object_getset) <"commands">: Use it.
6935
6936 2018-05-04  Tom Tromey  <tom@tromey.com>
6937
6938         * tracepoint.c (actions_command): Update.
6939         * mi/mi-cmd-break.c (mi_command_line_array)
6940         (mi_command_line_array_cnt, mi_command_line_array_ptr)
6941         (mi_read_next_line): Remove.
6942         (mi_cmd_break_commands): Update.
6943         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
6944         function_view.
6945         * cli/cli-script.c (get_command_line): Update.
6946         (process_next_line): Use function_view.  Constify.
6947         (recurse_read_control_structure, read_command_lines)
6948         (read_command_lines_1): Change argument types to function_view.
6949         (do_define_command, document_command): Update.
6950         * breakpoint.h (check_tracepoint_command): Don't declare.
6951         * breakpoint.c (check_tracepoint_command): Remove.
6952         (commands_command_1, create_tracepoint_from_upload): Update.
6953
6954 2018-05-04  Tom Tromey  <tom@tromey.com>
6955
6956         PR gdb/11750:
6957         * cli/cli-script.h (enum command_control_type) <define_control>:
6958         New constant.
6959         * cli/cli-script.c (multi_line_command_p): Handle define_control.
6960         (build_command_line, execute_control_command_1)
6961         (process_next_line): Likewise.
6962         (do_define_command): New function, extracted from define_command.
6963         (define_command): Use it.
6964
6965 2018-05-04  Tom Tromey  <tom@tromey.com>
6966
6967         * tracepoint.c (actions_command): Update.
6968         * cli/cli-script.h (read_command_lines): Update.
6969         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
6970         (MAX_TMPBUF): Remove define.
6971         (define_command): Use string_printf.
6972         (document_command): Likewise.
6973         * breakpoint.c (commands_command_1): Update.
6974
6975 2018-05-04  Tom Tromey  <tom@tromey.com>
6976
6977         * top.c (execute_command): Update.
6978         * cli/cli-script.h (print_command_lines): Now varargs.
6979         * cli/cli-script.c (print_command_lines): Now varargs.
6980         (execute_control_command_1) <case while_control, case if_control>:
6981         Update.
6982
6983 2018-05-04  Tom Tromey  <tom@tromey.com>
6984
6985         * tracepoint.c (all_tracepoint_actions): Rename from
6986         all_tracepoint_actions_and_cleanup.  Change return type.
6987         (actions_command, encode_actions_1, encode_actions)
6988         (trace_dump_actions, tdump_command): Update.
6989         * remote.c (remote_download_command_source): Update.
6990         * python/python.c (gdbpy_eval_from_control_command)
6991         (python_command, python_interactive_command): Update.
6992         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
6993         * guile/guile.c (guile_command)
6994         (gdbscm_eval_from_control_command, guile_command): Update.
6995         * compile/compile.c (compile_code_command)
6996         (compile_print_command, compile_to_object): Update.
6997         * cli/cli-script.h (struct command_lines_deleter): New.
6998         (counted_command_line): New typedef.
6999         (struct command_line): Add constructor, destructor.
7000         <body_list>: Remove.
7001         <body_list_0, body_list_1>: New members.
7002         (command_line_up): Remove typedef.
7003         (read_command_lines, read_command_lines_1, get_command_line):
7004         Update.
7005         (copy_command_lines): Don't declare.
7006         * cli/cli-script.c (build_command_line): Use "new".
7007         (get_command_line): Return counted_command_line.
7008         (print_command_lines, execute_user_command)
7009         (execute_control_command_1, while_command, if_command): Update.
7010         (realloc_body_list): Remove.
7011         (process_next_line, recurse_read_control_structure): Update.
7012         (read_command_lines, read_command_lines_1): Return counted_command_line.
7013         (free_command_lines): Use "delete".
7014         (copy_command_lines): Remove.
7015         (define_command, document_command, show_user_1): Update.
7016         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
7017         a counted_command_line.
7018         * breakpoint.h (counted_command_line): Remove typedef.
7019         (breakpoint_set_commands): Update.
7020         * breakpoint.c (check_no_tracepoint_commands)
7021         (validate_commands_for_breakpoint): Update.
7022         (breakpoint_set_commands): Change commands to be a
7023         counted_command_line.
7024         (commands_command_1, update_dprintf_command_list)
7025         (create_tracepoint_from_upload): Update.
7026
7027 2018-05-04  Tom Tromey  <tom@tromey.com>
7028
7029         * cli/cli-decode.h (cmd_list_element): New constructor.
7030         (~cmd_list_element): New destructor.
7031         (struct cmd_list_element): Add initializers.
7032         * cli/cli-decode.c (do_add_cmd): Use "new".
7033         (delete_cmd): Use "delete".
7034
7035 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
7036             Pedro Alves <palves@redhat.com>
7037
7038         PR breakpoints/19806 and support for PR external/20207.
7039         * NEWS: Mention Aarch64 watchpoint improvements.
7040         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
7041         watchpoints and PR external/20207 watchpoints.
7042         * nat/aarch64-linux-hw-point.c
7043         (kernel_supports_any_contiguous_range): New.
7044         (aarch64_watchpoint_offset): New.
7045         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
7046         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
7047         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
7048         (aarch64_align_watchpoint): New parameters aligned_offset_p and
7049         next_addr_orig_p.  Support PR external/20207 watchpoints.
7050         (aarch64_downgrade_regs): New.
7051         (aarch64_dr_state_insert_one_point): New parameters offset and
7052         addr_orig.
7053         (aarch64_dr_state_remove_one_point): Likewise.
7054         (aarch64_handle_breakpoint): Update caller.
7055         (aarch64_handle_aligned_watchpoint): Likewise.
7056         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
7057         aligned_offset.
7058         (aarch64_linux_set_debug_regs): Remove const from state.  Call
7059         aarch64_downgrade_regs.
7060         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
7061         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
7062         (DR_CONTROL_MASK): ... this.
7063         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
7064         (unsigned int aarch64_watchpoint_offset): New prototype.
7065         (aarch64_linux_set_debug_regs): Remove const from state.
7066         * utils.c (align_up, align_down): Move to ...
7067         * common/common-utils.c (align_up, align_down): ... here.
7068         * utils.h (align_up, align_down): Move to ...
7069         * common/common-utils.h (align_up, align_down): ... here.
7070
7071 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
7072
7073         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
7074         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
7075         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
7076         Re-implement to match the ABI as summarized in GCC's
7077         gcc/config/sparc/sparc.c.  All callers updated.
7078         (sparc32_store_arguments): Remove assertion.
7079
7080 2018-05-04  Tom Tromey  <tom@tromey.com>
7081
7082         * printcmd.c: Don't include tui.h.
7083         (decode_format): Use skip_spaces.
7084
7085 2018-05-04  Tom Tromey  <tom@tromey.com>
7086
7087         PR gdb/22619:
7088         * printcmd.c (last_count): New global.
7089         (x_command): Use saved count when repeating.
7090
7091 2018-05-04  Tom Tromey  <tom@tromey.com>
7092
7093         * nto-procfs.c (do_closedir_cleanup): Remove.
7094         (procfs_pidlist): Use gdb_dir_up.
7095         * procfs.c (do_closedir_cleanup): Remove.
7096         (proc_update_threads): Use gdb_dir_up.
7097         * common/filestuff.h (struct gdb_dir_deleter): New.
7098         (gdb_dir_up): New typedef.
7099
7100 2018-05-04  Tom Tromey  <tom@tromey.com>
7101
7102         * ada-lang.c (print_mention_exception): Use std::string.
7103
7104 2018-05-04  Tom Tromey  <tom@tromey.com>
7105
7106         * ada-lang.c (create_excep_cond_exprs): Update.
7107         (ada_exception_catchpoint_cond_string): Use std::string.
7108
7109 2018-05-04  Tom Tromey  <tom@tromey.com>
7110
7111         * ada-lang.c (xget_renaming_scope): Return std::string.
7112         (old_renaming_is_invisible): Update.
7113
7114 2018-05-04  Tom Tromey  <tom@tromey.com>
7115
7116         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
7117         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
7118
7119 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
7120
7121         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
7122
7123 2018-05-04  Tom Tromey  <tom@tromey.com>
7124
7125         * remote.c (remote_query_supported_append): Change type.
7126         (remote_check_symbols): Update.
7127
7128 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
7129
7130         PR gdb/11420
7131         * configure.ac: Prepend libpython.
7132         * python/python-config.py: Likewise.
7133         * configure: Regenerate.
7134
7135 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
7136
7137         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
7138
7139 2018-05-03  Pedro Alves  <palves@redhat.com>
7140
7141         * s390-linux-nat.c
7142         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
7143         override.  Write 'true' instead of '1'.
7144         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
7145         declaration.
7146
7147 2018-05-02  Pedro Alves  <palves@redhat.com>
7148
7149         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
7150         add_inf_child_target.
7151         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
7152         add_inf_child_target.
7153         * aix-thread.c (aix_thread_target_info): New.
7154         (aix_thread_target) <shortname, longname, doc>: Delete.
7155         <info>: New.
7156         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
7157         add_inf_child_target.
7158         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
7159         add_inf_child_target.
7160         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
7161         add_inf_child_target.
7162         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
7163         add_inf_child_target.
7164         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
7165         add_inf_child_target.
7166         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
7167         add_inf_child_target.
7168         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
7169         add_inf_child_target.
7170         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
7171         add_inf_child_target.
7172         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
7173         add_inf_child_target.
7174         * bfd-target.c (target_bfd_target_info): New.
7175         (target_bfd) <shortname, longname, doc>: Delete.
7176         <info>: New.
7177         * bsd-kvm.c (bsd_kvm_target_info): New.
7178         (bsd_kvm_target) <shortname, longname, doc>: Delete.
7179         <info>: New.
7180         (bsd_kvm_target::open): Rename to ...
7181         (bsd_kvm_target_open): ... this.  Adjust.
7182         * bsd-uthread.c (bsd_uthread_target_info): New.
7183         (bsd_uthread_target) <shortname, longname, doc>: Delete.
7184         <info>: New.
7185         * corefile.c (core_file_command): Adjust.
7186         * corelow.c (core_target_info): New.
7187         (core_target) <shortname, longname, doc>: Delete.
7188         <info>: New.
7189         (core_target::open): Rename to ...
7190         (core_target_open): ... this.  Adjust.
7191         * ctf.c (ctf_target_info): New.
7192         (ctf_target) <shortname, longname, doc>: Delete.
7193         <info>: New.
7194         (ctf_target::open): Rename to ...
7195         (ctf_target_open): ... this.
7196         (_initialize_ctf): Adjust.
7197         * exec.c (exec_target_info): New.
7198         (exec_target) <shortname, longname, doc>: Delete.
7199         <info>: New.
7200         (exec_target::open): Rename to ...
7201         (exec_target_open): ... this.
7202         * gdbcore.h (core_target_open): Declare.
7203         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
7204         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
7205         add_inf_child_target.
7206         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
7207         add_inf_child_target.
7208         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
7209         add_inf_child_target.
7210         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
7211         add_inf_child_target.
7212         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
7213         add_inf_child_target.
7214         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
7215         add_inf_child_target.
7216         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
7217         add_inf_child_target.
7218         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
7219         add_inf_child_target.
7220         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
7221         add_inf_child_target.
7222         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
7223         add_inf_child_target.
7224         * inf-child.c (inf_child_target_info): New.
7225         (inf_child_target::info): New.
7226         (inf_child_open_target): Remove 'target' parameter.  Use
7227         get_native_target instead.
7228         (inf_child_target::open): Delete.
7229         (add_inf_child_target): New.
7230         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
7231         Delete.
7232         <info>: New.
7233         (add_inf_child_target): Declare.
7234         (inf_child_open_target): Declare.
7235         * linux-thread-db.c (thread_db_target_info): New.
7236         (thread_db_target) <shortname, longname, doc>: Delete.
7237         <info>: New.
7238         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
7239         add_inf_child_target.
7240         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
7241         add_inf_child_target.
7242         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
7243         add_inf_child_target.
7244         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
7245         add_inf_child_target.
7246         * make-target-delegates (print_class): Adjust.
7247         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
7248         add_inf_child_target.
7249         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
7250         add_inf_child_target.
7251         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
7252         add_inf_child_target.
7253         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
7254         add_inf_child_target.
7255         * nto-procfs.c (nto_native_target_info): New.
7256         (nto_procfs_target_native) <shortname, longname, doc>:
7257         Delete.
7258         <info>: New.
7259         (nto_procfs_target_info): New.
7260         (nto_procfs_target_procfs) <shortname, longname, doc>:
7261         Delete.
7262         <info>: New.
7263         (init_procfs_targets): Adjust.
7264         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
7265         add_inf_child_target.
7266         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
7267         add_inf_child_target.
7268         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
7269         add_inf_child_target.
7270         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
7271         add_inf_child_target.
7272         * ravenscar-thread.c (ravenscar_target_info): New.
7273         (ravenscar_thread_target) <shortname, longname, doc>:
7274         Delete.
7275         <info>: New.
7276         * record-btrace.c (record_btrace_target_info):
7277         (record_btrace_target) <shortname, longname, doc>: Delete.
7278         <info>: New.
7279         (record_btrace_target::open): Rename to ...
7280         (record_btrace_target_open): ... this.  Adjust.
7281         * record-full.c (record_longname, record_doc): New.
7282         (record_full_base_target) <shortname, longname, doc>: Delete.
7283         <info>: New.
7284         (record_full_target_info): New.
7285         (record_full_target): <shortname>: Delete.
7286         <info>: New.
7287         (record_full_core_open_1, record_full_open_1): Update comments.
7288         (record_full_base_target::open): Rename to ...
7289         (record_full_open): ... this.
7290         (cmd_record_full_restore): Update.
7291         (_initialize_record_full): Update.
7292         * remote-sim.c (remote_sim_target_info): New.
7293         (gdbsim_target) <shortname, longname, doc>: Delete.
7294         <info>: New.
7295         (gdbsim_target::open): Rename to ...
7296         (gdbsim_target_open): ... this.
7297         (_initialize_remote_sim): Adjust.
7298         * remote.c (remote_doc): New.
7299         (remote_target_info): New.
7300         (remote_target) <shortname, longname, doc>: Delete.
7301         <info>: New.
7302         (extended_remote_target_info): New.
7303         (extended_remote_target) <shortname, longname, doc>: Delete.
7304         <info>: New.
7305         (remote_target::open_1): Make static.  Adjust.
7306         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
7307         * s390-linux-nat.c (_initialize_s390_nat): Use
7308         add_inf_child_target.
7309         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
7310         add_inf_child_target.
7311         * sol-thread.c (thread_db_target_info): New.
7312         (sol_thread_target) <shortname, longname, doc>: Delete.
7313         <info>: New.
7314         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
7315         add_inf_child_target.
7316         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
7317         add_inf_child_target.
7318         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
7319         add_inf_child_target.
7320         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
7321         add_inf_child_target.
7322         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
7323         add_inf_child_target.
7324         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
7325         add_inf_child_target.
7326         * spu-linux-nat.c (_initialize_spu_nat): Use
7327         add_inf_child_target.
7328         * spu-multiarch.c (spu_multiarch_target_info): New.
7329         (spu_multiarch_target) <shortname, longname, doc>: Delete.
7330         <info>: New.
7331         * target-delegates.c: Regenerate.
7332         * target.c: Include <unordered_map>.
7333         (target_ops_p): Delete.
7334         (DEF_VEC_P(target_ops_p)): Delete.
7335         (target_factories): New.
7336         (test_target_info): New.
7337         (test_target_ops::info): New.
7338         (open_target): Adjust to use target_factories.
7339         (add_target_with_completer): Rename to ...
7340         (add_target): ... this.  Change prototype.  Register target_info
7341         and open callback in target_factories.  Register target_info in
7342         command context instead of target_ops.
7343         (add_target): Delete old implementation.
7344         (add_deprecated_target_alias): Change prototype.  Adjust.
7345         (the_native_target): New.
7346         (set_native_target, get_native_target): New.
7347         (find_default_run_target): Use the_native_target.
7348         (find_attach_target, find_run_target): Simplify.
7349         (target_ops::open): Delete.
7350         (dummy_target_info): New.
7351         (dummy_target::shortname, dummy_target::longname)
7352         (dummy_target::doc): Delete.
7353         (dummy_target::info): New.
7354         (debug_target::shortname, debug_target::longname)
7355         (debug_target::doc): Delete.
7356         (debug_target::info): New.
7357         * target.h (struct target_info): New.
7358         (target_ops::~target_ops): Add comment.
7359         (target_ops::info): New.
7360         (target_ops::shortname, target_ops::longname, target_ops::doc): No
7361         longer virtual.  Implement in terms of target_info.
7362         (set_native_target, get_native_target): Declare.
7363         (target_open_ftype): New.
7364         (add_target, add_target_with_completer)
7365         (add_deprecated_target_alias): Change prototype.
7366         (test_target) <shortname, longname, doc>: Delete.
7367         <info>: New.
7368         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
7369         add_inf_child_target.
7370         * tracefile-tfile.c (tfile_target_info): New.
7371         (tfile_target) <shortname, longname, doc>: Delete.
7372         <info>: New.
7373         (tfile_target::open): Rename to ...
7374         (tfile_target_open): ... this.
7375         (_initialize_tracefile_tfile): Adjust.
7376         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
7377         add_inf_child_target.
7378         * windows-nat.c (_initialize_windows_nat): Use
7379         add_inf_child_target.
7380         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
7381         add_inf_child_target.
7382
7383 2018-05-02  Pedro Alves  <palves@redhat.com>
7384
7385         * linux-nat.h (linux_nat_target) <low_new_thread,
7386         low_delete_thread, low_new_fork, low_forget_process,
7387         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
7388         New virtual methods.
7389         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
7390         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
7391         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
7392         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
7393         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
7394         Delete.
7395         * linux-fork.c (delete_fork): Adjust to call low method.
7396         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
7397         (linux_nat_new_fork, linux_nat_forget_process_hook)
7398         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
7399         (linux_nat_status_is_event):
7400         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
7401         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
7402         to call low method.
7403         (sigtrap_is_event): Rename to ...
7404         (linux_nat_target::low_status_is_event): ... this.
7405         (linux_nat_set_status_is_event): Delete.
7406         (save_stop_reason, linux_nat_wait_1)
7407         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
7408         low methods.
7409         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
7410         (linux_nat_set_new_fork, linux_nat_set_forget_process)
7411         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
7412         (linux_nat_set_prepare_to_resume): Delete.
7413         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
7414         low virtual methods.
7415         * amd64-linux-nat.c: Likewise.
7416         * arm-linux-nat.c: Likewise.
7417         * i386-linux-nat.c: Likewise.
7418         * ia64-linux-nat.c: Likewise.
7419         * mips-linux-nat.c: Likewise.
7420         * ppc-linux-nat.c: Likewise.
7421         * s390-linux-nat.c: Likewise.
7422         * sparc64-linux-nat.c: Likewise.
7423         * x86-linux-nat.c: Likewise.
7424         * x86-linux-nat.h: Include "nat/x86-linux.h".
7425         (x86_linux_nat_target) <low_new_fork, low_forget_process,
7426         low_prepare_to_resume, low_new_thread, low_delete_thread>:
7427         Override methods.
7428
7429 2018-05-02  Pedro Alves  <palves@redhat.com>
7430
7431         * target.h (target_ops)
7432         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
7433         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
7434         stopped_by_watchpoint, have_continuable_watchpoint,
7435         stopped_data_address, watchpoint_addr_within_range,
7436         can_accel_watchpoint_condition, can_run, thread_alive,
7437         has_all_memory, has_memory, has_stack, has_registers,
7438         has_execution, can_async_p, is_async_p, supports_non_stop,
7439         always_non_stop_p, can_execute_reverse, supports_multi_process,
7440         supports_enable_disable_tracepoint,
7441         supports_disable_randomization, supports_string_tracing,
7442         supports_evaluation_of_breakpoint_conditions,
7443         can_run_breakpoint_commands, filesystem_is_local,
7444         can_download_tracepoint, get_trace_state_variable_value,
7445         set_trace_notes, get_tib_address, use_agent, can_use_agent,
7446         record_is_replaying, record_will_replay,
7447         augmented_libraries_svr4_read>: Adjust to return bool.
7448         * aarch64-linux-nat.c: All implementations adjusted.
7449         * aix-thread.c: All implementations adjusted.
7450         * arm-linux-nat.c: All implementations adjusted.
7451         * breakpoint.c: All implementations adjusted.
7452         * bsd-kvm.c: All implementations adjusted.
7453         * bsd-uthread.c: All implementations adjusted.
7454         * corelow.c: All implementations adjusted.
7455         * ctf.c: All implementations adjusted.
7456         * darwin-nat.c: All implementations adjusted.
7457         * darwin-nat.h: All implementations adjusted.
7458         * exec.c: All implementations adjusted.
7459         * fbsd-nat.c: All implementations adjusted.
7460         * fbsd-nat.h: All implementations adjusted.
7461         * gnu-nat.c: All implementations adjusted.
7462         * gnu-nat.h: All implementations adjusted.
7463         * go32-nat.c: All implementations adjusted.
7464         * ia64-linux-nat.c: All implementations adjusted.
7465         * inf-child.c: All implementations adjusted.
7466         * inf-child.h: All implementations adjusted.
7467         * inf-ptrace.c: All implementations adjusted.
7468         * inf-ptrace.h: All implementations adjusted.
7469         * linux-nat.c: All implementations adjusted.
7470         * linux-nat.h: All implementations adjusted.
7471         * mips-linux-nat.c: All implementations adjusted.
7472         * nto-procfs.c: All implementations adjusted.
7473         * ppc-linux-nat.c: All implementations adjusted.
7474         * procfs.c: All implementations adjusted.
7475         * ravenscar-thread.c: All implementations adjusted.
7476         * record-btrace.c: All implementations adjusted.
7477         * record-full.c: All implementations adjusted.
7478         * remote-sim.c: All implementations adjusted.
7479         * remote.c: All implementations adjusted.
7480         * s390-linux-nat.c: All implementations adjusted.
7481         * sol-thread.c: All implementations adjusted.
7482         * spu-multiarch.c: All implementations adjusted.
7483         * target-delegates.c: All implementations adjusted.
7484         * target.c: All implementations adjusted.
7485         * target.h: All implementations adjusted.
7486         * tracefile-tfile.c: All implementations adjusted.
7487         * tracefile.c: All implementations adjusted.
7488         * tracefile.h: All implementations adjusted.
7489         * windows-nat.c: All implementations adjusted.
7490         * x86-linux-nat.h: All implementations adjusted.
7491         * x86-nat.h: All implementations adjusted.
7492
7493 2018-05-02  Pedro Alves  <palves@redhat.com>
7494
7495         * make-target-delegates (scan_target_h): Don't trim lines here.
7496         Replace sequences of tabs and/or whitespace with a single
7497         whitespace.
7498         (top level, parsing methods): Trim each line before processing it
7499         here.
7500
7501 2018-05-02  Pedro Alves  <palves@redhat.com>
7502             John Baldwin  <jhb@freebsd.org>
7503
7504         * target.h (enum strata) <debug_stratum>: New.
7505         (struct target_ops) <all delegation methods>: Replace by C++
7506         virtual methods, and drop "to_" prefix.  All references updated
7507         throughout.
7508         <to_shortname, to_longname, to_doc, to_data,
7509         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
7510         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
7511         virtual methods.  All references updated throughout.
7512         <can_attach, supports_terminal_ours, can_create_inferior,
7513         get_thread_control_capabilities, attach_no_wait>: New
7514         virtual methods.
7515         <insert_breakpoint, remove_breakpoint>: Now
7516         TARGET_DEFAULT_NORETURN methods.
7517         <info_proc>: Now returns bool.
7518         <to_magic>: Delete.
7519         (OPS_MAGIC): Delete.
7520         (current_target): Delete.  All references replaced by references
7521         to ...
7522         (target_stack): ... this.  New.
7523         (target_shortname, target_longname): Adjust.
7524         (target_can_run): Now a function declaration.
7525         (default_child_has_all_memory, default_child_has_memory)
7526         (default_child_has_stack, default_child_has_registers)
7527         (default_child_has_execution): Remove target_ops parameter.
7528         (complete_target_initialization): Delete.
7529         (memory_breakpoint_target): New template class.
7530         (test_target_ops): Refactor as a C++ class with virtual methods.
7531         * make-target-delegates (NAME_PART): Tighten.
7532         (POINTER_PART, CP_SYMBOL): New.
7533         (SIMPLE_RETURN_PART): Reimplement.
7534         (VEC_RETURN_PART): Expect less.
7535         (RETURN_PART, VIRTUAL_PART): New.
7536         (METHOD): Adjust to C++ virtual methods.
7537         (scan_target_h): Remove reference to C99.
7538         (dname): Output "target_ops::" prefix.
7539         (write_function_header): Adjust to output a C++ class method.
7540         (write_declaration): New.
7541         (write_delegator): Adjust to output a C++ class method.
7542         (tdname): Output "dummy_target::" prefix.
7543         (write_tdefault, write_debugmethod): Adjust to output a C++ class
7544         method.
7545         (tdefault_names, debug_names): Delete.
7546         (return_types, tdefaults, styles, argtypes_array): New.
7547         (top level): All methods are delegators.
7548         (print_class): New.
7549         (top level): Print dummy_target and debug_target classes.
7550         * target-delegates.c: Regenerate.
7551         * target-debug.h (target_debug_print_enum_info_proc_what)
7552         (target_debug_print_thread_control_capabilities)
7553         (target_debug_print_thread_info_p): New.
7554         * target.c (dummy_target): Delete.
7555         (the_dummy_target, the_debug_target): New.
7556         (target_stack): Now extern.
7557         (set_targetdebug): Push/unpush debug target.
7558         (default_child_has_all_memory, default_child_has_memory)
7559         (default_child_has_stack, default_child_has_registers)
7560         (default_child_has_execution): Remove target_ops parameter.
7561         (complete_target_initialization): Delete.
7562         (add_target_with_completer): No longer call
7563         complete_target_initialization.
7564         (target_supports_terminal_ours): Use regular delegation.
7565         (update_current_target): Delete.
7566         (push_target): No longer check magic number.  Don't call
7567         update_current_target.
7568         (unpush_target): Don't call update_current_target.
7569         (target_is_pushed): No longer check magic number.
7570         (target_require_runnable): Skip for all stratums over
7571         process_stratum.
7572         (target_ops::info_proc): New.
7573         (target_info_proc): Use find_target_at and
7574         find_default_run_target.
7575         (target_supports_disable_randomization): Use regular delegation.
7576         (target_get_osdata): Use find_target_at.
7577         (target_ops::open, target_ops::close, target_ops::can_attach)
7578         (target_ops::attach, target_ops::can_create_inferior)
7579         (target_ops::create_inferior, target_ops::can_run)
7580         (target_can_run): New.
7581         (default_fileio_target): Use regular delegation.
7582         (target_ops::fileio_open, target_ops::fileio_pwrite)
7583         (target_ops::fileio_pread, target_ops::fileio_fstat)
7584         (target_ops::fileio_close, target_ops::fileio_unlink)
7585         (target_ops::fileio_readlink): New.
7586         (target_fileio_open_1, target_fileio_unlink)
7587         (target_fileio_readlink): Always call the target method.  Handle
7588         FILEIO_ENOSYS.
7589         (return_zero, return_zero_has_execution): Delete.
7590         (init_dummy_target): Delete.
7591         (dummy_target::dummy_target, dummy_target::shortname)
7592         (dummy_target::longname, dummy_target::doc)
7593         (debug_target::debug_target, debug_target::shortname)
7594         (debug_target::longname, debug_target::doc): New.
7595         (target_supports_delete_record): Use regular delegation.
7596         (setup_target_debug): Delete.
7597         (maintenance_print_target_stack): Skip debug_stratum.
7598         (initialize_targets): Instantiate the_dummy_target and
7599         the_debug_target.
7600         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
7601         use target_stack.
7602         (target_auxv_search, fprint_target_auxv): Adjust.
7603         (info_auxv_command): Adjust to use target_stack.
7604         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
7605         * exceptions.c (print_flush): Handle a NULL target_stack.
7606         * regcache.c (target_ops_no_register): Refactor as class with
7607         virtual methods.
7608
7609         * exec.c (exec_target): New class.
7610         (exec_ops): Now an exec_target.
7611         (exec_open, exec_close_1, exec_get_section_table)
7612         (exec_xfer_partial, exec_files_info, exec_has_memory)
7613         (exec_make_note_section): Refactor as exec_target methods.
7614         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
7615         Delete.
7616         (exec_target::find_memory_regions): New.
7617         (_initialize_exec): Don't call init_exec_ops.
7618         * gdbcore.h (exec_file_clear): Delete.
7619
7620         * corefile.c (core_target): Delete.
7621         (core_file_command): Adjust.
7622         * corelow.c (core_target): New class.
7623         (the_core_target): New.
7624         (core_close): Remove target_ops parameter.
7625         (core_close_cleanup): Adjust.
7626         (core_target::close): New.
7627         (core_open, core_detach, get_core_registers, core_files_info)
7628         (core_xfer_partial, core_thread_alive, core_read_description)
7629         (core_pid_to_str, core_thread_name, core_has_memory)
7630         (core_has_stack, core_has_registers, core_info_proc): Rework as
7631         core_target methods.
7632         (ignore, core_remove_breakpoint, init_core_ops): Delete.
7633         (_initialize_corelow): Initialize the_core_target.
7634         * gdbcore.h (core_target): Delete.
7635         (the_core_target): New.
7636
7637         * ctf.c: (ctf_target): New class.
7638         (ctf_ops): Now a ctf_target.
7639         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
7640         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
7641         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
7642         methods.
7643         (init_ctf_ops): Delete.
7644         (_initialize_ctf): Don't call it.
7645         * tracefile-tfile.c (tfile_target): New class.
7646         (tfile_ops): Now a tfile_target.
7647         (tfile_open, tfile_close, tfile_files_info)
7648         (tfile_get_tracepoint_status, tfile_trace_find)
7649         (tfile_fetch_registers, tfile_xfer_partial)
7650         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
7651         Refactor as tfile_target methods.
7652         (tfile_xfer_partial_features): Remove target_ops parameter.
7653         (init_tfile_ops): Delete.
7654         (_initialize_tracefile_tfile): Don't call it.
7655         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
7656         (tracefile_has_stack, tracefile_has_registers)
7657         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
7658         tracefile_target methods.
7659         (init_tracefile_ops): Delete.
7660         (tracefile_target::tracefile_target): New.
7661         * tracefile.h: Include "target.h".
7662         (tracefile_target): New class.
7663         (init_tracefile_ops): Delete.
7664
7665         * spu-multiarch.c (spu_multiarch_target): New class.
7666         (spu_ops): Now a spu_multiarch_target.
7667         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
7668         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
7669         (spu_search_memory, spu_mourn_inferior): Refactor as
7670         spu_multiarch_target methods.
7671         (init_spu_ops): Delete.
7672         (_initialize_spu_multiarch): Remove references to init_spu_ops,
7673         complete_target_initialization.
7674
7675         * ravenscar-thread.c (ravenscar_thread_target): New class.
7676         (ravenscar_ops): Now a ravenscar_thread_target.
7677         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
7678         (ravenscar_thread_alive, ravenscar_pid_to_str)
7679         (ravenscar_fetch_registers, ravenscar_store_registers)
7680         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
7681         (ravenscar_stopped_by_hw_breakpoint)
7682         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
7683         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
7684         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
7685         methods.
7686         (init_ravenscar_thread_ops): Delete.
7687         (_initialize_ravenscar): Remove references to
7688         init_ravenscar_thread_ops and complete_target_initialization.
7689
7690         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
7691         (bsd_uthread_target): New class.
7692         (bsd_uthread_ops): Now a bsd_uthread_target.
7693         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
7694         (bsd_uthread_close, bsd_uthread_mourn_inferior)
7695         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
7696         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
7697         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
7698         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
7699         (bsd_uthread_target): Delete function.
7700         (_initialize_bsd_uthread): Remove reference to
7701         complete_target_initialization.
7702
7703         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
7704         (target_bfd): ... this new class.
7705         (target_bfd_xfer_partial, target_bfd_get_section_table)
7706         (target_bfd_close): Refactor as target_bfd methods.
7707         (target_bfd::~target_bfd): New.
7708         (target_bfd_reopen): Adjust.
7709         (target_bfd::close): New.
7710
7711         * record-btrace.c (record_btrace_target): New class.
7712         (record_btrace_ops): Now a record_btrace_target.
7713         (record_btrace_open, record_btrace_stop_recording)
7714         (record_btrace_disconnect, record_btrace_close)
7715         (record_btrace_async, record_btrace_info)
7716         (record_btrace_insn_history, record_btrace_insn_history_range)
7717         (record_btrace_insn_history_from, record_btrace_call_history)
7718         (record_btrace_call_history_range)
7719         (record_btrace_call_history_from, record_btrace_record_method)
7720         (record_btrace_is_replaying, record_btrace_will_replay)
7721         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
7722         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
7723         (record_btrace_store_registers, record_btrace_prepare_to_store)
7724         (record_btrace_to_get_unwinder)
7725         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
7726         (record_btrace_commit_resume, record_btrace_wait)
7727         (record_btrace_stop, record_btrace_can_execute_reverse)
7728         (record_btrace_stopped_by_sw_breakpoint)
7729         (record_btrace_supports_stopped_by_sw_breakpoint)
7730         (record_btrace_stopped_by_hw_breakpoint)
7731         (record_btrace_supports_stopped_by_hw_breakpoint)
7732         (record_btrace_update_thread_list, record_btrace_thread_alive)
7733         (record_btrace_goto_begin, record_btrace_goto_end)
7734         (record_btrace_goto, record_btrace_stop_replaying_all)
7735         (record_btrace_execution_direction)
7736         (record_btrace_prepare_to_generate_core)
7737         (record_btrace_done_generating_core): Refactor as
7738         record_btrace_target methods.
7739         (init_record_btrace_ops): Delete.
7740         (_initialize_record_btrace): Remove reference to
7741         init_record_btrace_ops.
7742         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
7743         the execution_direction global.
7744         (record_full_base_target, record_full_target)
7745         (record_full_core_target): New classes.
7746         (record_full_ops): Now a record_full_target.
7747         (record_full_core_ops): Now a record_full_core_target.
7748         (record_full_target::detach, record_full_target::disconnect)
7749         (record_full_core_target::disconnect)
7750         (record_full_target::mourn_inferior, record_full_target::kill):
7751         New.
7752         (record_full_open, record_full_close, record_full_async): Refactor
7753         as methods of the record_full_base_target class.
7754         (record_full_resume, record_full_commit_resume): Refactor
7755         as methods of the record_full_target class.
7756         (record_full_wait, record_full_stopped_by_watchpoint)
7757         (record_full_stopped_data_address)
7758         (record_full_stopped_by_sw_breakpoint)
7759         (record_full_supports_stopped_by_sw_breakpoint)
7760         (record_full_stopped_by_hw_breakpoint)
7761         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
7762         methods of the record_full_base_target class.
7763         (record_full_store_registers, record_full_xfer_partial)
7764         (record_full_insert_breakpoint, record_full_remove_breakpoint):
7765         Refactor as methods of the record_full_target class.
7766         (record_full_can_execute_reverse, record_full_get_bookmark)
7767         (record_full_goto_bookmark, record_full_execution_direction)
7768         (record_full_record_method, record_full_info, record_full_delete)
7769         (record_full_is_replaying, record_full_will_replay)
7770         (record_full_goto_begin, record_full_goto_end, record_full_goto)
7771         (record_full_stop_replaying): Refactor as methods of the
7772         record_full_base_target class.
7773         (record_full_core_resume, record_full_core_kill)
7774         (record_full_core_fetch_registers)
7775         (record_full_core_prepare_to_store)
7776         (record_full_core_store_registers, record_full_core_xfer_partial)
7777         (record_full_core_insert_breakpoint)
7778         (record_full_core_remove_breakpoint)
7779         (record_full_core_has_execution): Refactor
7780         as methods of the record_full_core_target class.
7781         (record_full_base_target::supports_delete_record): New.
7782         (init_record_full_ops): Delete.
7783         (init_record_full_core_ops): Delete.
7784         (record_full_save): Refactor as method of the
7785         record_full_base_target class.
7786         (_initialize_record_full): Remove references to
7787         init_record_full_ops and init_record_full_core_ops.
7788
7789         * remote.c (remote_target, extended_remote_target): New classes.
7790         (remote_ops): Now a remote_target.
7791         (extended_remote_ops): Now an extended_remote_target.
7792         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
7793         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
7794         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
7795         (remote_pass_signals, remote_set_syscall_catchpoint)
7796         (remote_program_signals, )
7797         (remote_thread_always_alive): Remove target_ops parameter.
7798         (remote_thread_alive, remote_thread_name)
7799         (remote_update_thread_list, remote_threads_extra_info)
7800         (remote_static_tracepoint_marker_at)
7801         (remote_static_tracepoint_markers_by_strid)
7802         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
7803         (remote_open): Refactor as methods of remote_target.
7804         (extended_remote_open, extended_remote_detach)
7805         (extended_remote_attach, extended_remote_post_attach):
7806         (extended_remote_supports_disable_randomization)
7807         (extended_remote_create_inferior): : Refactor as method of
7808         extended_remote_target.
7809         (remote_set_permissions, remote_open_1, remote_detach)
7810         (remote_follow_fork, remote_follow_exec, remote_disconnect)
7811         (remote_resume, remote_commit_resume, remote_stop)
7812         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
7813         (remote_terminal_ours, remote_wait, remote_fetch_registers)
7814         (remote_prepare_to_store, remote_store_registers)
7815         (remote_flash_erase, remote_flash_done, remote_files_info)
7816         (remote_kill, remote_mourn, remote_insert_breakpoint)
7817         (remote_remove_breakpoint, remote_insert_watchpoint)
7818         (remote_watchpoint_addr_within_range)
7819         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
7820         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
7821         (remote_supports_stopped_by_sw_breakpoint)
7822         (remote_stopped_by_hw_breakpoint)
7823         (remote_supports_stopped_by_hw_breakpoint)
7824         (remote_stopped_by_watchpoint, remote_stopped_data_address)
7825         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
7826         (remote_verify_memory): Refactor as methods of remote_target.
7827         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
7828         parameter.
7829         (remote_xfer_partial, remote_get_memory_xfer_limit)
7830         (remote_search_memory, remote_rcmd, remote_memory_map)
7831         (remote_pid_to_str, remote_get_thread_local_address)
7832         (remote_get_tib_address, remote_read_description): Refactor as
7833         methods of remote_target.
7834         (remote_target::fileio_open, remote_target::fileio_pwrite)
7835         (remote_target::fileio_pread, remote_target::fileio_close): New.
7836         (remote_hostio_readlink, remote_hostio_fstat)
7837         (remote_filesystem_is_local, remote_can_execute_reverse)
7838         (remote_supports_non_stop, remote_supports_disable_randomization)
7839         (remote_supports_multi_process, remote_supports_cond_breakpoints)
7840         (remote_supports_enable_disable_tracepoint)
7841         (remote_supports_string_tracing)
7842         (remote_can_run_breakpoint_commands, remote_trace_init)
7843         (remote_download_tracepoint, remote_can_download_tracepoint)
7844         (remote_download_trace_state_variable, remote_enable_tracepoint)
7845         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
7846         (remote_trace_start, remote_get_trace_status)
7847         (remote_get_tracepoint_status, remote_trace_stop)
7848         (remote_trace_find, remote_get_trace_state_variable_value)
7849         (remote_save_trace_data, remote_get_raw_trace_data)
7850         (remote_set_disconnected_tracing, remote_core_of_thread)
7851         (remote_set_circular_trace_buffer, remote_traceframe_info)
7852         (remote_get_min_fast_tracepoint_insn_len)
7853         (remote_set_trace_buffer_size, remote_set_trace_notes)
7854         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
7855         (remote_disable_btrace, remote_teardown_btrace)
7856         (remote_read_btrace, remote_btrace_conf)
7857         (remote_augmented_libraries_svr4_read, remote_load)
7858         (remote_pid_to_exec_file, remote_can_do_single_step)
7859         (remote_execution_direction, remote_thread_handle_to_thread_info):
7860         Refactor as methods of remote_target.
7861         (init_remote_ops, init_extended_remote_ops): Delete.
7862         (remote_can_async_p, remote_is_async_p, remote_async)
7863         (remote_thread_events, remote_upload_tracepoints)
7864         (remote_upload_trace_state_variables): Refactor as methods of
7865         remote_target.
7866         (_initialize_remote): Remove references to init_remote_ops and
7867         init_extended_remote_ops.
7868
7869         * remote-sim.c (gdbsim_target): New class.
7870         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
7871         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
7872         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
7873         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
7874         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
7875         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
7876         Refactor as methods of gdbsim_target.
7877         (gdbsim_ops): Now a gdbsim_target.
7878         (init_gdbsim_ops): Delete.
7879         (gdbsim_cntrl_c): Adjust.
7880         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
7881
7882         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
7883         (the_amd64_linux_nat_target): New.
7884         (amd64_linux_fetch_inferior_registers)
7885         (amd64_linux_store_inferior_registers): Refactor as methods of
7886         amd64_linux_nat_target.
7887         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
7888         * i386-linux-nat.c: Don't include "linux-nat.h".
7889         (i386_linux_nat_target): New class.
7890         (the_i386_linux_nat_target): New.
7891         (i386_linux_fetch_inferior_registers)
7892         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
7893         as methods of i386_linux_nat_target.
7894         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
7895         * inf-child.c (inf_child_ops): Delete.
7896         (inf_child_fetch_inferior_registers)
7897         (inf_child_store_inferior_registers): Delete.
7898         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
7899         methods of inf_child_target.
7900         (inf_child_target::supports_terminal_ours)
7901         (inf_child_target::terminal_init)
7902         (inf_child_target::terminal_inferior)
7903         (inf_child_target::terminal_ours_for_output)
7904         (inf_child_target::terminal_ours, inf_child_target::interrupt)
7905         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
7906         New.
7907         (inf_child_open, inf_child_disconnect, inf_child_close)
7908         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
7909         (inf_child_post_startup_inferior, inf_child_can_run)
7910         (inf_child_pid_to_exec_file): Refactor as methods of
7911         inf_child_target.
7912         (inf_child_follow_fork): Delete.
7913         (inf_child_target::can_create_inferior)
7914         (inf_child_target::can_attach): New.
7915         (inf_child_target::has_all_memory, inf_child_target::has_memory)
7916         (inf_child_target::has_stack, inf_child_target::has_registers)
7917         (inf_child_target::has_execution): New.
7918         (inf_child_fileio_open, inf_child_fileio_pwrite)
7919         (inf_child_fileio_pread, inf_child_fileio_fstat)
7920         (inf_child_fileio_close, inf_child_fileio_unlink)
7921         (inf_child_fileio_readlink, inf_child_use_agent)
7922         (inf_child_can_use_agent): Refactor as methods of
7923         inf_child_target.
7924         (return_zero, inf_child_target): Delete.
7925         (inf_child_target::inf_child_target): New.
7926         * inf-child.h: Include "target.h".
7927         (inf_child_target): Delete function prototype.
7928         (inf_child_target): New class.
7929         (inf_child_open_target, inf_child_mourn_inferior)
7930         (inf_child_maybe_unpush_target): Delete.
7931         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
7932         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
7933         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
7934         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
7935         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
7936         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
7937         (inf_ptrace_wait, inf_ptrace_xfer_partial)
7938         (inf_ptrace_thread_alive, inf_ptrace_files_info)
7939         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
7940         methods of inf_ptrace_target.
7941         (inf_ptrace_target): Delete function.
7942         * inf-ptrace.h: Include "inf-child.h".
7943         (inf_ptrace_target): Delete function declaration.
7944         (inf_ptrace_target): New class.
7945         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
7946         * linux-nat.c (linux_target): New.
7947         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
7948         (linux_nat_target::~linux_nat_target): New.
7949         (linux_child_post_attach, linux_child_post_startup_inferior)
7950         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
7951         (linux_child_remove_fork_catchpoint)
7952         (linux_child_insert_vfork_catchpoint)
7953         (linux_child_remove_vfork_catchpoint)
7954         (linux_child_insert_exec_catchpoint)
7955         (linux_child_remove_exec_catchpoint)
7956         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
7957         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
7958         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
7959         (linux_nat_stopped_data_address)
7960         (linux_nat_stopped_by_sw_breakpoint)
7961         (linux_nat_supports_stopped_by_sw_breakpoint)
7962         (linux_nat_stopped_by_hw_breakpoint)
7963         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
7964         (linux_nat_kill, linux_nat_mourn_inferior)
7965         (linux_nat_xfer_partial, linux_nat_thread_alive)
7966         (linux_nat_update_thread_list, linux_nat_pid_to_str)
7967         (linux_nat_thread_name, linux_child_pid_to_exec_file)
7968         (linux_child_static_tracepoint_markers_by_strid)
7969         (linux_nat_is_async_p, linux_nat_can_async_p)
7970         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
7971         (linux_nat_supports_multi_process)
7972         (linux_nat_supports_disable_randomization, linux_nat_async)
7973         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
7974         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
7975         (linux_nat_fileio_open, linux_nat_fileio_readlink)
7976         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
7977         methods of linux_nat_target.
7978         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
7979         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
7980         parameter.
7981         (check_stopped_by_watchpoint): Adjust.
7982         (linux_xfer_partial): Delete.
7983         (linux_target_install_ops, linux_target, linux_nat_add_target):
7984         Delete.
7985         (linux_nat_target::linux_nat_target): New.
7986         * linux-nat.h: Include "inf-ptrace.h".
7987         (linux_nat_target): New.
7988         (linux_target, linux_target_install_ops, linux_nat_add_target):
7989         Delete function declarations.
7990         (linux_target): Declare global.
7991         * linux-thread-db.c (thread_db_target): New.
7992         (thread_db_target::thread_db_target): New.
7993         (thread_db_ops): Delete.
7994         (the_thread_db_target): New.
7995         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
7996         (thread_db_update_thread_list, thread_db_pid_to_str)
7997         (thread_db_extra_thread_info)
7998         (thread_db_thread_handle_to_thread_info)
7999         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
8000         (thread_db_resume): Refactor as methods of thread_db_target.
8001         (init_thread_db_ops): Delete.
8002         (_initialize_thread_db): Remove reference to init_thread_db_ops.
8003         * x86-linux-nat.c: Don't include "linux-nat.h".
8004         (super_post_startup_inferior): Delete.
8005         (x86_linux_nat_target::~x86_linux_nat_target): New.
8006         (x86_linux_child_post_startup_inferior)
8007         (x86_linux_read_description, x86_linux_enable_btrace)
8008         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
8009         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
8010         methods of x86_linux_nat_target.
8011         (x86_linux_create_target): Delete.  Bits folded ...
8012         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
8013         pointer.
8014         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
8015         (x86_linux_nat_target): New class.
8016         (x86_linux_create_target): Delete.
8017         (x86_linux_add_target): Now takes a linux_nat_target pointer.
8018         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
8019         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
8020         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
8021         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
8022         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
8023         make extern.
8024         (x86_use_watchpoints): Delete.
8025         * x86-nat.h: Include "breakpoint.h" and "target.h".
8026         (x86_use_watchpoints): Delete.
8027         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
8028         (x86_stopped_by_watchpoint, x86_stopped_data_address)
8029         (x86_insert_watchpoint, x86_remove_watchpoint)
8030         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
8031         (x86_stopped_by_hw_breakpoint): New declarations.
8032         (x86_nat_target): New template class.
8033
8034         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
8035         (the_ppc_linux_nat_target): New.
8036         (ppc_linux_fetch_inferior_registers)
8037         (ppc_linux_can_use_hw_breakpoint)
8038         (ppc_linux_region_ok_for_hw_watchpoint)
8039         (ppc_linux_ranged_break_num_registers)
8040         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
8041         (ppc_linux_insert_mask_watchpoint)
8042         (ppc_linux_remove_mask_watchpoint)
8043         (ppc_linux_can_accel_watchpoint_condition)
8044         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
8045         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
8046         (ppc_linux_watchpoint_addr_within_range)
8047         (ppc_linux_masked_watch_num_registers)
8048         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
8049         (ppc_linux_read_description): Refactor as methods of
8050         ppc_linux_nat_target.
8051         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
8052
8053         * procfs.c (procfs_xfer_partial): Delete forward declaration.
8054         (procfs_target): New class.
8055         (the_procfs_target): New.
8056         (procfs_target): Delete function.
8057         (procfs_auxv_parse, procfs_attach, procfs_detach)
8058         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
8059         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
8060         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
8061         (procfs_create_inferior, procfs_update_thread_list)
8062         (procfs_thread_alive, procfs_pid_to_str)
8063         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
8064         (procfs_stopped_data_address, procfs_insert_watchpoint)
8065         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
8066         (proc_find_memory_regions, procfs_info_proc)
8067         (procfs_make_note_section): Refactor as methods of procfs_target.
8068         (_initialize_procfs): Adjust.
8069         * sol-thread.c (sol_thread_target): New class.
8070         (sol_thread_ops): Now a sol_thread_target.
8071         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
8072         (sol_thread_fetch_registers, sol_thread_store_registers)
8073         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
8074         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
8075         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
8076         (init_sol_thread_ops): Delete.
8077         (_initialize_sol_thread): Adjust.  Remove references to
8078         init_sol_thread_ops and complete_target_initialization.
8079
8080         * windows-nat.c (windows_nat_target): New class.
8081         (windows_fetch_inferior_registers)
8082         (windows_store_inferior_registers, windows_resume, windows_wait)
8083         (windows_attach, windows_detach, windows_pid_to_exec_file)
8084         (windows_files_info, windows_create_inferior)
8085         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
8086         (windows_close, windows_pid_to_str, windows_xfer_partial)
8087         (windows_get_tib_address, windows_get_ada_task_ptid)
8088         (windows_thread_name, windows_thread_alive): Refactor as
8089         windows_nat_target methods.
8090         (do_initial_windows_stuff): Adjust.
8091         (windows_target): Delete function.
8092         (_initialize_windows_nat): Adjust.
8093
8094         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
8095         (darwin_mourn_inferior, darwin_kill_inferior)
8096         (darwin_create_inferior, darwin_attach, darwin_detach)
8097         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
8098         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
8099         (darwin_supports_multi_process): Refactor as darwin_nat_target
8100         methods.
8101         (darwin_resume_to, darwin_files_info): Delete.
8102         (_initialize_darwin_inferior): Rename to ...
8103         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
8104         * darwin-nat.h: Include "inf-child.h".
8105         (darwin_nat_target): New class.
8106         (darwin_complete_target): Delete.
8107         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
8108         (darwin_target): New.
8109         (i386_darwin_fetch_inferior_registers)
8110         (i386_darwin_store_inferior_registers): Refactor as methods of
8111         darwin_nat_target.
8112         (darwin_complete_target): Delete, with ...
8113         (_initialize_i386_darwin_nat): ... bits factored out here.
8114
8115         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
8116         (the_alpha_linux_nat_target): New.
8117         (alpha_linux_register_u_offset): Refactor as
8118         alpha_linux_nat_target method.
8119         (_initialize_alpha_linux_nat): Adjust.
8120         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
8121         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
8122         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
8123         methods of linux_nat_trad_target.
8124         (linux_trad_target): Delete.
8125         * linux-nat-trad.h (linux_trad_target): Delete function.
8126         (linux_nat_trad_target): New class.
8127         * mips-linux-nat.c (mips_linux_nat_target): New class.
8128         (super_fetch_registers, super_store_registers, super_close):
8129         Delete.
8130         (the_mips_linux_nat_target): New.
8131         (mips64_linux_regsets_fetch_registers)
8132         (mips64_linux_regsets_store_registers)
8133         (mips64_linux_fetch_registers, mips64_linux_store_registers)
8134         (mips_linux_register_u_offset, mips_linux_read_description)
8135         (mips_linux_can_use_hw_breakpoint)
8136         (mips_linux_stopped_by_watchpoint)
8137         (mips_linux_stopped_data_address)
8138         (mips_linux_region_ok_for_hw_watchpoint)
8139         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
8140         (mips_linux_close): Refactor as methods of mips_linux_nat.
8141         (_initialize_mips_linux_nat): Adjust to C++ification.
8142
8143         * aix-thread.c (aix_thread_target): New class.
8144         (aix_thread_ops): Now an aix_thread_target.
8145         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
8146         (aix_thread_fetch_registers, aix_thread_store_registers)
8147         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
8148         (aix_thread_thread_alive, aix_thread_pid_to_str)
8149         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
8150         Refactor as methods of aix_thread_target.
8151         (init_aix_thread_ops): Delete.
8152         (_initialize_aix_thread): Remove references to init_aix_thread_ops
8153         and complete_target_initialization.
8154         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
8155         (rs6000_nat_target): New class.
8156         (the_rs6000_nat_target): New.
8157         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
8158         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
8159         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
8160         (super_create_inferior): Delete.
8161         (_initialize_rs6000_nat): Adjust to C++ification.
8162
8163         * arm-linux-nat.c (arm_linux_nat_target): New class.
8164         (the_arm_linux_nat_target): New.
8165         (arm_linux_fetch_inferior_registers)
8166         (arm_linux_store_inferior_registers, arm_linux_read_description)
8167         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
8168         (arm_linux_remove_hw_breakpoint)
8169         (arm_linux_region_ok_for_hw_watchpoint)
8170         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
8171         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
8172         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
8173         arm_linux_nat_target.
8174         (_initialize_arm_linux_nat): Adjust to C++ification.
8175
8176         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
8177         (the_aarch64_linux_nat_target): New.
8178         (aarch64_linux_fetch_inferior_registers)
8179         (aarch64_linux_store_inferior_registers)
8180         (aarch64_linux_child_post_startup_inferior)
8181         (aarch64_linux_read_description)
8182         (aarch64_linux_can_use_hw_breakpoint)
8183         (aarch64_linux_insert_hw_breakpoint)
8184         (aarch64_linux_remove_hw_breakpoint)
8185         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
8186         (aarch64_linux_region_ok_for_hw_watchpoint)
8187         (aarch64_linux_stopped_data_address)
8188         (aarch64_linux_stopped_by_watchpoint)
8189         (aarch64_linux_watchpoint_addr_within_range)
8190         (aarch64_linux_can_do_single_step): Refactor as methods of
8191         aarch64_linux_nat_target.
8192         (super_post_startup_inferior): Delete.
8193         (_initialize_aarch64_linux_nat): Adjust to C++ification.
8194
8195         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
8196         (the_hppa_linux_nat_target): New.
8197         (hppa_linux_fetch_inferior_registers)
8198         (hppa_linux_store_inferior_registers): Refactor as methods of
8199         hppa_linux_nat_target.
8200         (_initialize_hppa_linux_nat): Adjust to C++ification.
8201
8202         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
8203         (the_ia64_linux_nat_target): New.
8204         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
8205         (ia64_linux_stopped_data_address)
8206         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
8207         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
8208         ia64_linux_nat_target methods.
8209         (super_xfer_partial): Delete.
8210         (_initialize_ia64_linux_nat): Adjust to C++ification.
8211
8212         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
8213         (the_m32r_linux_nat_target): New.
8214         (m32r_linux_fetch_inferior_registers)
8215         (m32r_linux_store_inferior_registers): Refactor as
8216         m32r_linux_nat_target methods.
8217         (_initialize_m32r_linux_nat): Adjust to C++ification.
8218
8219         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
8220         (the_m68k_linux_nat_target): New.
8221         (m68k_linux_fetch_inferior_registers)
8222         (m68k_linux_store_inferior_registers): Refactor as
8223         m68k_linux_nat_target methods.
8224         (_initialize_m68k_linux_nat): Adjust to C++ification.
8225
8226         * s390-linux-nat.c (s390_linux_nat_target): New class.
8227         (the_s390_linux_nat_target): New.
8228         (s390_linux_fetch_inferior_registers)
8229         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
8230         (s390_insert_watchpoint, s390_remove_watchpoint)
8231         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
8232         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
8233         (s390_auxv_parse, s390_read_description): Refactor as methods of
8234         s390_linux_nat_target.
8235         (_initialize_s390_nat): Adjust to C++ification.
8236
8237         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
8238         (the_sparc_linux_nat_target): New.
8239         (_initialize_sparc_linux_nat): Adjust to C++ification.
8240         * sparc-nat.c (sparc_fetch_inferior_registers)
8241         (sparc_store_inferior_registers): Remove target_ops parameter.
8242         * sparc-nat.h (sparc_fetch_inferior_registers)
8243         (sparc_store_inferior_registers): Remove target_ops parameter.
8244         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
8245         (the_sparc64_linux_nat_target): New.
8246         (_initialize_sparc64_linux_nat): Adjust to C++ification.
8247
8248         * spu-linux-nat.c (spu_linux_nat_target): New class.
8249         (the_spu_linux_nat_target): New.
8250         (spu_child_post_startup_inferior, spu_child_post_attach)
8251         (spu_child_wait, spu_fetch_inferior_registers)
8252         (spu_store_inferior_registers, spu_xfer_partial)
8253         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
8254         methods.
8255         (_initialize_spu_nat): Adjust to C++ification.
8256
8257         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
8258         (the_tilegx_linux_nat_target): New.
8259         (fetch_inferior_registers, store_inferior_registers):
8260         Refactor as methods.
8261         (_initialize_tile_linux_nat): Adjust to C++ification.
8262
8263         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
8264         (the_xtensa_linux_nat_target): New.
8265         (xtensa_linux_fetch_inferior_registers)
8266         (xtensa_linux_store_inferior_registers): Refactor as
8267         xtensa_linux_nat_target methods.
8268         (_initialize_xtensa_linux_nat): Adjust to C++ification.
8269
8270         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
8271         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
8272         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
8273         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
8274         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
8275         (fbsd_stopped_by_sw_breakpoint)
8276         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
8277         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
8278         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
8279         (fbsd_post_startup_inferior, fbsd_post_attach)
8280         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
8281         (fbsd_set_syscall_catchpoint)
8282         (super_xfer_partial, super_resume, super_wait)
8283         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
8284         (fbsd_handle_debug_trap): Remove target_ops parameter.
8285         (fbsd_nat_add_target): Delete.
8286         * fbsd-nat.h: Include "inf-ptrace.h".
8287         (fbsd_nat_add_target): Delete.
8288         (USE_SIGTRAP_SIGINFO): Define.
8289         (fbsd_nat_target): New class.
8290
8291         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
8292         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
8293         (amd64bsd_target): Delete.
8294         * amd64-bsd-nat.h: New file.
8295         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
8296         "x86-bsd-nat.h".
8297         (amd64_fbsd_nat_target): New class.
8298         (the_amd64_fbsd_nat_target): New.
8299         (amd64fbsd_read_description): Refactor as method of
8300         amd64_fbsd_nat_target.
8301         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
8302         (_initialize_amd64fbsd_nat): Adjust to C++ification.
8303         * amd64-nat.h (amd64bsd_target): Delete function declaration.
8304         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
8305         (i386bsd_store_inferior_registers): Remove target_ops parameter.
8306         (i386bsd_target): Delete.
8307         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
8308         (i386bsd_fetch_inferior_registers)
8309         (i386bsd_store_inferior_registers): Declare.
8310         (i386_bsd_nat_target): New class.
8311         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
8312         (the_i386_fbsd_nat_target): New.
8313         (i386fbsd_resume, i386fbsd_read_description): Refactor as
8314         i386_fbsd_nat_target methods.
8315         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
8316         (_initialize_i386fbsd_nat): Adjust to C++ification.
8317         * x86-bsd-nat.c (super_mourn_inferior): Delete.
8318         (x86bsd_mourn_inferior, x86bsd_target): Delete.
8319         (_initialize_x86_bsd_nat): Adjust to C++ification.
8320         * x86-bsd-nat.h: Include "x86-nat.h".
8321         (x86bsd_target): Delete declaration.
8322         (x86bsd_nat_target): New class.
8323
8324         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
8325         (the_aarch64_fbsd_nat_target): New.
8326         (aarch64_fbsd_fetch_inferior_registers)
8327         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
8328         aarch64_fbsd_nat_target.
8329         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
8330         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
8331         (the_alpha_bsd_nat_target): New.
8332         (alphabsd_fetch_inferior_registers)
8333         (alphabsd_store_inferior_registers): Refactor as
8334         alpha_bsd_nat_target methods.
8335         (_initialize_alphabsd_nat): Refactor as methods of
8336         alpha_bsd_nat_target.
8337         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
8338         (the_amd64_nbsd_nat_target): New.
8339         (_initialize_amd64nbsd_nat): Adjust to C++ification.
8340         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
8341         (the_amd64_obsd_nat_target): New.
8342         (_initialize_amd64obsd_nat): Adjust to C++ification.
8343         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
8344         (the_arm_fbsd_nat_target): New.
8345         (arm_fbsd_fetch_inferior_registers)
8346         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
8347         (_initialize_arm_fbsd_nat): Refactor as methods of
8348         arm_fbsd_nat_target.
8349         (_initialize_arm_fbsd_nat): Adjust to C++ification.
8350         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
8351         (the_arm_netbsd_nat_target): New.
8352         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
8353         arm_netbsd_nat_target.
8354         (_initialize_arm_netbsd_nat): Adjust to C++ification.
8355         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
8356         (the_hppa_nbsd_nat_target): New.
8357         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
8358         hppa_nbsd_nat_target methods.
8359         (_initialize_hppanbsd_nat): Adjust to C++ification.
8360         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
8361         (the_hppa_obsd_nat_target): New.
8362         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
8363         methods of hppa_obsd_nat_target.
8364         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
8365         add_target.
8366         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
8367         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
8368         add_target.
8369         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
8370         (_initialize_i386obsd_nat): Use add_target.
8371         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
8372         (the_m68k_bsd_nat_target): New.
8373         (m68kbsd_fetch_inferior_registers)
8374         (m68kbsd_store_inferior_registers): Refactor as methods of
8375         m68k_bsd_nat_target.
8376         (_initialize_m68kbsd_nat): Adjust to C++ification.
8377         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
8378         (the_mips_fbsd_nat_target): New.
8379         (mips_fbsd_fetch_inferior_registers)
8380         (mips_fbsd_store_inferior_registers): Refactor as methods of
8381         mips_fbsd_nat_target.
8382         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
8383         add_target.
8384         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
8385         (the_mips_nbsd_nat_target): New.
8386         (mipsnbsd_fetch_inferior_registers)
8387         (mipsnbsd_store_inferior_registers): Refactor as methods of
8388         mips_nbsd_nat_target.
8389         (_initialize_mipsnbsd_nat): Adjust to C++ification.
8390         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
8391         (the_mips64_obsd_nat_target): New.
8392         (mips64obsd_fetch_inferior_registers)
8393         (mips64obsd_store_inferior_registers): Refactor as methods of
8394         mips64_obsd_nat_target.
8395         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
8396         add_target.
8397         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
8398         nbsd_nat_target.
8399         * nbsd-nat.h: Include "inf-ptrace.h".
8400         (nbsd_nat_target): New class.
8401         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
8402         (obsd_wait): Refactor as methods of obsd_nat_target.
8403         (obsd_add_target): Delete.
8404         * obsd-nat.h: Include "inf-ptrace.h".
8405         (obsd_nat_target): New class.
8406         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
8407         (the_ppc_fbsd_nat_target): New.
8408         (ppcfbsd_fetch_inferior_registers)
8409         (ppcfbsd_store_inferior_registers): Refactor as methods of
8410         ppc_fbsd_nat_target.
8411         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
8412         add_target.
8413         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
8414         (the_ppc_nbsd_nat_target): New.
8415         (ppcnbsd_fetch_inferior_registers)
8416         (ppcnbsd_store_inferior_registers): Refactor as methods of
8417         ppc_nbsd_nat_target.
8418         (_initialize_ppcnbsd_nat): Adjust to C++ification.
8419         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
8420         (the_ppc_obsd_nat_target): New.
8421         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
8422         methods of ppc_obsd_nat_target.
8423         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
8424         add_target.
8425         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
8426         (the_sh_nbsd_nat_target): New.
8427         (shnbsd_fetch_inferior_registers)
8428         (shnbsd_store_inferior_registers): Refactor as methods of
8429         sh_nbsd_nat_target.
8430         (_initialize_shnbsd_nat): Adjust to C++ification.
8431         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
8432         (inf_ptrace_xfer_partial): Delete.
8433         (sparc_xfer_partial, sparc_target): Delete.
8434         * sparc-nat.h (sparc_fetch_inferior_registers)
8435         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
8436         (sparc_target): Delete function declaration.
8437         (sparc_target): New template class.
8438         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
8439         (_initialize_sparcnbsd_nat): Adjust to C++ification.
8440         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
8441         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
8442         add_target.
8443         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
8444         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
8445         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
8446         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
8447         add_target.
8448         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
8449         (the_vax_bsd_nat_target): New.
8450         (vaxbsd_fetch_inferior_registers)
8451         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
8452         methods.
8453         (_initialize_vaxbsd_nat): Adjust to C++ification.
8454
8455         * bsd-kvm.c (bsd_kvm_target): New class.
8456         (bsd_kvm_ops): Now a bsd_kvm_target.
8457         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
8458         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
8459         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
8460         bsd_kvm_target.
8461         (bsd_kvm_return_one): Delete.
8462         (bsd_kvm_add_target): Adjust to C++ification.
8463
8464         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
8465         (nto_procfs_target_procfs): New classes.
8466         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
8467         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
8468         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
8469         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
8470         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
8471         (procfs_remove_hw_breakpoint, procfs_resume)
8472         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
8473         (procfs_kill_inferior, procfs_store_registers)
8474         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
8475         as methods of nto_procfs_target.
8476         (nto_procfs_ops): Now an nto_procfs_target_procfs.
8477         (nto_native_ops): Delete.
8478         (procfs_open, procfs_native_open): Delete.
8479         (nto_native_ops): Now an nto_procfs_target_native.
8480         (init_procfs_targets): Adjust to C++ification.
8481         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
8482         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
8483         Refactor as methods of nto_procfs_target.
8484
8485         * go32-nat.c (go32_nat_target): New class.
8486         (the_go32_nat_target): New.
8487         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
8488         (go32_store_registers, go32_xfer_partial, go32_files_info)
8489         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
8490         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
8491         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
8492         (go32_pid_to_str): Refactor as methods of go32_nat_target.
8493         (go32_target): Delete.
8494         (_initialize_go32_nat): Adjust to C++ification.
8495
8496         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
8497         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
8498         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
8499         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
8500         gnu_nat_target.
8501         (gnu_target): Delete.
8502         * gnu-nat.h (gnu_target): Delete.
8503         (gnu_nat_target): New class.
8504         * i386-gnu-nat.c (gnu_base_target): New.
8505         (i386_gnu_nat_target): New class.
8506         (the_i386_gnu_nat_target): New.
8507         (_initialize_i386gnu_nat): Adjust to C++ification.
8508
8509 2018-05-02  Pedro Alves  <palves@redhat.com>
8510
8511         * bfd-target.c (target_bfd_xclose): Rename to ...
8512         (target_bfd_close): ... this.
8513         (target_bfd_reopen): Adjust.
8514         * target.c (target_close): Remove references to to_xclose.
8515         * target.h (target_ops::to_xclose): Delete.
8516         (target_ops::to_close): Update comments.
8517
8518 2018-05-02  Pedro Alves  <palves@redhat.com>
8519
8520         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
8521         "linux-nat.h".
8522         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
8523         * inf-ptrace.c (inf_ptrace_register_u_offset)
8524         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
8525         (inf_ptrace_store_register, inf_ptrace_store_registers)
8526         (inf_ptrace_trad_target): Move to ...
8527         * linux-nat-trad.c: ... this new file.
8528         * linux-nat-trad.h: New file.
8529         * linux-nat.c (linux_target_install_ops): Make extern.
8530         (linux_trad_target): Delete.
8531         * linux-nat.h (linux_trad_target): Delete declaration.
8532         (linux_target_install_ops): Declare.
8533         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
8534         "linux-nat.h".
8535
8536 2018-05-02  Pedro Alves  <palves@redhat.com>
8537
8538         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
8539         procfs_target/add_target here.
8540         * procfs.c (procfs_target): Make static.
8541         (_initialize_procfs): Call add_target here.
8542         * procfs.h (struct target_ops): Remove forward declaration.
8543         (procfs_target): Remove declaration.
8544         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
8545
8546 2018-05-02  Pedro Alves  <palves@redhat.com>
8547
8548         * procfs.c (procfs_stopped_by_watchpoint)
8549         (procfs_insert_watchpoint, procfs_remove_watchpoint)
8550         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
8551         Forward declare.
8552         (procfs_use_watchpoints): Delete, move contents...
8553         (procfs_target): ... here.
8554         * procfs.h (procfs_use_watchpoints): Delete declaration.
8555         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
8556         procfs_use_watchpoints.
8557         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
8558         procfs_use_watchpoints.
8559
8560 2018-05-02  Tom Tromey  <tom@tromey.com>
8561
8562         PR python/20084:
8563         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
8564         and var_zuinteger_unlimited.
8565         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
8566         and PARAM_ZUINTEGER_UNLIMITED.
8567         (set_parameter_value): Handle var_zuinteger and
8568         var_zuinteger_unlimited.
8569         (add_setshow_generic): Likewise.
8570         (parmpy_init): Likewise.
8571
8572 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
8573
8574         PR rust/23124
8575         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
8576         pointer is not null before dereferencing it.
8577
8578 2018-04-30  Tom Tromey  <tom@tromey.com>
8579
8580         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
8581         is_mi_like_p.
8582
8583 2018-04-30  Tom Tromey  <tom@tromey.com>
8584
8585         * breakpoint.c (mention): Remove use of is_mi_like_p.
8586         (print_mention_ranged_breakpoint): Likewise.
8587         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
8588         of is_mi_like_p.
8589
8590 2018-04-30  Tom Tromey  <tom@tromey.com>
8591
8592         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
8593
8594 2018-04-30  Tom Tromey  <tom@tromey.com>
8595
8596         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
8597         (info_spu_event_command): Remove some uses of is_mi_like_p.
8598
8599 2018-04-30  Tom Tromey  <tom@tromey.com>
8600
8601         * python/py-framefilter.c (py_print_single_arg)
8602         (enumerate_locals, py_print_args, py_print_frame): Remove some
8603         uses of is_mi_like_p.
8604
8605 2018-04-30  Tom Tromey  <tom@tromey.com>
8606
8607         * ui-out.c: Update.
8608         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
8609         * ui-out.h (ui_out::is_mi_like_p): Now const.
8610         (ui_out::do_is_mi_like_p): Now const.
8611         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
8612
8613 2018-04-30  Tom Tromey  <tom@tromey.com>
8614
8615         * varobj.c (varobj_set_visualizer): Use new_reference.
8616         * python/python.c (gdbpy_decode_line): Use new_reference.
8617         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
8618         new_reference.
8619
8620 2018-04-30  Tom Tromey  <tom@tromey.com>
8621
8622         * varobj.c (install_new_value): Use new_reference.
8623         * value.h (value_incref): Return void.  Swap intro comment with
8624         value_decref.
8625         * value.c (set_value_parent): Use new_reference.
8626         (value_incref): Return void.  Update intro comment.
8627         (release_value): Use new_reference.
8628         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
8629
8630 2018-04-30  Tom Tromey  <tom@tromey.com>
8631
8632         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
8633         * gdb_bfd.h (new_bfd_ref): Remove.
8634         (gdb_bfd_open): Update comment.
8635         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
8636         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
8637         (gdb_bfd_fdopenr): Use new_reference.
8638         * exec.c (exec_file_attach): Use new_reference.
8639
8640 2018-04-30  Tom Tromey  <tom@tromey.com>
8641
8642         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
8643         method.
8644
8645 2018-04-30  Tom Tromey  <tom@tromey.com>
8646
8647         * jit.c (jit_read_code_entry): Use type_align.
8648         * i386-tdep.c (i386_gdbarch_init): Don't call
8649         set_gdbarch_long_long_align_bit.
8650         * gdbarch.sh: Remove long_long_align_bit.
8651         * gdbarch.c, gdbarch.h: Rebuild.
8652         * arc-tdep.c (arc_type_align): New function.
8653         (arc_gdbarch_init): Use arc_type_align.  Don't call
8654         set_gdbarch_long_long_align_bit.
8655
8656 2018-04-30  Tom Tromey  <tom@tromey.com>
8657
8658         * rust-lang.c (rust_type_alignment): Remove.
8659         (rust_composite_type): Use type_align.
8660
8661 2018-04-30  Tom Tromey  <tom@tromey.com>
8662
8663         * NEWS: Mention Type.align.
8664         * python/py-type.c (typy_get_alignof): New function.
8665         (type_object_getset): Add "alignof".
8666
8667 2018-04-30  Tom Tromey  <tom@tromey.com>
8668
8669         PR exp/17095:
8670         * NEWS: Update.
8671         * std-operator.def (UNOP_ALIGNOF): New operator.
8672         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
8673         New.
8674         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
8675         * c-lang.c (c_op_print_tab): Add alignof.
8676         * c-exp.y (ALIGNOF): New token.
8677         (exp): Add "ALIGNOF" production.
8678         (ident_tokens): Add _Alignof and alignof.
8679
8680 2018-04-30  Tom Tromey  <tom@tromey.com>
8681
8682         * i386-tdep.c (i386_type_align): New function.
8683         (i386_gdbarch_init): Update.
8684         * gdbarch.sh (type_align): New method.
8685         * gdbarch.c, gdbarch.h: Rebuild.
8686         * arch-utils.h (default_type_align): Declare.
8687         * arch-utils.c (default_type_align): New function.
8688         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
8689         (struct type) <align_log2>: New field.
8690         <instance_flags>: Now a bitfield.
8691         (TYPE_RAW_ALIGN): New macro.
8692         (type_align, type_raw_align, set_type_align): Declare.
8693         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
8694         functions.
8695         * dwarf2read.c (quirk_rust_enum): Set type alignment.
8696         (get_alignment, maybe_set_alignment): New functions.
8697         (read_structure_type, read_enumeration_type, read_array_type)
8698         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
8699         (read_subrange_type, read_base_type): Set type alignment.
8700
8701 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
8702
8703         * dwarf2read.c (read_index_from_section): Use bool.
8704
8705 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
8706
8707         PR gdb/22950
8708         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
8709         with #ifdef.
8710
8711 2018-04-29  John Reiser  <jreiser@BitWagon.com>
8712
8713         PR build/22873
8714         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
8715         last step, and do it atomically.
8716
8717 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
8718
8719         * compile/compile-c-types.c (convert_int, convert_float):
8720         Update for C FE v1.
8721
8722 2018-04-27  Tom Tromey  <tom@tromey.com>
8723
8724         PR rust/22545:
8725         * rust-lang.c (rust_inclusive_range_type_p): New function.
8726         (rust_range): Handle inclusive ranges.
8727         (rust_compute_range): Likewise.
8728         * rust-exp.y (struct rust_op) <inclusive>: New field.
8729         (DOTDOTEQ): New constant.
8730         (range_expr): Add "..=" productions.
8731         (operator_tokens): Add "..=" token.
8732         (ast_range): Add "inclusive" parameter.
8733         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
8734         ranges.
8735         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
8736         bounds values.
8737         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
8738         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
8739         Update comments.
8740         * expprint.c (print_subexp_standard): Handle new bounds values.
8741         (dump_subexp_body_standard): Likewise.
8742
8743 2018-04-27  Tom Tromey  <tom@tromey.com>
8744
8745         * configure: Rebuild.
8746         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
8747         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
8748         "OVERRIDE".
8749         (class symbol_needs_eval_context): Likewise.
8750         * dwarf2read.c (mock_mapped_index::symbol_name_count)
8751         (mock_mapped_index::symbol_name_at): Use "override".  Remove
8752         "virtual".
8753         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
8754         "override".
8755         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
8756         * aarch64-tdep.c (instruction_reader::read): Use "override".
8757         (instruction_reader_test::read): Likewise.
8758         * arm-tdep.c (instruction_reader::read): Use "override".
8759         (instruction_reader_thumb::read): Likewise.
8760
8761 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
8762
8763         PR remote/9665
8764         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
8765         instead of remote_send.
8766         (remote_send): Remove.
8767
8768 2018-04-26  Pedro Alves  <palves@redhat.com>
8769
8770         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
8771         find_function_start_sal instead of find_pc_line.
8772
8773 2018-04-26  Pedro Alves  <palves@redhat.com>
8774
8775         * breakpoint.c (set_breakpoint_location_function): Handle
8776         mst_data_gnu_ifunc.
8777         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
8778         * elfread.c (elf_symtab_read): Give data symbols with
8779         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
8780         (elf_rel_plt_read): Update comment.
8781         * linespec.c (convert_linespec_to_sals): Handle
8782         mst_data_gnu_ifunc.
8783         (minsym_found): Handle mst_data_gnu_ifunc.
8784         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
8785         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
8786         * parse.c (find_minsym_type_and_address): Handle
8787         mst_data_gnu_ifunc.
8788         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
8789         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
8790         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
8791         comment.
8792         <mst_data_gnu_ifunc>: New enumerator.
8793
8794 2018-04-26  Pedro Alves  <palves@redhat.com>
8795
8796         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
8797         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
8798         'want_trampoline' parameter by a lookup_msym_prefer parameter.
8799         Handle it.
8800         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
8801         (lookup_minimal_symbol_by_pc): Adjust.
8802         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
8803         (lookup_solib_trampoline_symbol_by_pc): Adjust.
8804         * minsyms.h (lookup_msym_prefer): New enum.
8805         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8806         parameter by a lookup_msym_prefer parameter.
8807
8808 2018-04-26  Pedro Alves  <palves@redhat.com>
8809
8810         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
8811         ends in "@plt" instead of looking at the symbol's section.
8812
8813 2018-04-26  Pedro Alves  <palves@redhat.com>
8814
8815         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
8816         all references.
8817         (find_pc_partial_function_gnu_ifunc): Rename to ...
8818         (find_pc_partial_function): ... this, and remove references to
8819         'is_gnu_ifunc_p'.
8820         (find_pc_partial_function): Delete old implementation.
8821         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
8822
8823 2018-04-26  Pedro Alves  <palves@redhat.com>
8824
8825         * linespec.c (struct bound_minimal_symbol_search_key): New.
8826         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
8827         skip first line if we found a GNU ifunc minimal symbol by name.
8828         (compare_msymbols): Change parameters to work with a destructured
8829         lhs minsym.
8830         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
8831         functions.
8832
8833 2018-04-26  Pedro Alves  <palves@redhat.com>
8834
8835         * breakpoint.c (set_breakpoint_location_function): Don't resolve
8836         ifunc targets here.  Instead, if we have an ifunc minsym, use its
8837         address/name.
8838         (add_location_to_breakpoint): Store the minsym and the objfile in
8839         the breakpoint location.
8840         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
8841         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
8842         Record the minsym in the sal.
8843         * symtab.h (symtab_and_line) <msymbol>: New field.
8844
8845 2018-04-26  Pedro Alves  <palves@redhat.com>
8846
8847         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
8848         unless we actually resolved the ifunc.
8849
8850 2018-04-26  Pedro Alves  <palves@redhat.com>
8851
8852         * c-exp.y (variable production): Prefer ifunc minsyms over
8853         regular function symbols.
8854         * symtab.c (find_gnu_ifunc): New function.
8855         * minsyms.h (lookup_msym_prefer): New enum.
8856         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8857         parameter by a lookup_msym_prefer parameter.
8858         * symtab.h (find_gnu_ifunc): New declaration.
8859
8860 2018-04-26  Pedro Alves  <palves@redhat.com>
8861
8862         * blockframe.c (find_gnu_ifunc_target_type): New function.
8863         (find_function_type): New.
8864         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
8865         return a value with a memory address.
8866         (eval_call): For calls to GNU ifunc functions, try to find the
8867         type of the target function from the type that the resolver
8868         returns.
8869         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
8870         symbols.
8871         * infcall.c (find_function_return_type): Delete.
8872         (find_function_addr): Add 'function_type' parameter.  For calls to
8873         GNU ifunc functions, try to find the type of the target function
8874         from the type that the resolver returns, and return it via
8875         FUNCTION_TYPE.
8876         (call_function_by_hand_dummy): Adjust to use the function type
8877         returned by find_function_addr.
8878         (find_function_addr): Add 'function_type' parameter and move
8879         description here.
8880         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
8881         declarations.
8882
8883 2018-04-26  Pedro Alves  <palves@redhat.com>
8884
8885         * c-exp.y (variable production): Skip finding an alias for ifunc
8886         symbols.
8887
8888 2018-04-26  Pedro Alves  <palves@redhat.com>
8889
8890         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
8891
8892 2018-04-25  Pedro Alves  <palves@redhat.com>
8893
8894         * infcmd.c (kill_command): Print the pid as string, not the whole
8895         thread's ptid.  Add comment.  s/has been killed/killed/ in output
8896         message.
8897         * remote.c (remote_detach_1): Print the pid as string, not the
8898         whole thread's ptid.
8899
8900 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
8901             Sergio Durigan Junior  <sergiodj@redhat.com>
8902             Pedro Alves  <palves@redhat.com>
8903
8904         * infcmd.c (kill_command): Print message when inferior has
8905         been killed.
8906         * inferior.c (print_inferior_events): Remove 'static'.  Set as
8907         '1'.
8908         (add_inferior): Improve message printed when
8909         'print_inferior_events' is on.
8910         (exit_inferior): Remove message printed when
8911         'print_inferior_events' is on.
8912         (detach_inferior): Improve message printed when
8913         'print_inferior_events' is on.
8914         (initialize_inferiors): Use 'add_inferior_silent' to set
8915         'current_inferior_'.
8916         * inferior.h (print_inferior_events): Declare here as
8917         'extern'.
8918         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
8919         '[Detaching...]' messages when 'print_inferior_events' is on.
8920         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
8921         as prefix/suffix for messages.  Remove periods.  Fix erroneous
8922         'Detaching after fork from child...', replace it by '... from
8923         parent...'.
8924         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
8925         prefix/suffix when printing 'Detaching...' messages.  Print
8926         them when 'print_inferior_events' is on.
8927         * remote.c (remote_detach_1): Print message when detaching
8928         from inferior and '!is_fork_parent'.
8929
8930 2018-04-24  Tom Tromey  <tom@tromey.com>
8931
8932         * cli-out.h: Reindent.
8933
8934 2018-04-24  Tom Tromey  <tom@tromey.com>
8935
8936         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
8937         (cli_ui_out::do_field_string): Use fputs_filtered.
8938         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
8939
8940 2018-04-23  Tom Tromey  <tom@tromey.com>
8941
8942         * guile/scm-frame.c (gdbscm_frame_read_var): Use
8943         gdb::unique_xmalloc_ptr.
8944
8945 2018-04-23  Tom Tromey  <tom@tromey.com>
8946
8947         * configure: Rebuild.
8948
8949 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
8950
8951         PR gdb/23095
8952         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
8953         prepare_for_testing.  Set normal_bp to r_debug_state if target
8954         is bsd.
8955
8956 2018-04-21  Pedro Alves  <palves@redhat.com>
8957             Rajendra SY  <rajendra.sy@gmail.com>
8958
8959         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
8960         * remote.c (extended_remote_attach): In all-stop mode, mark the
8961         thread as executing.
8962
8963 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8964
8965         * thread.c (thread_apply_all_command): Fix comment.
8966         (thread_command): Fix comment.
8967
8968 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
8969
8970         * common/tdesc.h (tdesc_create_feature): Remove xml filename
8971         parameter.
8972         * features/aarch64-core.c (create_feature_aarch64_core):
8973         Regenerate.
8974         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
8975         Likewise.
8976         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
8977         Likewise.
8978         * features/i386/32bit-avx512.c
8979         (create_feature_i386_32bit_avx512): Likewise.
8980         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
8981         Likewise.
8982         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
8983         Likewise.
8984         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
8985         Likewise.
8986         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
8987         Likewise.
8988         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
8989         Likewise.
8990         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
8991         Likewise.
8992         * features/i386/64bit-avx512.c
8993         (create_feature_i386_64bit_avx512): Likewise.
8994         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
8995         Likewise.
8996         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
8997         Likewise.
8998         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
8999         Likewise.
9000         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
9001         Likewise.
9002         * features/i386/64bit-segments.c
9003         (create_feature_i386_64bit_segments): Likewise.
9004         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
9005         Likewise.
9006         * features/i386/x32-core.c
9007         (create_feature_i386_x32_core): Likewise.
9008         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
9009         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
9010         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
9011         * target-descriptions.c: In generated code, don't pass xml
9012         filename.
9013
9014 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9015
9016         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
9017         (print_xml_feature::visit_post): Likewise.
9018         (print_xml_feature::visit): Likewise.
9019         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
9020         (print_xml_feature): Add new class.
9021         * regformats/regdat.sh: Null xmltarget on feature targets.
9022         * target-descriptions.c (struct target_desc): Add xmltarget.
9023         (maintenance_check_tdesc_xml_convert): Add unittest function.
9024         (tdesc_get_features_xml): Add function to get xml.
9025         (maintenance_check_xml_descriptions): Test xml generation.
9026         * xml-tdesc.c (string_read_description_xml): Add function.
9027         * xml-tdesc.h (string_read_description_xml): Add declaration.
9028
9029 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9030
9031         * features/Makefile: Add feature marker to targets with new style
9032         target descriptions.
9033         * regformats/aarch64.dat: Regenerate.
9034         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
9035         * regformats/i386/amd64-avx-linux.dat: Likewise.
9036         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
9037         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
9038         * regformats/i386/amd64-linux.dat: Likewise.
9039         * regformats/i386/amd64-mpx-linux.dat: Likewise.
9040         * regformats/i386/amd64.dat: Likewise.
9041         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
9042         * regformats/i386/i386-avx-linux.dat: Likewise.
9043         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
9044         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
9045         * regformats/i386/i386-linux.dat: Likewise.
9046         * regformats/i386/i386-mmx-linux.dat: Likewise.
9047         * regformats/i386/i386-mpx-linux.dat: Likewise.
9048         * regformats/i386/i386.dat: Likewise.
9049         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
9050         * regformats/i386/x32-avx-linux.dat: Likewise.
9051         * regformats/i386/x32-linux.dat: Likewise.
9052         * regformats/tic6x-c62x-linux.dat: Likewise.
9053         * regformats/tic6x-c64x-linux.dat: Likewise.
9054         * regformats/tic6x-c64xp-linux.dat: Likewise.
9055         * regformats/regdat.sh: Parse feature marker.
9056
9057 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9058
9059         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
9060         (tdesc_osabi_name): Likewise.
9061         * target-descriptions.c (tdesc_architecture_name): Add new
9062         function.
9063         (tdesc_osabi_name): Likewise.
9064
9065 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9066
9067         * common/tdesc.c (tdesc_predefined_type): Move to here.
9068         (tdesc_named_type): Likewise.
9069         (tdesc_create_vector): Likewise.
9070         (tdesc_create_struct): Likewise.
9071         (tdesc_set_struct_size): Likewise.
9072         (tdesc_create_union): Likewise.
9073         (tdesc_create_flags): Likewise.
9074         (tdesc_create_enum): Likewise.
9075         (tdesc_add_field): Likewise.
9076         (tdesc_add_typed_bitfield): Likewise.
9077         (tdesc_add_bitfield): Likewise.
9078         (tdesc_add_flag): Likewise.
9079         (tdesc_add_enum_value): Likewise.
9080         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
9081         (struct tdesc_type_vector): Likewise.
9082         (struct tdesc_type_field): Likewise.
9083         (struct tdesc_type_with_fields): Likewise.
9084         (tdesc_create_enum): Add declaration.
9085         (tdesc_add_typed_bitfield): Likewise.
9086         (tdesc_add_enum_value): Likewise.
9087         * target-descriptions.c (tdesc_type_field): Move from here.
9088         (tdesc_type_builtin): Likewise.
9089         (tdesc_type_vector): Likewise.
9090         (tdesc_type_with_fields): Likewise.
9091         (tdesc_predefined_types): Likewise.
9092         (tdesc_named_type): Likewise.
9093         (tdesc_create_vector): Likewise.
9094         (tdesc_create_struct): Likewise.
9095         (tdesc_set_struct_size): Likewise.
9096         (tdesc_create_union): Likewise.
9097         (tdesc_create_flags): Likewise.
9098         (tdesc_create_enum): Likewise.
9099         (tdesc_add_field): Likewise.
9100         (tdesc_add_typed_bitfield): Likewise.
9101         (tdesc_add_bitfield): Likewise.
9102         (tdesc_add_flag): Likewise.
9103         (tdesc_add_enum_value): Likewise.
9104         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
9105         (tdesc_add_typed_bitfield): Likewise.
9106         (tdesc_add_enum_value): Likewise.
9107
9108 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9109
9110         * common/tdesc.c (tdesc_feature::accept): Move to here.
9111         (tdesc_feature::operator==): Likewise.
9112         (tdesc_create_reg): Likewise.
9113         * common/tdesc.h (tdesc_type_kind): Likewise.
9114         (struct tdesc_type): Likewise.
9115         (struct tdesc_feature): Likewise.
9116         * regformats/regdat.sh: Create a feature.
9117         * target-descriptions.c (tdesc_type_kind): Move from here.
9118         (tdesc_type): Likewise.
9119         (tdesc_type_up): Likewise.
9120         (tdesc_feature): Likewise.
9121         (tdesc_create_reg): Likewise.
9122
9123 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9124
9125         * Makefile.in: Add arch/tdesc.c
9126         * common/tdesc.c: New file.
9127         * common/tdesc.h (tdesc_element_visitor): Move to here.
9128         (tdesc_element): Likewise.
9129         (tdesc_reg): Likewise.
9130         (tdesc_reg_up): Likewise.
9131         * regformats/regdef.h (reg): Add offset to constructors.
9132         * target-descriptions.c (tdesc_element_visitor): Move from here.
9133         (tdesc_element): Likewise.
9134         (tdesc_reg): Likewise.
9135         (tdesc_reg_up): Likewise.
9136
9137 2018-04-17  Tom Tromey  <tom@tromey.com>
9138
9139         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
9140         discriminant field.
9141
9142 2018-04-17  Tom Tromey  <tom@tromey.com>
9143
9144         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
9145
9146 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9147
9148         * symtab.c (print_symbol_info): Skip printing filename and line
9149         number when `last' is NULL.
9150         (symtab_symbol_info): Use empty string instead of NULL for first
9151         invocation of print_symbol_info.
9152         (rbreak_command): Pass NULL to `last' parameter of
9153         print_symbol_info.
9154
9155 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
9156
9157         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
9158         instead of nullptr.
9159
9160 2018-04-16  Pedro Alves  <palves@redhat.com>
9161
9162         * MAINTAINERS (sh): Remove.
9163         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
9164         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
9165         (ALLDEPFILES): Remove sh64-tdep.c.
9166         * NEWS: Mentions that support for SH-5/SH64 is removed.
9167         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
9168         (sh*-*-openbsd*): Ditto.
9169         (sh64-*-elf*): Remove.
9170         (sh*): Remove.
9171         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
9172         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
9173         * sh-tdep.c: No longer include "sh64-tdep.h".
9174         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
9175         * sh64-tdep.c, sh64-tdep.h: Remove files.
9176
9177 2018-04-16  Pedro Alves  <palves@redhat.com>
9178
9179         * MAINTAINERS: Remove m88k.
9180         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
9181         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
9182         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
9183         * NEWS: Mention that support for m88k was removed.
9184         * configure.host (m88*-*-*): Remove support.
9185         * configure.nat (m88k-*-*): Remove support.
9186         * configure.tgt (m88*-*-openbsd*): Remove.
9187         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
9188
9189 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
9190
9191         * configure.tgt (x86_tobjs): New variable.
9192         (amd64_tobjs, i386_tobjs): Use it.
9193
9194 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9195
9196         * symtab.c (print_symbol_info): Precede the symbol definition by
9197         the line number when available.
9198         * NEWS: Advertise this enhancement.
9199
9200 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
9201
9202         * NEWS (New options): announce set/show record btrace cpu.
9203         * btrace.c: Include record-btrace.h.
9204         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
9205         the vendor is unknown.
9206         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
9207         Maybe overwrite the btrace configuration's cpu.
9208         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
9209         (btrace_fetch): Add cpu parameter.  Update callers.
9210         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
9211         Maybe overwrite the btrace configuration's cpu.  Skip enabling
9212         errata workarounds if the vendor is unknown.
9213         * python/py-record-btrace.c: Include record-btrace.h.
9214         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
9215         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
9216         * record-btrace.c (record_btrace_cpu_state_kind): New.
9217         (record_btrace_cpu): New.
9218         (set_record_btrace_cpu_cmdlist): New.
9219         (record_btrace_get_cpu): New.
9220         (require_btrace_thread, record_btrace_info)
9221         (record_btrace_resume_thread): Call record_btrace_get_cpu.
9222         (cmd_set_record_btrace_cpu_none): New.
9223         (cmd_set_record_btrace_cpu_auto): New.
9224         (cmd_set_record_btrace_cpu): New.
9225         (cmd_show_record_btrace_cpu): New.
9226         (_initialize_record_btrace): Initialize set/show record btrace cpu
9227         commands.
9228         * record-btrace.h (record_btrace_get_cpu): New.
9229
9230 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
9231
9232         * record.c (set_record_command): Fix typo in message.
9233
9234 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
9235
9236         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
9237
9238 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
9239
9240         * infrun.c (process_event_stop_test): Call
9241         gdbarch_in_indirect_branch_thunk.
9242         * gdbarch.sh (in_indirect_branch_thunk): New.
9243         * gdbarch.c: Regenerated.
9244         * gdbarch.h: Regenerated.
9245         * x86-tdep.h: New.
9246         * x86-tdep.c: New.
9247         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
9248         (HFILES_NO_SRCDIR): Add x86-tdep.h.
9249         (ALLDEPFILES): Add x86-tdep.c.
9250         * arch-utils.h (default_in_indirect_branch_thunk): New.
9251         * arch-utils.c (default_in_indirect_branch_thunk): New.
9252         * i386-tdep: Include x86-tdep.h.
9253         (i386_in_indirect_branch_thunk): New.
9254         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
9255         function.
9256         * amd64-tdep: Include x86-tdep.h.
9257         (amd64_in_indirect_branch_thunk): New.
9258         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
9259
9260 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
9261
9262         PR gdb/23053
9263         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
9264         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
9265         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
9266         regression.
9267
9268 2018-04-12  Tom Tromey  <tom@tromey.com>
9269
9270         * rust-lang.c (rust_print_struct_def): Remove univariant code.
9271         (rust_evaluate_subexp): Likewise.
9272
9273 2018-04-12  Pedro Alves  <palves@redhat.com>
9274
9275         * procfs.c (procfs_detach): Make forward declaration's prototype
9276         match definition's protototype.
9277         (proc_get_LDT_entry): Remove stale do_cleanups call.
9278
9279 2018-04-12  Pedro Alves  <palves@redhat.com>
9280
9281         * target.h (target_ops::to_has_exited): Delete.
9282         (target_has_exited): Delete.
9283         * target-delegates.c: Regenerate.
9284
9285 2018-04-11  Pedro Alves  <palves@redhat.com>
9286
9287         * target.c (fileio_fh_t::t): Add comment.
9288         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
9289         (target_fileio_close): Handle a NULL target.
9290         (invalidate_fileio_fh): New.
9291         (target_close): Call it.
9292         * remote.c (remote_hostio_send_command): No longer check whether
9293         remote_desc is open.
9294
9295 2018-04-11  Pedro Alves  <palves@redhat.com>
9296
9297         * target.c (fileio_fh_t): Make it a named struct instead of a
9298         typedef.
9299         (fileio_fh_t::is_closed): New method.
9300         (DEF_VEC_O (fileio_fh_t)): Remove.
9301         (fileio_fhandles): Now a std::vector.
9302         (is_closed_fileio_fh): Delete.
9303         (acquire_fileio_fd): Adjust.  Rename parameters.
9304         (release_fileio_fd): Adjust.
9305         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
9306         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
9307         (target_fileio_close): Adjust.
9308
9309 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
9310
9311         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
9312         index.
9313
9314 2018-04-10  Pedro Alves  <palves@redhat.com>
9315
9316         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
9317         (scoped_finish_thread_state): New class.
9318         * infcmd.c (run_command_1): Use it instead of finish_thread_state
9319         cleanup.
9320         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
9321         (fetch_inferior_event, normal_stop): Likewise.
9322         * thread.c (finish_thread_state_cleanup): Delete.
9323
9324 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9325             Pedro Alves  <palves@redhat.com>
9326
9327         * value.c: Include "selftest.h" and "common/array-view.h".
9328         (struct range) <operator ==>: New.
9329         (test_ranges_contain): New.
9330         (check_ranges_vector): New.
9331         (test_insert_into_bit_range_vector): New.
9332         (_initialize_values): Register selftests.
9333         * common/array-view.h (operator==, operator!=): New.
9334
9335 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9336
9337         * common/gdb_vecs.h (unordered_remove): Add overload that takes
9338         an iterator.
9339         * inline-frame.c: Include <algorithm>.
9340         (struct inline_state): Add constructor.
9341         (inline_state_s): Remove.
9342         (DEF_VEC_O(inline_state_s)): Remove.
9343         (inline_states): Change type to std::vector.
9344         (find_inline_frame_state): Adjust to std::vector.
9345         (allocate_inline_frame_state): Remove.
9346         (clear_inline_frame_state): Adjust to std::vector.
9347         (skip_inline_frames): Adjust to std::vector.
9348
9349 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9350
9351         * tracepoint.h (struct trace_state_variable): Add constructor.
9352         <name>: Change type to std::string.
9353         * tracepoint.c (tsv_s): Remove.
9354         (DEF_VEC_O(tsv_s)): Remove.
9355         (tvariables): Change to std::vector.
9356         (create_trace_state_variable): Adjust to std::vector.
9357         (find_trace_state_variable): Likewise.
9358         (find_trace_state_variable_by_number): Likewise.
9359         (delete_trace_state_variable): Likewise.
9360         (trace_variable_command): Adjust to std::string.
9361         (delete_trace_variable_command): Likewise.
9362         (tvariables_info_1): Adjust to std::vector.
9363         (save_trace_state_variables): Likewise.
9364         (start_tracing): Likewise.
9365         (merge_uploaded_trace_state_variables): Adjust to std::vector
9366         and std::string.
9367         * target.h (struct target_ops)
9368         <to_download_trace_state_variable>: Pass reference to
9369         trace_state_variable.
9370         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
9371         * target-delegates.c: Re-generate.
9372         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
9373         (mi_tsv_deleted): Likewise.
9374         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
9375         * remote.c (remote_download_trace_state_variable): Change
9376         pointer to reference and adjust.
9377         * make-target-delegates (parse_argtypes): Handle references.
9378         (write_function_header): Likewise.
9379         (munge_type): Likewise.
9380
9381 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9382
9383         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9384         string_view-selftests.c.
9385         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
9386         testsuite.
9387         * unittests/basic_string_view/cons/char/1.cc: Likewise.
9388         * unittests/basic_string_view/cons/char/2.cc: Likewise.
9389         * unittests/basic_string_view/cons/char/3.cc: Likewise.
9390         * unittests/basic_string_view/element_access/char/1.cc:
9391         Likewise.
9392         * unittests/basic_string_view/element_access/char/empty.cc:
9393         Likewise.
9394         * unittests/basic_string_view/element_access/char/front_back.cc:
9395         Likewise.
9396         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
9397         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
9398         Likewise.
9399         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
9400         Likewise.
9401         * unittests/basic_string_view/modifiers/swap/char/1.cc:
9402         Likewise.
9403         * unittests/basic_string_view/operations/compare/char/1.cc:
9404         Likewise.
9405         * unittests/basic_string_view/operations/compare/char/13650.cc:
9406         Likewise.
9407         * unittests/basic_string_view/operations/copy/char/1.cc:
9408         Likewise.
9409         * unittests/basic_string_view/operations/data/char/1.cc:
9410         Likewise.
9411         * unittests/basic_string_view/operations/find/char/1.cc:
9412         Likewise.
9413         * unittests/basic_string_view/operations/find/char/2.cc:
9414         Likewise.
9415         * unittests/basic_string_view/operations/find/char/3.cc:
9416         Likewise.
9417         * unittests/basic_string_view/operations/find/char/4.cc:
9418         Likewise.
9419         * unittests/basic_string_view/operations/rfind/char/1.cc:
9420         Likewise.
9421         * unittests/basic_string_view/operations/rfind/char/2.cc:
9422         Likewise.
9423         * unittests/basic_string_view/operations/rfind/char/3.cc:
9424         Likewise.
9425         * unittests/basic_string_view/operations/substr/char/1.cc:
9426         Likewise.
9427         * unittests/basic_string_view/operators/char/2.cc: Likewise.
9428         * unittests/string_view-selftests.c: New file.
9429
9430 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9431
9432         * unittests/basic_string_view/capacity/1.cc: New file.
9433         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
9434         * unittests/basic_string_view/cons/char/1.cc: New file.
9435         * unittests/basic_string_view/cons/char/2.cc: New file.
9436         * unittests/basic_string_view/cons/char/3.cc: New file.
9437         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
9438         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
9439         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
9440         * unittests/basic_string_view/element_access/char/1.cc: New file.
9441         * unittests/basic_string_view/element_access/char/2.cc: New file.
9442         * unittests/basic_string_view/element_access/char/empty.cc: New file.
9443         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
9444         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
9445         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
9446         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
9447         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
9448         * unittests/basic_string_view/include.cc: New file.
9449         * unittests/basic_string_view/inserters/char/1.cc: New file.
9450         * unittests/basic_string_view/inserters/char/2.cc: New file.
9451         * unittests/basic_string_view/inserters/char/3.cc: New file.
9452         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
9453         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
9454         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
9455         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
9456         * unittests/basic_string_view/literals/types.cc: New file.
9457         * unittests/basic_string_view/literals/values.cc: New file.
9458         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
9459         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
9460         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
9461         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
9462         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
9463         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
9464         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
9465         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
9466         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
9467         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
9468         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
9469         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
9470         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
9471         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
9472         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
9473         * unittests/basic_string_view/operations/data/char/1.cc: New file.
9474         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
9475         * unittests/basic_string_view/operations/find/char/1.cc: New file.
9476         * unittests/basic_string_view/operations/find/char/2.cc: New file.
9477         * unittests/basic_string_view/operations/find/char/3.cc: New file.
9478         * unittests/basic_string_view/operations/find/char/4.cc: New file.
9479         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
9480         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
9481         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
9482         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
9483         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
9484         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
9485         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
9486         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
9487         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
9488         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
9489         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
9490         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
9491         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
9492         * unittests/basic_string_view/operators/char/2.cc: New file.
9493         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
9494         * unittests/basic_string_view/range_access/char/1.cc: New file.
9495         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
9496         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
9497         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
9498         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
9499         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
9500         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
9501         * unittests/basic_string_view/requirements/typedefs.cc: New file.
9502         * unittests/basic_string_view/typedefs.cc: New file.
9503         * unittests/basic_string_view/types/1.cc: New file.
9504
9505 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9506
9507         * common/gdb_string_view.h: Remove libstdc++ implementation
9508         details, adjust to gdb reality.
9509         * common/gdb_string_view.tcc: Likewise.
9510         * cli/cli-script.c (struct string_view): Remove.
9511         (user_args) <m_args>: Change element type to gdb::string_view.
9512         (user_args::insert_args): Adjust.
9513
9514 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9515
9516         * common/gdb_string_view.h: New file.
9517         * common/gdb_string_view.tcc: New file.
9518
9519 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9520
9521         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
9522         * configure: Re-generate.
9523
9524 2018-04-09  Pedro Alves  <palves@redhat.com>
9525
9526         * gdbarch.sh: Include "observable.h" instead of "observer.h".
9527         (set_target_gdbarch): Call
9528         gdb::observers::architecture_changed.notify instead of
9529         observer_notify_architecture_changed.
9530
9531 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9532
9533         * tracepoint.c (struct current_traceframe_cleanup): Remove.
9534         (do_restore_current_traceframe_cleanup): Remove.
9535         (restore_current_traceframe_cleanup_dtor): Remove.
9536         (make_cleanup_restore_current_traceframe): Remove.
9537         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
9538         New.
9539         * tracepoint.h (struct scoped_restore_current_traceframe): New.
9540         * infrun.c (fetch_inferior_event): Use
9541         scoped_restore_current_traceframe.
9542
9543 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9544
9545         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
9546         Remove.
9547         <n_allocated_type_units>: Remove.
9548         <all_type_units>: Change to std::vector.
9549         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
9550         to std::vector change.
9551         (dwarf2_per_objfile::get_cutu): Likewise.
9552         (dwarf2_per_objfile::get_tu): Likewise.
9553         (create_signatured_type_table_from_index): Likewise.
9554         (create_signatured_type_table_from_debug_names): Likewise.
9555         (dw2_symtab_iter_next): Likewise.
9556         (dw2_print_stats): Likewise.
9557         (dw2_expand_all_symtabs): Likewise.
9558         (dw2_expand_marked_cus): Likewise.
9559         (dw2_debug_names_iterator::next): Likewise.
9560         (dwarf2_initialize_objfile): Likewise.
9561         (add_signatured_type_cu_to_table): Likewise.
9562         (create_all_type_units): Likewise.
9563         (add_type_unit): Likewise.
9564         (struct tu_abbrev_offset): Add constructor.
9565         (build_type_psymtabs_1): Adjust to std::vector change.
9566         (print_tu_stats): Likewise.
9567         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9568         (write_debug_names): Likewise.
9569
9570 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9571
9572         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
9573         Make an std::vector.
9574         <n_comp_units>: Remove.
9575         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
9576         to std::vector change.
9577         (dwarf2_per_objfile::get_cutu): Likewise.
9578         (dwarf2_per_objfile::get_cu): Likewise.
9579         (create_cus_from_index): Likewise.
9580         (create_addrmap_from_index): Likewise.
9581         (create_addrmap_from_aranges): Likewise.
9582         (dwarf2_read_index): Likewise.
9583         (dw2_find_last_source_symtab): Likewise.
9584         (dw2_map_symtabs_matching_filename): Likewise.
9585         (dw2_symtab_iter_next): Likewise.
9586         (dw2_print_stats): Likewise.
9587         (dw2_expand_all_symtabs): Likewise.
9588         (dw2_expand_symtabs_with_fullname): Likewise.
9589         (dw2_expand_marked_cus): Likewise.
9590         (dw2_map_symbol_filenames): Likewise.
9591         (create_cus_from_debug_names): Likewise.
9592         (dwarf2_read_debug_names): Likewise.
9593         (dw2_debug_names_iterator::next): Likewise.
9594         (dwarf2_initialize_objfile): Likewise.
9595         (set_partial_user): Likewise.
9596         (dwarf2_build_psymtabs_hard): Likewise.
9597         (read_comp_units_from_section): Remove arguments, adjust to
9598         std::vector change.
9599         (create_all_comp_units): Adjust to std::vector and
9600         read_comp_units_from_section changes.
9601         (dwarf2_find_containing_comp_unit): Adjust to std::vector
9602         change.
9603         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9604         (psyms_seen_size): Likewise.
9605         (write_gdbindex): Likewise.
9606         (write_debug_names): Likewise.
9607
9608 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9609
9610         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
9611         with dwarf2_per_objfile.
9612         (create_cus_from_index): Likewise.
9613         (create_signatured_type_table_from_index): Likewise.
9614         (dwarf2_read_index): Likewise.
9615         (dwarf2_initialize_objfile): Likewise.
9616         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
9617         per_cu rather than get_dwarf2_per_objfile.
9618
9619 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9620
9621         * dwarf2read.h (struct signatured_type): Forward declare.
9622         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
9623         New methods.
9624         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
9625         (dw2_get_cutu): ...this.
9626         (dwarf2_per_objfile::get_cu): Rename from...
9627         (dw2_get_cu): ...this.
9628         (dwarf2_per_objfile::get_tu): New.
9629         (create_addrmap_from_index): Adjust.
9630         (create_addrmap_from_aranges): Adjust.
9631         (dw2_find_last_source_symtab): Adjust.
9632         (dw2_map_symtabs_matching_filename): Adjust.
9633         (dw2_symtab_iter_next): Adjust.
9634         (dw2_print_stats): Adjust.
9635         (dw2_expand_all_symtabs): Adjust.
9636         (dw2_expand_symtabs_with_fullname): Adjust.
9637         (dw2_expand_marked_cus): Adjust.
9638         (dw_expand_symtabs_matching_file_matcher): Adjust.
9639         (dw2_map_symbol_filenames): Adjust.
9640         (dw2_debug_names_iterator::next): Adjust.
9641         (dwarf2_initialize_objfile): Adjust.
9642         (set_partial_user): Adjust.
9643         (dwarf2_build_psymtabs_hard): Adjust.
9644
9645 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9646
9647         * dwarf2read.c (create_signatured_type_table_from_debug_names):
9648         Remove unused variables.
9649         (dw2_map_symtabs_matching_filename): Likewise.
9650         (dwarf2_record_block_ranges): Likewise.
9651         (dwarf2_read_addr_index): Likewise.
9652         (follow_die_offset): Likewise.
9653
9654 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9655
9656         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
9657         to symbol_file_add_main.
9658
9659 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9660
9661         PR mi/22299
9662         * mi/mi-console.c (do_fputc_async_safe): New.
9663         (mi_console_file::write_async_safe): New.
9664         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
9665         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
9666         New.
9667         * ui-file.c (ui_file::putstrn): Adjust call to
9668         fputstrn_unfiltered.
9669         * utils.c (printchar): Replace do_fputs and do_fprintf
9670         parameters by do_fputc.
9671         (fputstr_filtered): Adjust call to printchar.
9672         (fputstr_unfiltered): Likewise.
9673         (fputstrn_filtered): Likewise.
9674         (fputstrn_unfiltered): Add do_fputc parameter, pass to
9675         printchar.
9676         * utils.h (do_fputc_ftype): New typedef.
9677         (fputstrn_unfiltered): Add do_fputc parameter.
9678
9679 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9680
9681         * regformats/i386/i386-avx.dat: Remove.
9682
9683 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
9684
9685         PR gdb/22979
9686         * amd64-tdep.c (amd64_none_init_abi): New function.
9687         (amd64_x32_none_init_abi): New function.
9688         (_initialize_amd64_tdep): Register handlers for x86-64 and
9689         x64_32 with GDB_OSABI_NONE.
9690         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
9691         GDB_OSABI_NONE osabi.
9692
9693 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
9694
9695         PR gdb/22980
9696         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
9697         GDB_OSABI_NONE.
9698         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
9699         * osabi.c (gdb_osabi_names): Add "unknown" entry.
9700
9701 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
9702
9703         * common/byte-vector.h (char_vector): New type.
9704         * target.h (target_read_alloc): Return
9705         gdb::optional<byte_vector>.
9706         (target_read_stralloc): Return gdb::optional<char_vector>.
9707         (target_get_osdata): Return gdb::optional<char_vector>.
9708         * target.c (target_read_alloc_1): Templatize.  Replacement
9709         manual memory management with vector.
9710         (target_read_alloc): Change return type, adjust.
9711         (target_read_stralloc): Change return type, adjust.
9712         (target_get_osdata): Change return type, adjust.
9713         * auxv.c (struct auxv_info) <length>: Remove.
9714         <data>: Change type to gdb::optional<byte_vector>.
9715         (auxv_inferior_data_cleanup): Free auxv_info with delete.
9716         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
9717         (target_auxv_search): Adjust.
9718         (fprint_target_auxv): Adjust.
9719         * avr-tdep.c (avr_io_reg_read_command): Adjust.
9720         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
9721         (linux_make_corefile_notes): Adjust.
9722         * osdata.c (get_osdata): Adjust.
9723         * remote.c (remote_get_threads_with_qxfer): Adjust.
9724         (remote_memory_map): Adjust.
9725         (remote_traceframe_info): Adjust.
9726         (btrace_read_config): Adjust.
9727         (remote_read_btrace): Adjust.
9728         (remote_pid_to_exec_file): Adjust.
9729         * solib-aix.c (solib_aix_get_library_list): Adjust.
9730         * solib-dsbt.c (decode_loadmap): Don't free buf.
9731         (dsbt_get_initial_loadmaps): Adjust.
9732         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
9733         * solib-target.c (solib_target_current_sos): Adjust.
9734         * tracepoint.c (sdata_make_value): Adjust.
9735         * xml-support.c (xinclude_start_include): Adjust.
9736         (xml_fetch_content_from_file): Adjust.
9737         * xml-support.h (xml_fetch_another): Change return type.
9738         (xml_fetch_content_from_file): Change return type.
9739         * xml-syscall.c (xml_init_syscalls_info): Adjust.
9740         * xml-tdesc.c (file_read_description_xml): Adjust.
9741         (fetch_available_features_from_target): Change return type.
9742         (target_fetch_description_xml): Adjust.
9743         (target_read_description_xml): Adjust.
9744
9745 2018-04-06  Tom Tromey  <tom@tromey.com>
9746
9747         * value.c (~value): Update.
9748         (struct value) <contents>: Now unique_xmalloc_ptr.
9749         (value_contents_bits_eq, allocate_value_contents)
9750         (value_contents_raw, value_contents_all_raw)
9751         (value_contents_for_printing, value_contents_for_printing_const)
9752         (set_value_enclosing_type): Update.
9753
9754 2018-04-06  Tom Tromey  <tom@tromey.com>
9755
9756         * value.c (range_s): Remove typedef, VEC.
9757         (struct range): Add operator<.
9758         (range_lessthan): Remove.
9759         (ranges_contain): Change type.
9760         (~value): Update.
9761         (struct value) <unavailable, optimized_out>: Now std::vector.
9762         (value_entirely_available)
9763         (value_entirely_covered_by_range_vector)
9764         (value_entirely_unavailable, value_entirely_optimized_out):
9765         Update.
9766         (insert_into_bit_range_vector): Change argument type.
9767         (find_first_range_overlap): Likewise.
9768         (struct ranges_and_idx, value_contents_bits_eq)
9769         (require_not_optimized_out, require_available): Update.
9770         (ranges_copy_adjusted): Change argument types.
9771         (value_optimized_out, value_copy, value_fetch_lazy): Update.
9772
9773 2018-04-06  Tom Tromey  <tom@tromey.com>
9774
9775         * value.c (~value): Update.
9776         (struct value) <parent>: Now a value_ref_ptr.
9777         (value_parent, set_value_parent, value_address, value_copy):
9778         Update.
9779
9780 2018-04-06  Tom Tromey  <tom@tromey.com>
9781
9782         * value.c (struct value): Add constructor, destructor, and member
9783         initializers.
9784         (allocate_value_lazy, value_decref): Update.
9785
9786 2018-04-06  Tom Tromey  <tom@tromey.com>
9787
9788         * value.c (struct value) <released, next>: Remove.
9789         (all_values): Now a std::vector.
9790         (allocate_value_lazy): Update.
9791         (value_next): Remove.
9792         (value_mark, value_free_to_mark, release_value)
9793         (value_release_to_mark): Update.
9794
9795 2018-04-06  Tom Tromey  <tom@tromey.com>
9796
9797         * value.h (fetch_subexp_value, value_release_to_mark): Update.
9798         (free_value_chain): Remove.
9799         * value.c (free_value_chain): Remove.
9800         (value_release_to_mark): Return a std::vector.
9801         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
9802         std::vector.
9803         (check_condition): Update.
9804         * eval.c (fetch_subexp_value): Change "val_chain" to a
9805         std::vector.
9806         * breakpoint.c (update_watchpoint): Update.
9807         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
9808
9809 2018-04-06  Tom Tromey  <tom@tromey.com>
9810
9811         * value.h (free_all_values): Remove.
9812         * value.c (free_all_values): Remove.
9813
9814 2018-04-06  Tom Tromey  <tom@tromey.com>
9815
9816         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
9817         (value_history_chain, value_history_count): Remove.
9818         (value_history): New global.
9819         (record_latest_value, access_value_history, show_values)
9820         (preserve_values): Update.
9821
9822 2018-04-06  Tom Tromey  <tom@tromey.com>
9823
9824         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
9825         * varobj.c (varobj_set_display_format, varobj_set_value)
9826         (install_default_visualizer, construct_visualizer)
9827         (install_new_value, ~varobj, varobj_get_value_type)
9828         (my_value_of_variable, varobj_editable_p): Update.
9829         * c-varobj.c (c_describe_child, c_value_of_variable)
9830         (cplus_number_of_children, cplus_describe_child): Update.
9831         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
9832         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
9833         (ada_value_of_variable, ada_value_is_changeable_p): Update.
9834
9835 2018-04-06  Tom Tromey  <tom@tromey.com>
9836
9837         * printcmd.c (last_examine_address): Change type to
9838         value_ref_ptr.
9839         (do_examine, x_command): Update.
9840
9841 2018-04-06  Tom Tromey  <tom@tromey.com>
9842
9843         * value.c (release_value): Update.
9844         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
9845         (struct bpstats) <val>: Now a value_ref_ptr.
9846         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9847         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9848         (~watchpoint, print_it_watchpoint, watch_command_1)
9849         (invalidate_bp_value_on_memory_change): Update.
9850
9851 2018-04-06  Tom Tromey  <tom@tromey.com>
9852
9853         * varobj.c (varobj_clear_saved_item)
9854         (update_dynamic_varobj_children, install_new_value, ~varobj):
9855         Update.
9856         * value.h (value_incref): Move declaration earlier.
9857         (value_decref): Rename from value_free.
9858         (struct value_ref_policy): New.
9859         (value_ref_ptr): New typedef.
9860         (struct value_deleter): Remove.
9861         (gdb_value_up): Remove typedef.
9862         (release_value): Change return type.
9863         (release_value_or_incref): Remove.
9864         * value.c (set_value_parent): Update.
9865         (value_incref): Change return type.
9866         (value_decref): Rename from value_free.
9867         (value_free_to_mark, free_all_values, free_value_chain): Update.
9868         (release_value): Return value_ref_ptr.
9869         (release_value_or_incref): Remove.
9870         (record_latest_value, set_internalvar, clear_internalvar):
9871         Update.
9872         * stack.c (info_frame_command): Don't call value_free.
9873         * python/py-value.c (valpy_dealloc, valpy_new)
9874         (value_to_value_object): Update.
9875         * printcmd.c (do_examine): Update.
9876         * opencl-lang.c (lval_func_free_closure): Update.
9877         * mi/mi-main.c (register_changed_p): Don't call value_free.
9878         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
9879         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
9880         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
9881         value_free.
9882         * guile/scm-value.c (vlscm_free_value_smob)
9883         (vlscm_scm_from_value): Update.
9884         * frame.c (frame_register_unwind, frame_unwind_register_signed)
9885         (frame_unwind_register_unsigned, get_frame_register_bytes)
9886         (put_frame_register_bytes): Don't call value_free.
9887         * findvar.c (address_from_register): Don't call value_free.
9888         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
9889         * dwarf2loc.c (entry_data_value_free_closure)
9890         (value_of_dwarf_reg_entry, free_pieced_value_closure)
9891         (dwarf2_evaluate_loc_desc_full): Update.
9892         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9893         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9894         (~watchpoint, watch_command_1)
9895         (invalidate_bp_value_on_memory_change): Update.
9896         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
9897
9898 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
9899
9900         PR gdb/23022
9901         * warning.m4: Add -Wno-error=deprecated-register.
9902         * configure: Re-generate.
9903
9904 2018-04-05  Tom Tromey  <tom@tromey.com>
9905
9906         * linespec.h: Remove include of "vec.h".
9907
9908 2018-04-05  Tom Tromey  <tom@tromey.com>
9909
9910         * linespec.c (typep): Remove typedef.
9911         (find_methods, find_superclass_methods): Take a std::vector.
9912         (find_method): Use std::vector.
9913
9914 2018-04-05  Tom Tromey  <tom@tromey.com>
9915
9916         * utils.c (compare_strings): Remove.
9917         * utils.h (compare_strings): Remove.
9918         * objc-lang.h (find_imps): Update.
9919         * objc-lang.c (find_methods): Take a std::vector.
9920         (uniquify_strings, find_imps): Likewise.
9921         * linespec.c (find_methods): Take a std::vector.
9922         (decode_objc): Use std::vector.
9923         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
9924         a std::vector.
9925         (find_method, find_function_symbols): Use std::vector.
9926
9927 2018-04-05  Tom Tromey  <tom@tromey.com>
9928
9929         * completer.c (completion_tracker::completion_tracker): Remove
9930         cast.
9931         (completion_tracker::discard_completions): Likewise.
9932         * breakpoint.c (ambiguous_names_p): Remove cast.
9933         * ada-lang.c (_initialize_ada_language): Remove cast.
9934         * utils.h (streq): Update.
9935         (streq_hash): Add new declaration.
9936         * utils.c (streq): Return bool.
9937         (streq_hash): New function.
9938
9939 2018-04-05  Tom Tromey  <tom@tromey.com>
9940
9941         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
9942         Remove a string copy.
9943
9944 2018-04-05  Tom Tromey  <tom@tromey.com>
9945
9946         * linespec.c (filter_results): Use std::vector.
9947         (decode_line_2, decode_line_full): Update.
9948
9949 2018-04-05  Tom Tromey  <tom@tromey.com>
9950
9951         * linespec.c (canonical_to_fullform): Return std::string.
9952         (filter_results): Update.
9953         (struct decode_line_2_item): Add constructor.
9954         <fullform, displayform>: Now std::string.
9955         (decode_line_2_compare_items): Now a std::sort comparator.
9956         (decode_line_2): Update.
9957
9958 2018-04-05  Tom Tromey  <tom@tromey.com>
9959
9960         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
9961         (unexpected_linespec_error): Update.
9962         (linespec_parse_basic, parse_linespec): Update.
9963
9964 2018-04-05  Tom Tromey  <tom@tromey.com>
9965
9966         * linespec.c (linespec_parse_basic): Reindent.
9967
9968 2018-04-05  Tom Tromey  <tom@tromey.com>
9969
9970         * minsyms.h (iterate_over_minimal_symbols): Update.
9971         * minsyms.c (iterate_over_minimal_symbols): Take a
9972         gdb::function_view.
9973         * linespec.c (struct collect_minsyms): Remove.
9974         (compare_msyms): Now a std::sort comparator.
9975         (add_minsym): Add parameters.
9976         (search_minsyms_for_name): Update.  Use std::vector.
9977
9978 2018-04-03  Tom Tromey  <tom@tromey.com>
9979
9980         * mipsread.c (read_alphacoff_dynamic_symtab): Use
9981         gdb::byte_vector.
9982
9983 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
9984
9985         * MAINTAINERS (Write After Approval): Add Weimin Pan.
9986
9987 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
9988
9989         PR gdb/16959
9990         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
9991         printing static type.
9992
9993 2018-04-01  Tom Tromey  <tom@tromey.com>
9994
9995         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
9996         (rs6000_xfer_shared_libraries): Update.
9997
9998 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
9999
10000         * common/gdb_vecs.h (char_ptr): Remove.
10001         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
10002
10003 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
10004
10005         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
10006         with std::vector.
10007         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
10008
10009 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
10010
10011         * tracepoint.h (struct uploaded_tp): Initialize fields.
10012         <actions, step_actions, cmd_strings>: Change type to
10013         std::vector<char *>.
10014         * tracepoint.c (get_uploaded_tp): Allocate with new.
10015         (free_uploaded_tps): Free with delete.
10016         (parse_tracepoint_definition): Adjust to std::vector change.
10017         * breakpoint.c (read_uploaded_action): Likewise.
10018         (create_tracepoint_from_upload): Likewise.
10019         * ctf.c (ctf_write_uploaded_tp): Likewise.
10020         (SET_ARRAY_FIELD): Likewise.
10021         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
10022
10023 2018-03-30  Tom Tromey  <tom@tromey.com>
10024
10025         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
10026         std::unique_ptr.
10027         (svr4_keep_data_in_core): Update.
10028         (svr4_read_so_list): Update.
10029
10030 2018-03-30  Tom Tromey  <tom@tromey.com>
10031
10032         * windows-nat.c (handle_output_debug_string, handle_exception):
10033         Update.
10034         * target.h (target_read_string): Update.
10035         * target.c (target_read_string): Change "string" to
10036         unique_xmalloc_ptr.
10037         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
10038         Update.
10039         * solib-frv.c (frv_current_sos): Update.
10040         * solib-dsbt.c (dsbt_current_sos): Update.
10041         * solib-darwin.c (darwin_current_sos): Update.
10042         * linux-thread-db.c (inferior_has_bug): Update.
10043         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
10044         Update.  Remove alloca.
10045         * ada-lang.c (ada_main_name): Update.
10046
10047 2018-03-30  Tom Tromey  <tom@tromey.com>
10048
10049         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
10050         (struct dwo_file_deleter): New.
10051         (dwo_file_up): New typedef.
10052         (open_and_init_dwo_file): Use dwo_file_up.
10053         (free_dwo_file_cleanup): Remove.
10054
10055 2018-03-30  Tom Tromey  <tom@tromey.com>
10056
10057         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
10058         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
10059
10060 2018-03-30  Tom Tromey  <tom@tromey.com>
10061
10062         * dwarf2read.c (class free_cached_comp_units): New class.
10063         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
10064         (free_cached_comp_units): Remove function.
10065
10066 2018-03-30  Tom Tromey  <tom@tromey.com>
10067
10068         * utils.h (make_cleanup_unpush_target): Remove.
10069         * inf-ptrace.c (struct target_unpusher): New.
10070         (target_unpush_up) New typedef.
10071         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
10072         target_unpush_up.
10073         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
10074
10075 2018-03-27  Tom Tromey  <tom@tromey.com>
10076
10077         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
10078
10079 2018-03-27  Pedro Alves  <palves@redhat.com>
10080             Tom Tromey  <tom@tromey.com>
10081
10082         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
10083         destructor.  Now a class.
10084         (gdb_readline_wrapper_cleanup): Remove function.
10085         (gdb_readline_wrapper): Remove cleanups.
10086
10087 2018-03-27  Tom Tromey  <tom@tromey.com>
10088
10089         * typeprint.h (struct type_print_options) <local_typedefs,
10090         global_typedefs>: Remove "struct" keyword.
10091         (class typedef_hash_table): New class.
10092         (recursively_update_typedef_hash, add_template_parameters)
10093         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
10094         (find_typedef_in_hash): Don't declare.
10095         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
10096         (typedef_hash_table::recursively_update): Rename from
10097         recursively_update_typedef_hash.  Now a member.
10098         (typedef_hash_table::add_template_parameters): Rename from
10099         add_template_parameters.  Now a member.
10100         (typedef_hash_table::typedef_hash_table): Now a constructor;
10101         rename from create_typedef_hash.
10102         (typedef_hash_table::~typedef_hash_table): Now a destructor;
10103         rename from free_typedef_hash.
10104         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
10105         (do_free_global_table): Remove.
10106         (typedef_hash_table::typedef_hash_table): New constructor; renamed
10107         from copy_type_recursive.
10108         (create_global_typedef_table): Remove.
10109         (typedef_hash_table::find_global_typedef): Now a member of
10110         typedef_hash_table.
10111         (typedef_hash_table::find_typedef): Rename from
10112         find_typedef_in_hash; now a member.
10113         (whatis_exp): Update.
10114         * extension.h (struct ext_lang_type_printers): Add constructor and
10115         destructor.
10116         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
10117         declare.
10118         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
10119         Now a constructor; rename from start_ext_lang_type_printers.
10120         (ext_lang_type_printers): Now a destructor; rename from
10121         free_ext_lang_type_printers.
10122         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
10123         Update.
10124         (c_type_print_base_struct_union): Update.  Remove cleanups.
10125
10126 2018-03-27  Tom Tromey  <tom@tromey.com>
10127
10128         * dwarf-index-write.c: Include <cmath>.
10129
10130 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
10131
10132         * NEWS: Add entry describing new "set|show varsize-limit" command.
10133         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
10134         command.
10135         * printcmd.c (_initialize_printcmd): Add "set var" alias of
10136         "set variable".
10137
10138 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
10139
10140         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
10141         dwarf-index-write.c
10142         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
10143         * dwarf-index-common.c: New file.
10144         * dwarf-index-common.h: New file.
10145         * dwarf-index-write.c: New file.
10146         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
10147         (struct dwarf2_section_info): Move from here.
10148         (dwarf2_section_info_def): Likewise.
10149         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
10150         (offset_type): Likewise.
10151         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
10152         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
10153         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
10154         (byte_swap): Likewise.
10155         (MAYBE_SWAP): Likewise.
10156         (dwarf2_per_cu_ptr): Likewise.
10157         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
10158         (struct tu_stats): Likewise.
10159         (struct dwarf2_per_objfile): Likewise.
10160         (struct dwarf2_per_cu_data): Likewise.
10161         (struct signatured_type): Likewise.
10162         (sig_type_ptr): Likewise.
10163         (DEF_VEC_P (sig_type_ptr)): Likewise.
10164         (INDEX4_SUFFIX): Likewise.
10165         (INDEX5_SUFFIX): Likewise.
10166         (DEBUG_STR_SUFFIX): Likewise.
10167         (dwarf2_read_section): Make non-static.
10168         (mapped_index_string_hash): Move from here.
10169         (dwarf5_djb_hash): Likewise.
10170         (file_write): Likewise.
10171         (class data_buf): Likewise.
10172         (struct symtab_index_entry): Likewise.
10173         (struct mapped_symtab): Likewise.
10174         (find_slot): Likewise.
10175         (hash_expand): Likewise.
10176         (add_index_entry): Likewise.
10177         (uniquify_cu_indices): Likewise.
10178         (class c_str_view): Likewise.
10179         (class c_str_view_hasher): Likewise.
10180         (class vector_hasher): Likewise.
10181         (write_hash_table): Likewise.
10182         (psym_index_map): Likewise.
10183         (struct addrmap_index_data): Likewise.
10184         (add_address_entry): Likewise.
10185         (add_address_entry_worker): Likewise.
10186         (write_address_map): Likewise.
10187         (symbol_kind): Likewise.
10188         (write_psymbols): Likewise.
10189         (struct signatured_type_index_data): Likewise.
10190         (write_one_signatured_type): Likewise.
10191         (recursively_count_psymbols): Likewise.
10192         (recursively_write_psymbols): Likewise.
10193         (class debug_names): Likewise.
10194         (check_dwarf64_offsets): Likewise.
10195         (psyms_seen_size): Likewise.
10196         (write_gdbindex): Likewise.
10197         (write_debug_names): Likewise.
10198         (assert_file_size): Likewise.
10199         (write_psymtabs_to_index): Likewise.
10200         (save_gdb_index_command): Likewise.
10201         (_initialize_dwarf2_read): Don't register the "save gdb-index"
10202         command.
10203         * dwarf2read.h: New file.
10204
10205 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
10206
10207         PR gdb/22670
10208         * dwarf2read.c (dwarf2_physname): Do not return the demangled
10209         symbol name if the CU's language stores symbol names in linkage
10210         format.
10211         * language.h (struct language_defn)
10212         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
10213         all instances of this struct.
10214
10215 2018-03-26  Tom Tromey  <tom@tromey.com>
10216
10217         * stack.c (backtrace_command_1): Remove verbose code.
10218
10219 2018-03-26  Tom Tromey  <tom@tromey.com>
10220
10221         * python/py-framefilter.c (py_print_type): Don't catch
10222         exceptions.  Return void.
10223         (py_print_value): Likewise.
10224         (py_print_single_arg): Likewise.
10225         (enumerate_args): Don't catch exceptions.
10226         (py_print_args): Likewise.
10227         (py_print_frame): Likewise.
10228         (gdbpy_apply_frame_filter): Catch exceptions here.
10229
10230 2018-03-26  Tom Tromey  <tom@tromey.com>
10231
10232         * stack.c (_initialize_stack): Remove trailing newlines from help
10233         text.  Add "Usage" line to "backtrace" help.
10234
10235 2018-03-26  Tom Tromey  <tom@tromey.com>
10236
10237         PR python/16486:
10238         * python/py-framefilter.c (py_print_args): Call wrap_hint.
10239
10240 2018-03-26  Tom Tromey  <tom@tromey.com>
10241
10242         * python/py-framefilter.c (py_print_single_arg): Return
10243         EXT_LANG_BT_ERROR from catch.
10244
10245 2018-03-26  Tom Tromey  <tom@tromey.com>
10246
10247         PR backtrace/15584:
10248         * stack.c (backtrace_command_1): Move some code into no-filters
10249         "if".
10250
10251 2018-03-26  Tom Tromey  <tom@tromey.com>
10252
10253         * python/py-framefilter.c (throw_quit_or_print_exception): New
10254         function.
10255         (gdbpy_apply_frame_filter): Use it.
10256
10257 2018-03-26  Tom Tromey  <tom@tromey.com>
10258
10259         PR cli/17716:
10260         * python/py-framefilter.c (py_print_type, py_print_value)
10261         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
10262         RETURN_MASK_ERROR.
10263
10264 2018-03-26  Tom Tromey  <tom@tromey.com>
10265
10266         * python/py-framefilter.c (enumerate_args): Use
10267         gdb::unique_xmalloc_ptr.
10268
10269 2018-03-26  Tom Tromey  <tom@tromey.com>
10270
10271         * python/py-framefilter.c (py_print_frame): Return
10272         EXT_LANG_BT_OK.
10273         (gdbpy_apply_frame_filter): Update comment.
10274         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
10275         Remove.
10276         <EXT_LANG_BT_NO_FILTERS>: Change value.
10277
10278 2018-03-26  Tom Tromey  <tom@tromey.com>
10279
10280         PR backtrace/15582:
10281         * stack.c (backtrace_command): Parse "hide" argument.
10282         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
10283         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
10284         constant.
10285
10286 2018-03-26  Tom Tromey  <tom@tromey.com>
10287
10288         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
10289         add "flags".
10290         (backtrace_command): Remove "fulltrace", add "flags".
10291
10292 2018-03-26  Tom Tromey  <tom@tromey.com>
10293
10294         * stack.c (backtrace_command): Rewrite command line parsing.
10295
10296 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
10297
10298         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
10299
10300 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
10301
10302         * filename-seen-cache.h: Add include guard.
10303
10304 2018-03-26  Keith Seitz  <keiths@redhat.com>
10305
10306         * symfile.c (place_section): Remove "struct" from section_addr_info
10307         in comment.
10308         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
10309         "struct" keyword from section_addr_info.
10310
10311 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
10312
10313         * regformats/regdef.h (reg): Add constructors.
10314
10315 2018-03-25  Pedro Alves  <palves@redhat.com>
10316
10317         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
10318         if then/else bodies in var_func_name extraction.
10319
10320 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
10321
10322         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
10323         lookup_minimal_symbol() to find symbol entry.
10324         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
10325
10326 2018-03-23  Keith Seitz  <keiths@redhat.com>
10327
10328         PR c++/22968
10329         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
10330         nested type definitions for C++, too.
10331
10332 2018-03-23  Tom Tromey  <tom@tromey.com>
10333
10334         * machoread.c (struct oso_el): Add a constructor.  Don't define as
10335         a typedef.
10336         (macho_register_oso): Remove.
10337         (macho_symtab_read): Take a std::vector.
10338         (oso_el_compare_name): Now a std::sort comparator.
10339         (macho_symfile_read_all_oso): Take a std::vector.
10340         (macho_symfile_read): Use std::vector.  Remove cleanups.
10341
10342 2018-03-22  Tom Tromey  <tom@tromey.com>
10343
10344         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
10345         (record_full_goto_bookmark): Use std::string.
10346
10347 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
10348
10349         PR tdep/18295
10350         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
10351         a single mask.
10352
10353 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
10354
10355         * rs6000-tdep.c (store_insn_p): New function.
10356         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
10357         and cr_reg to their unshifted values. Use store_insn_p to
10358         match LR saves using either R1 or fdata->alloca_reg. Use
10359         store_insn_p to match CR saves. Set alloca_reg_offset
10360         when alloca_reg and framep are set. Remove lr_reg shift
10361         when assigning to fdata->lr_register.
10362
10363 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10364
10365         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
10366         command line args instead of emitting a warning.
10367
10368 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
10369
10370         * tracepoint.h (struct static_tracepoint_marker): Initialize
10371         fields, define default constructor, move constructor and move
10372         assignment, disable the rest.
10373         <str_id, extra>: Make std::string.
10374         (release_static_tracepoint_marker): Remove.
10375         (free_current_marker): Remove.
10376         * tracepoint.c (free_current_marker): Remove.
10377         (parse_static_tracepoint_marker_definition): Adjust to
10378         std::string, use new hex2str overload.
10379         (release_static_tracepoint_marker): Remove.
10380         (print_one_static_tracepoint_marker): Get marker by reference
10381         and adjust to std::string.
10382         (info_static_tracepoint_markers_command): Adjust to std::vector
10383         changes
10384         * target.h (static_tracepoint_marker_p): Remove typedef.
10385         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
10386         (struct target_ops) <to_static_tracepoint_marker_at>: Return
10387         bool.
10388         <to_static_tracepoint_markers_by_strid>: Return std::vector.
10389         * target-debug.h
10390         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
10391         (target_debug_print_std_vector_static_tracepoint_marker): New.
10392         (target_debug_print_struct_static_tracepoint_marker_p): Rename
10393         to...
10394         (target_debug_print_static_tracepoint_marker_p): ... this.
10395         * target-delegates.c: Re-generate.
10396         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
10397         Make std::string.
10398         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
10399         (decode_static_tracepoint_spec): Adjust to std::vector.
10400         (tracepoint_print_one_detail): Adjust to std::string.
10401         (strace_marker_decode_location): Adjust to std::string.
10402         (update_static_tracepoint): Adjust to std::string, remove call
10403         to release_static_tracepoint_marker.
10404         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
10405         Adjust to std::vector.
10406         * remote.c (remote_static_tracepoint_marker_at): Return bool.
10407         (remote_static_tracepoint_markers_by_strid): Adjust to
10408         std::vector.
10409         * common/rsp-low.h (hex2str): New overload with explicit count
10410         of bytes.
10411         * common/rsp-low.c (hex2str): New overload with explicit count
10412         of bytes.
10413         * unittests/rsp-low-selftests.c (test_hex2str): New function.
10414         (_initialize_rsp_low_selftests): Add test_hex2str test.
10415         * unittests/tracepoint-selftests.c
10416         (test_parse_static_tracepoint_marker_definition): Adjust to
10417         std::string.
10418
10419 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
10420
10421         * tracepoint.c (parse_static_tracepoint_marker_definition):
10422         Consider case where the definition is followed by more
10423         definitions.
10424         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10425         tracepoint-selftests.c.
10426         * unittests/tracepoint-selftests.c: New.
10427
10428 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
10429
10430         * MAINTAINERS (Write After Approval): Add Pedro Franco de
10431         Carvalho.
10432
10433 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
10434
10435         * symtab.c (find_pc_sect_line): fixed indentation.
10436
10437 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
10438
10439         * symtab.c (find_pc_sect_line): now uses binary search.
10440
10441 2018-03-19  Tom Tromey  <tom@tromey.com>
10442
10443         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
10444         "IDENT" production.
10445
10446 2018-03-19  Pedro Alves  <palves@redhat.com>
10447             Tom Tromey  <tom@tromey.com>
10448
10449         * unittests/observable-selftests.c: New file.
10450         * common/observable.h: New file.
10451         * observable.h: New file.
10452         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
10453         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
10454         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
10455         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
10456         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
10457         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
10458         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
10459         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
10460         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
10461         python/py-breakpoint.c, python/py-finishbreakpoint.c,
10462         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
10463         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
10464         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
10465         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
10466         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
10467         tui/tui-interp.c, valops.c: Update all users.
10468         * tui/tui-hooks.c (tui_bp_created_observer)
10469         (tui_bp_deleted_observer, tui_bp_modified_observer)
10470         (tui_inferior_exit_observer, tui_before_prompt_observer)
10471         (tui_normal_stop_observer, tui_register_changed_observer):
10472         Remove.
10473         (tui_observers_token): New global.
10474         (attach_or_detach, tui_attach_detach_observers): New functions.
10475         (tui_install_hooks, tui_remove_hooks): Use
10476         tui_attach_detach_observers.
10477         * record-btrace.c (record_btrace_thread_observer): Remove.
10478         (record_btrace_thread_observer_token): New global.
10479         * observer.sh: Remove.
10480         * observer.c: Rename to observable.c.
10481         * observable.c (namespace gdb_observers): Define new objects.
10482         (observer_debug): Move into gdb_observers namespace.
10483         (struct observer, struct observer_list, xalloc_observer_list_node)
10484         (xfree_observer_list_node, generic_observer_attach)
10485         (generic_observer_detach, generic_observer_notify): Remove.
10486         (_initialize_observer): Update.
10487         Don't include observer.inc.
10488         * Makefile.in (generated_files): Remove observer.h, observer.inc.
10489         (clean mostlyclean): Likewise.
10490         (observer.h, observer.inc): Remove targets.
10491         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
10492         (COMMON_SFILES): Use observable.c, not observer.c.
10493         * .gitignore: Remove observer.h.
10494
10495 2018-03-18  Tom Tromey  <tom@tromey.com>
10496
10497         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
10498         gdb::def_vector.
10499         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
10500
10501 2018-03-17  Tom Tromey  <tom@tromey.com>
10502
10503         * auto-load.c (auto_load_objfile_script_1): Use std::string.
10504
10505 2018-03-17  Tom Tromey  <tom@tromey.com>
10506
10507         * target.c (class scoped_target_fd): New.
10508         (target_fileio_close_cleanup): Remove.
10509         (target_fileio_read_alloc_1): Use scoped_target_fd.
10510
10511 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
10512
10513         * silent-rules.mk: New.
10514         * Makefile.in: Include silent-rules.mk
10515         (srcdir, VPATH, top_srcdir): Move up.
10516         (COMPILE): Add ECHO_CXX.
10517         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
10518         (init.c): Add ECHO_INIT_C.
10519         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
10520         (version.c): Add ECHO_GEN.
10521         (printcmd.o): Add ECHO_CXX.
10522         (target-float.o): Add ECHO_CXX.
10523         (ada-exp.o): Add ECHO_CXX.
10524         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
10525         (insight$(EXEEXT)): Add ECHO_CXXLD.
10526         * gnulib/configure.ac: Add AM_SILENT_RULES.
10527         * gnulib/aclocal.m4: Re-generate.
10528         * gnulib/configure: Re-generate.
10529         * gnulib/import/Makefile.in: Re-generate.
10530
10531 2018-03-16  Tom Tromey  <tom@tromey.com>
10532
10533         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
10534         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
10535         * utils.c (do_free_section_addr_info)
10536         (make_cleanup_free_section_addr_info): Remove.
10537         * symfile.h (struct other_sections): Add constructor.
10538         (struct section_addr_info): Remove.
10539         (section_addr_info): New typedef.
10540         (struct sym_fns) <sym_offsets>: Change type of parameter.
10541         (build_section_addr_info_from_objfile)
10542         (relative_addr_info_to_section_offsets, addr_info_make_relative)
10543         (default_symfile_offsets, symbol_file_add)
10544         (symbol_file_add_from_bfd)
10545         (build_section_addr_info_from_section_table): Update.
10546         (alloc_section_addr_info, free_section_addr_info): Don't declare.
10547         * symfile.c (alloc_section_addr_info): Remove.
10548         (build_section_addr_info_from_section_table): Change return type.
10549         Update.
10550         (build_section_addr_info_from_bfd)
10551         (build_section_addr_info_from_objfile): Likewise.
10552         (free_section_addr_info): Remove.
10553         (relative_addr_info_to_section_offsets): Change type of "addrs".
10554         (addrs_section_compar): Now a std::sort comparator.
10555         (addrs_section_sort): Change return type.
10556         (addr_info_make_relative): Change type of "addrs".  Update.
10557         (default_symfile_offsets, syms_from_objfile_1)
10558         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
10559         (symbol_file_add_separate): Update.
10560         (symbol_file_add): Change type of "addrs".  Update.
10561         (add_symbol_file_command): Update.  Remove cleanups.
10562         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
10563         cleanups.
10564         * symfile-debug.c (debug_sym_offsets): Change type of "info".
10565         * solib.c (solib_read_symbols): Update.
10566         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
10567         * machoread.c (macho_symfile_offsets): Update.
10568         * jit.c (jit_bfd_try_read_symtab): Update.
10569
10570 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
10571
10572         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10573         unittests/utils-selftests.c.
10574         * unittests/utils-selftests.c: New file.
10575
10576 2018-03-14  Tom Tromey  <tom@tromey.com>
10577
10578         PR cli/14977:
10579         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
10580         for NULL.
10581
10582 2018-03-14  Tom Tromey  <tom@tromey.com>
10583
10584         PR cli/19918:
10585         * printcmd.c (printf_pointer): Allow "-" in format.
10586
10587 2018-03-14  Tom Tromey  <tom@tromey.com>
10588
10589         * printcmd.c (_initialize_printcmd): Add usage to printf.
10590
10591 2018-03-14  Yao Qi  <qiyao@sourceware.org>
10592
10593         * MAINTAINERS: Update my email address.
10594
10595 2018-03-13  Tom Tromey  <tom@tromey.com>
10596
10597         * machoread.c (macho_check_dsym): Change filenamep to a
10598         std::string*.
10599         (macho_symfile_read): Update.
10600         * symfile.c (load_command): Use std::string.
10601
10602 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
10603
10604         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
10605         to error message string.
10606         (riscv_register_name): Use xsnprintf instead of sprintf.
10607         (riscv_insn::fetch_instruction): Use gdb_assert instead of
10608         internal_error.
10609         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
10610         error.
10611         (riscv_push_dummy_call): Likewise.
10612
10613 2018-03-12  Tom Tromey  <tom@tromey.com>
10614
10615         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
10616         Use gdb::byte_vector.
10617         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
10618
10619 2018-03-12  Yao Qi  <yao.qi@linaro.org>
10620
10621         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
10622         parameter type to readable_regcache.
10623         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
10624         the declaration.
10625
10626 2018-03-11  Tom Tromey  <tom@tromey.com>
10627
10628         * dwarf2read.c (struct nextfield): Add initializers.
10629         (struct nextfnfield): Remove.
10630         (struct fnfieldlist): Add initializers.  Remove "length" and
10631         "head", use std::vector.
10632         (struct decl_field_list): Remove.
10633         (struct field_info): Add initializers.
10634         <fields, baseclasses>: Now std::vector.
10635         <nbaseclasses, nfnfields, typedef_field_list_count,
10636         nested_types_list_count>: Remove.
10637         (dwarf2_add_field, dwarf2_add_type_defn)
10638         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
10639         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
10640         (process_structure_scope): Update.
10641
10642 2018-03-11  Tom Tromey  <tom@tromey.com>
10643
10644         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
10645         for use by std::sort.
10646         (build_type_psymtabs_1): Use std::vector.
10647
10648 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
10649
10650         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
10651         and LIBMPFR in the printed configuration.
10652
10653 2018-03-08  Tom Tromey  <tom@tromey.com>
10654
10655         * source.c (get_filename_and_charpos): Use scoped_fd.
10656         * nto-procfs.c (procfs_open_1): Use scoped_fd.
10657         (procfs_pidlist): Likewise.
10658         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
10659         (iterate_over_mappings): Likewise.
10660
10661 2018-03-08  Tom Tromey  <tom@tromey.com>
10662
10663         * infcall.c (struct call_return_meta_info)
10664         <stack_temporaries_enabled>: Remove.
10665         (get_call_return_value, call_function_by_hand_dummy): Update.
10666         * thread.c (disable_thread_stack_temporaries): Remove.
10667         (enable_thread_stack_temporaries): Remove.
10668         (thread_stack_temporaries_enabled_p): Return bool.
10669         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
10670         (get_last_thread_stack_temporary): Update.
10671         * eval.c (evaluate_subexp): Update.
10672         * gdbthread.h (class enable_thread_stack_temporaries): Now a
10673         class, not a function.
10674         (value_ptr, value_vec): Remove typedefs.
10675         (class thread_info) <stack_temporaries_enabled>: Now bool.
10676         <stack_temporaries>: Now a std::vector.
10677         (thread_stack_temporaries_enabled_p)
10678         (value_in_thread_stack_temporaries): Return bool.
10679
10680 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
10681
10682         * remote.c (putpkt_binary): Fix omitted bytes reporting.
10683         (getpkt_or_notif_sane_1): Likewise.
10684
10685 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
10686
10687         * build-id.c (build_id_to_debug_bfd): Use std::string.
10688
10689 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
10690
10691         * build-id.c (find_separate_debug_file_by_buildid): Return
10692         std::string.
10693         * build-id.h (find_separate_debug_file_by_buildid): Return
10694         std::string.
10695         * coffread.c (coff_symfile_read): Adjust to std::string.
10696         * elfread.c (elf_symfile_read): Adjust to std::string.
10697         * symfile.c (separate_debug_file_exists): Change parameter to
10698         std::string.
10699         (find_separate_debug_file): Return std::string.
10700         (find_separate_debug_file_by_debuglink): Return std::string.
10701         * symfile.h (find_separate_debug_file_by_debuglink): Return
10702         std::string.
10703
10704 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
10705
10706         * common/xml-utils.c (xml_escape_text): Move code to...
10707         (xml_escape_text_append): ... this new function.
10708         * common/xml-utils.h (xml_escape_text_append): New declaration.
10709         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
10710         New function.
10711         (_initialize_xml_utils): register test_xml_escape_text_append as
10712         a selftest.
10713
10714 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
10715
10716         * defs.h: Remove MAX_REGISTER_SIZE.
10717         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
10718         asserts.
10719         * python/py-unwind.c (pyuw_sniffer): Likewise.
10720
10721 2018-03-07  Tom Tromey  <tom@tromey.com>
10722
10723         * linux-tdep.c (linux_info_proc): Update.
10724         * target.h (struct target_ops) <to_fileio_readlink>: Return
10725         optional<string>.
10726         (target_fileio_readlink): Return optional<string>.
10727         * remote.c (remote_hostio_readlink): Return optional<string>.
10728         * inf-child.c (inf_child_fileio_readlink): Return
10729         optional<string>.
10730         * target.c (target_fileio_readlink): Return optional<string>.
10731
10732 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
10733
10734         * regcache.c (cooked_read_test): Add riscv to the list of
10735         architectures that have a save_reggroup.
10736
10737 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10738
10739         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
10740         value is not a dynamic class object.
10741
10742 2018-03-06  Tom Tromey  <tom@tromey.com>
10743
10744         * rust-exp.y: Formatting fixes.
10745
10746 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10747
10748         * riscv-tdep.c (riscv_register_name): Remove target description
10749         support.
10750         (riscv_gdbarch_init): Remove target description check.
10751
10752 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10753
10754         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
10755         comment.
10756         * riscv-tdep.h: Likewise.
10757
10758 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10759
10760         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
10761         (riscv_pseudo_register_write): Delete.
10762         (riscv_gdbarch_init): Remove all use of pseudo registers.
10763
10764 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
10765
10766         * record-btrace.c (btrace_print_lines): Replace cleanup
10767         parameter with RAII equivalents.
10768         (btrace_insn_history): Replace cleanup with RAII equivalents.
10769         * ui-out.h (make_cleanup_ui_out_list_begin_end,
10770         make_cleanup_ui_out_tuple_begin_end): Remove.
10771         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
10772         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
10773         make_cleanup_ui_out_list_begin_end): Remove.
10774
10775 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
10776
10777         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
10778         parameter types to std::vector.  Use bool.
10779         (record_btrace_wait): Replace VEC(tp_t) with
10780         std::vector<thread_info *>.
10781         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
10782
10783 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
10784
10785         * record-btrace.c (record_btrace_disable_callback): Remove.
10786         (struct scoped_btrace_disable): New.
10787         (record_btrace_open): Use scoped_btrace_disable.
10788
10789 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10790
10791         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
10792         reading values from registers.
10793
10794 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10795
10796         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
10797         where appropriate.
10798
10799 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10800
10801         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
10802         change parameter type.  Use GDB's print functions, and use
10803         core_addr_to_string where appropriate.
10804         (riscv_push_dummy_call): Use core_addr_to_string where
10805         appropriate, update call to riscv_print_arg_location, and reindent
10806         a few lines.
10807         (riscv_return_value): Update call to riscv_print_arg_location.
10808
10809 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10810             Tim Newsome <tim@sifive.com>
10811             Albert Ou <a0u@eecs.berkeley.edu>
10812             Darius Rad <darius@bluespec.com>
10813
10814         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
10815         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
10816         (ALLDEPFILES): Add riscv-tdep.c
10817         * configure.tgt: Add riscv support.
10818         * riscv-tdep.c: New file.
10819         * riscv-tdep.h: New file.
10820         * NEWS: Mention new target.
10821         * MAINTAINERS: Add entry for riscv.
10822
10823 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10824
10825         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
10826         fields within aggregates.
10827
10828 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
10829
10830         * record-btrace.c (btrace_print_lines): Change type of flags to
10831         gdb_disassembly_flags.
10832
10833 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
10834
10835         * fbsd-nat.c: Include "inf-ptrace.h".
10836         (USE_SIGTRAP_SIGINFO): Conditionally define.
10837         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
10838         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
10839         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
10840         function.
10841         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
10842         Likewise.
10843         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
10844         Likewise.
10845         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
10846         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
10847         "supports_stopped_by_hw_breakpoint" target methods.
10848
10849 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
10850
10851         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
10852         * fbsd-nat.c (debug_fbsd_nat): New variable.
10853         (show_fbsd_nat_debug): New function.
10854         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
10855         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
10856
10857 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
10858
10859         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
10860         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
10861         prototype.
10862         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
10863         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
10864         method.
10865
10866 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10867
10868         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
10869         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
10870
10871 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10872
10873         * charset.c (struct charset_vector): New.
10874         (charsets): Change type to charset_vector.
10875         (find_charset_names): Adjust.
10876         (add_one): Adjust.
10877         (_initialize_charset): Adjust.
10878
10879 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10880
10881         * progspace.h (struct program_space) <deleted_solibs>: Change
10882         type to std::vector<std::string>.
10883         * progspace.c (clear_program_space_solib_cache): Adjust.
10884         * breakpoint.c (print_solib_event): Adjust.
10885         (check_status_catch_solib): Adjust.
10886         * solib.c (update_solib_list): Adjust.
10887         * ui-out.h (class ui_out) <field_string>: New overload.
10888         * ui-out.c (ui_out::field_string): New overload.
10889
10890 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10891
10892         * progspace.h (struct program_space): Add constructor and
10893         destructor, initialize fields.
10894         (add_program_space): Remove.
10895         * progspace.c (add_program_space): Rename to...
10896         (program_space::program_space): ... this.
10897         (release_program_space): Rename to...
10898         (program_space::~program_space): ... this.
10899         (delete_program_space): Use delete to delete program_space.
10900         (initialize_progspace): Use new to allocate program_space.
10901         * inferior.c (add_inferior_with_spaces): Likewise.
10902         (clone_inferior_command): Likewise.
10903         * infrun.c (follow_fork_inferior): Likewise.
10904         (handle_vfork_child_exec_or_exit): Likewise.
10905
10906 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10907
10908         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
10909         (delim_string_to_char_ptr_vec): Return std::vector of
10910         gdb::unique_xmalloc_ptr.
10911         (dirnames_to_char_ptr_vec_append): Take std::vector of
10912         gdb::unique_xmalloc_ptr.
10913         (dirnames_to_char_ptr_vec): Return std::vector of
10914         gdb::unique_xmalloc_ptr.
10915         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
10916         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
10917         (delim_string_to_char_ptr_vec): Return an std::vector of
10918         gdb::unique_xmalloc_ptr, adjust the code.
10919         (dirnames_to_char_ptr_vec_append): Take an std::vector of
10920         gdb::unique_xmalloc_ptr, adjust the code.
10921         (dirnames_to_char_ptr_vec): Return an std::vector of
10922         gdb::unique_xmalloc_ptr, adjust the code.
10923         * auto-load.c (auto_load_safe_path_vec): Change type to
10924         std::vector of gdb::unique_xmalloc_ptr.
10925         (auto_load_expand_dir_vars): Return an std::vector of
10926         gdb::unique_xmalloc_ptr, adjust the code.
10927         (auto_load_safe_path_vec_update): Adjust.
10928         (filename_is_in_auto_load_safe_path_vec): Adjust.
10929         (auto_load_objfile_script_1): Adjust.
10930         * build-id.c (build_id_to_debug_bfd): Adjust.
10931         * linux-thread-db.c (thread_db_load_search): Adjust.
10932         * source.c (add_path): Adjust.
10933         (openp): Adjust.
10934         * symfile.c (find_separate_debug_file): Adjust.
10935         * utils.c (do_free_char_ptr_vec): Remove.
10936         (make_cleanup_free_char_ptr_vec): Remove.
10937
10938 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
10939
10940         PR gdb/22907
10941         * common/pathstuff.c: Conditionally include "<windows.h>".
10942
10943 2018-03-01  Georg Sauthoff  <mail@georg.so>
10944
10945         PR gdb/22888
10946         * gcore.in: Quote variables and switch interpreter to bash.
10947
10948 2018-03-01  Tom Tromey  <tom@tromey.com>
10949
10950         * dwarf2read.c (alloc_discriminant_info): Fix default_index
10951         assertion.  Add assertion for discriminant_index.
10952         (quirk_rust_enum): Use correct base type name in univariant case.
10953
10954 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
10955
10956         * record.c (get_call_history_modifiers): Return a
10957         record_print_flags.
10958         (cmd_record_call_history): Adjust.
10959         * record-btrace.c (record_btrace_call_history): Adjust.
10960         (record_btrace_call_history_range): Adjust.
10961         (record_btrace_call_history_from): Adjust.
10962         * target-debug.h (target_debug_print_record_print_flags): New.
10963         * target-delegates.c: Re-generate.
10964         * target.c (target_call_history): Change flags type.
10965         (target_call_history_from): Likewise.
10966         (target_call_history_range): Likewise.
10967         * target.h (struct target_ops) <target_call_history>: Likewise.
10968         (target_call_history_from): Likewise.
10969         (target_call_history_range): Likewise.
10970
10971 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
10972             Simon Marchi  <simon.marchi@polymtl.ca>
10973
10974         * common/common-utils.c: Include "sys/stat.h".
10975         (is_regular_file): Move here from "source.c"; change return
10976         type to "bool".
10977         * common/common-utils.h (is_regular_file): New prototype.
10978         * common/pathstuff.c (contains_dir_separator): New function.
10979         * common/pathstuff.h (contains_dir_separator): New prototype.
10980         * source.c: Don't include "sys/stat.h".
10981         (is_regular_file): Move to "common/common-utils.c".
10982
10983 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
10984
10985         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
10986         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
10987         * auto-load.c: Include "common/pathstuff.h".
10988         * common/common-def.h (current_directory): Move here.
10989         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
10990         function.
10991         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
10992         prototype.
10993         * common/pathstuff.c: New file.
10994         * common/pathstuff.h: New file.
10995         * compile/compile.c: Include "common/pathstuff.h".
10996         * defs.h (current_directory): Move to "common/common-defs.h".
10997         * dwarf2read.c: Include "common/pathstuff.h".
10998         * exec.c: Likewise.
10999         * guile/scm-safe-call.c: Likewise.
11000         * linux-thread-db.c: Likewise.
11001         * main.c: Likewise.
11002         * nto-tdep.c: Likewise.
11003         * objfiles.c: Likewise.
11004         * source.c: Likewise.
11005         * symtab.c: Likewise.
11006         * utils.c: Include "common/pathstuff.h".
11007         (gdb_realpath): Move to "common/pathstuff.c".
11008         (gdb_realpath_keepfile): Likewise.
11009         (gdb_abspath): Likewise.
11010         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
11011         (gdb_realpath_keepfile): Likewise.
11012         (gdb_abspath): Likewise.
11013
11014 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
11015
11016         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
11017         wildcard process pid for super_resume for kernels with a
11018         specific bug.
11019
11020 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
11021
11022         * compile/compile.c (get_args): Add additional comments
11023         explaining function.
11024
11025 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
11026             Tom Tromey  <tom@tromey.com>
11027
11028         * target.h (memory_write_request_s): Remove typedef.  Don't define
11029         VEC.
11030         (target_write_memory_blocks): Change argument to std::vector.
11031         (struct memory_write_request): Add constructor.
11032         * target-memory.c (compare_block_starting_address): Return bool.
11033         Change argument types.
11034         (claim_memory): Change arguments to use std::vector.
11035         (split_regular_and_flash_blocks, blocks_to_erase)
11036         (compute_garbled_blocks): Likewise.
11037         (cleanup_request_data, cleanup_write_requests_vector): Remove.
11038         (target_write_memory_blocks): Change argument to std::vector.
11039         * symfile.c (struct load_section_data): Add constructor and
11040         destructor.  Use std::vector for "requests".
11041         (struct load_progress_data): Add initializers.
11042         (load_section_callback): Update.  Use "new".
11043         (clear_memory_write_data): Remove.
11044         (generic_load): Update.
11045
11046 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
11047
11048         * arch/aarch64.h: Use common/tdesc.h.
11049
11050 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
11051
11052         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
11053         architecture with a 64-bit ABI.
11054
11055 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
11056
11057         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
11058         ahead of target description loading.
11059
11060 2018-02-26  Tom Tromey  <tom@tromey.com>
11061
11062         * stack.c (backtrace_command_1): Update.
11063         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
11064         of "flags".
11065         * python/py-framefilter.c (py_print_frame)
11066         (gdbpy_apply_frame_filter): Change type of "flags".
11067         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
11068         of "flags".
11069         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
11070         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
11071         * extension.h (enum frame_filter_flag): Rename from
11072         frame_filter_flags.
11073         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
11074         (apply_ext_lang_frame_filter): Change type of "flags".
11075         * extension.c (apply_ext_lang_frame_filter): Change type of
11076         "flags".
11077         * extension-priv.h (struct extension_language_ops)
11078         <apply_frame_filter>: Change type of "flags".
11079
11080 2018-02-26  Tom Tromey  <tom@tromey.com>
11081
11082         PR python/16497:
11083         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
11084         off-by-one in py_end computation.
11085         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
11086         PRINT_MORE_FRAMES.
11087         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
11088         constant.
11089
11090 2018-02-26  Tom Tromey  <tom@tromey.com>
11091
11092         * dwarf2read.c (struct variant_field): New.
11093         (struct nextfield) <variant>: New field.
11094         (dwarf2_add_field): Handle DW_TAG_variant_part.
11095         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
11096         discriminated union.
11097         (read_structure_type): Handle DW_TAG_variant_part.
11098         (handle_struct_member_die): New function, extracted from
11099         process_structure_scope.  Handle DW_TAG_variant.
11100         (process_structure_scope): Handle discriminated unions.  Call
11101         handle_struct_member_die.
11102
11103 2018-02-26  Tom Tromey  <tom@tromey.com>
11104
11105         * rust-lang.h (rust_last_path_segment): Declare.
11106         * rust-lang.c (rust_last_path_segment): Now public.  Change
11107         contract.
11108         (struct disr_info): Remove.
11109         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
11110         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
11111         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
11112         (rust_enum_p, rust_enum_variant): New function.
11113         (rust_underscore_fields): Remove "offset" parameter.
11114         (rust_print_enum): New function.
11115         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
11116         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
11117         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
11118         enums.
11119         (rust_internal_print_type): New function, from rust_print_type.
11120         Remove enum code.
11121         (rust_print_type): Call rust_internal_print_type.
11122         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
11123         Update enum handling.
11124         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
11125         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
11126         (rust_union_quirks): New functions.
11127         (process_full_comp_unit, process_full_type_unit): Call
11128         rust_union_quirks.
11129         (process_structure_scope): Update rust_unions if necessary.
11130
11131 2018-02-26  Tom Tromey  <tom@tromey.com>
11132
11133         * value.h (value_union_variant): Declare.
11134         * valops.c (value_union_variant): New function.
11135         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
11136         (struct discriminant_info): New.
11137         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
11138         enumerator.
11139         (struct main_type) <flag_discriminated_union>: New field.
11140
11141 2018-02-26  Tom Tromey  <tom@tromey.com>
11142
11143         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11144         unittests/unpack-selftests.c.
11145         * unittests/unpack-selftests.c: New file.
11146         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
11147
11148 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11149
11150         * dwarf2read.c (struct partial_die_info) <read>: New method.
11151         (read_partial_die): Remove the declaration.
11152         (load_partial_dies): Update.
11153         (partial_die_info::partial_die_info):
11154         (read_partial_die): Change it to partial_die_info::read.
11155
11156 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11157
11158         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
11159         (fixup_partial_die): Remove declaration.
11160         (scan_partial_symbols): Update.
11161         (partial_die_parent_scope): Likewise.
11162         (partial_die_full_name): Likewise.
11163         (fixup_partial_die): Change it to partial_die_info::fixup.
11164
11165 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11166
11167         * dwarf2read.c (read_partial_die): Update the declaration.
11168         (load_partial_dies): Caller update.
11169         (read_partial_die): Remove one argument abbrev_len.
11170
11171 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11172
11173         * dwarf2read.c (struct partial_die_info): Add ctor, delete
11174         assignment operator.
11175         (load_partial_dies): Use ctor and copy ctor.
11176         (read_partial_die): Update.
11177         (dwarf2_cu::find_partial_die): Use ctor.
11178
11179 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11180
11181         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
11182         (find_partial_die_in_comp_unit): Change it to
11183         dwarf2_cu::find_partial_die.
11184         (find_partial_die): Update.
11185
11186 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11187
11188         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
11189         is NULL.
11190
11191 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11192
11193         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
11194
11195 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
11196
11197         * arch/amd64.h: Use common/tdesc.h.
11198         * arch/i386.c: Likewise.
11199         * arch/i386.h: Likewise.
11200         * arch/tic6x.c: Likewise.
11201         * arch/tdesc.h: Move file from here...
11202         * common/tdesc.h: ...to here.
11203         * features/aarch64-core.c: Regenerate.
11204         * features/aarch64-fpu.c: Regenerate.
11205         * features/i386/32bit-avx.c: Regenerate.
11206         * features/i386/32bit-avx512.c: Regenerate.
11207         * features/i386/32bit-core.c: Regenerate.
11208         * features/i386/32bit-linux.c: Regenerate.
11209         * features/i386/32bit-mpx.c: Regenerate.
11210         * features/i386/32bit-pkeys.c: Regenerate.
11211         * features/i386/32bit-sse.c: Regenerate.
11212         * features/i386/64bit-avx.c: Regenerate.
11213         * features/i386/64bit-avx512.c: Regenerate.
11214         * features/i386/64bit-core.c: Regenerate.
11215         * features/i386/64bit-linux.c: Regenerate.
11216         * features/i386/64bit-mpx.c: Regenerate.
11217         * features/i386/64bit-pkeys.c: Regenerate.
11218         * features/i386/64bit-segments.c: Regenerate.
11219         * features/i386/64bit-sse.c: Regenerate.
11220         * features/i386/x32-core.c: Regenerate.
11221         * features/tic6x-c6xp.c: Regenerate.
11222         * features/tic6x-core.c: Regenerate.
11223         * features/tic6x-gp.c: Regenerate.
11224         * target-descriptions.c: Use common/tdesc.h.
11225         * target-descriptions.h: Likewise.
11226
11227 2018-02-24  Tom Tromey  <tom@tromey.com>
11228
11229         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
11230         (try_thread_db_load_from_dir, thread_db_load_search): Use
11231         std::string.
11232         (info_auto_load_libthread_db_compare): Return bool.  Change
11233         argument types.
11234         (info_auto_load_libthread_db): Use std::vector, std::string.
11235         Remove cleanups.
11236
11237 2018-02-24  Tom Tromey  <tom@tromey.com>
11238
11239         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
11240         std::string.
11241         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
11242         std::string*.
11243         * gdbarch.c: Rebuild.
11244         * gdbarch.h: Rebuild.
11245         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
11246         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
11247         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
11248         std::string*.
11249
11250 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
11251
11252         * gdbtypes.h (sect_offset): Change type to uint64_t.
11253         (sect_offset_str): New function.
11254         * dwarf2read.c (create_addrmap_from_aranges): Use
11255         sect_offset_str.
11256         (error_check_comp_unit_head): Likewise.
11257         (create_debug_type_hash_table): Likewise.
11258         (read_cutu_die_from_dwo): Likewise.
11259         (init_cutu_and_read_dies): Likewise.
11260         (init_cutu_and_read_dies_no_follow): Likewise.
11261         (process_psymtab_comp_unit_reader): Likewise.
11262         (partial_die_parent_scope): Likewise.
11263         (peek_die_abbrev): Likewise.
11264         (process_queue): Likewise.
11265         (dwarf2_physname): Likewise.
11266         (read_namespace_alias): Likewise.
11267         (read_import_statement): Likewise.
11268         (create_dwo_cu_reader): Likewise.
11269         (create_cus_hash_table): Likewise.
11270         (lookup_dwo_cutu): Likewise.
11271         (inherit_abstract_dies): Likewise.
11272         (read_func_scope): Likewise.
11273         (read_call_site_scope): Likewise.
11274         (dwarf2_add_member_fn): Likewise.
11275         (read_common_block): Likewise.
11276         (read_module_type): Likewise.
11277         (read_typedef): Likewise.
11278         (read_subrange_type): Likewise.
11279         (load_partial_dies): Likewise.
11280         (read_partial_die): Likewise.
11281         (find_partial_die): Likewise.
11282         (read_str_index): Likewise.
11283         (dwarf2_string_attr): Likewise.
11284         (build_error_marker_type): Likewise.
11285         (lookup_die_type): Likewise.
11286         (dump_die_shallow): Likewise.
11287         (follow_die_ref): Likewise.
11288         (dwarf2_fetch_die_loc_sect_off): Likewise.
11289         (dwarf2_fetch_constant_bytes): Likewise.
11290         (follow_die_sig): Likewise.
11291         (get_signatured_type): Likewise.
11292         (get_DW_AT_signature_type): Likewise.
11293         (dwarf2_find_containing_comp_unit): Likewise.
11294         (set_die_type): Likewise.
11295
11296 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
11297
11298         * arch/aarch64.c: Include "common-defs.h".
11299         * arch/amd64.c: Likewise.
11300         * arch/i386.c: Likewise.
11301
11302 2018-02-21  Tom Tromey  <tom@tromey.com>
11303
11304         * value.h: (extract_field_op): Update.
11305         * eval.c (extract_field_op): Return a const char *.
11306         * expression.h (parse_expression_for_completion): Update.
11307         * completer.c (complete_expression): Update.
11308         (add_struct_fields): Make fieldname const.
11309         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
11310         (mark_completion_tag, parse_exp_in_context_1): Update.
11311         (parse_expression_for_completion): Change "name" to
11312         unique_xmalloc_ptr*.
11313
11314 2018-02-21  Tom Tromey  <tom@tromey.com>
11315
11316         * infcall.c (call_function_by_hand_dummy): Use std::vector.
11317
11318 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11319
11320         * avr-tdep.c (avr_read_pc): Change parameter type to
11321         readable_regcache.
11322         * gdbarch.sh (read_pc): Likewise.
11323         * gdbarch.c: Re-generated.
11324         * gdbarch.h: Re-generated.
11325         * hppa-tdep.c (hppa_read_pc): Change parameter type to
11326         readable_regcache.
11327         * ia64-tdep.c (ia64_read_pc): Likewise.
11328         * mips-tdep.c (mips_read_pc): Likewise.
11329         * spu-tdep.c (spu_read_pc): Likewise.
11330
11331 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11332
11333         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
11334         * regcache-dump.c: New file.
11335         * regcache.c: Move register_dump to regcache-dump.c.
11336         (maintenance_print_registers): Likewise.
11337         (maintenance_print_raw_registers): Likewise.
11338         (maintenance_print_cooked_registers): Likewise.
11339         (maintenance_print_register_groups): Likewise.
11340         (maintenance_print_remote_registers): Likewise.
11341         (_initialize_regcache): Likewise.
11342         * regcache.h (register_dump): Moved from regcache.c.
11343
11344 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11345
11346         * regcache.c (regcache::regcache): Update.
11347         (regcache::invalidate): Move it to detached_regcache::invalidate.
11348         (get_thread_arch_aspace_regcache): Update.
11349         (regcache::raw_update): Update.
11350         (regcache::cooked_read): Remove some code.
11351         (regcache::cooked_read_value): Likewise.
11352         (regcache::raw_write): Remove assert on m_readonly_p.
11353         (regcache::raw_supply_integer): Move it to
11354         detached_regcache::raw_supply_integer.
11355         (regcache::raw_supply_zeroed): Likewise.
11356         * regcache.h (detached_regcache) <raw_supply_integer>: New
11357         declaration.
11358         <raw_supply_zeroed, invalidate>: Likewise.
11359         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
11360         <invalidate>: Likewise.
11361         <m_readonly_p>: Removed.
11362
11363 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11364
11365         * infcmd.c (get_return_value): Let stop_regs point to
11366         get_current_regcache.
11367         * regcache.c (regcache::regcache): Remove.
11368         (register_dump_reg_buffer): New class.
11369         (regcache_print): Adjust.
11370         * regcache.h (regcache): Remove constructors.
11371
11372 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11373
11374         * regcache.c (class register_dump): New class.
11375         (register_dump_regcache, register_dump_none): New class.
11376         (register_dump_remote, register_dump_groups): New class.
11377         (regcache_print): Update.
11378         * regcache.h (regcache_dump_what): Move it to regcache.c.
11379         (regcache) <dump>: Remove.
11380
11381 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11382
11383         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
11384          reg_buffer_rw *.
11385         (jit_unwind_reg_set_impl): Call raw_supply.
11386         (jit_frame_sniffer): Use reg_buffer_rw.
11387         * record-full.c (record_full_core_regbuf): Change its type.
11388         (record_full_core_open_1): Use reg_buffer_rw.
11389         (record_full_close): Likewise.
11390         (record_full_core_fetch_registers): Use regcache->raw_supply.
11391         (record_full_core_store_registers): Likewise.
11392         * regcache.c (regcache::get_register_status): Move it to
11393         reg_buffer.
11394         (regcache_raw_set_cached_value): Remove.
11395         (regcache::raw_set_cached_value): Remove.
11396         (regcache::raw_write): Call raw_supply.
11397         (regcache::raw_supply): Move it to reg_buffer_rw.
11398         * regcache.h (regcache_raw_set_cached_value): Remove.
11399         (reg_buffer_rw): New class.
11400
11401 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11402
11403         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
11404         readonly_detached_regcache.
11405         (dummy_frame_prev_register): Use regcache->cooked_read.
11406         * frame.c (frame_save_as_regcache): Change return type.
11407         (frame_pop): Update.
11408         * frame.h (frame_save_as_regcache): Update declaration.
11409         * inferior.h (get_infcall_suspend_state_regcache): Update
11410         declaration.
11411         * infrun.c (infcall_suspend_state) <registers>: use
11412         readonly_detached_regcache.
11413         (save_infcall_suspend_state): Don't use regcache_dup.
11414         (get_infcall_suspend_state_regcache): Change return type.
11415         * linux-fork.c (struct fork_info) <savedregs>: Change to
11416         readonly_detached_regcache.
11417         <pc>: New field.
11418         (fork_save_infrun_state): Don't use regcache_dup.
11419         (info_checkpoints_command): Adjust.
11420         * mi/mi-main.c (register_changed_p): Update declaration.
11421         (mi_cmd_data_list_changed_registers): Use
11422         readonly_detached_regcache.
11423         (register_changed_p): Change parameter type to
11424         readonly_detached_regcache.
11425         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
11426         readonly_detached_regcache.
11427         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
11428         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
11429         New.
11430         (regcache::save): Move it to reg_buffer.
11431         (regcache::restore): Change parameter type.
11432         (regcache_dup): Remove.
11433         * regcache.h (reg_buffer) <save>: New method.
11434         (readonly_detached_regcache): New class.
11435         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
11436         readonly_detached_regcache.
11437         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
11438
11439 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11440
11441         * frame.c (frame_save_as_regcache): Use regcache method save.
11442         (frame_pop): Use regcache method restore.
11443         * infrun.c (restore_infcall_suspend_state): Likewise.
11444         * linux-fork.c (fork_load_infrun_state): Likewise.
11445         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
11446         save.
11447         * regcache.c (regcache_save): Remove.
11448         (regcache::restore): More asserts.
11449         (regcache_cpy): Remove.
11450         * regcache.h (regcache_save): Remove the declaration.
11451         (regcache::restore): Move from private to public.
11452         Remove the friend declaration of regcache_cpy.
11453         (regcache_cpy): Remove declaration.
11454
11455 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11456
11457         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
11458         parameter type to 'readable_regcache *'.
11459         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
11460         * arm-tdep.c (arm_neon_quad_read): Likewise.
11461         (arm_pseudo_read): Likewise.
11462         * avr-tdep.c (avr_pseudo_register_read): Likewise.
11463         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
11464         * frv-tdep.c (frv_pseudo_register_read): Likewise.
11465         * gdbarch.c: Re-generated.
11466         * gdbarch.h: Re-generated.
11467         * gdbarch.sh (pseudo_register_read): Change parameter type to
11468         'readable_regcache *'.
11469         (pseudo_register_read_value): Likewise.
11470         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
11471         (h8300_pseudo_register_read): Likewise.
11472         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
11473         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
11474         (i386_pseudo_register_read_into_value): Likewise.
11475         (i386_pseudo_register_read_value): Likewise.
11476         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
11477         declaration.
11478         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
11479         * m32c-tdep.c (m32c_raw_read): Likewise.
11480         (m32c_read_flg): Likewise.
11481         (m32c_banked_register): Likewise.
11482         (m32c_banked_read): Likewise.
11483         (m32c_sb_read): Likewise.
11484         (m32c_part_read): Likewise.
11485         (m32c_cat_read): Likewise.
11486         (m32c_r3r2r1r0_read): Likewise.
11487         (m32c_pseudo_register_read): Likewise.
11488         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
11489         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
11490         (mep_pseudo_cr64_read): Likewise.
11491         (mep_pseudo_register_read): Likewise.
11492         * mips-tdep.c (mips_pseudo_register_read): Likewise.
11493         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
11494         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
11495         * regcache.c (regcache::raw_read): Move it to readable_regcache.
11496         (regcache::cooked_read): Likewise.
11497         (regcache::cooked_read_value): Likewise.
11498         (regcache_cooked_read_signed):
11499         (regcache::cooked_read): Likewise.
11500         * regcache.h (readable_regcache): New class.
11501         (regcache): Inherit readable_regcache.  Move some methods to
11502         readable_regcache.
11503         * rl78-tdep.c (rl78_pseudo_register_read): Change
11504         parameter type to 'readable_regcache *'.
11505         * rs6000-tdep.c (do_regcache_raw_read): Remove.
11506         (e500_pseudo_register_read): Change parameter type to
11507         'readable_regcache *'.
11508         (dfp_pseudo_register_read): Likewise.
11509         (vsx_pseudo_register_read): Likewise.
11510         (efpr_pseudo_register_read): Likewise.
11511         * s390-tdep.c (s390_pseudo_register_read): Likewise.
11512         * sh-tdep.c (sh_pseudo_register_read): Likewise.
11513         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
11514         (sh64_pseudo_register_read): Likewise.
11515         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
11516         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
11517         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
11518         (spu_pseudo_register_read): Likewise.
11519         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
11520         (xtensa_pseudo_register_read): Likewise.
11521
11522 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11523
11524         * regcache.c (regcache::regcache): Call reg_buffer ctor.
11525         (regcache::arch): Move it to reg_buffer::arch.
11526         (regcache::register_buffer): Likewise.
11527         (regcache::assert_regnum): Likewise.
11528         (regcache::num_raw_registers): Likewise.
11529         * regcache.h (reg_buffer): New class.
11530         (regcache): Inherit reg_buffer.
11531
11532 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
11533
11534         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
11535         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
11536
11537 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
11538
11539         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
11540
11541 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
11542
11543         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
11544         (SFILES): Remove common/*.c files.
11545         (COMMON_OBS): Remove some *.o files built from common/*.c files.
11546         * common/common.host: Add common reference.
11547         * configure.ac: Likewise.
11548         * configure: Regenerate.
11549
11550 2018-02-16  Yao Qi  <yao.qi@linaro.org>
11551
11552         * block.c (block_namespace_info): Inherit allocate_on_obstack.
11553         (block_initialize_namespace): Use new.
11554         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
11555         (dwarf2_free_objfile): Use delete.
11556         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
11557         (copy_type_recursive): Use new.
11558         * gdb_obstack.h (allocate_on_obstack): New.
11559
11560 2018-02-15  Yao Qi  <yao.qi@linaro.org>
11561
11562         PR gdb/22849
11563         * inferior.c (exit_inferior_1): Reset inf->control.
11564
11565 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
11566
11567         * ada-lang.c (ada_to_fixed_value_create): Delete advance
11568         declaration.
11569
11570 2018-02-14  Pedro Alves  <palves@redhat.com>
11571
11572         * frame-unwind.c (frame_unwind_try_unwinder): Always call
11573         frame_cleanup_after_sniffer on exception.
11574
11575 2018-02-14  Tom Tromey  <tom@tromey.com>
11576
11577         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
11578         const.
11579         (solib_bfd_open): Make pathname const.
11580         * solib.c (solib_bfd_open): Make pathname const.
11581         * solib-spu.c (spu_bfd_fopen): Make name const.
11582         (spu_bfd_open): Make pathname const.
11583         * solib-darwin.c (darwin_bfd_open): Make pathname const.
11584         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
11585
11586 2018-02-14  Tom Tromey  <tom@tromey.com>
11587
11588         * symfile.c (symfile_bfd_open): Update.
11589         * source.h (openp, source_full_path_of, find_and_open_source):
11590         Change argument type to unique_xmalloc_ptr.
11591         * source.c (openp): Take a unique_xmalloc_ptr.
11592         (source_full_path_of, find_and_open_source): Likewise.
11593         (open_source_file, symtab_to_fullname): Update.
11594         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
11595         unique_xmalloc_ptr.
11596         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
11597         (exec_file_find): Update.
11598         * psymtab.c (psymtab_to_fullname): Update.
11599         * nto-tdep.h (nto_find_and_open_solib): Update.
11600         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
11601         unique_xmalloc_ptr.
11602         * exec.c (exec_file_attach): Update.
11603         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
11604         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
11605
11606 2018-02-14  Tom Tromey  <tom@tromey.com>
11607
11608         * solib.c: Include source.h.
11609         * nto-tdep.c: Include source.h.
11610         * mi/mi-cmd-env.c: Include source.h.
11611         * infcmd.c: Include source.h.
11612         * exec.c: Include source.h.
11613         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
11614         (add_path, directory_switch, source_path, init_source_path): Move
11615         declarations...
11616         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
11617         (add_path, directory_switch, source_path, init_source_path):
11618         ...here.
11619
11620 2018-02-14  Tom Tromey  <tom@tromey.com>
11621
11622         * solist.h (exec_file_find, solib_find): Return
11623         unique_xmalloc_ptr.
11624         (solib_bfd_fopen): Take a const char *.
11625         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
11626         (exec_file_find, solib_find): Likewise.
11627         (solib_bfd_fopen): Do not take ownership of "pathname".
11628         (solib_bfd_open): Use unique_xmalloc_ptr.
11629         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
11630         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
11631         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
11632         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
11633
11634 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
11635
11636         * ada-lang.c (name_match_type_from_name): Remove reference to
11637         ada_name_for_lookup in function's documentation.
11638         * ada-lang.h (ada_name_for_lookup): Delete declaration.
11639
11640 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
11641
11642         * defs.h (enum openp_flags): New enum.
11643         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
11644         Move to enum openp_flags.
11645         (openp_flags): New enum flags.
11646         (openp): Change parameter type to openp_flags.
11647         * source.c (openp): Change parameter type to openp_flags.
11648         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
11649         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
11650
11651 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
11652
11653         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
11654         per-command.
11655
11656 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
11657
11658         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
11659         into...
11660         (class dwarf2_queue_guard): ...the destructor of this new class.
11661         (dw2_do_instantiate_symtab): Create instance of the new class
11662         dwarf2_queue_guard, remove cleanup.
11663
11664 2018-02-09  Tom Tromey  <tom@tromey.com>
11665
11666         * source.c (find_source_lines): Don't reference past the end of
11667         the vector.
11668
11669 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11670
11671         * remote.c (remote_btrace_maybe_reopen): Change error message.
11672         * btrace.c (btrace_enable): Likewise.
11673         (parse_xml_btrace): Likewise.
11674         (parse_xml_btrace_conf): Likewise.
11675
11676 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11677
11678         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
11679         (linux_enable_pt, linux_enable_bts): Call
11680         diagnose_perf_event_open_fail.
11681
11682 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11683
11684         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
11685         Remove parameter and change return type.  Update callers.  Move it.
11686         (linux_enable_bts, linux_enable_pt): Improve error message.
11687         (linux_enable_pt): Remove zero buffer size check.
11688         (linux_enable_btrace): Improve error messages.  Remove NULL return
11689         check.
11690
11691 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11692
11693         * btrace.c (btrace_enable): Remove target_supports_btrace call.
11694         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
11695         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
11696         (linux_supports_pt, linux_supports_btrace): Remove.
11697         (linux_enable_bts): Call cpu_supports_bts.
11698         * nat/linux-btrace.h (linux_supports_btrace): Remove.
11699         * remote.c (remote_supports_btrace): Remove.
11700         (init_remote_ops): Remove remote_supports_btrace.
11701         * target-delegates.c: Regenerated.
11702         * target.c (target_supports_btrace): Remove.
11703         * target.h (target_ops) <to_supports_btrace>: Remove
11704         (target_supports_btrace): Remove.
11705         * x86-linux-nat.c (x86_linux_create_target): Remove
11706         linux_supports_btrace.
11707
11708 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11709
11710         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
11711         btrace failed.
11712         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
11713         exception and use message in own exception.
11714
11715 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11716
11717         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
11718         (perf_event_pt_event_type): Use gdb_file_up.
11719         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
11720         scoped_fd, and scoped_mmap.
11721
11722 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11723
11724         * common/scoped_mmap.h: New.
11725         * unittests/scoped_mmap-selftest.c: New.
11726         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11727         unittests/scoped_mmap-selftest.c.
11728
11729 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11730
11731         * common/scoped_fd.h: New.
11732         * unittests/scoped_fd-selftest.c: New.
11733         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11734         unittests/scoped_fd-selftest.c.
11735
11736 2018-02-09  Tom Tromey  <tom@tromey.com>
11737
11738         * auto-load.c (auto_load_section_scripts): Use
11739         gdb::unique_xmalloc_ptr.
11740
11741 2018-02-09  Tom Tromey  <tom@tromey.com>
11742
11743         * auto-load.c (execute_script_contents): Use std::string.
11744
11745 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
11746
11747         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
11748         Python function, rather than a new command.
11749
11750 2018-02-08  Tom Tromey  <tom@tromey.com>
11751
11752         * solib.c (solib_find_1): Use std::string.
11753         (solib_bfd_fopen): Use unique_xmalloc_ptr.
11754
11755 2018-02-08  Tom Tromey  <tom@tromey.com>
11756
11757         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
11758
11759 2018-02-08  Tom Tromey  <tom@tromey.com>
11760
11761         * source.c (find_source_lines): Use gdb::def_vector.
11762
11763 2018-02-08  Tom Tromey  <tom@tromey.com>
11764
11765         * macrocmd.c (struct temporary_macro_definition): New.
11766         (macro_define_command): Use temporary_macro_definition.  Remove
11767         cleanups.
11768         (free_macro_definition_ptr): Remove.
11769
11770 2018-02-08  Tom Tromey  <tom@tromey.com>
11771
11772         * macroexp.c (maybe_expand): Use std::string.
11773
11774 2018-02-08  Tom Tromey  <tom@tromey.com>
11775
11776         * macroexp.c (struct macro_buffer): Add initializers for some
11777         members.
11778         (init_buffer, init_shared_buffer, free_buffer)
11779         (free_buffer_return_text): Remove.
11780         (macro_buffer): New constructors.
11781         (~macro_buffer): New destructor.
11782         (macro_buffer::set_shared): New method.
11783         (macro_buffer::resize_buffer, macro_buffer::appendc)
11784         (macro_buffer::appendmem): Now methods, not free functions.
11785         (set_token, append_tokens_without_splicing, stringify)
11786         (macro_stringify): Update.
11787         (gather_arguments): Change return type.  Remove argc_p argument,
11788         add args_ptr argument.  Use std::vector.
11789         (substitute_args): Remove argc argument.  Accept std::vector.
11790         (expand): Update.  Use std::vector.
11791         (scan, macro_expand, macro_expand_next): Update.
11792
11793 2018-02-08  Tom Tromey  <tom@tromey.com>
11794
11795         * symtab.c (default_collect_symbol_completion_matches_break_on):
11796         Use unique_xmalloc_ptr.
11797         * macroscope.h: (sal_macro_scope, user_macro_scope)
11798         (default_macro_scope): Return unique_xmalloc_ptr.
11799         * macroscope.c (sal_macro_scope, user_macro_scope)
11800         (default_macro_scope): Return unique_xmalloc_ptr.
11801         * macroexp.h (macro_expand, macro_expand_once): Return
11802         unique_xmalloc_ptr.
11803         * macroexp.c (macro_expand, macro_expand_once): Return
11804         unique_xmalloc_ptr.
11805         * macrocmd.c (macro_expand_command, macro_expand_once_command)
11806         (info_macro_command, info_macros_command): Use
11807         unique_xmalloc_ptr.
11808         * compile/compile-c-support.c (write_macro_definitions): Use
11809         unique_xmalloc_ptr.
11810         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
11811
11812 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
11813
11814         * value.c (value_static_field): Assign field type instead of
11815         containing type when returning an optimized out value.
11816
11817 2018-02-06  Yao Qi  <yao.qi@linaro.org>
11818
11819         * ft32-tdep.c (ft32_read_pc): Remove.
11820         (ft32_write_pc): Remove.
11821         (ft32_gdbarch_init): Update.
11822         * m32r-tdep.c (m32r_read_pc): Remove.
11823         (m32r_gdbarch_init): Update.
11824         * mep-tdep.c (mep_read_pc): Remove.
11825         (mep_gdbarch_init): Update.
11826         * microblaze-tdep.c (microblaze_write_pc): Remove.
11827         (microblaze_gdbarch_init): Update.
11828         * mn10300-tdep.c (mn10300_read_pc): Remove.
11829         (mn10300_write_pc): Remove.
11830         (mn10300_gdbarch_init): Update.
11831         * moxie-tdep.c (moxie_read_pc): Remove.
11832         (moxie_write_pc): Remove.
11833         (moxie_gdbarch_init): Update.
11834
11835 2018-02-06  Yao Qi  <yao.qi@linaro.org>
11836
11837         * expprint.c (print_subexp_standard): Handle
11838         OP_F77_UNDETERMINED_ARGLIST.
11839         (dump_subexp_body_standard): Likewise.
11840
11841 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
11842
11843         * target-descriptions.c (tdesc_element_visitor) Add empty
11844         implementations.
11845         (tdesc_type): Move make_gdb_type from here.
11846         (tdesc_type_builtin): Likewise.
11847         (tdesc_type_vector): Likewise.
11848         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
11849         (make_gdb_type_struct): Move from tdesc_type_with_fields.
11850         (make_gdb_type_union): Likewise.
11851         (make_gdb_type_flags): Likewise.
11852         (make_gdb_type_enum): Likewise.
11853         (make_gdb_type): New function.
11854         (tdesc_register_type): Use static make_gdb_type.
11855
11856 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
11857
11858         * infcmd.c (default_print_one_register_info): Align natural-format
11859         column values consistently one under another.
11860         (pad_to_column): New function.
11861
11862 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
11863
11864         * dwarf2read.c (dwarf2_physname): Move commment.
11865
11866 2018-02-01  Leszek Swirski  <leszeks@google.com>
11867
11868         * varobj.c (varobj_formatted_print_options): Allow recursive
11869         pretty printing if pretty printing is enabled.
11870
11871 2018-02-01  Leszek Swirski  <leszeks@google.com>
11872
11873         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
11874         names after a structop as a filename.
11875
11876 2018-02-01  Yao Qi  <yao.qi@linaro.org>
11877
11878         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
11879         (arm_record_coproc_data_proc): Likewise.
11880
11881 2018-02-01  Yao Qi  <yao.qi@linaro.org>
11882
11883         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
11884
11885 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
11886
11887         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
11888         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
11889
11890 2018-01-31  Pedro Alves  <palves@redhat.com>
11891
11892         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
11893         * inflow.c (child_terminal_save_inferior): Wrap reference to
11894         tcgetpgrp in HAVE_TERMIOS_H.
11895         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
11896         _WIN32.
11897         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
11898         always iterate over all inferiors.
11899         (gdbsim_cntrl_c): Adjust.
11900         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
11901
11902 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
11903
11904         * gdbtypes.c (lookup_array_range_type): Make sure the array's
11905         index type is objfile-owned if the element type is as well.
11906
11907 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
11908
11909         GDB 8.1 released.
11910
11911 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11912
11913         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
11914         "features/s390x-linux64.c".
11915         (_initialize_s390_linux_tdep): Remove initialization of tdescs
11916         s390_linux32 and s390x_linux64.
11917         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
11918         default tdesc.
11919         * s390-tdep.c: Include "features/s390-linux32.c" and
11920         "features/s390x-linux64.c".
11921         (s390_tdesc_valid): Add check for tdesc_has_registers.
11922         (s390_gdbarch_init): Make sure there is always a valid tdesc.
11923         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
11924         tdesc_s390x_linux64.
11925         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
11926         tdesc_s390x_linux64 to...
11927         * s390-tdep.h: ...here.
11928
11929 2018-01-30  Pedro Alves  <palves@redhat.com>
11930
11931         PR gdb/13211
11932         * config.in, configure: Regenerate.
11933         * configure.ac: Check for getpgid.
11934         * go32-nat.c (go32_pass_ctrlc): New.
11935         (go32_target): Install it.
11936         * inf-child.c (inf_child_target): Install
11937         child_terminal_save_inferior, child_pass_ctrlc and
11938         child_interrupt.
11939         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
11940         (inf_ptrace_target): No longer install it.
11941         * infcmd.c (interrupt_target_1): Adjust.
11942         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
11943         (child_interrupt): Declare.
11944         (inferior::terminal_state): New.
11945         * inflow.c (struct terminal_info): Update comments.
11946         (inferior_process_group): Delete.
11947         (terminal_is_ours): Delete.
11948         (gdb_tty_state): New.
11949         (child_terminal_init): Adjust.
11950         (is_gdb_terminal, sharing_input_terminal_1)
11951         (sharing_input_terminal): New functions.
11952         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
11953         Set the process's actual process group in the foreground if
11954         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
11955         mark terminal as the inferior's if not sharing GDB's terminal.
11956         Don't check attach_flag.
11957         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
11958         pass down a target_terminal_state.
11959         (child_terminal_save_inferior): New, factored out from ...
11960         (child_terminal_ours_1): ... this.  Handle
11961         target_terminal_state::is_ours_for_output.
11962         (child_interrupt, child_pass_ctrlc): New.
11963         (inflow_inferior_exit): Clear the inferior's terminal_state.
11964         (copy_terminal_info): Copy the inferior's terminal state.
11965         (_initialize_inflow): Remove reference to terminal_is_ours.
11966         * inflow.h (inferior_process_group): Delete.
11967         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
11968         * procfs.c (procfs_target): Don't install procfs_interrupt.
11969         (procfs_interrupt): Delete.
11970         * remote.c (remote_serial_quit_handler): Adjust.
11971         (remote_interrupt): Remove ptid parameter.  Adjust.
11972         * target-delegates.c: Regenerate.
11973         * target.c: Include "terminal.h".
11974         (target_terminal::terminal_state): Rename to ...
11975         (target_terminal::m_terminal_state): ... this.
11976         (target_terminal::init): Adjust.
11977         (target_terminal::inferior): Adjust to per-inferior
11978         terminal_state.
11979         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
11980         (target_terminal::ours, target_terminal::ours_for_output): Use
11981         target_terminal_is_ours_kind.
11982         (target_interrupt): Remove ptid parameter.  Adjust.
11983         (default_target_pass_ctrlc): Adjust.
11984         * target.h (target_ops::to_terminal_save_inferior): New field.
11985         (target_ops::to_interrupt): Remove ptid_t parameter.
11986         (target_interrupt): Remove ptid_t parameter.  Update comment.
11987         (target_pass_ctrlc): Update comment.
11988         * target/target.h (target_terminal_state): New scoped enum,
11989         factored out of ...
11990         (target_terminal::terminal_state): ... here.
11991         (target_terminal::inferior): Update comments.
11992         (target_terminal::restore_inferior): New.
11993         (target_terminal::is_inferior, target_terminal::is_ours)
11994         (target_terminal::is_ours_for_output): Adjust.
11995         (target_terminal::scoped_restore_terminal_state): Adjust to
11996         rename, and call restore_inferior() instead of inferior().
11997         (target_terminal::scoped_restore_terminal_state::m_state): Change
11998         type.
11999         (target_terminal::terminal_state): Rename to ...
12000         (target_terminal::m_terminal_state): ... this and change type.
12001
12002 2018-01-30  Pedro Alves  <palves@redhat.com>
12003
12004         * linux-nat.c (wait_for_signal): New function.
12005         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
12006         directly.
12007         (async_terminal_is_ours)
12008         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
12009         (linux_nat_add_target): Don't override
12010         to_terminal_inferior/to_terminal_ours.
12011
12012 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
12013
12014         * remote.c (remote_follow_fork): Don't call "detach_inferior".
12015
12016 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
12017
12018         * dwarf2read.c (free_dwo_files): Add forward-declaration.
12019         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
12020         dwarf2_per_objfile_free here.
12021         (dwarf2_per_objfile_free): Remove.
12022         (_initialize_dwarf2_read): Don't register
12023         dwarf2_per_objfile_free as a registry cleanup.
12024
12025 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
12026
12027         Avoid compilation errors in MinGW native builds
12028
12029         The error is triggered by including python-internal.h, and the
12030         error message is:
12031
12032              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
12033                       from build-gnulib/import/math.h:27,
12034                       from d:/usr/Python26/include/pyport.h:235,
12035                       from d:/usr/Python26/include/Python.h:58,
12036                       from python/python-internal.h:94,
12037                       from python/py-arch.c:24:
12038              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
12039         using ::hypot;
12040                 ^~~~~
12041
12042         This happens because Python headers define 'hypot' to expand t
12043         '_hypot' in the Windows builds.
12044         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
12045         'hypoth'.  This avoids a compilation error.
12046
12047 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
12048
12049         * MAINTAINERS (Write After Approval): Fix ordering.
12050
12051 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
12052
12053         * MAINTAINERS (Write After Approval): Add Alan Hayward.
12054
12055 2018-01-26  Alan Modra  <amodra@gmail.com>
12056
12057         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
12058         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
12059         Remove nop.  Make const.  Comment.
12060         (powerpc32_plt_stub_so_2): New.
12061         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
12062         Correct count.  Update uses.
12063         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
12064         Move common code reading PLT entry word.  Correct
12065         powerpc32_plt_stub PLT address calculation.
12066         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
12067         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
12068         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
12069         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
12070         (ppc64_standard_linkage8): Likewise.
12071         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
12072         Correct insns description.
12073         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
12074
12075 2018-01-24  Pedro Alves  <palves@redhat.com>
12076
12077         GCC PR libstdc++/83906
12078         * gdbtypes.c (operator==(const dynamic_prop &,
12079         const dynamic_prop &)): New.
12080         (operator==(const range_bounds &, const range_bounds &)): New.
12081         (check_types_equal): Use them instead of memcmp.
12082         * gdbtypes.h (operator==(const dynamic_prop &,
12083         const dynamic_prop &)): Declare.
12084         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
12085         (operator==(const range_bounds &, const range_bounds &)): Declare.
12086         (operator!=(const range_bounds &, const range_bounds &)): Declare.
12087
12088 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12089
12090         * s390-linux-tdep.c (s390_record_address_mask)
12091         (s390_record_calc_disp_common, s390_record_calc_disp)
12092         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12093         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12094         (s390_process_record): Move to s390-tdep.c.
12095         (s390_linux_init_abi_any): Adjust.
12096         * s390-tdep.c (s390_record_address_mask)
12097         (s390_record_calc_disp_common, s390_record_calc_disp)
12098         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12099         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12100         (s390_process_record): Moved from s390-linux-tdep.c
12101         (s390_gdbarch_init): Adjust.
12102
12103 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12104
12105         * s390-linux-nat.c (s390-tdep.h): New include.
12106         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
12107         (HFILES_NO_SRCDIR): Add s390-tdep.h.
12108         (ALLDEPFILES): Add s390-tdep.c.
12109         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
12110         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
12111         * s390-tdep.h: ...this.  New file.
12112         * s390-linux-tdep.c (s390-tdep.h): New include.
12113         (_initialize_s390_tdep): Rename to...
12114         (_initialize_s390_linux_tdep): ...this and adjust.
12115         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
12116         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
12117         s390-tdep.h.
12118         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
12119         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
12120         (s390_is_partial_instruction, s390_software_single_step)
12121         (is_non_branch_ril, s390_displaced_step_copy_insn)
12122         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
12123         (s390_prologue_data, s390_addr, s390_store, s390_load)
12124         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
12125         (s390_register_call_saved, s390_guess_tracepoint_registers)
12126         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
12127         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
12128         (s390_pseudo_register_name, s390_pseudo_register_type)
12129         (s390_pseudo_register_read, s390_pseudo_register_write)
12130         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
12131         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
12132         (s390_addr_bits_remove, s390_address_class_type_flags)
12133         (s390_address_class_type_flags_to_name)
12134         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
12135         (s390_function_arg_float, s390_function_arg_vector)
12136         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
12137         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
12138         (s390_frame_align, s390_register_return_value, s390_return_value)
12139         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
12140         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
12141         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
12142         (s390_trad_frame_prev_register, s390_unwind_cache)
12143         (s390_prologue_frame_unwind_cache)
12144         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
12145         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
12146         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
12147         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
12148         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
12149         (s390_frame_base_address, s390_local_base_address)
12150         (s390_frame_base, s390_gcc_target_options)
12151         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
12152         (s390_validate_reg_range, s390_tdesc_valid)
12153         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
12154         * s390-tdep.c: ...this.  New file.
12155
12156 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12157
12158         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
12159         (s390_process_record, s390_gdbarch_tdep_alloc)
12160         (s390_linux_init_abi_any): Use/set new hook.
12161
12162 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12163
12164         * s390-linux-tdep.c (osabi.h): New include.
12165         (s390_linux_init_abi_31, s390_linux_init_abi_64)
12166         (s390_linux_init_abi_any): New functions.
12167         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
12168
12169 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12170
12171         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
12172         tdesc_has_registers check
12173
12174 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12175
12176         * s390-linux-tdep.c (s390_tdesc_valid): New function.
12177         (s390_validate_reg_range): New macro.
12178         (s390_gdbarch_init): Adjust.
12179
12180 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12181
12182         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
12183         (s390_gdbarch_tdep_alloc): Adjust.
12184         (s390_gdbarch_init): Adjust.
12185
12186 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12187
12188         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
12189         <have_tdb>: Change type to bool.
12190         (s390_gdbarch_tdep_alloc): Adjust.
12191         (s390_gdbarch_init): Adjust.
12192
12193 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12194
12195         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
12196         (gdbarch_tdep) <have_upper, have_vx>: New fields.
12197         (s390_gdbarch_tdep_alloc): New function.
12198         (s390_gdbarch_init): Allocate tdep at start and use its fields
12199         instead of separate variables.
12200
12201 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12202
12203         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
12204         when looking for cached gdbarch and add comment for remaining.
12205
12206 2018-01-22  Pedro Alves  <palves@redhat.com>
12207             Sergio Durigan Junior  <sergiodj@redhat.com>
12208
12209         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
12210         case.
12211
12212 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
12213
12214         * MAINTAINERS: Update my company e-mail address.
12215
12216 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12217
12218         * regcache.c (cooked_write_test): New function.
12219         (_initialize_regcache): Register the test.
12220
12221 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12222
12223         * ia64-tdep.c (ia64_pseudo_register_read): Call
12224         regcache->cooked_read instead of regcache_cooked_read_unsigned.
12225         * m32c-tdep.c (m32c_cat_read): Likewise.
12226         (m32c_r3r2r1r0_read): Likewise.
12227         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
12228         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
12229
12230 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12231
12232         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
12233         method raw_read instead of regcache_raw_read.
12234         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
12235         * arm-tdep.c (arm_neon_quad_read): Likewise.
12236         * avr-tdep.c (avr_pseudo_register_read): Likewise.
12237         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
12238         * frv-tdep.c (frv_pseudo_register_read): Likewise.
12239         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
12240         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
12241         (i386_pseudo_register_read_into_value): Likewise.
12242         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
12243         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
12244         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
12245         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
12246         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
12247         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
12248         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
12249         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
12250         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
12251
12252 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12253
12254         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
12255         * configure.tgt: Remove target mt.
12256         * mt-tdep.c: Remove.
12257         * regcache.c (cooked_read_test): Remove the check for mt.
12258
12259 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12260
12261         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
12262         instead of gdbarch_pseudo_register_read_value.
12263
12264 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
12265
12266         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
12267         language is Ada.
12268
12269 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
12270
12271         * linespec.c (create_sals_line_offset): Remove code that preserved
12272         the symtab_and_line's line number.
12273
12274 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12275
12276         * varobj.c (varobj_create): Don't set valid_block when creating a
12277         floating varobj.
12278
12279 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12280
12281         * varobj.c (varobj_create): Remove out of date comment.
12282
12283 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12284
12285         PR mi/20395
12286         * ada-exp.y (write_var_from_sym): Pass extra parameter when
12287         updating innermost block.
12288         * parse.c (innermost_block_tracker::update): Take extra type
12289         parameter, and check types match before updating innermost block.
12290         (write_dollar_variable): Update innermost block for registers.
12291         * parser-defs.h (enum innermost_block_tracker_type): New enum.
12292         (innermost_block_tracker::innermost_block_tracker): Initialise
12293         m_types member.
12294         (innermost_block_tracker::reset): Take type parameter.
12295         (innermost_block_tracker::update): Take type parameter, and pass
12296         type through as needed.
12297         (innermost_block_tracker::m_types): New member.
12298         * varobj.c (varobj_create): Pass type when reseting innermost
12299         block.
12300
12301 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12302
12303         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
12304         * ada-lang.c (resolve_subexp): Likewise.
12305         * breakpoint.c (set_breakpoint_condition) Likewise.
12306         (watch_command_1) Likewise.
12307         * c-exp.y (variable): Likewise.
12308         * d-exp.y (PrimaryExpression): Likewise.
12309         * f-exp.y (variable): Likewise.
12310         * go-exp.y (variable): Likewise.
12311         * m2-exp.y (variable): Likewise.
12312         * objfiles.c (objfile::~objfile): Likewise.
12313         * p-exp.y (variable): Likewise.
12314         * parse.c (innermost_block): Change type.
12315         * parser-defs.h (class innermost_block_tracker): New.
12316         (innermost_block): Change to innermost_block_tracker.
12317         * printcmd.c (display_command): Switch to innermost_block API.
12318         (do_one_display): Likewise.
12319         * rust-exp.y (do_one_display): Likewise.
12320         * symfile.c (clear_symtab_users): Likewise.
12321         * varobj.c (varobj_create): Switch to innermost_block API, replace
12322         use of innermost_block with block stored on varobj object.
12323
12324 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12325
12326         * expression.h (innermost_block): Remove declaration.
12327         * varobj.c: Add 'parser-defs.h' include.
12328
12329 2018-01-19  Tom Tromey  <tom@tromey.com>
12330
12331         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
12332         symbols in the static and global blocks.
12333
12334 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
12335
12336         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
12337         gdb_ptrace.h, and move including gdb_wait.h ...
12338         * nat/linux-ptrace.h: ... to here.
12339
12340 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
12341
12342         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
12343         inf_ptrace_detach_success.
12344         (inf_ptrace_detach_success): Add inferior parameter, use it
12345         instead of inferior_ptid, pass it to detach_inferior.
12346         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
12347         parameter.
12348         * inferior.c (detach_inferior): Add overload that takes an
12349         inferior object.
12350         * inferior.h (detach_inferior): Likewise.
12351         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
12352         use inferior_ptid, adjust call to inf_ptrace_detach_success.
12353         * linux-thread-db.c (thread_db_detach): Use inf parameter.
12354
12355 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
12356
12357         * target.h (struct target_ops) <to_detach>: Add inferior
12358         parameter.
12359         (target_detach): Likewise.
12360         * target.c (dispose_inferior): Pass inferior down.
12361         (target_detach): Pass inferior down.  Assert that it is equal to
12362         the current inferior.
12363         * aix-thread.c (aix_thread_detach): Pass inferior down.
12364         * corefile.c (core_file_command): Pass current_inferior() down.
12365         * corelow.c (core_detach): Add inferior parameter.
12366         * darwin-nat.c (darwin_detach): Likewise.
12367         * gnu-nat.c (gnu_detach): Likewise.
12368         * inf-ptrace.c (inf_ptrace_detach): Likewise.
12369         * infcmd.c (detach_command): Pass current_inferior() down to
12370         target_detach.
12371         * infrun.c (follow_fork_inferior): Pass parent_inf to
12372         target_detach.
12373         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
12374         target_detach.
12375         * linux-nat.c (linux_nat_detach): Add inferior parameter.
12376         * linux-thread-db.c (thread_db_detach): Likewise.
12377         * nto-procfs.c (procfs_detach): Likewise.
12378         * procfs.c (procfs_detach): Likewise.
12379         * record.c (record_detach): Likewise.
12380         * record.h (struct inferior): Forward-declare.
12381         (record_detach): Add inferior parameter.
12382         * remote-sim.c (gdbsim_detach): Likewise.
12383         * remote.c (remote_detach_1): Likewise.
12384         (remote_detach): Likewise.
12385         (extended_remote_detach): Likewise.
12386         * sol-thread.c (sol_thread_detach): Likewise.
12387         * target-debug.h (target_debug_print_inferior_p): New macro.
12388         * target-delegates.c: Re-generate.
12389         * top.c (kill_or_detach): Pass inferior down to target_detach.
12390         * windows-nat.c (windows_detach): Add inferior parameter.
12391
12392 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
12393
12394         * target.h (struct target_ops) <to_detach>: Remove args
12395         parameter.
12396         (target_detach): Likewise.
12397         * target.c (dispose_inferior): Adjust.
12398         (target_detach): Remove args parameter, adjust.
12399         * aix-thread.c (aix_thread_detach): Adjust.
12400         * corefile.c (core_file_command): Adjust.
12401         * corelow.c (core_detach): Adjust.
12402         * darwin-nat.c (darwin_detach): Adjust.
12403         * gnu-nat.c (gnu_detach): Adjust.
12404         * inf-ptrace.c (inf_ptrace_detach): Adjust.
12405         * infcmd.c (detach_command): Adjust
12406         * infrun.c (follow_fork_inferior): Adjust.
12407         (handle_vfork_child_exec_or_exit): Adjust.
12408         * linux-fork.c (linux_fork_detach): Remove args parameter.
12409         * linux-fork.h (linux_fork_detach): Likewise.
12410         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
12411         * linux-thread-db.c (thread_db_detach): Likewise.
12412         * nto-procfs.c (procfs_detach): Likewise.
12413         * procfs.c (procfs_detach): Likewise.
12414         (do_detach): Remove signo parameter.
12415         * record.c (record_detach): Remove args parameter.
12416         * record.h (record_detach): Likewise.
12417         * remote-sim.c (gdbsim_detach): Likewise.
12418         * remote.c (remote_detach_1): Likewise.
12419         (remote_detach): Likewise.
12420         (extended_remote_detach): Likewise.
12421         * sol-thread.c (sol_thread_detach): Likewise.
12422         * target-delegates.c: Re-generate.
12423         * top.c (struct qt_args) <args>: Remove field.
12424         (kill_or_detach): Don't pass args.
12425         (quit_force): Don't set args.
12426         * windows-nat.c (windows_detach): Remove args parameter.
12427
12428 2018-01-19  Yao Qi  <yao.qi@linaro.org>
12429
12430         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
12431         (arm_linux_init_abi): Install it.
12432
12433 2018-01-19  Yao Qi  <yao.qi@linaro.org>
12434
12435         * osabi.c (gdb_osabi_names): Extend the regexp for
12436         arm-linux-gnueabihf.
12437
12438 2018-01-18  Yao Qi  <yao.qi@linaro.org>
12439
12440         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
12441         m_abbrevs.
12442         (abbrev_table::add_abbrev): Update.
12443         (abbrev_table::lookup_abbrev): Update.
12444
12445 2018-01-18  Yao Qi  <yao.qi@linaro.org>
12446
12447         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
12448
12449 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
12450
12451         * compile/compile.c (compile_to_object): Convert "triplet_rx"
12452         to "std::string".
12453
12454 2018-01-17  Tom Tromey  <tom@tromey.com>
12455
12456         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
12457
12458 2018-01-17  Tom Tromey  <tom@tromey.com>
12459
12460         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
12461         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
12462         (create_array_type_with_stride): Update.
12463         * dwarf2read.c (set_die_type): Update.
12464
12465 2018-01-17  Tom Tromey  <tom@tromey.com>
12466
12467         * dwarf2read.c (delayed_method_info): Remove typedef.
12468         (dwarf2_cu::method_info): Now a std::vector.
12469         (add_to_method_list): Update.
12470         (free_delayed_list): Remove.
12471         (compute_delayed_physnames): Update.
12472         (process_full_comp_unit, process_full_type_unit): Clear the method
12473         list.  Remove cleanups.
12474         (psymtab_include_file_name): Add name_holder parameter.  Use
12475         unique_xmalloc_ptr.
12476         (dwarf_decode_lines): Update.
12477
12478 2018-01-17  Tom Tromey  <tom@tromey.com>
12479             Simon Marchi  <simon.marchi@ericsson.com>
12480
12481         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
12482         (dwarf2_per_objfile::free_cached_comp_units)
12483         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
12484         (init_cutu_and_read_dies_no_follow): Update.
12485         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
12486         (dwarf2_cu::~dwarf2_cu): New.
12487         (free_heap_comp_unit, free_stack_comp_unit): Remove.
12488         (age_cached_comp_units, free_one_cached_comp_unit): Update.
12489
12490 2018-01-17  Tom Tromey  <tom@tromey.com>
12491             Simon Marchi  <simon.marchi@ericsson.com>
12492
12493         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
12494         (struct die_reader_specs) <abbrev_table>: New member.
12495         (struct abbrev_table): Add constructor.
12496         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
12497         <abbrev_obstack>: Now an auto_obstack.
12498         (abbrev_table_up): New typedef.
12499         (init_cu_die_reader): Add abbrev_table parameter.
12500         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
12501         Add result_dwo_abbrev_table.
12502         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
12503         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
12504         Update.
12505         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
12506         parameter.
12507         (skip_children): Update.
12508         (abbrev_table::alloc_abbrev): Rename from
12509         abbrev_table_alloc_abbrev.
12510         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
12511         (abbrev_table::lookup_abbrev): Rename from
12512         abbrev_table_lookup_abbrev.
12513         (abbrev_table_read_table): Return abbrev_table_up.
12514         (abbrev_table_free, abbrev_table_free_cleanup)
12515         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
12516         (load_partial_dies): Update.
12517
12518 2018-01-17  Tom Tromey  <tom@tromey.com>
12519
12520         * dwarf2read.c (dwarf2_compute_name): Update comment.
12521         (read_func_scope, read_variable): Update.
12522         (new_symbol): Remove.
12523         (new_symbol_full): Rename to new_symbol.
12524
12525 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
12526
12527         PR gdb/16577
12528         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
12529         a warning instead of throwing an error, set section size to 0 and return
12530         NULL.
12531         * gdb_bfd.h (gdb_bfd_map_section): Update description.
12532
12533 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
12534
12535         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
12536         std::string.
12537         (linux_ptrace_attach_fail_reason_string): Likewise.
12538         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
12539         Likewise.
12540         (linux_ptrace_attach_fail_reason_string): Likewise.
12541         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
12542
12543 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
12544
12545         * linux-nat.c (linux_nat_attach): Remove xstrdup.
12546
12547 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
12548
12549         PR gdb/21559
12550         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
12551         checking for fs_base/gs_base fields in struct user_regs_struct.
12552         * configure: Regenerate.
12553
12554 2018-01-17  Yao Qi  <yao.qi@linaro.org>
12555
12556         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
12557         function.
12558         (aarch64_linux_init_abi): Install it to gdbarch hook
12559         gcc_target_options.
12560
12561 2018-01-15  Pedro Alves  <palves@redhat.com>
12562
12563         * common/signals-state-save-restore.c
12564         (save_original_signals_state): Fix typos.
12565
12566 2017-01-12  Tom Tromey  <tom@tromey.com>
12567             Sergio Durigan Junior  <sergiodj@redhat.com>
12568
12569         * Makefile.in (install-only): Install gdb-add-index.
12570
12571 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
12572
12573         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
12574
12575 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12576
12577         * infrun.c (keep_going_pass_signal): Clear step-over info when
12578         insert_breakpoints fails.
12579
12580 2018-01-11  Pedro Alves  <palves@redhat.com>
12581
12582         PR gdb/22583
12583         * infrun.c (resume): Rename to ...
12584         (resume_1): ... this.
12585         (resume): Reimplement as wrapper around resume_1.
12586
12587 2018-01-11  Pedro Alves  <palves@redhat.com>
12588
12589         PR remote/22597
12590         * remote.c (remote_parse_stop_reply): Default to the last-set
12591         general thread instead of to 'magic_null_ptid'.
12592
12593 2018-01-10  Pedro Alves  <palves@redhat.com>
12594
12595         * language.h (language_get_symbol_name_matcher): Rename ...
12596         (get_symbol_name_matcher): ... this.
12597         * language.c (language_get_symbol_name_matcher): Ditto.
12598         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
12599         callers adjusted.
12600
12601 2018-01-10  Pedro Alves  <palves@redhat.com>
12602
12603         PR gdb/22670
12604         * dwarf2read.c
12605         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
12606         Adjust to use language_get_symbol_name_matcher instead of
12607         language_defn::la_get_symbol_name_matcher.
12608         * language.c (language_get_symbol_name_matcher): If in Ada mode
12609         and the lookup name is a verbatim match, return Ada's matcher.
12610         * language.h (language_get_symbol_name_matcher): Adjust comment.
12611         (ada_lookup_name_info::verbatim_p):: New method.
12612
12613 2018-01-10  Pedro Alves  <palves@redhat.com>
12614
12615         PR gdb/22670
12616         * ada-lang.c (ada_collect_symbol_completion_matches): If the
12617         minsym's language is language_auto or language_cplus, pass down
12618         language_ada instead.
12619         * symtab.c (compare_symbol_name): Don't frob symbol language here.
12620
12621 2018-01-10  Pedro Alves  <palves@redhat.com>
12622
12623         PR gdb/22670
12624         * minsyms.c (linkage_name_str): New function.
12625         (iterate_over_minimal_symbols): Use it.
12626
12627 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12628
12629         * NEWS: Document that 'info proc' now works on FreeBSD.
12630
12631 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12632
12633         * configure.ac: Check for kinfo_getfile in libutil.
12634         * configure: Regenerate.
12635         * config.in: Regenerate.
12636         * fbsd-nat.c: Include "fbsd-tdep.h".
12637         (fbsd_fetch_cmdline): New.
12638         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
12639         rather than calling error.
12640         (fbsd_info_proc): New.
12641         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
12642         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
12643         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
12644
12645 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12646
12647         * fbsd-nat.c (struct free_deleter): Remove.
12648         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
12649
12650 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12651
12652         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
12653         NULL for an empty pathname.
12654
12655 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12656
12657         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
12658         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
12659         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
12660         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
12661         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
12662         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
12663         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
12664         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
12665         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
12666         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
12667         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
12668         (fbsd_core_fetch_timeval, fbsd_print_sigset)
12669         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
12670         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
12671         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
12672
12673 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
12674
12675         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
12676         (gnu_xfer_auxv): New function.
12677         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
12678         TARGET_OBJECT_AUXV.
12679
12680 2018-01-08  Yao Qi  <yao.qi@linaro.org>
12681             Simon Marchi  <simon.marchi@ericsson.com>
12682
12683         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
12684         common/selftest.c.
12685         (COMMON_OBS): Remove selftest.o.
12686         * configure.ac: Append selftest-arch.c and common/selftest.c to
12687         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
12688         * configure: Re-generated.
12689         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
12690         GDB_SELF_TEST.
12691         (maintenance_info_selftests): Likewise.
12692
12693 2018-01-08  Xavier Roirand  <roirand@adacore.com>
12694
12695         * ada-valprint.c (val_print_packed_array_elements): Use
12696         proper number of elements when printing an array indexed
12697         by an enumeration type.
12698
12699 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12700
12701         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
12702         (dw2_get_file_names_reader): Adjust.
12703         (lookup_dwo_signatured_type): Adjust.
12704         (lookup_dwp_signatured_type): Adjust.
12705         (lookup_signatured_type): Adjust.
12706         (create_type_unit_group): Adjust.
12707         (get_type_unit_group): Adjust.
12708         (process_psymtab_comp_unit_reader): Adjust.
12709         (build_type_psymtabs_reader): Adjust.
12710         (scan_partial_symbols): Adjust.
12711         (add_partial_symbol): Adjust.
12712         (add_partial_subprogram): Adjust.
12713         (peek_die_abbrev): Adjust.
12714         (fixup_go_packaging): Adjust.
12715         (process_imported_unit_die): Adjust.
12716         (dwarf2_compute_name): Adjust.
12717         (dwarf2_physname): Adjust.
12718         (read_import_statement): Adjust.
12719         (handle_DW_AT_stmt_list): Adjust.
12720         (read_file_scope): Adjust.
12721         (read_func_scope): Adjust.
12722         (read_lexical_block_scope): Adjust.
12723         (read_call_site_scope): Adjust.
12724         (read_variable): Adjust.
12725         (dwarf2_rnglists_process): Adjust.
12726         (dwarf2_ranges_process): Adjust.
12727         (dwarf2_ranges_read): Adjust.
12728         (dwarf2_get_pc_bounds): Adjust.
12729         (dwarf2_record_block_ranges): Adjust.
12730         (dwarf2_add_field): Adjust.
12731         (dwarf2_add_member_fn): Adjust.
12732         (read_structure_type): Adjust.
12733         (process_structure_scope): Adjust.
12734         (read_enumeration_type): Adjust.
12735         (read_array_type): Adjust.
12736         (mark_common_block_symbol_computed): Adjust.
12737         (read_common_block): Adjust.
12738         (read_namespace_type): Adjust.
12739         (read_namespace): Adjust.
12740         (read_module_type): Adjust.
12741         (read_tag_pointer_type): Adjust.
12742         (read_tag_ptr_to_member_type): Adjust.
12743         (read_tag_string_type): Adjust.
12744         (read_subroutine_type): Adjust.
12745         (read_typedef): Adjust.
12746         (read_base_type): Adjust.
12747         (attr_to_dynamic_prop): Adjust.
12748         (read_subrange_type): Adjust.
12749         (read_unspecified_type): Adjust.
12750         (dwarf2_read_abbrevs): Adjust.
12751         (load_partial_dies): Adjust.
12752         (read_partial_die): Adjust.
12753         (find_partial_die): Adjust.
12754         (guess_partial_die_structure_name): Adjust.
12755         (fixup_partial_die): Adjust.
12756         (read_attribute_value): Adjust.
12757         (read_addr_index): Adjust.
12758         (read_addr_index_from_leb128): Adjust.
12759         (read_str_index): Adjust.
12760         (dwarf2_string_attr): Adjust.
12761         (get_debug_line_section): Adjust.
12762         (dwarf_decode_line_header): Adjust.
12763         (lnp_state_machine::check_line_address): Adjust.
12764         (dwarf_decode_lines_1): Adjust.
12765         (dwarf_decode_lines): Adjust.
12766         (dwarf2_start_symtab): Adjust.
12767         (var_decode_location): Adjust.
12768         (new_symbol_full): Adjust.
12769         (dwarf2_const_value_data): Adjust.
12770         (dwarf2_const_value_attr): Adjust.
12771         (dwarf2_const_value): Adjust.
12772         (die_type): Adjust.
12773         (die_containing_type): Adjust.
12774         (build_error_marker_type): Adjust.
12775         (lookup_die_type): Adjust.
12776         (guess_full_die_structure_name): Adjust.
12777         (anonymous_struct_prefix): Adjust.
12778         (determine_prefix): Adjust.
12779         (dwarf2_name): Adjust.
12780         (follow_die_ref_or_sig): Adjust.
12781         (follow_die_offset): Adjust.
12782         (follow_die_ref): Adjust.
12783         (follow_die_sig_1): Adjust.
12784         (follow_die_sig): Adjust.
12785         (get_signatured_type): Adjust.
12786         (get_DW_AT_signature_type): Adjust.
12787         (decode_locdesc): Adjust.
12788         (dwarf_decode_macros): Adjust.
12789         (cu_debug_loc_section): Adjust.
12790         (fill_in_loclist_baton): Adjust.
12791         (dwarf2_symbol_mark_computed): Adjust.
12792         (init_one_comp_unit): Don't assign
12793         dwarf2_cu::dwarf2_per_objfile.
12794         (set_die_type): Adjust.
12795
12796 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
12797
12798         * dwarf2read.c (struct mapped_debug_names): Add constructor.
12799         <dwarf2_per_objfile>: New field.
12800         (dwarf2_per_objfile): Remove global.
12801         (get_dwarf2_per_objfile): New function.
12802         (set_dwarf2_per_objfile): New function.
12803         (dwarf2_build_psymtabs_hard): Change objfile parameter to
12804         dwarf2_per_objfile.
12805         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12806         (read_abbrev_offset): Likewise.
12807         (read_indirect_string): Likewise.
12808         (read_indirect_line_string): Likewise.
12809         (read_indirect_string_at_offset): Likewise.
12810         (read_indirect_string_from_dwz): Likewise.
12811         (dwarf2_find_containing_comp_unit): Change objfile parameter to
12812         dwarf2_per_objfile.
12813         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12814         (create_all_comp_units): Change objfile parameter to
12815         dwarf2_per_objfile.
12816         (create_all_type_units): Likewise.
12817         (process_queue): Add dwarf2_per_objfile parameter.
12818         (read_and_check_comp_unit_head): Likewise.
12819         (lookup_dwo_unit_in_dwp): Likewise.
12820         (get_dwp_file): Likewise.
12821         (process_cu_includes): Likewise.
12822         (struct free_dwo_file_cleanup_data): New struct.
12823         (dwarf2_has_info): Use get_dwarf2_per_objfile and
12824         set_dwarf2_per_objfile.
12825         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
12826         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
12827         context, adjust calls.
12828         (dw2_instantiate_symtab): Likewise.
12829         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
12830         (dw2_get_cu): Likewise.
12831         (create_cu_from_index_list): Change objfile parameter to
12832         dwarf2_per_objfile.
12833         (create_cus_from_index_list): Get dwarf2_per_objfile from
12834         context, adjust calls.
12835         (create_cus_from_index): Likewise.
12836         (create_signatured_type_table_from_index): Change objfile
12837         parameter to dwarf2_per_objfile.
12838         (create_signatured_type_table_from_debug_names): Change objfile
12839         parameter to dwarf2_per_objfile.
12840         (create_addrmap_from_index): Likewise.
12841         (create_addrmap_from_aranges): Likewise.
12842         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
12843         (dw2_setup): Remove.
12844         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
12845         context.
12846         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
12847         get_dwarf2_per_objfile.
12848         (dw2_forget_cached_source_info): Likewise.
12849         (dw2_map_symtabs_matching_filename): Likewise.
12850         (struct dw2_symtab_iterator) <index>: Remove.
12851         <dwarf2_per_objfile>: New field.
12852         (dw2_symtab_iter_init): Replace index parameter with
12853         dwarf2_per_objfile.
12854         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
12855         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
12856         (dw2_print_stats): Likewise.
12857         (dw2_dump): Likewise.
12858         (dw2_expand_symtabs_for_function): Likewise.
12859         (dw2_expand_all_symtabs): Likewise.
12860         (dw2_expand_symtabs_with_fullname): Likewise.
12861         (dw2_expand_marked_cus): Replace index and objfile parameters
12862         with dwarf2_per_objfile.
12863         (dw_expand_symtabs_matching_file_matcher): Add
12864         dwarf2_per_objfile parameter and adjust calls.
12865         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
12866         adjust calls.
12867         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
12868         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
12869         adjust calls.
12870         (create_cus_from_debug_names_list): Replace objfile parameter
12871         with dwarf2_per_objfile and adjust calls.
12872         (create_cus_from_debug_names): Likewise.
12873         (dwarf2_read_debug_names): Likewise.
12874         (mapped_debug_names::namei_to_name): Adjust call.
12875         (dw2_debug_names_iterator::next): Likewise.
12876         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
12877         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
12878         (dw2_debug_names_dump): Likewise.
12879         (dw2_debug_names_expand_symtabs_for_function): Likewise.
12880         (dw2_debug_names_expand_symtabs_matching): Likewise.
12881         (dwarf2_initialize_objfile): Likewise.
12882         (dwarf2_build_psymtabs): Likewise.
12883         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
12884         this_cu.
12885         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
12886         (read_and_check_comp_unit_head): Likewise.
12887         (read_abbrev_offset): Likewise.
12888         (create_debug_type_hash_table): Likewise.
12889         (create_debug_types_hash_table): Likewise.
12890         (create_all_type_units): Replace objfile parameter with
12891         dwarf2_per_objfile.
12892         (add_type_unit): Add dwarf2_per_objfile parameter.
12893         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
12894         with dwarf2_per_objfile.
12895         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
12896         (lookup_dwp_signatured_type): Likewise.
12897         (lookup_signatured_type): Likewise.
12898         (read_cutu_die_from_dwo): Likewise.
12899         (init_tu_and_read_dwo_dies): Likewise.
12900         (init_cutu_and_read_dies): Likewise.
12901         (init_cutu_and_read_dies_no_follow): Likewise.
12902         (allocate_type_unit_groups_table): Add objfile parameter.
12903         (create_type_unit_group): Use dwarf2_per_objfile from cu.
12904         (get_type_unit_group): Likewise.
12905         (process_psymtab_comp_unit): Update call.
12906         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
12907         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
12908         (print_tu_stats): Likewise.
12909         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
12910         in void* parameter.
12911         (build_type_psymtabs): Change objfile parameter to
12912         dwarf2_per_objfile.
12913         (process_skeletonless_type_unit): Use dwarf2_per_objfile
12914         passed in void* parameter.
12915         (process_skeletonless_type_units): Change objfile parameter to
12916         dwarf2_per_objfile.
12917         (set_partial_user): Likewise.
12918         (dwarf2_build_psymtabs_hard): Likewise.
12919         (read_comp_units_from_section): Likewise.
12920         (create_all_comp_units): Likewise.
12921         (scan_partial_symbols): Update calls.
12922         (add_partial_symbol): Likewise.
12923         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
12924         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
12925         (process_queue): Add dwarf2_per_objfile parameter.
12926         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
12927         (compute_compunit_symtab_includes): Likewise.
12928         (process_cu_includes): Add dwarf2_per_objfile parameter.
12929         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
12930         (process_full_type_unit): Likewise.
12931         (process_imported_unit_die): Update call.
12932         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
12933         (read_file_scope): Likewise.
12934         (allocate_dwo_file_hash_table): Add objfile parameter.
12935         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
12936         (create_cus_hash_table): Likewise.
12937         (create_dwp_hash_table): Likewise.
12938         (create_dwo_unit_in_dwp_v1): Likewise.
12939         (create_dwp_v2_section): Likewise.
12940         (create_dwo_unit_in_dwp_v2): Likewise.
12941         (lookup_dwo_unit_in_dwp): Likewise.
12942         (try_open_dwop_file): Likewise.
12943         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
12944         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
12945         cleanup to include a reference to dwarf2_per_objfile.
12946         (open_dwp_file): Add dwarf2_per_objfile parameter.
12947         (open_and_init_dwp_file): Likewise.
12948         (get_dwp_file): Likewise.
12949         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
12950         (queue_and_load_all_dwo_tus): Update call.
12951         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
12952         data.
12953         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
12954         (dwarf2_ranges_process): Likewise.
12955         (dwarf2_get_pc_bounds): Likewise.
12956         (mark_common_block_symbol_computed): Likewise.
12957         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12958         (dwarf2_read_abbrevs): Update call.
12959         (read_partial_die): Use dwarf2_per_objfile from cu.
12960         (find_partial_die): Likewise.
12961         (fixup_partial_die): Likewise.
12962         (read_attribute_value): Likewise.
12963         (read_indirect_string_at_offset_from): Add objfile parameter.
12964         (read_indirect_string_at_offset): Add dwarf2_per_objfile
12965         parameter.
12966         (read_indirect_string_from_dwz): Add objfile parameter.
12967         (read_indirect_string): Add objfile parameter.
12968         (read_addr_index_1): Add dwarf2_per_objfile parameter.
12969         (read_addr_index): Use dwarf2_per_objfile from cu.
12970         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
12971         call dw2_setup.
12972         (read_str_index): Use dwarf2_per_objfile from cu.
12973         (get_debug_line_section): Likewise.
12974         (read_formatted_entries): Add dwarf2_per_objfile parameter.
12975         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
12976         (new_symbol_full): Use dwarf2_per_objfile from cu.
12977         (build_error_marker_type): Likewise.
12978         (lookup_die_type): Likewise.
12979         (determine_prefix): Likewise.
12980         (follow_die_offset): Likewise.
12981         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
12982         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
12983         (dwarf2_fetch_die_type_sect_off): Likewise.
12984         (dwarf2_get_die_type): Likewise.
12985         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
12986         (get_signatured_type): Likewise.
12987         (get_DW_AT_signature_type): Likewise.
12988         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
12989         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
12990         (cu_debug_loc_section): Likewise.
12991         (fill_in_loclist_baton): Likewise.
12992         (dwarf2_symbol_mark_computed): Likewise.
12993         (dwarf2_find_containing_comp_unit): Change objfile parameter to
12994         dwarf2_per_objfile.
12995         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
12996         parameter.
12997         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12998         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
12999         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
13000         (set_die_type): Use dwarf2_free_objfile from cu.
13001         (get_die_type_at_offset): Likewise.
13002         (dwarf2_per_objfile_free): Don't assign global variable.
13003         (debug_names) <constructor>: Add dwarf2_per_objfile
13004         parameter, update m_debugstrlookup construction.
13005         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
13006         parameter.
13007         <m_dwarf2_per_objfile>: New field.
13008         <lookup>: Use m_dwarf2_per_objfile.
13009         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
13010         (psyms_seen_size): Likewise.
13011         (write_gdbindex): Replace objfile parameter with
13012         dwarf2_per_objfile.
13013         (write_debug_names): Likewise.
13014         (write_psymtabs_to_index): Likewise.
13015         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
13016         calls.
13017
13018 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
13019
13020         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
13021         <dwarf2_per_objfile>: New field.
13022         (struct dwarf2_per_cu_data) <objfile>: Remove.
13023         <dwarf2_per_objfile>: New field.
13024         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
13025         of objfile.
13026         (create_signatured_type_table_from_index): Likewise.
13027         (create_debug_type_hash_table): Likewise.
13028         (fill_in_sig_entry_from_dwo_entry): Likewise.
13029         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
13030         (create_type_unit_group): Assign dwarf2_per_objfile instead of
13031         objfile.
13032         (create_partial_symtab): Access objfile through
13033         dwarf2_per_objfile.
13034         (process_psymtab_comp_unit_reader): Likewise.
13035         (read_comp_units_from_section): Likewise.
13036         (scan_partial_symbols): Likewise.
13037         (add_partial_symbol): Likewise.
13038         (add_partial_subprogram): Likewise.
13039         (peek_die_abbrev): Likewise.
13040         (fixup_go_packaging): Likewise.
13041         (process_full_comp_unit): Likewise.
13042         (process_full_type_unit): Likewise.
13043         (process_imported_unit_die): Likewise.
13044         (dwarf2_compute_name): Likewise.
13045         (dwarf2_physname): Likewise.
13046         (read_import_statement): Likewise.
13047         (create_cus_hash_table): Assign dwarf2_physname instead of
13048         objfile.
13049         (read_func_scope): Access objfile through dwarf2_per_objfile.
13050         (read_lexical_block_scope): Likewise.
13051         (read_call_site_scope): Likewise.
13052         (read_variable): Likewise.
13053         (dwarf2_rnglists_process): Likewise.
13054         (dwarf2_ranges_process): Likewise.
13055         (dwarf2_ranges_read): Likewise.
13056         (dwarf2_record_block_ranges): Likewise.
13057         (dwarf2_add_field): Likewise.
13058         (dwarf2_add_member_fn): Likewise.
13059         (read_structure_type): Likewise.
13060         (process_structure_scope): Likewise.
13061         (read_enumeration_type): Likewise.
13062         (read_array_type): Likewise.
13063         (read_common_block): Likewise.
13064         (read_namespace_type): Likewise.
13065         (read_namespace): Likewise.
13066         (read_module_type): Likewise.
13067         (read_tag_pointer_type): Likewise.
13068         (read_tag_ptr_to_member_type): Likewise.
13069         (read_tag_string_type): Likewise.
13070         (read_subroutine_type): Likewise.
13071         (read_typedef): Likewise.
13072         (read_base_type): Likewise.
13073         (attr_to_dynamic_prop): Likewise.
13074         (read_subrange_type): Likewise.
13075         (read_unspecified_type): Likewise.
13076         (load_partial_dies): Likewise.
13077         (read_partial_die): Likewise.
13078         (find_partial_die): Likewise.
13079         (guess_partial_die_structure_name): Likewise.
13080         (fixup_partial_die): Likewise.
13081         (read_attribute_value): Likewise.
13082         (read_addr_index_from_leb128): Likewise.
13083         (dwarf2_read_addr_index): Likewise.
13084         (dwarf2_string_attr): Likewise.
13085         (lnp_state_machine::check_line_address): Likewise.
13086         (dwarf_decode_lines_1): Likewise.
13087         (dwarf_decode_lines): Likewise.
13088         (dwarf2_start_symtab): Likewise.
13089         (var_decode_location): Likewise.
13090         (new_symbol_full): Likewise.
13091         (dwarf2_const_value_data): Likewise.
13092         (dwarf2_const_value_attr): Likewise.
13093         (dwarf2_const_value): Likewise.
13094         (die_type): Likewise.
13095         (die_containing_type): Likewise.
13096         (lookup_die_type): Likewise.
13097         (guess_full_die_structure_name): Likewise.
13098         (anonymous_struct_prefix): Likewise.
13099         (dwarf2_name): Likewise.
13100         (follow_die_ref_or_sig): Likewise.
13101         (follow_die_offset): Likewise.
13102         (follow_die_ref): Likewise.
13103         (dwarf2_fetch_die_loc_sect_off): Likewise.
13104         (dwarf2_fetch_constant_bytes): Likewise.
13105         (dwarf2_fetch_die_type_sect_off): Likewise.
13106         (dwarf2_get_die_type): Likewise.
13107         (follow_die_sig): Likewise.
13108         (decode_locdesc): Likewise.
13109         (dwarf2_per_cu_objfile): Likewise.
13110         (dwarf2_per_cu_text_offset): Likewise.
13111         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
13112         objfile.
13113         (set_die_type): Access objfile through
13114         dwarf2_per_objfile.
13115
13116 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
13117
13118         * valprint.c (converted_character_d): Remove typedef.
13119         (DEF_VEC_O (converted_character_d)): Remove.
13120         (count_next_character): Use std::vector.
13121         (print_converted_chars_to_obstack): Likewise.
13122         (generic_printstr): Likewise.
13123
13124 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
13125
13126         * xml-support.h (struct gdb_xml_value): Add constructor.
13127         <value>: Change type to unique_xmalloc_ptr.
13128         (gdb_xml_value_s): Remove typedef.
13129         (DEF_VEC_O (gdb_xml_value_s)): Remove.
13130         (gdb_xml_element_start_handler): Change parameter type to
13131         std::vector.
13132         (xml_find_attribute): Likewise.
13133         * xml-support.c (xml_find_attribute): Change parameter type to
13134         std::vector and adjust.
13135         (gdb_xml_values_cleanup): Remove.
13136         (gdb_xml_parser::start_element): Adjust to std::vector.
13137         (xinclude_start_include): Change paraeter type to std::vector
13138         and adjust.
13139         * btrace.c (check_xml_btrace_version): Likewise.
13140         (parse_xml_btrace_block): Likewise.
13141         (parse_xml_btrace_pt_config_cpu): Likewise.
13142         (parse_xml_btrace_pt): Likewise.
13143         (parse_xml_btrace_conf_bts): Likewise.
13144         (parse_xml_btrace_conf_pt): Likewise.
13145         * memory-map.c (memory_map_start_memory): Likewise.
13146         (memory_map_start_property): Likewise.
13147         * osdata.c (osdata_start_osdata): Likewise.
13148         (osdata_start_item): Likewise.
13149         (osdata_start_column): Likewise.
13150         * remote.c (start_thread): Likewise.
13151         * solib-aix.c (library_list_start_library): Likewise.
13152         (library_list_start_list): Likewise.
13153         * solib-svr4.c (library_list_start_library): Likewise.
13154         (svr4_library_list_start_list): Likewise.
13155         * solib-target.c (library_list_start_segment): Likewise.
13156         (library_list_start_section): Likewise.
13157         (library_list_start_library): Likewise.
13158         (library_list_start_list): Likewise.
13159         * tracepoint.c (traceframe_info_start_memory): Likewise.
13160         (traceframe_info_start_tvar): Likewise.
13161         * xml-syscall.c (syscall_start_syscall): Likewise.
13162         * xml-tdesc.c (tdesc_start_target): Likewise.
13163         (tdesc_start_feature): Likewise.
13164         (tdesc_start_reg): Likewise.
13165         (tdesc_start_union): Likewise.
13166         (tdesc_start_struct): Likewise.
13167         (tdesc_start_flags): Likewise.
13168         (tdesc_start_enum): Likewise.
13169         (tdesc_start_field): Likewise.
13170         (tdesc_start_enum_value): Likewise.
13171         (tdesc_start_vector): Likewise.
13172
13173 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
13174
13175         * extension.h (struct xmethod_worker) <clone>: Remove.
13176         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
13177         Remove.
13178         (python_xmethod_worker::clone): Remove.
13179         * valops.c (find_overload_match): Use std::move instead of
13180         clone.
13181
13182 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
13183
13184         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
13185         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
13186         <free_xmethod_worker_data>: Remove.
13187         <get_matching_xmethod_workers>: Chance VEC to std::vector.
13188         <get_xmethod_arg_types>: Remove.
13189         <get_xmethod_result_type>: Remove.
13190         <invoke_xmethod>: Remove.
13191         * extension.c (new_xmethod_worker): Remove.
13192         (clone_xmethod_worker): Remove.
13193         (get_matching_xmethod_workers): Return void, pass std::vector by
13194         pointer.
13195         (get_xmethod_arg_types): Rename to...
13196         (xmethod_worker::get_arg_types): ... this, and adjust.
13197         (get_xmethod_result_type): Rename to...
13198         (xmethod_worker::get_result_type): ... this, and adjust.
13199         (invoke_xmethod): Remove.
13200         (free_xmethod_worker): Remove.
13201         (free_xmethod_worker_vec): Remove.
13202         * extension.h (enum ext_lang_rc): Move here from
13203         extension-priv.h.
13204         (struct xmethod_worker): Add constructor and destructor.
13205         <data>: Remove.
13206         <value>: Remove.
13207         <invoke, clone, do_get_result_type, do_get_arg_types>: New
13208         virtual pure methods.
13209         <get_arg_types, get_result_type>: New methods.
13210         (xmethod_worker_ptr): Remove typedef.
13211         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
13212         (xmethod_worker_vec): Remove typedef.
13213         (xmethod_worker_up): New typedef.
13214         (invoke_xmethod): Remove.
13215         (clone_xmethod_worker): Remove.
13216         (free_xmethod_worker): Remove.
13217         (free_xmethod_worker_vec): Remove.
13218         (get_xmethod_arg_types): Remove.
13219         (get_xmethod_result_type): Remove.
13220         * valops.c (find_method_list): Use std::vector, don't use
13221         intermediate vector.
13222         (value_find_oload_method_list): Use std::vector.
13223         (find_overload_match): Use std::vector.
13224         (find_oload_champ): Use std::vector.
13225         * value.c (value_free): Use operator delete.
13226         (value_of_xmethod): Rename to...
13227         (value_from_xmethod): ... this.  Don't assign
13228         xmethod_worker::value, take rvalue-reference.
13229         (result_type_of_xmethod): Adjust.
13230         (call_xmethod): Adjust.
13231         * value.h: Include extension.h.
13232         (struct xmethod_worker): Don't forward-declare.
13233         (value_of_xmethod): Rename to...
13234         (value_from_xmethod): ... this, take rvalue-reference.
13235         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
13236         (struct python_xmethod_worker): ... this, add constructor and
13237         destructor.
13238         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
13239         (gdbpy_free_xmethod_worker_data): Rename to...
13240         (python_xmethod_worker::~python_xmethod_worker): ... this and
13241         adjust.
13242         (gdbpy_clone_xmethod_worker_data): Rename to...
13243         (python_xmethod_worker::clone): ... this and adjust.
13244         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
13245         temporary vector.
13246         (gdbpy_get_xmethod_arg_types): Rename to...
13247         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
13248         (gdbpy_get_xmethod_result_type): Rename to...
13249         (python_xmethod_worker::do_get_result_type): ... this and
13250         adjust.
13251         (gdbpy_invoke_xmethod): Rename to...
13252         (python_xmethod_worker::invoke): ... this and adjust.
13253         (new_python_xmethod_worker): Rename to...
13254         (python_xmethod_worker::python_xmethod_worker): ... this and
13255         adjust.
13256         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
13257         Remove.
13258         (gdbpy_free_xmethod_worker_data): Remove.
13259         (gdbpy_get_matching_xmethod_workers): Use std::vector.
13260         (gdbpy_get_xmethod_arg_types): Remove.
13261         (gdbpy_get_xmethod_result_type): Remove.
13262         (gdbpy_invoke_xmethod): Remove.
13263         * python/python.c (python_extension_ops): Remove obsolete
13264         callbacks.
13265
13266 2018-01-05  Pedro Alves  <palves@redhat.com>
13267
13268         PR gdb/18653
13269         * common/signals-state-save-restore.c
13270         (save_original_signals_state): New parameter 'quiet'.  Warn if we
13271         find a custom handler preinstalled, instead of internal erroring.
13272         But only warn if !quiet.
13273         * common/signals-state-save-restore.h
13274         (save_original_signals_state): New parameter 'quiet'.
13275         * main.c (captured_main_1): Move save_original_signals_state call
13276         after option handling, and pass QUIET.
13277
13278 2018-01-05  Pedro Alves  <palves@redhat.com>
13279
13280         * spu-tdep.c (spu_catch_start): Pass
13281         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
13282
13283 2018-01-05  Pedro Alves  <palves@redhat.com>
13284
13285         PR gdb/22670
13286         * ada-lang.c (literal_symbol_name_matcher): New function.
13287         (ada_get_symbol_name_matcher): Use it for
13288         symbol_name_match_type::SEARCH_NAME.
13289         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
13290         it down instead of assuming symbol_name_match_type::FULL.
13291         * block.h (block_lookup_symbol): New parameter 'match_type'.
13292         * c-valprint.c (print_unpacked_pointer): Use
13293         lookup_symbol_search_name instead of lookup_symbol.
13294         * compile/compile-object-load.c (get_out_value_type): Pass down
13295         symbol_name_match_type::SEARCH_NAME.
13296         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
13297         symbol_name_match_type::FULL.
13298         * cp-support.c (cp_get_symbol_name_matcher): Handle
13299         symbol_name_match_type::SEARCH_NAME.
13300         * infrun.c (insert_exception_resume_breakpoint): Use
13301         lookup_symbol_search_name.
13302         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
13303         * psymtab.c (maintenance_check_psymtabs): Use
13304         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
13305         * stack.c (print_frame_args): Use lookup_symbol_search_name and
13306         SYMBOL_SEARCH_NAME.
13307         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
13308         if symbol_name_match_type::SEARCH_NAME.
13309         (lookup_symbol_in_language): Pass down
13310         symbol_name_match_type::FULL.
13311         (lookup_symbol_search_name): New.
13312         (lookup_language_this): Pass down
13313         symbol_name_match_type::SEARCH_NAME.
13314         (lookup_symbol_aux, lookup_local_symbol): New parameter
13315         'match_type'.  Pass it down.
13316         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
13317         (lookup_symbol_search_name): New declaration.
13318         (lookup_symbol_in_block): New 'match_type' parameter.
13319
13320 2018-01-05  Pedro Alves  <palves@redhat.com>
13321
13322         PR gdb/22670
13323         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
13324         ada_lookup_symbol.
13325         (ada_lookup_symbol): Reimplement in terms of
13326         ada_lookup_symbol_list, bits factored out from
13327         ada_lookup_encoded_symbol.
13328
13329 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
13330
13331         * ada-exp.y (write_object_renaming): When subscripting an array
13332         using a symbol as the index, pass the block in call to
13333         ada_lookup_encoded_symbol when looking that symbol up.
13334
13335 2018-01-05  Jerome Guitton  <guitton@adacore.com>
13336
13337         * ada-lang.c (ada_array_length): Use ada_index_type instead of
13338         TYPE_INDEX_TYPE.
13339
13340 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
13341
13342         * ada-lang.c (ada_to_fixed_value_create): Add handling of
13343         the case where VALUE_LVAL (val0) is not lval_memory.
13344
13345 2018-01-05  Xavier Roirand  <roirand@adacore.com>
13346
13347         * ada-valprint.c (print_optional_low_bound): Handle
13348         character-indexed array printing like boolean-indexed array
13349         printing.
13350
13351 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
13352
13353         * NEWS: Create a new section for the next release branch.
13354         Rename the section of the current branch, now that it has
13355         been cut.
13356
13357 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
13358
13359         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
13360         * version.in: Bump version to 8.1.50.DATE-git.
13361
13362 2018-01-03  Xavier Roirand  <roirand@adacore.com>
13363
13364         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
13365         Add field.
13366         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
13367         Add field.
13368         (default_exception_support_info) <catch_handlers_sym>: Add field.
13369         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
13370         (ada_exception_name_addr_1): Add "catch handlers" handling.
13371         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
13372         Update all callers.
13373         (create_excep_cond_exprs) <ex>: Add parameter.
13374         (re_set_exception): Update create_excep_cond_exprs call.
13375         (print_it_exception, print_one_exception, print_mention_exception)
13376         (print_recreate_exception): Add "catch handler" handling.
13377         (allocate_location_catch_handlers, re_set_catch_handlers)
13378         (check_status_catch_handlers, print_it_catch_handlers)
13379         (print_one_catch_handlers, print_mention_catch_handlers)
13380         (print_recreate_catch_handlers): New function.
13381         (catch_handlers_breakpoint_ops): New variable.
13382         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
13383         Add parameter.  Add "catch handler" handling.
13384         (ada_exception_sym_name, ada_exception_breakpoint_ops):
13385         Add "catch handler" handling.
13386         (ada_exception_catchpoint_cond_string): Add "catch handler"
13387         handling.
13388         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
13389         call.
13390         (catch_ada_handlers_command): New function.
13391         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
13392         operations structure.
13393         (_initialize_ada_language): Add "catch handlers" command entry.
13394         * NEWS: Document "catch handlers" feature.
13395
13396 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
13397
13398         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
13399         account when creating the array type of the slice.
13400         (ada_value_slice): Likewise.
13401
13402 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
13403
13404         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
13405         New enum value.
13406         (create_array_type_with_stride): Add byte_stride_prop parameter.
13407         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
13408         New parameter.  Update all callers in this file.
13409         (array_type_has_dynamic_stride): New function.
13410         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
13411         of arrays with dynamic byte strides.
13412         * dwarf2read.c (read_array_type): Add support for dynamic
13413         DW_AT_byte_stride attributes.
13414
13415 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
13416
13417         * dwarf2read.c (read_unspecified_type): Treat
13418         DW_TAG_enumeration_type DIEs from Ada units as stubs.
13419
13420 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
13421
13422         Update copyright year range in all GDB files.
13423
13424 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
13425
13426         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
13427         and gdb/testsuite/gdb.base/step-line.c.
13428
13429 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
13430
13431         * copyright.py (main): Dump the contents of
13432         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
13433         even if BY_HAND is empty.
13434
13435 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
13436
13437         * top.c (print_gdb_version): Update Copyright year in version
13438         message.
13439
13440 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
13441
13442         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
13443
13444 For older changes see ChangeLog-2017.
13445 \f
13446 Local Variables:
13447 mode: change-log
13448 left-margin: 8
13449 fill-column: 74
13450 version-control: never
13451 coding: utf-8
13452 End: