Make infpy_thread_from_thread_handle static
[external/binutils.git] / gdb / ChangeLog
1 2018-09-13  Tom Tromey  <tom@tromey.com>
2
3         * python/py-inferior.c (infpy_thread_from_thread_handle): Now
4         static.
5
6 2018-09-13  Tom Tromey  <tom@tromey.com>
7
8         * exec.c (try_open_exec_file): Use std::string.
9
10 2018-09-13  Tom Tromey  <tom@tromey.com>
11
12         * utils.h (gdb_bfd_errmsg): Return std::string.
13         * exec.c (exec_file_attach): Update.
14         * compile/compile-object-load.c (compile_object_load): Update.
15         * utils.c (gdb_bfd_errmsg): Return std::string.
16
17 2018-09-13  Tom Tromey  <tom@tromey.com>
18
19         * procfs.c (struct procinfo_deleter): New.
20         (procinfo_up): New typedef.
21         (do_destroy_procinfo_cleanup): Remove.
22         (procfs_target::info_proc): Use procinfo_up.  Remove cleanups.
23
24 2018-09-13  Tom Tromey  <tom@tromey.com>
25
26         * source.c (add_path): Use gdb::unique_xmalloc_ptr.
27
28 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
29 2018-09-13  Tom Tromey  <tom@tromey.com>
30
31         * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
32         (pspy_get_objfiles): New function.
33         (progspace_object_methods): New.
34         (pspace_object_type): Add tp_methods callback.
35         * python/python-internal.h (build_objfiles_list): New
36         declaration.
37         * python/python.c (build_objfiles_list): New function.
38         (gdbpy_objfiles): Implement using build_objfiles_list.
39         * NEWS: Mention the Progspace.objfiles method.
40
41 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
42
43         * python/py-inferior.c (infpy_get_progspace): New function.
44         (inferior_object_getset): Add progspace property.
45         * NEWS: Mention the new property.
46
47 2018-09-13  Tom Tromey  <tom@tromey.com>
48
49         PR rust/23650:
50         * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
51
52 2018-09-13  Tom Tromey  <tom@tromey.com>
53
54         PR rust/23626:
55         * rust-lang.c (rust_enum_variant): Now static.
56         (rust_empty_enum_p): New function.
57         (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
58         Handle empty enum.
59
60 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
61
62         * python/py-inferior.c (infpy_repr): New.
63         (inferior_object_type): Register infpy_repr.
64         * python/py-objfile.c (objfpy_repr): New.
65         (objfile_object_type): Register objfpy_repr.
66
67 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
68
69         * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
70
71 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
72
73         * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
74         typo.
75
76 2018-09-12  Sergio Durigan Junior  <sergiodj@redhat.com>
77
78         * common/common-utils.c: Don't include '<sys/stat.h>'.
79         (is_regular_file): Move to...
80         * common/filestuff.c (is_regular_file): ... here.
81         * common/common-utils.h (is_regular_file): Move to...
82         * common/filestuff.h (is_regular_file): ... here.
83
84 2018-09-12  Simon Marchi  <simon.marchi@ericsson.com>
85
86         * skip.c (debug_skip): New variable.
87         (skiplist_entry::do_skip_file_p): Add debug output.
88         (skiplist_entry::do_skip_gfile_p): Likewise.
89         (skiplist_entry::skip_function_p): Likewise.
90         (_initialize_step_skip): Create debug command.
91         * NEWS: Mention set/show debug skip.
92
93 2018-09-11  Xavier Roirand  <roirand@adacore.com>
94
95         * darwin-nat.c (should_disable_startup_with_shell):
96         New function.
97         (darwin_nat_target::create_inferior): Add call.
98
99 2018-09-11  Xavier Roirand  <roirand@adacore.com>
100
101         * darwin-nat.h (struct darwin_thread_info) <gdb_port,
102         inf_port, msg_state>: Initialize.
103         (struct darwin_thread_info) <signaled, single_step>: Change
104         type and initialize.
105         (struct darwin_thread_info) <event>: Initialize.
106
107 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
108
109         PR gdb/23555
110         PR gdb/23558
111         * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
112         guesses.
113
114 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
115
116         Revert:
117         2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
118
119         PR gdb/23555
120         PR gdb/23558
121         * gnulib/aclocal.m4: Regenerate.
122         * gnulib/config.in: Regenerate.
123         * gnulib/configure: Regenerate.
124         * gnulib/import/Makefile.am: Update.
125         * gnulib/import/Makefile.in: Update.
126         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
127         * gnulib/import/_Noreturn.h: ... this.
128         * gnulib/import/alloca.in.h: Update.
129         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
130         * gnulib/import/arg-nonnull.h: ... this.
131         * gnulib/import/assure.h: Update.
132         * gnulib/import/at-func.c: Update.
133         * gnulib/import/basename-lgpl.c: Update.
134         * gnulib/import/extra/snippet/c++defs.h: Rename to...
135         * gnulib/import/c++defs.h: ... this.
136         * gnulib/import/canonicalize-lgpl.c: Update.
137         * gnulib/import/cdefs.h: Update.
138         * gnulib/import/chdir-long.c: Update.
139         * gnulib/import/chdir-long.h: Update.
140         * gnulib/import/cloexec.c: Update.
141         * gnulib/import/cloexec.h: Update.
142         * gnulib/import/close.c: Update.
143         * gnulib/import/closedir.c: Update.
144         * gnulib/import/config.charset: Update.
145         * gnulib/import/dirent-private.h: Update.
146         * gnulib/import/dirent.in.h: Update.
147         * gnulib/import/dirfd.c: Update.
148         * gnulib/import/dirname-lgpl.c: Update.
149         * gnulib/import/dirname.h: Update.
150         * gnulib/import/dosname.h: Update.
151         * gnulib/import/dup-safer-flag.c: Update.
152         * gnulib/import/dup-safer.c: Update.
153         * gnulib/import/dup.c: Update.
154         * gnulib/import/dup2.c: Update.
155         * gnulib/import/errno.in.h: Update.
156         * gnulib/import/error.c: Update.
157         * gnulib/import/error.h: Update.
158         * gnulib/import/exitfail.c: Update.
159         * gnulib/import/exitfail.h: Update.
160         * gnulib/import/extra/update-copyright: Update.
161         * gnulib/import/fchdir.c: Update.
162         * gnulib/import/fcntl.c: Update.
163         * gnulib/import/fcntl.in.h: Update.
164         * gnulib/import/fd-hook.c: Update.
165         * gnulib/import/fd-hook.h: Update.
166         * gnulib/import/fd-safer-flag.c: Update.
167         * gnulib/import/fd-safer.c: Update.
168         * gnulib/import/fdopendir.c: Update.
169         * gnulib/import/filename.h: Update.
170         * gnulib/import/filenamecat-lgpl.c: Update.
171         * gnulib/import/filenamecat.h: Update.
172         * gnulib/import/flexmember.h: Update.
173         * gnulib/import/float+.h: Update.
174         * gnulib/import/float.c: Update.
175         * gnulib/import/float.in.h: Update.
176         * gnulib/import/fnmatch.c: Update.
177         * gnulib/import/fnmatch.in.h: Update.
178         * gnulib/import/fnmatch_loop.c: Update.
179         * gnulib/import/fpucw.h: Update.
180         * gnulib/import/frexp.c: Update.
181         * gnulib/import/frexpl.c: Update.
182         * gnulib/import/fstat.c: Update.
183         * gnulib/import/fstatat.c: Update.
184         * gnulib/import/getcwd-lgpl.c: Update.
185         * gnulib/import/getcwd.c: Update.
186         * gnulib/import/getdtablesize.c: Update.
187         * gnulib/import/getlogin_r.c: Update.
188         * gnulib/import/getprogname.c: Update.
189         * gnulib/import/getprogname.h: Update.
190         * gnulib/import/gettext.h: Update.
191         * gnulib/import/gettimeofday.c: Update.
192         * gnulib/import/glob-libc.h: Update.
193         * gnulib/import/glob.c: Update.
194         * gnulib/import/glob.in.h: Update.
195         * gnulib/import/glob_internal.h: Update.
196         * gnulib/import/glob_pattern_p.c: Update.
197         * gnulib/import/globfree.c: Update.
198         * gnulib/import/hard-locale.c: Update.
199         * gnulib/import/hard-locale.h: Update.
200         * gnulib/import/intprops.h: Update.
201         * gnulib/import/inttypes.in.h: Update.
202         * gnulib/import/isnan.c: Update.
203         * gnulib/import/isnand-nolibm.h: Update.
204         * gnulib/import/isnand.c: Update.
205         * gnulib/import/isnanl-nolibm.h: Update.
206         * gnulib/import/isnanl.c: Update.
207         * gnulib/import/itold.c: Update.
208         * gnulib/import/libc-config.h: Update.
209         * gnulib/import/limits.in.h: Update.
210         * gnulib/import/localcharset.c: Update.
211         * gnulib/import/localcharset.h: Update.
212         * gnulib/import/localtime-buffer.c: Update.
213         * gnulib/import/localtime-buffer.h: Update.
214         * gnulib/import/lstat.c: Update.
215         * gnulib/import/m4/00gnulib.m4: Update.
216         * gnulib/import/m4/__inline.m4: Update.
217         * gnulib/import/m4/absolute-header.m4: Update.
218         * gnulib/import/m4/alloca.m4: Update.
219         * gnulib/import/m4/builtin-expect.m4: Update.
220         * gnulib/import/m4/canonicalize.m4: Update.
221         * gnulib/import/m4/chdir-long.m4: Update.
222         * gnulib/import/m4/close.m4: Update.
223         * gnulib/import/m4/closedir.m4: Update.
224         * gnulib/import/m4/configmake.m4: Update.
225         * gnulib/import/m4/d-ino.m4: Update.
226         * gnulib/import/m4/d-type.m4: Update.
227         * gnulib/import/m4/dirent_h.m4: Update.
228         * gnulib/import/m4/dirfd.m4: Update.
229         * gnulib/import/m4/dirname.m4: Update.
230         * gnulib/import/m4/double-slash-root.m4: Update.
231         * gnulib/import/m4/dup.m4: Update.
232         * gnulib/import/m4/dup2.m4: Update.
233         * gnulib/import/m4/eealloc.m4: Update.
234         * gnulib/import/m4/environ.m4: Update.
235         * gnulib/import/m4/errno_h.m4: Update.
236         * gnulib/import/m4/error.m4: Update.
237         * gnulib/import/m4/exponentd.m4: Update.
238         * gnulib/import/m4/exponentl.m4: Update.
239         * gnulib/import/m4/extensions.m4: Update.
240         * gnulib/import/m4/extern-inline.m4: Update.
241         * gnulib/import/m4/fchdir.m4: Update.
242         * gnulib/import/m4/fcntl-o.m4: Update.
243         * gnulib/import/m4/fcntl.m4: Update.
244         * gnulib/import/m4/fcntl_h.m4: Update.
245         * gnulib/import/m4/fdopendir.m4: Update.
246         * gnulib/import/m4/filenamecat.m4: Update.
247         * gnulib/import/m4/flexmember.m4: Update.
248         * gnulib/import/m4/float_h.m4: Update.
249         * gnulib/import/m4/fnmatch.m4: Update.
250         * gnulib/import/m4/fnmatch_h.m4: Update.
251         * gnulib/import/m4/fpieee.m4: Update.
252         * gnulib/import/m4/frexp.m4: Update.
253         * gnulib/import/m4/frexpl.m4: Update.
254         * gnulib/import/m4/fstat.m4: Update.
255         * gnulib/import/m4/fstatat.m4: Update.
256         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
257         * gnulib/import/m4/getcwd-path-max.m4: Update.
258         * gnulib/import/m4/getcwd.m4: Update.
259         * gnulib/import/m4/getdtablesize.m4: Update.
260         * gnulib/import/m4/getlogin.m4: Update.
261         * gnulib/import/m4/getlogin_r.m4: Update.
262         * gnulib/import/m4/getpagesize.m4: Update.
263         * gnulib/import/m4/getprogname.m4: Update.
264         * gnulib/import/m4/gettimeofday.m4: Update.
265         * gnulib/import/m4/glibc21.m4: Update.
266         * gnulib/import/m4/glob.m4: Update.
267         * gnulib/import/m4/glob_h.m4: Update.
268         * gnulib/import/m4/gnulib-cache.m4: Update.
269         * gnulib/import/m4/gnulib-common.m4: Update.
270         * gnulib/import/m4/gnulib-comp.m4: Update.
271         * gnulib/import/m4/gnulib-tool.m4: Update.
272         * gnulib/import/m4/hard-locale.m4: Update.
273         * gnulib/import/m4/include_next.m4: Update.
274         * gnulib/import/m4/inttypes-pri.m4: Update.
275         * gnulib/import/m4/inttypes.m4: Update.
276         * gnulib/import/m4/isnand.m4: Update.
277         * gnulib/import/m4/isnanl.m4: Update.
278         * gnulib/import/m4/largefile.m4: Update.
279         * gnulib/import/m4/limits-h.m4: Update.
280         * gnulib/import/m4/localcharset.m4: Update.
281         * gnulib/import/m4/locale-fr.m4: Update.
282         * gnulib/import/m4/locale-ja.m4: Update.
283         * gnulib/import/m4/locale-zh.m4: Update.
284         * gnulib/import/m4/localtime-buffer.m4: Update.
285         * gnulib/import/m4/longlong.m4: Update.
286         * gnulib/import/m4/lstat.m4: Update.
287         * gnulib/import/m4/malloc.m4: Update.
288         * gnulib/import/m4/malloca.m4: Update.
289         * gnulib/import/m4/math_h.m4: Update.
290         * gnulib/import/m4/mbrtowc.m4: Update.
291         * gnulib/import/m4/mbsinit.m4: Update.
292         * gnulib/import/m4/mbsrtowcs.m4: Update.
293         * gnulib/import/m4/mbstate_t.m4: Update.
294         * gnulib/import/m4/memchr.m4: Update.
295         * gnulib/import/m4/memmem.m4: Update.
296         * gnulib/import/m4/mempcpy.m4: Update.
297         * gnulib/import/m4/memrchr.m4: Update.
298         * gnulib/import/m4/mkdir.m4: Update.
299         * gnulib/import/m4/mkstemp.m4: Update.
300         * gnulib/import/m4/mmap-anon.m4: Update.
301         * gnulib/import/m4/mode_t.m4: Update.
302         * gnulib/import/m4/msvc-inval.m4: Update.
303         * gnulib/import/m4/msvc-nothrow.m4: Update.
304         * gnulib/import/m4/multiarch.m4: Update.
305         * gnulib/import/m4/nocrash.m4: Update.
306         * gnulib/import/m4/off_t.m4: Update.
307         * gnulib/import/m4/onceonly.m4: Update.
308         * gnulib/import/m4/open-cloexec.m4: Update.
309         * gnulib/import/m4/open.m4: Update.
310         * gnulib/import/m4/openat.m4: Update.
311         * gnulib/import/m4/opendir.m4: Update.
312         * gnulib/import/m4/pathmax.m4: Update.
313         * gnulib/import/m4/rawmemchr.m4: Update.
314         * gnulib/import/m4/readdir.m4: Update.
315         * gnulib/import/m4/readlink.m4: Update.
316         * gnulib/import/m4/realloc.m4: Update.
317         * gnulib/import/m4/rename.m4: Update.
318         * gnulib/import/m4/rewinddir.m4: Update.
319         * gnulib/import/m4/rmdir.m4: Update.
320         * gnulib/import/m4/save-cwd.m4: Update.
321         * gnulib/import/m4/secure_getenv.m4: Update.
322         * gnulib/import/m4/setenv.m4: Update.
323         * gnulib/import/m4/signal_h.m4: Update.
324         * gnulib/import/m4/ssize_t.m4: Update.
325         * gnulib/import/m4/stat-time.m4: Update.
326         * gnulib/import/m4/stat.m4: Update.
327         * gnulib/import/m4/std-gnu11.m4: Update.
328         * gnulib/import/m4/stdbool.m4: Update.
329         * gnulib/import/m4/stddef_h.m4: Update.
330         * gnulib/import/m4/stdint.m4: Update.
331         * gnulib/import/m4/stdio_h.m4: Update.
332         * gnulib/import/m4/stdlib_h.m4: Update.
333         * gnulib/import/m4/strchrnul.m4: Update.
334         * gnulib/import/m4/strdup.m4: Update.
335         * gnulib/import/m4/strerror.m4: Update.
336         * gnulib/import/m4/string_h.m4: Update.
337         * gnulib/import/m4/strstr.m4: Update.
338         * gnulib/import/m4/strtok_r.m4: Update.
339         * gnulib/import/m4/sys_socket_h.m4: Update.
340         * gnulib/import/m4/sys_stat_h.m4: Update.
341         * gnulib/import/m4/sys_time_h.m4: Update.
342         * gnulib/import/m4/sys_types_h.m4: Update.
343         * gnulib/import/m4/tempname.m4: Update.
344         * gnulib/import/m4/time_h.m4: Update.
345         * gnulib/import/m4/unistd-safer.m4: Update.
346         * gnulib/import/m4/unistd_h.m4: Update.
347         * gnulib/import/m4/warn-on-use.m4: Update.
348         * gnulib/import/m4/wchar_h.m4: Update.
349         * gnulib/import/m4/wchar_t.m4: Update.
350         * gnulib/import/m4/wctype_h.m4: Update.
351         * gnulib/import/m4/wint_t.m4: Update.
352         * gnulib/import/malloc.c: Update.
353         * gnulib/import/malloc/scratch_buffer.h: Update.
354         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
355         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
356         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
357         * gnulib/import/malloca.c: Update.
358         * gnulib/import/malloca.h: Update.
359         * gnulib/import/malloca.valgrind: Update.
360         * gnulib/import/math.in.h: Update.
361         * gnulib/import/mbrtowc.c: Update.
362         * gnulib/import/mbsinit.c: Update.
363         * gnulib/import/mbsrtowcs-impl.h: Update.
364         * gnulib/import/mbsrtowcs-state.c: Update.
365         * gnulib/import/mbsrtowcs.c: Update.
366         * gnulib/import/memchr.c: Update.
367         * gnulib/import/memmem.c: Update.
368         * gnulib/import/mempcpy.c: Update.
369         * gnulib/import/memrchr.c: Update.
370         * gnulib/import/mkdir.c: Update.
371         * gnulib/import/mkstemp.c: Update.
372         * gnulib/import/msvc-inval.c: Update.
373         * gnulib/import/msvc-inval.h: Update.
374         * gnulib/import/msvc-nothrow.c: Update.
375         * gnulib/import/msvc-nothrow.h: Update.
376         * gnulib/import/open.c: Update.
377         * gnulib/import/openat-die.c: Update.
378         * gnulib/import/openat-priv.h: Update.
379         * gnulib/import/openat-proc.c: Update.
380         * gnulib/import/openat.c: Update.
381         * gnulib/import/openat.h: Update.
382         * gnulib/import/opendir.c: Update.
383         * gnulib/import/pathmax.h: Update.
384         * gnulib/import/pipe-safer.c: Update.
385         * gnulib/import/rawmemchr.c: Update.
386         * gnulib/import/readdir.c: Update.
387         * gnulib/import/readlink.c: Update.
388         * gnulib/import/realloc.c: Update.
389         * gnulib/import/ref-add.sin: Update.
390         * gnulib/import/ref-del.sin: Update.
391         * gnulib/import/rename.c: Update.
392         * gnulib/import/rewinddir.c: Update.
393         * gnulib/import/rmdir.c: Update.
394         * gnulib/import/same-inode.h: Update.
395         * gnulib/import/save-cwd.c: Update.
396         * gnulib/import/save-cwd.h: Update.
397         * gnulib/import/scratch_buffer.h: Update.
398         * gnulib/import/secure_getenv.c: Update.
399         * gnulib/import/setenv.c: Update.
400         * gnulib/import/signal.in.h: Update.
401         * gnulib/import/stat-time.c: Update.
402         * gnulib/import/stat-time.h: Update.
403         * gnulib/import/stat-w32.c: Update.
404         * gnulib/import/stat-w32.h: Update.
405         * gnulib/import/stat.c: Update.
406         * gnulib/import/stdbool.in.h: Update.
407         * gnulib/import/stddef.in.h: Update.
408         * gnulib/import/stdint.in.h: Update.
409         * gnulib/import/stdio.in.h: Update.
410         * gnulib/import/stdlib.in.h: Update.
411         * gnulib/import/str-two-way.h: Update.
412         * gnulib/import/strchrnul.c: Update.
413         * gnulib/import/strdup.c: Update.
414         * gnulib/import/streq.h: Update.
415         * gnulib/import/strerror-override.c: Update.
416         * gnulib/import/strerror-override.h: Update.
417         * gnulib/import/strerror.c: Update.
418         * gnulib/import/string.in.h: Update.
419         * gnulib/import/stripslash.c: Update.
420         * gnulib/import/strnlen1.c: Update.
421         * gnulib/import/strnlen1.h: Update.
422         * gnulib/import/strstr.c: Update.
423         * gnulib/import/strtok_r.c: Update.
424         * gnulib/import/sys_stat.in.h: Update.
425         * gnulib/import/sys_time.in.h: Update.
426         * gnulib/import/sys_types.in.h: Update.
427         * gnulib/import/tempname.c: Update.
428         * gnulib/import/tempname.h: Update.
429         * gnulib/import/time.in.h: Update.
430         * gnulib/import/unistd--.h: Update.
431         * gnulib/import/unistd-safer.h: Update.
432         * gnulib/import/unistd.in.h: Update.
433         * gnulib/import/unsetenv.c: Update.
434         * gnulib/import/verify.h: Update.
435         * gnulib/import/extra/snippet/warn-on-use.h: Update.
436         * gnulib/import/wchar.in.h: Update.
437         * gnulib/import/wctype.in.h: Update.
438         * gnulib/import/xalloc-oversized.h: Update.
439         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
440         "53e2c179f26a890fa6685af4b6c1397ee370433b".
441
442 2018-09-10  Simon Marchi  <simon.marchi@ericsson.com>
443
444         * record-btrace.c (get_thread_current_frame): Remove
445         old_inferior_ptid.
446
447 2018-09-10  Jerome Guitton  <guitton@adacore.com>
448
449         * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
450         with check_tag to 1 if and only if the type is tagged and the
451         component being searched cannot been found in the current
452         view. Otherwise, always call ada_to_fixed_type with
453         check_tag to 0.
454
455 2018-09-10  Xavier Roirand  <roirand@adacore.com>
456
457         * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
458         declaration.
459         * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
460         * ada-varobj.c (ada_varobj_get_number_of_children,
461         ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
462
463 2018-09-10  Xavier Roirand  <roirand@adacore.com>
464
465         * ada-valprint.c (ada_value_print): Use type instead of
466         enclosing type.
467
468 2018-09-10  Xavier Roirand  <roirand@adacore.com>
469
470         * ada-lang.c (ada_value_subscript): Handle case when parameter is
471         an array of access to unconstrained array.
472
473 2018-09-10  Xavier Roirand  <roirand@adacore.com>
474
475         * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
476         (ada_check_typedef): Use it.
477
478 2018-09-10  Xavier Roirand  <roirand@adacore.com>
479
480         * ada-varobj.c (ada_varobj_describe_struct_child)
481         (ada_varobj_describe_child): Handle union case like struct one.
482
483 2018-09-10  Tom Tromey  <tom@tromey.com>
484
485         PR python/18380:
486         * python/python.c (_initialize_python): Make example in "python"
487         help work in Python 3.
488
489 2018-09-10  Eli Zaretskii  <eliz@gnu.org>
490
491         * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
492         INSTALL_PROGRAM to install gdb-add-index.sh.  Don't append
493         $(EXEEXT) to the script, as it is not a program.
494
495 2018-09-09  Simon Marchi  <simon.marchi@ericsson.com>
496
497         * python/py-prettyprint.c (pretty_print_one_value): Return
498         gdbpy_ref<>.
499         (print_string_repr): Adjust.
500         (apply_varobj_pretty_printer): Return gdbpy_ref<>.
501         * python/python-internal.h (apply_varobj_pretty_printer): Return
502         gdbpy_ref<>.
503         * varobj.c (varobj_value_get_print_value): Adjust.
504
505 2018-09-08  Tom Tromey  <tom@tromey.com>
506
507         PR python/16047:
508         * python/py-prettyprint.c (pretty_print_one_value): Check for
509         to_string method.
510
511 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
512
513         * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
514         replace_operator_with_call.
515
516 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
517
518         * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
519
520 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
521
522         * ada-typeprint.c (print_range): Print the bounds using TYPE
523         rather than its TYPE_TARGET_TYPE.
524
525 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
526
527         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
528         call to ada_to_fixed_value_create.
529
530 2018-09-08  Jerome Guitton  <guitton@adacore.com>
531
532         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
533
534 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
535
536         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
537         by calls to error.
538
539 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
540
541         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
542         Move update of loop variable "fi".
543
544 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
545
546         * ada-lang.c (value_assign_to_component): In the case of
547         big-endian targets, extract the bits of the given VAL
548         using an src_offset of zero if container is not a scalar.
549
550 2018-09-06  Simon Ser  <contact@emersion.fr>
551
552         PR gdb/23105
553         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
554         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
555         * fbsd-tdep.c (fbsd_make_note_desc): New.
556         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
557         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
558         * target.h (enum target_object) Add FreeBSD-specific
559         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
560
561 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
562
563         * compile/compile-c.h (generate_c_for_variable_locations):
564         Change reference to pointer.
565         * compile/compile-c-support.c (compile_program) <compute>:
566         Likewise.
567         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
568         (generate_c_for_for_one_variable): Likewise
569         (generate_c_for_variable_locations): Likewise
570         * compile/compile-c-types.c (compile_c_instance::convert_type):
571         Likewise
572         * compile/compile-cplus-symbols.c (convert_one_symbol):
573         std::move the scope passed to enter_scope.
574         * compile/compile-cplus-types.c
575         (compile_cplus_instance::enter_scope): Make parameter
576         rvalue-reference.
577         (compile_cplus_instance::new_scope): Change reference to
578         pointer.
579         (compile_cplus_instance::convert_type): Likewise
580         (compile_cplus_convert_typedef): std::move the scope passed to
581         enter_scope.
582         (compile_cplus_convert_struct_or_union): Likewise.
583         (compile_cplus_convert_enum): Likewise.
584         (compile_cplus_convert_namespace): Likewise.
585         * compile/compile-cplus.h (compile_cplus_instance)
586         <enter_scope>: Make parameter rvalue-reference.
587         * compile/compile-internal.h (compile_instance)
588         <get_cached_type>: Likewise
589         * compile/compile-loc2c.c (push): Likewise
590         (pushf): Likewise
591         (unary): Likewise
592         (binary): Likewise
593         (print_label): Likewise
594         (pushf_register_address): Likewise
595         (pushf_register): Likewise
596         (do_compile_dwarf_expr_to_c): Likewise
597         (compile_dwarf_expr_to_c): Likewise
598         (compile_dwarf_bounds_to_c): Likewise
599         * compile/compile.c (compile_instance::get_cached_type):
600         Likewise
601         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
602         (compile_dwarf_bounds_to_c): Likewise
603         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
604         (dwarf2_compile_property_to_c): Likewise
605         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
606         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
607         Likewise
608
609 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
610
611         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
612         * tui/tui-data.c (init_content_element): Don't initialize it.
613
614 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
615
616         * tui/tui-data.h (struct tui_win_info)
617         <detail::opaque>: Remove.
618         * tui/tui-data.c (init_win_info): Remove assignment.
619
620 2018-09-05  Tom Tromey  <tom@tromey.com>
621
622         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
623         -Wformat-nonliteral.
624         * target-float.c (host_float_ops<T>::to_string)
625         (host_float_ops<T>::from_string): Use
626         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
627         * configure: Rebuild.
628
629 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
630
631         * printcmd.c (printf_c_string): Use
632         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
633         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
634
635 2018-09-05  Tom Tromey  <tom@tromey.com>
636
637         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
638
639 2018-09-05  Tom de Vries  <tdevries@suse.de>
640
641         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
642         with resolve_abstract_p == true.
643         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
644         defaulting to false. Propagate resolve_abstract_p to
645         dwarf2_fetch_die_loc_sect_off.
646         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
647         parameter, defaulting to false.
648         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
649         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
650         parameter.
651         * dwarf2read.h (struct die_info): Forward-declare.
652         (die_info_ptr): New typedef.
653         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
654
655 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
656
657         GDB 8.2 released.
658
659 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
660             Pedro Alves  <palves@redhat.com>
661
662         * gnulib/Makefile.in (aclocal_m4_deps): Move to
663         "aclocal-m4-deps.mk".  Include file here.
664         $(srcdir)/aclocal.m4: Add "configure.ac".
665         * gnulib/aclocal-m4-deps.mk: New file.
666         * gnulib/update-gnulib.sh: Automatically update
667         "aclocal-m4-deps.mk".
668
669 2018-09-04  Tom Tromey  <tom@tromey.com>
670
671         * configure: Rebuild.
672         * configure.ac: Remove multi-ice code.
673
674 2018-09-04  Tom Tromey  <tom@tromey.com>
675
676         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
677         (ada-exp.o): Update.
678
679 2018-09-04  Tom Tromey  <tom@tromey.com>
680
681         * Makefile.in (printcmd.o, target-float.o): Remove.
682         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
683
684 2018-09-04  Tom Tromey  <tom@tromey.com>
685
686         * gnulib/Makefile.in: Remove obsolete comment.
687         * Makefile.in: Remove obsolete comment.
688
689 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
690
691         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
692         line with '+'.
693
694 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
695
696         * riscv-tdep.c: Add 'prologue-value.h' include.
697         (struct riscv_unwind_cache): New struct.
698         (riscv_debug_unwinder): New global.
699         (riscv_scan_prologue): Update arguments, capture register details
700         from prologue scan.
701         (riscv_skip_prologue): Reformat arguments line, move end of
702         prologue calculation into riscv_scan_prologue.
703         (riscv_frame_cache): Update return type, create
704         riscv_unwind_cache, scan the prologue, and fill in remaining cache
705         details.
706         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
707         (riscv_frame_prev_register): Use the trad_frame within the
708         riscv_unwind_cache.
709         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
710         flag.
711
712 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
713
714         * trad-frame.h (trad_frame_set_realreg): Declare.
715         (trad_frame_set_addr): Declare.
716         * trad-frame.c (trad_frame_set_realreg): Define new function.
717         (trad_frame_set_addr): Define new function.
718         (trad_frame_set_reg_realreg): Use new function.
719         (trad_frame_set_reg_addr): Use new function.
720
721 2018-09-01  Keith Seitz  <keiths@redhat.com>
722
723         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
724         pulongest instead of "%lld".
725         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
726         ATTRIBUTE_UNUSED.
727
728 2018-08-31  Tom Tromey  <tom@tromey.com>
729
730         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
731         variant part type.
732
733 2018-08-31  Pedro Alves  <palves@redhat.com>
734
735         * gdbarch.h: Regenerate.
736
737 2018-08-31  Pedro Alves  <palves@redhat.com>
738
739         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
740         * target.h (Hardware watchpoint interfaces): Describe
741         continuable/steppable/non-steppable watchpoints.
742         * gdbarch.h, gdbarch.c: Regenerate.
743
744 2018-08-31  Pedro Alves  <palves@redhat.com>
745
746         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
747         Delete.
748         * s390-linux-nat.c
749         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
750         * target.h (target_ops::have_continuable_watchpoint): Delete.
751         (target_have_continuable_watchpoint): Delete.
752         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
753         * target-delegates.c: Regenerate.
754
755 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
756
757         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
758         the files present in "gnulib/import/m4/".
759
760 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
761
762         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
763         c.sw, c.swsp, and c.sdsp.
764
765 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
766
767         * riscv-tdep.c (struct riscv_inferior_data): Delete.
768         (riscv_read_misa_reg): Don't cache value read into inferior data.
769         (riscv_new_inferior_data): Delete.
770         (riscv_inferior_data_cleanup): Delete.
771         (riscv_inferior_data): Delete.
772         (riscv_invalidate_inferior_data): Delete.
773         (_initialize_riscv_tdep): Remove initialisation of inferior data.
774
775 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
776
777         * compile/compile-cplus-types.c
778         (compile_cplus_instance::leave_scope): Take the address of scope
779         object.
780         (compile_cplus_instance::convert_qualified_base): Compare quals
781         to 0.
782
783 2018-08-30  Keith Seitz  <keiths@redhat.com>
784
785         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
786         Use "%s" and host_address_to_string instead of "%p" in printf.
787
788 2018-08-29  Keith Seitz  <keiths@redhat.com>
789
790         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
791         and compile-cplus-types.c.
792         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
793         * c-lang.c (cplus_language_defn): Set C++ compile functions.
794         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
795         Declare.
796         * compile/compile-c-support.c: Include compile-cplus.h.
797         (load_libcompile): Templatize.
798         (get_compile_context): "New" function.
799         (c_get_compile_context): Use get_compile_context.
800         (cplus_get_compile_context): New function.
801         (cplus_push_user_expression, cplus_pop_user_expression)
802         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
803         (cplus_compute_program): Define new structs/functions.
804         * compile/compile-cplus-symmbols.c: New file.
805         * compile/compile-cplus-types.c: New file.
806         * compile/compile-cplus.h: New file.
807         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
808         Declare.
809         * compile/compile-object-load.c (get_out_value_type): Use
810         strncmp_iw when comparing symbol names.
811         (compile_object_load): Add mst_bss and mst_data.
812         * compile/compile.c (_initialize_compile): Remove
813         -Wno-implicit-function-declaration from `compile_args'.
814         * compile/gcc-cp-plugin.h: New file.
815         * NEWS: Mention C++ compile support and new debug options.
816
817 2018-08-29  Keith Seitz  <keiths@redhat.com>
818
819         * linespec.c (collect_info::add_symbol): Make virtual.
820         (struct symbol_searcher_collect_info): New struct.
821         (symbol_searcher::find_all_symbols): New method.
822         * symtab.h (class symbol_searcher): New class.
823
824 2018-08-29  Keith Seitz  <keiths@redhat.com>
825
826         * linespec.c (struct linespec) <function_symbols, label_symbols>:
827         Change to vector of block_symbol.  Update all users.
828         (struct collect_info) <symbols>: Likewise.
829         (collect_info::add_symbol): Take block_symbol as argument.
830         Update all callers.
831         (decode_compound_collector) <m_symbols>: Change type to vector
832         of block_symbol.  Update all users.
833         (decode_compound_collector::operator ()): Change parameter type
834         to block_symbol.
835         (find_method, find_function_symbols, find_linespec_symbols)
836         (find_label_symbols_in_block, find_label_symbols): Change symbol
837         vectors to block_symbol vectors.
838         * symtab.h (symbol_found_callback_ftype): Change parameter type to
839         block_symbol.
840
841 2018-08-29  Keith Seitz  <keiths@redhat.com>
842
843         * linespec.c (symbolp): Remove typedef and VEC definitions.
844         (bound_minimal_symbol_d): Likewise.
845
846 2018-08-29  Keith Seitz  <keiths@redhat.com>
847
848         * linespec.c (decode_compound_collector::decode_compound_collector):
849         Remove initialization for `m_symtabs'.
850         (decode_compound_collector::release_symbols): Change return type
851         to std::vector.  Update all callers.
852         (class decode_compound_collector) <m_symbols>: Change type to
853         std::vector.
854         (lookup_prefix_sym): Change return type to std::vector.  Update all
855         callers.
856         (compare_symbols): Remove.
857         (std_compare_symbols): Rename to `compare_symbols'.
858         (find_method): Change `sym_classes' parameter to std::vector.
859         Update all callers.  Use std::sort to sort sym_classes.
860         (find_linespec_symbols): Remove cleanup.
861
862 2018-08-29  Keith Seitz  <keiths@redhat.com>
863
864         * linespec.c (struct linespec) <minimal_symbols>: Change type to
865         std::vector.  Update all users.
866         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
867         (struct collect_info) <minimal_symbols>: Likewise.
868         (compare_msymbols): Return bool.  Change parameters to const
869         bound_minimal_symbol references.
870         (find_method, find_function_symbols, find_linespec_symbols): Change
871         `minsyms' parameter to std::vector.  Update all callers.
872
873 2018-08-29  Keith Seitz  <keiths@redhat.com>
874
875         * linespec.c (struct linespec) <label_symbols>: Change type to
876         std::vector.  Update all users.
877         (find_label_symbols_in_block): Change `result' parameter to
878         std::vector.  Update all callers.
879         (find_label_symbols): Return std::vector.  Update all callers.
880
881 2018-08-29  Keith Seitz  <keiths@redhat.com>
882
883         * linespec.c (struct linespec) <function_symbols>: Change type to
884         std::vector.  Update all users.
885         (struct collect_info) <function_symbols>: Likewise.
886         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
887         (std_compare_symbols): New function.
888         (find_method, find_function_symbols, find_linespec_symbols)
889         (find_label_symbols_in_block): Change `symbols' parameter to
890         std::vector.  Update all callers.
891         (find_label_symbols): Likewise for `function_symbols' and
892         `label_funcs_ret'.
893
894 2018-08-29  Keith Seitz  <keiths@redhat.com>
895
896         * linespec.c (symtab_vector_up): Define.
897         (struct linespec) <file_symtabs>: Change type to std::vector *.
898         Update all uses.
899         (struct collect_info) <file_symtabs>: Likewise.
900         (collect_symtabs_from_filename): Return symtab_vector_up.
901         Update all callers.
902         (decode_objc): Remove cleanup.
903         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
904         (symtab_collector::release_symtabs): Return symtab_vector_up.
905         Update all callers.
906         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
907         Update all users.
908         (collect_symtabs_from_filename, symtabs_from_filename): Return
909         symtab_vector_up.  Update all callers.
910
911 2018-08-29  Tom Tromey  <tom@tromey.com>
912
913         * csky-tdep.c (csky_analyze_prologue): Use
914         core_addr_to_string_nz.
915
916 2018-08-29  Tom Tromey  <tom@tromey.com>
917
918         * windows-nat.c (struct xlate_exception) <them>: Change type to
919         DWORD.
920         (xlate): Fix formatting.  Remove last entry.
921         (struct xlate_exception, xlate): Comment out.
922         (windows_nat_target::resume): Use ranged for.
923
924 2018-08-29  Jim Wilson  <jimw@sifive.com>
925
926         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
927         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
928         of NT_PRFPREG.
929         (riscv_linux_nat_target::store_registers): Likewise.
930
931 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
932
933         PR gdb/23555
934         PR gdb/23558
935         * gnulib/aclocal.m4: Regenerate.
936         * gnulib/config.in: Regenerate.
937         * gnulib/configure: Regenerate.
938         * gnulib/import/Makefile.am: Update.
939         * gnulib/import/Makefile.in: Update.
940         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
941         * gnulib/import/_Noreturn.h: ... this.
942         * gnulib/import/alloca.in.h: Update.
943         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
944         * gnulib/import/arg-nonnull.h: ... this.
945         * gnulib/import/assure.h: Update.
946         * gnulib/import/at-func.c: Update.
947         * gnulib/import/basename-lgpl.c: Update.
948         * gnulib/import/extra/snippet/c++defs.h: Rename to...
949         * gnulib/import/c++defs.h: ... this.
950         * gnulib/import/canonicalize-lgpl.c: Update.
951         * gnulib/import/cdefs.h: Update.
952         * gnulib/import/chdir-long.c: Update.
953         * gnulib/import/chdir-long.h: Update.
954         * gnulib/import/cloexec.c: Update.
955         * gnulib/import/cloexec.h: Update.
956         * gnulib/import/close.c: Update.
957         * gnulib/import/closedir.c: Update.
958         * gnulib/import/config.charset: Update.
959         * gnulib/import/dirent-private.h: Update.
960         * gnulib/import/dirent.in.h: Update.
961         * gnulib/import/dirfd.c: Update.
962         * gnulib/import/dirname-lgpl.c: Update.
963         * gnulib/import/dirname.h: Update.
964         * gnulib/import/dosname.h: Update.
965         * gnulib/import/dup-safer-flag.c: Update.
966         * gnulib/import/dup-safer.c: Update.
967         * gnulib/import/dup.c: Update.
968         * gnulib/import/dup2.c: Update.
969         * gnulib/import/errno.in.h: Update.
970         * gnulib/import/error.c: Update.
971         * gnulib/import/error.h: Update.
972         * gnulib/import/exitfail.c: Update.
973         * gnulib/import/exitfail.h: Update.
974         * gnulib/import/extra/update-copyright: Update.
975         * gnulib/import/fchdir.c: Update.
976         * gnulib/import/fcntl.c: Update.
977         * gnulib/import/fcntl.in.h: Update.
978         * gnulib/import/fd-hook.c: Update.
979         * gnulib/import/fd-hook.h: Update.
980         * gnulib/import/fd-safer-flag.c: Update.
981         * gnulib/import/fd-safer.c: Update.
982         * gnulib/import/fdopendir.c: Update.
983         * gnulib/import/filename.h: Update.
984         * gnulib/import/filenamecat-lgpl.c: Update.
985         * gnulib/import/filenamecat.h: Update.
986         * gnulib/import/flexmember.h: Update.
987         * gnulib/import/float+.h: Update.
988         * gnulib/import/float.c: Update.
989         * gnulib/import/float.in.h: Update.
990         * gnulib/import/fnmatch.c: Update.
991         * gnulib/import/fnmatch.in.h: Update.
992         * gnulib/import/fnmatch_loop.c: Update.
993         * gnulib/import/fpucw.h: Update.
994         * gnulib/import/frexp.c: Update.
995         * gnulib/import/frexpl.c: Update.
996         * gnulib/import/fstat.c: Update.
997         * gnulib/import/fstatat.c: Update.
998         * gnulib/import/getcwd-lgpl.c: Update.
999         * gnulib/import/getcwd.c: Update.
1000         * gnulib/import/getdtablesize.c: Update.
1001         * gnulib/import/getlogin_r.c: Update.
1002         * gnulib/import/getprogname.c: Update.
1003         * gnulib/import/getprogname.h: Update.
1004         * gnulib/import/gettext.h: Update.
1005         * gnulib/import/gettimeofday.c: Update.
1006         * gnulib/import/glob-libc.h: Update.
1007         * gnulib/import/glob.c: Update.
1008         * gnulib/import/glob.in.h: Update.
1009         * gnulib/import/glob_internal.h: Update.
1010         * gnulib/import/glob_pattern_p.c: Update.
1011         * gnulib/import/globfree.c: Update.
1012         * gnulib/import/hard-locale.c: Update.
1013         * gnulib/import/hard-locale.h: Update.
1014         * gnulib/import/intprops.h: Update.
1015         * gnulib/import/inttypes.in.h: Update.
1016         * gnulib/import/isnan.c: Update.
1017         * gnulib/import/isnand-nolibm.h: Update.
1018         * gnulib/import/isnand.c: Update.
1019         * gnulib/import/isnanl-nolibm.h: Update.
1020         * gnulib/import/isnanl.c: Update.
1021         * gnulib/import/itold.c: Update.
1022         * gnulib/import/libc-config.h: Update.
1023         * gnulib/import/limits.in.h: Update.
1024         * gnulib/import/localcharset.c: Update.
1025         * gnulib/import/localcharset.h: Update.
1026         * gnulib/import/localtime-buffer.c: Update.
1027         * gnulib/import/localtime-buffer.h: Update.
1028         * gnulib/import/lstat.c: Update.
1029         * gnulib/import/m4/00gnulib.m4: Update.
1030         * gnulib/import/m4/__inline.m4: Update.
1031         * gnulib/import/m4/absolute-header.m4: Update.
1032         * gnulib/import/m4/alloca.m4: Update.
1033         * gnulib/import/m4/builtin-expect.m4: Update.
1034         * gnulib/import/m4/canonicalize.m4: Update.
1035         * gnulib/import/m4/chdir-long.m4: Update.
1036         * gnulib/import/m4/close.m4: Update.
1037         * gnulib/import/m4/closedir.m4: Update.
1038         * gnulib/import/m4/configmake.m4: Update.
1039         * gnulib/import/m4/d-ino.m4: Update.
1040         * gnulib/import/m4/d-type.m4: Update.
1041         * gnulib/import/m4/dirent_h.m4: Update.
1042         * gnulib/import/m4/dirfd.m4: Update.
1043         * gnulib/import/m4/dirname.m4: Update.
1044         * gnulib/import/m4/double-slash-root.m4: Update.
1045         * gnulib/import/m4/dup.m4: Update.
1046         * gnulib/import/m4/dup2.m4: Update.
1047         * gnulib/import/m4/eealloc.m4: Update.
1048         * gnulib/import/m4/environ.m4: Update.
1049         * gnulib/import/m4/errno_h.m4: Update.
1050         * gnulib/import/m4/error.m4: Update.
1051         * gnulib/import/m4/exponentd.m4: Update.
1052         * gnulib/import/m4/exponentl.m4: Update.
1053         * gnulib/import/m4/extensions.m4: Update.
1054         * gnulib/import/m4/extern-inline.m4: Update.
1055         * gnulib/import/m4/fchdir.m4: Update.
1056         * gnulib/import/m4/fcntl-o.m4: Update.
1057         * gnulib/import/m4/fcntl.m4: Update.
1058         * gnulib/import/m4/fcntl_h.m4: Update.
1059         * gnulib/import/m4/fdopendir.m4: Update.
1060         * gnulib/import/m4/filenamecat.m4: Update.
1061         * gnulib/import/m4/flexmember.m4: Update.
1062         * gnulib/import/m4/float_h.m4: Update.
1063         * gnulib/import/m4/fnmatch.m4: Update.
1064         * gnulib/import/m4/fnmatch_h.m4: Update.
1065         * gnulib/import/m4/fpieee.m4: Update.
1066         * gnulib/import/m4/frexp.m4: Update.
1067         * gnulib/import/m4/frexpl.m4: Update.
1068         * gnulib/import/m4/fstat.m4: Update.
1069         * gnulib/import/m4/fstatat.m4: Update.
1070         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
1071         * gnulib/import/m4/getcwd-path-max.m4: Update.
1072         * gnulib/import/m4/getcwd.m4: Update.
1073         * gnulib/import/m4/getdtablesize.m4: Update.
1074         * gnulib/import/m4/getlogin.m4: Update.
1075         * gnulib/import/m4/getlogin_r.m4: Update.
1076         * gnulib/import/m4/getpagesize.m4: Update.
1077         * gnulib/import/m4/getprogname.m4: Update.
1078         * gnulib/import/m4/gettimeofday.m4: Update.
1079         * gnulib/import/m4/glibc21.m4: Update.
1080         * gnulib/import/m4/glob.m4: Update.
1081         * gnulib/import/m4/glob_h.m4: Update.
1082         * gnulib/import/m4/gnulib-cache.m4: Update.
1083         * gnulib/import/m4/gnulib-common.m4: Update.
1084         * gnulib/import/m4/gnulib-comp.m4: Update.
1085         * gnulib/import/m4/gnulib-tool.m4: Update.
1086         * gnulib/import/m4/hard-locale.m4: Update.
1087         * gnulib/import/m4/include_next.m4: Update.
1088         * gnulib/import/m4/inttypes-pri.m4: Update.
1089         * gnulib/import/m4/inttypes.m4: Update.
1090         * gnulib/import/m4/isnand.m4: Update.
1091         * gnulib/import/m4/isnanl.m4: Update.
1092         * gnulib/import/m4/largefile.m4: Update.
1093         * gnulib/import/m4/limits-h.m4: Update.
1094         * gnulib/import/m4/localcharset.m4: Update.
1095         * gnulib/import/m4/locale-fr.m4: Update.
1096         * gnulib/import/m4/locale-ja.m4: Update.
1097         * gnulib/import/m4/locale-zh.m4: Update.
1098         * gnulib/import/m4/localtime-buffer.m4: Update.
1099         * gnulib/import/m4/longlong.m4: Update.
1100         * gnulib/import/m4/lstat.m4: Update.
1101         * gnulib/import/m4/malloc.m4: Update.
1102         * gnulib/import/m4/malloca.m4: Update.
1103         * gnulib/import/m4/math_h.m4: Update.
1104         * gnulib/import/m4/mbrtowc.m4: Update.
1105         * gnulib/import/m4/mbsinit.m4: Update.
1106         * gnulib/import/m4/mbsrtowcs.m4: Update.
1107         * gnulib/import/m4/mbstate_t.m4: Update.
1108         * gnulib/import/m4/memchr.m4: Update.
1109         * gnulib/import/m4/memmem.m4: Update.
1110         * gnulib/import/m4/mempcpy.m4: Update.
1111         * gnulib/import/m4/memrchr.m4: Update.
1112         * gnulib/import/m4/mkdir.m4: Update.
1113         * gnulib/import/m4/mkstemp.m4: Update.
1114         * gnulib/import/m4/mmap-anon.m4: Update.
1115         * gnulib/import/m4/mode_t.m4: Update.
1116         * gnulib/import/m4/msvc-inval.m4: Update.
1117         * gnulib/import/m4/msvc-nothrow.m4: Update.
1118         * gnulib/import/m4/multiarch.m4: Update.
1119         * gnulib/import/m4/nocrash.m4: Update.
1120         * gnulib/import/m4/off_t.m4: Update.
1121         * gnulib/import/m4/onceonly.m4: Update.
1122         * gnulib/import/m4/open-cloexec.m4: Update.
1123         * gnulib/import/m4/open.m4: Update.
1124         * gnulib/import/m4/openat.m4: Update.
1125         * gnulib/import/m4/opendir.m4: Update.
1126         * gnulib/import/m4/pathmax.m4: Update.
1127         * gnulib/import/m4/rawmemchr.m4: Update.
1128         * gnulib/import/m4/readdir.m4: Update.
1129         * gnulib/import/m4/readlink.m4: Update.
1130         * gnulib/import/m4/realloc.m4: Update.
1131         * gnulib/import/m4/rename.m4: Update.
1132         * gnulib/import/m4/rewinddir.m4: Update.
1133         * gnulib/import/m4/rmdir.m4: Update.
1134         * gnulib/import/m4/save-cwd.m4: Update.
1135         * gnulib/import/m4/secure_getenv.m4: Update.
1136         * gnulib/import/m4/setenv.m4: Update.
1137         * gnulib/import/m4/signal_h.m4: Update.
1138         * gnulib/import/m4/ssize_t.m4: Update.
1139         * gnulib/import/m4/stat-time.m4: Update.
1140         * gnulib/import/m4/stat.m4: Update.
1141         * gnulib/import/m4/std-gnu11.m4: Update.
1142         * gnulib/import/m4/stdbool.m4: Update.
1143         * gnulib/import/m4/stddef_h.m4: Update.
1144         * gnulib/import/m4/stdint.m4: Update.
1145         * gnulib/import/m4/stdio_h.m4: Update.
1146         * gnulib/import/m4/stdlib_h.m4: Update.
1147         * gnulib/import/m4/strchrnul.m4: Update.
1148         * gnulib/import/m4/strdup.m4: Update.
1149         * gnulib/import/m4/strerror.m4: Update.
1150         * gnulib/import/m4/string_h.m4: Update.
1151         * gnulib/import/m4/strstr.m4: Update.
1152         * gnulib/import/m4/strtok_r.m4: Update.
1153         * gnulib/import/m4/sys_socket_h.m4: Update.
1154         * gnulib/import/m4/sys_stat_h.m4: Update.
1155         * gnulib/import/m4/sys_time_h.m4: Update.
1156         * gnulib/import/m4/sys_types_h.m4: Update.
1157         * gnulib/import/m4/tempname.m4: Update.
1158         * gnulib/import/m4/time_h.m4: Update.
1159         * gnulib/import/m4/unistd-safer.m4: Update.
1160         * gnulib/import/m4/unistd_h.m4: Update.
1161         * gnulib/import/m4/warn-on-use.m4: Update.
1162         * gnulib/import/m4/wchar_h.m4: Update.
1163         * gnulib/import/m4/wchar_t.m4: Update.
1164         * gnulib/import/m4/wctype_h.m4: Update.
1165         * gnulib/import/m4/wint_t.m4: Update.
1166         * gnulib/import/malloc.c: Update.
1167         * gnulib/import/malloc/scratch_buffer.h: Update.
1168         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
1169         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
1170         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
1171         * gnulib/import/malloca.c: Update.
1172         * gnulib/import/malloca.h: Update.
1173         * gnulib/import/malloca.valgrind: Update.
1174         * gnulib/import/math.in.h: Update.
1175         * gnulib/import/mbrtowc.c: Update.
1176         * gnulib/import/mbsinit.c: Update.
1177         * gnulib/import/mbsrtowcs-impl.h: Update.
1178         * gnulib/import/mbsrtowcs-state.c: Update.
1179         * gnulib/import/mbsrtowcs.c: Update.
1180         * gnulib/import/memchr.c: Update.
1181         * gnulib/import/memmem.c: Update.
1182         * gnulib/import/mempcpy.c: Update.
1183         * gnulib/import/memrchr.c: Update.
1184         * gnulib/import/mkdir.c: Update.
1185         * gnulib/import/mkstemp.c: Update.
1186         * gnulib/import/msvc-inval.c: Update.
1187         * gnulib/import/msvc-inval.h: Update.
1188         * gnulib/import/msvc-nothrow.c: Update.
1189         * gnulib/import/msvc-nothrow.h: Update.
1190         * gnulib/import/open.c: Update.
1191         * gnulib/import/openat-die.c: Update.
1192         * gnulib/import/openat-priv.h: Update.
1193         * gnulib/import/openat-proc.c: Update.
1194         * gnulib/import/openat.c: Update.
1195         * gnulib/import/openat.h: Update.
1196         * gnulib/import/opendir.c: Update.
1197         * gnulib/import/pathmax.h: Update.
1198         * gnulib/import/pipe-safer.c: Update.
1199         * gnulib/import/rawmemchr.c: Update.
1200         * gnulib/import/readdir.c: Update.
1201         * gnulib/import/readlink.c: Update.
1202         * gnulib/import/realloc.c: Update.
1203         * gnulib/import/ref-add.sin: Update.
1204         * gnulib/import/ref-del.sin: Update.
1205         * gnulib/import/rename.c: Update.
1206         * gnulib/import/rewinddir.c: Update.
1207         * gnulib/import/rmdir.c: Update.
1208         * gnulib/import/same-inode.h: Update.
1209         * gnulib/import/save-cwd.c: Update.
1210         * gnulib/import/save-cwd.h: Update.
1211         * gnulib/import/scratch_buffer.h: Update.
1212         * gnulib/import/secure_getenv.c: Update.
1213         * gnulib/import/setenv.c: Update.
1214         * gnulib/import/signal.in.h: Update.
1215         * gnulib/import/stat-time.c: Update.
1216         * gnulib/import/stat-time.h: Update.
1217         * gnulib/import/stat-w32.c: Update.
1218         * gnulib/import/stat-w32.h: Update.
1219         * gnulib/import/stat.c: Update.
1220         * gnulib/import/stdbool.in.h: Update.
1221         * gnulib/import/stddef.in.h: Update.
1222         * gnulib/import/stdint.in.h: Update.
1223         * gnulib/import/stdio.in.h: Update.
1224         * gnulib/import/stdlib.in.h: Update.
1225         * gnulib/import/str-two-way.h: Update.
1226         * gnulib/import/strchrnul.c: Update.
1227         * gnulib/import/strdup.c: Update.
1228         * gnulib/import/streq.h: Update.
1229         * gnulib/import/strerror-override.c: Update.
1230         * gnulib/import/strerror-override.h: Update.
1231         * gnulib/import/strerror.c: Update.
1232         * gnulib/import/string.in.h: Update.
1233         * gnulib/import/stripslash.c: Update.
1234         * gnulib/import/strnlen1.c: Update.
1235         * gnulib/import/strnlen1.h: Update.
1236         * gnulib/import/strstr.c: Update.
1237         * gnulib/import/strtok_r.c: Update.
1238         * gnulib/import/sys_stat.in.h: Update.
1239         * gnulib/import/sys_time.in.h: Update.
1240         * gnulib/import/sys_types.in.h: Update.
1241         * gnulib/import/tempname.c: Update.
1242         * gnulib/import/tempname.h: Update.
1243         * gnulib/import/time.in.h: Update.
1244         * gnulib/import/unistd--.h: Update.
1245         * gnulib/import/unistd-safer.h: Update.
1246         * gnulib/import/unistd.in.h: Update.
1247         * gnulib/import/unsetenv.c: Update.
1248         * gnulib/import/verify.h: Update.
1249         * gnulib/import/extra/snippet/warn-on-use.h: Update.
1250         * gnulib/import/wchar.in.h: Update.
1251         * gnulib/import/wctype.in.h: Update.
1252         * gnulib/import/xalloc-oversized.h: Update.
1253         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
1254         "53e2c179f26a890fa6685af4b6c1397ee370433b".
1255
1256 2018-08-16  Gary Benson <gbenson@redhat.com>
1257
1258         PR gdb/13000:
1259         * gdb/main.c (captured_main_1): Exit with nonzero status
1260         in batch mode if the last command to be executed failed.
1261         * NEWS: Mention the above.
1262
1263 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
1264
1265         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
1266         end of warning message.
1267
1268 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
1269
1270         PR gdb/22943:
1271         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
1272         (aarch64_extract_return_value): Use
1273         aapcs_is_vfp_call_or_return_candidate.
1274         (aarch64_return_in_memory): Likewise.
1275         (aarch64_store_return_value): Likewise.
1276
1277 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
1278
1279         * aarch64-tdep.c
1280         (aapcs_is_vfp_call_or_return_candidate): Make static
1281         (pass_in_v_or_stack): Remove function.
1282         (pass_in_v_vfp_candidate): New function.
1283         (aarch64_push_dummy_call): Check for float register candidates.
1284
1285 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
1286
1287         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
1288         (aapcs_is_vfp_call_or_return_candidate_1): New function.
1289         (aapcs_is_vfp_call_or_return_candidate): Likewise.
1290
1291 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
1292
1293         PR build/23399
1294         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
1295         (struct ipa_sym_addresses): Rename to...
1296         (struct ipa_sym_addresses_common): ... this.
1297         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
1298
1299 2018-08-28  Tom Tromey  <tom@tromey.com>
1300
1301         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1302         (token_fifo): Now a std::vector.
1303         (yylex, c_parse): Update.
1304         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1305         (token_fifo): Now a std::vector.
1306         (yylex, d_parse): Update.
1307         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1308         (token_fifo): Now a std::vector.
1309         (yylex, go_parse): Update.
1310
1311 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
1312
1313         * parser-defs.h (struct type_stack) <elements>: Change type to
1314         std::vector<union type_stack_elt>.
1315         <depth, size>: Remove.
1316         * parse.c (parse_exp_in_context_1): Adjust.
1317         (type_stack_reserve): Remove.
1318         (check_type_stack_depth): Remove.
1319         (insert_into_type_stack): Adjust to std::vector.
1320         (insert_type): Likewise.
1321         (push_type): Likewise.
1322         (push_type_int): Likewise.
1323         (insert_type_address_space): Likewise.
1324         (pop_type): Likewise.
1325         (pop_type_int): Likewise.
1326         (pop_typelist): Likewise.
1327         (pop_type_stack): Likewise.
1328         (append_type_stack): Likewise.
1329         (push_type_stack): Likewise.
1330         (get_type_stack): Likewise.
1331         (type_stack_cleanup): Likewise.
1332         (push_typelist): Likewise.
1333         (follow_types): Likewise.
1334         (_initialize_parse): Likewise.
1335
1336 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
1337
1338         * NEWS: Mention csky target.
1339
1340 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
1341             Hafiz Abid Qadeer  <abidh@codesourcery.com>
1342             Don Breazeal  <donb@codesourcery.com>
1343
1344         * csky-linux-tdep.c: New file.
1345         * csky-tdep.c: Likewise.
1346         * csky-tdep.h: Likewise.
1347         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
1348         csky-tdep.o.
1349         (HFILES_NO_SRCDIR): Add csky-tdep.h.
1350         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
1351         * configure.tgt: Add csky support.
1352
1353 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
1354
1355         * python/py-framefilter.c (py_print_frame): Print frame architecture
1356         when printing on an MI output.
1357
1358 2018-08-27  Tom Tromey  <tom@tromey.com>
1359
1360         PR build/23087:
1361         * configure: Rebuild.
1362         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
1363
1364 2018-08-27  Tom Tromey  <tom@tromey.com>
1365
1366         * aarch64-linux-tdep.c
1367         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
1368         casts to int.
1369
1370 2018-08-27  Tom Tromey  <tom@tromey.com>
1371
1372         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
1373         unsigned.
1374         (ppc64_standard_linkage1, ppc64_standard_linkage2)
1375         (ppc64_standard_linkage3, ppc64_standard_linkage4)
1376         (ppc64_standard_linkage5, ppc64_standard_linkage6)
1377         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
1378         unsigned.
1379
1380 2018-08-27  Tom Tromey  <tom@tromey.com>
1381
1382         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
1383         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
1384
1385 2018-08-27  Tom Tromey  <tom@tromey.com>
1386
1387         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
1388         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
1389         ULONGEST_MAX.
1390         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
1391         ULONGEST_MAX.
1392         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
1393         ULONGEST_MAX.
1394         * sparc-linux-tdep.c (sparc32_linux_sigframe)
1395         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
1396         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
1397         ULONGEST_MAX.
1398         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
1399         (ppc64_linux_sigaction_tramp_frame)
1400         (ppc32_linux_sighandler_tramp_frame)
1401         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
1402         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
1403         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
1404         * mn10300-linux-tdep.c (am33_linux_sigframe)
1405         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
1406         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
1407         * mips-linux-tdep.c (mips_linux_o32_sigframe)
1408         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
1409         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
1410         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
1411         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
1412         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
1413         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
1414         * microblaze-linux-tdep.c
1415         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
1416         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
1417         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
1418         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
1419         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
1420         * common/common-types.h (ULONGEST_MAX): New define.
1421         (CORE_ADDR_MAX): Fix formatting.
1422         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
1423         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
1424         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
1425         (arm_linux_rt_sigreturn_tramp_frame)
1426         (arm_eabi_linux_sigreturn_tramp_frame)
1427         (arm_eabi_linux_rt_sigreturn_tramp_frame)
1428         (thumb2_eabi_linux_sigreturn_tramp_frame)
1429         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
1430         (arm_linux_restart_syscall_tramp_frame)
1431         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
1432         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
1433         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
1434         ULONGEST_MAX.
1435         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
1436
1437 2018-08-27  Tom Tromey  <tom@tromey.com>
1438
1439         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
1440         CORE_ADDR_MAX.
1441         * mips-tdep.c (mips_deal_with_atomic_sequence)
1442         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
1443         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
1444         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
1445         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
1446         CORE_ADDR_MAX.
1447         * aarch64-tdep.c (aarch64_software_single_step): Use
1448         CORE_ADDR_MAX.
1449
1450 2018-08-27  Tom Tromey  <tom@tromey.com>
1451
1452         * linespec.c (complete_linespec_component): Add cast to "char".
1453         * completer.c (completion_tracker::build_completion_result): Add
1454         cast to "char".
1455
1456 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
1457
1458         * solist.h (struct solist, struct target_so_ops): Fix
1459         indentation.
1460
1461 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
1462
1463         * ada-tasks.c (ada_task_info_s): Remove typedef.
1464         (DEF_VEC_O(ada_task_info_s)): Remove.
1465         (struct ada_tasks_inferior_data): Initialize fields.
1466         <task_list>: Make an std::vector.
1467         (get_ada_tasks_inferior_data): Allocate with new.
1468         (ada_get_task_number): Adjust.
1469         (get_task_number_from_id): Likewise.
1470         (valid_task_id): Likewise.
1471         (ada_get_task_info_from_ptid): Likewise.
1472         (iterate_over_live_ada_tasks): Likewise.
1473         (add_ada_task): Likewise.
1474         (read_known_tasks): Likewise.
1475         (ada_build_task_list): Likewise.
1476         (print_ada_task_info): Likewise.
1477         (info_task): Likewise.
1478         (task_command_1): Likewise.
1479
1480 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
1481
1482         * ada-lang.c (add_angle_brackets): Return std::string.
1483
1484 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
1485
1486         * python/py-threadevent.c (py_get_event_thread): Initialize
1487         pythread.
1488
1489 2018-08-24  Pedro Alves  <palves@redhat.com>
1490
1491         * python/py-bpevent.c (create_breakpoint_event_object): Use
1492         copy-initialization.
1493         * python/py-continueevent.c (emit_continue_event): Use
1494         copy-initialization.
1495         * python/py-exitedevent.c (create_exited_event_object): Return a
1496         gdbpy_ref<>.
1497         (emit_exited_event): Use copy-initialization.
1498         * python/py-inferior.c (python_new_inferior)
1499         (python_inferior_deleted, add_thread_object): Use
1500         copy-initialization.
1501         * python/py-infevents.c (create_inferior_call_event_object)
1502         (create_register_changed_event_object)
1503         (create_memory_changed_event_object): Return a gdbpy_ref<>.
1504         (emit_inferior_call_event, emit_memory_changed_event)
1505         (emit_register_changed_event): Use copy-initialization.
1506         * python/py-newobjfileevent.c (create_new_objfile_event_object):
1507         Return a gdbpy_ref<>.
1508         (emit_new_objfile_event): Use copy-initialization.
1509         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
1510         (emit_clear_objfiles_event): Use copy-initialization.
1511         * python/py-signalevent.c (create_signal_event_object): Use
1512         copy-initialization.
1513         * python/py-threadevent.c (create_thread_event_object): Use
1514         copy-initialization.
1515
1516 2018-08-24  Pedro Alves  <palves@redhat.com>
1517             Simon Marchi  <simon.marchi@ericsson.com>
1518
1519         PR gdb/23379
1520         * python/py-continueevent.c: Include "gdbthread.h".
1521         (create_continue_event_object): Add intro comment.  Add 'ptid'
1522         parameter.  Use it to find thread to pass to
1523         create_thread_event_object.
1524         (emit_continue_event): Pass PTID down to
1525         create_continue_event_object.
1526         * python/py-event.h (py_get_event_thread): Declare.
1527         (create_thread_event_object): Remove default from 'thread'
1528         parameter.
1529         * python/py-stopevent.c (create_stop_event_object): Use
1530         py_get_event_thread.
1531         * python/py-threadevent.c (get_event_thread): Rename to ...
1532         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
1533         and use it to find the thread.
1534         (create_thread_event_object): Assert that THREAD isn't null.
1535         Don't find the event thread here.
1536
1537 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
1538
1539         * block.h (blockrange, blockranges): New struct declarations.
1540         (struct block): Add new field named `ranges'.
1541         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
1542         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
1543         macros for accessing ranges in struct block.
1544         (make_blockranges): New declaration.
1545         block.c (make_blockranges): New function.
1546         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
1547         for block.
1548         * symtab.h (find_pc_partial_function): Add new parameter `block'.
1549         * blockframe.c (cache_pc_function_block): New static global.
1550         (clear_pc_function_cache): Clear cache_pc_function_block.
1551         (find_pc_partial_function): Move comment to symtab.h.  Add
1552         support for non-contiguous blocks.
1553         * cli/cli-cmds.c (block.h): Include.
1554         (print_disassembly): Handle printing of non-contiguous blocks.
1555         (disassemble_current_function): Likewise.
1556         (disassemble_command): Likewise.
1557
1558         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
1559         BLOCK_START.
1560         * blockframe.c (get_pc_function_start): Likewise.
1561         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
1562         (gcc_symbol_address): Likewise.
1563         * compile/compile-object-run.c (compile_object_run): Likewise.
1564         * compile/compile.c (get_expr_block_and_pc): Likewise.
1565         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
1566         (func_addr_to_tail_call_list): Likewise.
1567         * findvar.c (default_read_var_value): Likewise.
1568         * inline-frame.c (inline_frame_this_id): Likewise.
1569         (skip-inline_frames): Likewise.
1570         * infcmd.c (until_next_command): Likewise.
1571         * linespec.c (convert_linespec_to_sals): Likewise.
1572         * parse.c (parse_exp_in_context_1): Likewise.
1573         * printcmd.c (build_address_symbolic): likewise.
1574         (info_address_command): Likewise.
1575         symtab.c (find_function_start_sal): Likewise.
1576         (skip_prologue_sal): Likewise.
1577         (find_function_alias_target): Likewise.
1578         (find_gnu_ifunc): Likewise.
1579         * stack.c (find_frame_funname): Likewise.
1580         * symtab.c (fixup_symbol_section): Likewise.
1581         (find_function_start_sal): Likewise.
1582         (skip_prologue_sal): Likewsie.
1583         (find_function_alias_target): Likewise.
1584         (find_gnu_ifunc): Likewise.
1585         * tracepoint.c (info_scope_command): Likewise.
1586         * value.c (value_fn_field): Likewise.
1587
1588         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
1589         in place of find_pc_partial_function.
1590         * blockframe.c (find_function_entry_range_from_pc): New function.
1591         * symtab.h (find_function_entry_range_from_pc): Declare and document.
1592         * objfiles.c (objfile_relocate1): Relocate start and end addresses
1593         for each range in a block.
1594
1595
1596 2018-08-23  Xavier Roirand  <roirand@adacore.com>
1597
1598         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
1599         incrementation.
1600
1601 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
1602
1603         * solib-svr4.c (read_program_headers_from_bfd): Return
1604         gdb::optional<gdb::byte_vector>.
1605         (svr4_exec_displacement): Adjust.
1606
1607 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
1608
1609         * solib-svr4.c (read_program_header): Return
1610         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
1611         (find_program_interpreter): Return
1612         gdb::optional<gdb::byte_vector>.
1613         (scan_dyntag_auxv): Adjust.
1614         (enable_break): Adjust.
1615         (svr4_exec_displacement): Adjust.
1616
1617 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
1618
1619         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
1620         * inf-child.c (inf_child_target::terminal_save_inferior): New.
1621
1622 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
1623
1624         * guile/scm-string.c (gdbscm_scm_from_printf): Use
1625         string_vprintf.
1626         * guile/scm-utils.c (gdbscm_printf): Likewise.
1627         * serial.c (serial_printf): Likewise.
1628         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
1629
1630 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
1631
1632         * stack.c (print_frame): Print frame architecture when printing on
1633         an MI output.
1634         * NEWS: Mention new "arch" attribute in frame output.
1635
1636 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
1637
1638         * arch/aarch64.h (aarch64_regnum): Update comment.
1639
1640 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
1641
1642         * NEWS: Add SVE to 8.2 section.
1643
1644 2018-08-21  Pedro Alves  <palves@redhat.com>
1645
1646         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
1647         out from gdbscm_parse_function_args.
1648         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
1649         gdbscm_parse_function_args_1.
1650
1651 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
1652
1653         PR gdb/17816
1654         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
1655         operator.
1656
1657 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
1658
1659         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
1660
1661 2018-08-19  Michael Spang  <spang@google.com>
1662
1663         PR gdb/11786
1664         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
1665         for PT_TLS segments.
1666
1667 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
1668
1669         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
1670         dwarf_variable_value.
1671         * dwarf2-frame.c (class dwarf_expr_executor):
1672         Add override for dwarf_variable_value.
1673         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
1674         (class symbol_needs_eval_context): Likewise.
1675         (indirect_synthetic_pointer): Add forward declaration.
1676         (sect_variable_value): New function.
1677         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
1678         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
1679         for DW_OP_GNU_variable_value.
1680
1681 2018-08-16  Tom Tromey  <tom@tromey.com>
1682
1683         * top.c (read_command_file): Update.
1684         (command_line_input): Remove "repeat" argument.
1685         * ada-lang.c (get_selections): Update.
1686         * linespec.c (decode_line_2): Update.
1687         * defs.h (command_line_input): Remove argument.
1688         * cli/cli-script.c (read_next_line): Update.
1689         * python/py-gdb-readline.c: Update.
1690
1691 2018-08-17  Tom Tromey  <tom@tromey.com>
1692
1693         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
1694         command_line_input.
1695
1696 2018-08-15  Tom Tromey  <tom@tromey.com>
1697
1698         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
1699
1700 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
1701
1702         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
1703         If used, use find_pc_partial_function to find address range
1704         to disassemble.
1705         * mi/mi-main.c (mi_cmd_list_features): Report
1706         "data-disassemble-a-option" feature.
1707         * NEWS: Mention new -data-disassemble option -a.
1708
1709 2018-08-13  Tom Tromey  <tom@tromey.com>
1710
1711         * common/common-defs.h (_FORTIFY_SOURCE): Define.
1712
1713 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
1714
1715         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
1716         (aarch64_linux_collect_sve_regset): Likewise.
1717         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
1718         * regcache.h (regcache_map_entry_size): New function.
1719
1720 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
1721
1722         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
1723         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
1724         (SVE_HEADER_VL_LENGTH): Likewise.
1725         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
1726         (SVE_HEADER_FLAGS_LENGTH): Likewise.
1727         (SVE_HEADER_RESERVED_LENGTH): Likewise.
1728         (SVE_HEADER_SIZE_OFFSET): Likewise.
1729         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
1730         (SVE_HEADER_VL_OFFSET): Likewise.
1731         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
1732         (SVE_HEADER_FLAGS_OFFSET): Likewise.
1733         (SVE_HEADER_RESERVED_OFFSET): Likewise.
1734         (SVE_HEADER_SIZE): Likewise.
1735         (aarch64_linux_core_read_vq): Add function.
1736         (aarch64_linux_core_read_description): Check for SVE section.
1737
1738 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
1739
1740         * aarch64-fbsd-tdep.c
1741         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
1742         collect_size.
1743         * aarch64-linux-tdep.c
1744         (aarch64_linux_iterate_over_regset_sections): Likewise.
1745         * alpha-linux-tdep.c
1746         (alpha_linux_iterate_over_regset_sections):
1747         * alpha-nbsd-tdep.c
1748         (alphanbsd_iterate_over_regset_sections): Likewise.
1749         * amd64-fbsd-tdep.c
1750         (amd64fbsd_iterate_over_regset_sections): Likewise.
1751         * amd64-linux-tdep.c
1752         (amd64_linux_iterate_over_regset_sections): Likewise.
1753         * arm-bsd-tdep.c
1754         (armbsd_iterate_over_regset_sections): Likewise.
1755         * arm-fbsd-tdep.c
1756         (arm_fbsd_iterate_over_regset_sections): Likewise.
1757         * arm-linux-tdep.c
1758         (arm_linux_iterate_over_regset_sections): Likewise.
1759         * corelow.c (get_core_registers_cb): Likewise.
1760         (core_target::fetch_registers): Likewise.
1761         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
1762         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
1763         * gdbarch.h (void): Regenerate.
1764         * gdbarch.sh: Add supply_size and collect_size.
1765         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
1766         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
1767         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
1768         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
1769         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
1770         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
1771         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
1772         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
1773         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
1774         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
1775         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
1776         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
1777         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
1778         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
1779         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
1780         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
1781         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
1782         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
1783         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
1784         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
1785         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
1786         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
1787         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
1788         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
1789         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
1790         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
1791         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
1792         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
1793         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
1794         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
1795
1796 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
1797
1798         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
1799         with string_printf.
1800
1801 2018-08-10  Keith Seitz  <keiths@redhat.com>
1802
1803         * compile/compile-c-support.c (add_code_header, add_code_footer):
1804         Move into policy class.
1805         (c_push_user_expression, pop_user_expression_nop)
1806         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
1807         (compile_program): New host class.
1808         (c_compile_program): New typedef.
1809         (c_compute_porgram): Use c_compile_program.
1810
1811 2018-08-10  Keith Seitz  <keiths@redhat.com>
1812
1813         * compile/compile-internal.h (compile_instance::~compile_instance):
1814         Remove calls to htab_delete.
1815         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
1816         * compile.c (compile_instance::compile_instance): Initialize
1817         htab unique pointers.
1818         (compile_instance::get_cached_type, compile_instance::insert_type)
1819         (compile_instance::error_symbol_once): Update for unique_ptr.
1820
1821 2018-08-10  Keith Seitz  <keiths@redhat.com>
1822
1823         * compile/compile-c-symbols.c (struct symbol_error)
1824         (hash_symbol_error, eq_symbol_error, del_symbol_error)
1825         (compile_instance::insert_symbol_error)
1826         (compile_instance::error_symbol_once): Move to ...
1827         * compile/compile.c: ... here.
1828
1829 2018-08-10  Keith Seitz  <keiths@redhat.com>
1830
1831         * compile/compile-c-support.c (c_get_compile_context): Use `new'
1832         instead of `new_compile_instance'.
1833         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
1834         Update description.
1835         If the symbol error map is not initialized, create it.
1836         (generate_c_for_for_one_symbol): Do not check/initialize
1837         the symbol error map.
1838         * compile/compile-c-types.c (compile_c_instance): Make a class.
1839         Update all callers.
1840         (compile_instance::compile_instance): Initialize the type cache.
1841         (get_cached_type): New function.
1842         (insert_type): Update description.
1843         (compile_c_instance::m_default_cflags): Define.
1844         (convert_type): Update description.  Use get_cached_type.
1845         (delete_instance): Moved to destructor.
1846         (new_compile_instance): Moved to constructor.
1847         * compile/compile-c.h (compile_c_instance): Make class inheriting
1848         from compile_instance.
1849         <base>: Remove field.
1850         <type_map, symbol_err_map>: Move to base class.
1851         <c_plugin>: Rename to `m_plugin' and remove pointer type.
1852         * compile/compile-internal.h (compile_instance): Make class.
1853         <type_map_t, symbol_err_map_t>: Define.
1854         <fe>: Rename to `m_gcc_fe'.
1855         <scope, block, gcc_target_options>: Add `m_' prefix.
1856         <m_type_map, m_symbol_err_map>: New fields, moved from
1857         compile_c_instance.
1858         <destroy>: Remove.
1859         (convert_type, new_compile_instance): Remove.
1860         * compile/compile.c (cleanup_compile_instance): Remove.
1861         (compile_to_object): Use unique_ptr to eliminate cleanups.
1862         (compile_instance::set_print_callback, compile_instance::version)
1863         (compile_instance::set_verbose)
1864         (compile_instance::set_driver_filename)
1865         (compile_instance::set_triplet_regexp)
1866         (compile_instance::set_arguments)
1867         (compile_instance::set_source_file)
1868         (compile_instance::compile): Define.
1869
1870 2018-08-10  Keith Seitz  <keiths@redhat.com>
1871
1872         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
1873         * compile/compile-c-types.c: Define GCC_METHODN macros and include
1874         gcc-c-fe.def to define C plugin.
1875         (delete_instance): Delete `c_plugin'.
1876         (new_compile_instance): Initialize `c_plugin'.
1877         * compile/compile-c.h: Include gcc_c_plugin.h.
1878         (struct compile_c_instance) <c_plugin>: New member.
1879         * gcc-c-plugin.h: New file.
1880         Update all callers with API change.
1881
1882 2018-08-10  Keith Seitz  <keiths@redhat.com>
1883
1884         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
1885         (HFILES_NO_SRCDIR): ... to here.
1886         Add compile-internal.h and compile-c.h.
1887         * compile/compile-c-support.c: Include compile-c.h.
1888         * compile/compile-c-symbols.c: Include compile-c.h.
1889         (generate_c_for_variable_locations): Update comment.
1890         * compile/compile-c-types.c: Include compile-c.h.
1891         * compile/compile-c.h: New file -- moved C language declarations
1892         from other files here.
1893         * compile/compile-internal.h: Do not include hashtab.h or
1894         common/enum-flags.h.
1895         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
1896         (gcc_convert_symbol, gcc_symbol_address)
1897         (generate_c_for_variable_locations, c_get_mode_for_size)
1898         (c_get_range_decl_name): Definitions moved to compile-c.h.
1899         * compile/compile-loc2c.c: Include compile-c.h.
1900
1901 2018-08-10  Keith Seitz  <keiths@redhat.com>
1902
1903         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
1904         (c_symbol_substitution_name): ... this.
1905         Update all callers.
1906
1907 2018-08-10  Keith Seitz  <keiths@redhat.com>
1908
1909         * compile/compile-c-support.c (c_compute_program): Use
1910         unique_xmalloc_ptr to eliminate cleanup.
1911         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
1912         Return a unique_xmalloc_ptr and eliminate cleanup.
1913         * compile/compile-internal.h (generate_c_for_variable_locations):
1914         Return unique_xmalloc_ptr and update description.
1915
1916 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
1917
1918         * corelow.c (core_target::get_core_register_section): Rename
1919         min_size to section_min_size.
1920
1921 2018-08-09  Jim Wilson  <jimw@sifive.com>
1922
1923         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
1924         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
1925         * NEWS: Mention new GNU/Linux RISC-V target.
1926         * configure.host: Add riscv*-*-linux*.
1927         * configure.nat: Add riscv*.
1928         * configure.tgt: Add riscv*-*-linux*.
1929         * riscv-linux-nat.c: New file.
1930         * riscv-linux-tdep.c: New file.
1931
1932 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
1933
1934         * infrun.c (resume): Make static, add forward declaration.
1935         (proceed): Update header comment.
1936         * infrun.h (resume): Delete declaration.
1937
1938 2018-08-09  Tom Tromey  <tom@tromey.com>
1939
1940         * riscv-tdep.h: Minor formatting fixes.
1941
1942 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
1943
1944         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
1945         * dwarf-index-cache.c (create_dir_and_check): Likewise.
1946         (test_mkdir_recursive): Likewise.
1947         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
1948
1949 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
1950
1951         * valarith.c (value_subscripted_rvalue): If an array is not in
1952         memory, and we don't know the upper bound, then we can't know that
1953         the requested element exists or not.
1954
1955 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
1956
1957         * target.c (str_comma_list_concat_elem): Fix typo in comment.
1958         (target_options_to_string): Add comment.
1959
1960 2018-08-08  Tom Tromey  <tom@tromey.com>
1961
1962         * unittests/scoped_mmap-selftests.c: Check result of "write".
1963
1964 2018-08-08  Jim Wilson  <jimw@sifive.com>
1965
1966         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
1967         (decode_register_index_short): New.
1968         (decode_j_type_insn, decode_cj_type_insn): New.
1969         (decode_b_type_insn, decode_cb_type_insn): New.
1970         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
1971         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
1972         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
1973         is_c_sw_insn instead of is_sw_insn.
1974         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
1975         (riscv_software_single_step): New.
1976         * riscv-tdep.h (riscv_software_single_step): Declare.
1977
1978         * riscv-tdep.c (riscv_isa_xlen): Drop static.
1979         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
1980
1981 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
1982
1983         PR gdb/18050:
1984         * target.c (dispose_inferior): Don't dispose of inferiors that are
1985         already killed.
1986
1987 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
1988
1989         * remote.c (remote_target::download_tracepoint): Change char* to
1990         const char*.
1991
1992 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
1993
1994         * target.h (target_options_to_string): Return an std::string.
1995         * target.c (str_comma_list_concat_elem): Return void, use
1996         std::string.
1997         (do_option): Likewise.
1998         (target_options_to_string): Return an std::string.
1999         * linux-nat.c (linux_nat_target::wait): Adjust.
2000         * target-debug.h (target_debug_print_options): Adjust.
2001
2002 2018-08-07  Tom Tromey  <tom@tromey.com>
2003
2004         * Makefile.in (CPPFLAGS): New variable.
2005         (INTERNAL_CPPFLAGS): Use it.
2006
2007 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2008
2009         * NEWS: Mention the index cache.
2010
2011 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2012
2013         * common/pathstuff.h (get_standard_cache_dir): New.
2014         * common/pathstuff.c (get_standard_cache_dir): New.
2015         * build-id.h (build_id_to_string): New.
2016         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
2017         DEBUG_STR_SUFFIX): Move to here.
2018         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
2019         DEBUG_STR_SUFFIX): Move from there.
2020         (write_psymtabs_to_index): Make non-static, add basename
2021         parameter.  Write to temporary files, rename when done.
2022         (save_gdb_index_command): Adjust call to
2023         write_psymtabs_to_index.
2024         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
2025         field.
2026         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
2027         (get_gdb_index_contents_from_cache): New.
2028         (get_gdb_index_contents_from_cache_dwz): New.
2029         (dwarf2_initialize_objfile): Read index from cache.
2030         (dwarf2_build_psymtabs): Save to index.
2031         * dwarf-index-cache.h: New file.
2032         * dwarf-index-cache.c: New file.
2033         * dwarf-index-write.h: New file.
2034
2035 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2036
2037         * gnulib/aclocal.m4: Re-generate.
2038         * gnulib/config.in: Re-generate.
2039         * gnulib/configure: Re-generate.
2040         * gnulib/import/Makefile.am: Re-generate.
2041         * gnulib/import/Makefile.in: Re-generate.
2042         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
2043         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2044         * gnulib/import/m4/mkdir.m4: New file.
2045         * gnulib/import/mkdir.c: New file.
2046         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
2047         module.
2048
2049 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2050
2051         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
2052         * common/scoped_mmap.c: New file.
2053         * common/scoped_mmap.h (destroy): New method.
2054         (~scoped_mmap, reset): Use destroy.
2055         (scoped_mmap): New move constructor.
2056         (mmap_file): New declaration.
2057         * unittests/scoped_mmap-selftests.c (test_normal,
2058         test_invalid_filename, run_tests): New functions.
2059         (_initialize_scoped_mmap_selftests): Register selftest.
2060
2061 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2062
2063         * dwarf2read.c (read_gdb_index_from_section): Rename to...
2064         (read_gdb_index_from_buffer): ... this.  Remove section
2065         parameter, add buffer parameter.
2066         (get_gdb_index_contents_ftype,
2067         get_gdb_index_contents_dwz_ftype): New typedefs.
2068         (dwarf2_read_gdb_index): Add callback parameters to get the
2069         index contents.
2070         (get_gdb_index_contents_from_section): New.
2071         (dwarf2_initialize_objfile): Update call to
2072         dwarf2_read_gdb_index.
2073
2074 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2075
2076         * common/filestuff.h (gdb_fopen_cloexec): New overload.
2077         (gdb_open_cloexec): Likewise.
2078         * nat/linux-osdata.c (command_from_pid): Use string_printf.
2079         (commandline_from_pid): Likewise.
2080         (linux_xfer_osdata_threads): Likewise.
2081         (linux_xfer_osdata_fds): Likewise.
2082         * ada-lang.c (is_package_name): Likewise.
2083         * auxv.c (procfs_xfer_auxv): Likewise.
2084         * breakpoint.c (print_one_breakpoint_location): Use
2085         uiout::field_fmt.
2086         (print_one_catch_solib): Use string_printf.
2087         * coff-pe-read.c (add_pe_exported_sym): Likewise.
2088         (add_pe_forwarded_sym): Likewise.
2089         * dwarf2read.c (create_type_unit_group): Likewise.
2090         (build_error_marker_type): Likewise.
2091         * infcall.c (get_function_name): Likewise.
2092         * valprint.c (print_converted_chars_to_obstack): Likewise.
2093         * xtensa-tdep.c (xtensa_register_type): Likewise.
2094
2095 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
2096
2097         * remote.c (remote_target::download_tracepoint): Fix format
2098         string errors.
2099
2100 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2101
2102         * tracefile.c: Include common/byte-vector.h.
2103         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
2104         with trace_regblock_size if needed.  Update uses of buf.
2105
2106 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2107
2108         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
2109         std::vector<unsigned char>.
2110         * tracepoint.c (collection_list::collection_list): Remove
2111         m_regs_mask initializer from initializer list.  Resize
2112         m_regs_mask using the largest remote register number.
2113         (collection_list::add_remote_register): Remove size check on
2114         m_regs_mask.  Use at to access element.
2115         (collection_list::stringify): Change type of temp_buf to
2116         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
2117         stringify the register mask.  Use pack_hex_byte for the register
2118         mask.
2119
2120 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2121
2122         * tracepoint.h (class collection_list) <add_register>: Remove.
2123         <add_remote_register, add_ax_registers, add_local_register>:
2124         Declare.
2125         <add_memrange>: Add scope parameter.
2126         * tracepoint.c (encode_actions_1): Likewise.
2127         (collection_list::add_register): Rename to ...
2128         (collection_list::add_remote_register): ... this.  Update
2129         comment.
2130         (collection_list::add_ax_registers, add_local_register): New
2131         methods.
2132         (collection_list::add_memrange): Add scope parameter.  Call
2133         add_local_register instead of add_register.
2134         (finalize_tracepoint_aexpr): New function.
2135         (collection_list::collect_symbol): Update calls to add_memrange.
2136         Call add_local_register instead of add_register.  Call
2137         add_ax_registers.  Call finalize_tracepoint_aexpr.
2138         (encode_actions_1): Get remote regnos for $reg action.  Call
2139         add_remote_register, add_ax_registers, and add_local_register.
2140         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
2141         (validate_actionline): Call finalize_tracepoint_aexpr.
2142
2143 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2144
2145         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
2146         Replace array buf with gdb::char_vector buf, of size
2147         get_remote_packet_size ().  Replace references to buf and
2148         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
2149         and xsnprintf with snprintf.  Raise errors if the buffer is too
2150         small.
2151
2152 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2153
2154         * remote.c (remote_target::download_tracepoint): Fix the has_more
2155         predicate in the QTDP action list iteration.
2156
2157 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2158
2159         * remote.c (remote_target::download_tracepoint): Fix indentation
2160         in for block.
2161
2162 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2163
2164         * proc-api.c (_initialize_proc_api): Remove c, unused.
2165         * procfs.c (procfs_init_inferior): Remove signals, unused.
2166         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
2167         unused.
2168
2169 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
2170             Andrew Burgess  <andrew.burgess@embecosm.com>
2171
2172         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
2173         'W_STOPCODE (0)' as this could be ambiguous.
2174
2175 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
2176
2177         * ser-tcp.c (net_open): Fix thinko when deciding whether to
2178         disable TCP's Nagle algorithm (use "ai_protocol" instead of
2179         "ai_socktype").
2180
2181 2018-08-02  Tom Tromey  <tom@tromey.com>
2182
2183         PR symtab/16842.
2184         * dwarf2read.c (read_func_scope): Set symtab on template parameter
2185         symbols.
2186         (process_structure_scope): Likewise.
2187
2188 2018-08-02  Xavier Roirand  <roirand@adacore.com>
2189
2190         PR gdb/22629:
2191         * darwin-nat.c (darwin_kill_inferior): Fix handling of
2192         kill inferior.
2193
2194 2018-08-02  Tom Tromey  <tom@tromey.com>
2195
2196         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
2197         (darwin_suspend_inferior, darwin_resume_inferior)
2198         (darwin_decode_notify_message, darwin_resume_inferior_threads)
2199         (darwin_check_new_threads): Check result of get_darwin_inferior.
2200
2201 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
2202
2203         GDB 8.1.1 released.
2204
2205 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
2206
2207         * varobj.c (varobj_get_path_expr_parent): Report an error if
2208         parent is a dynamic varobj.
2209
2210 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
2211
2212         * gnulib/aclocal.m4: Re-generate.
2213         * gnulib/config.in: Re-generate.
2214         * gnulib/configure: Re-generate.
2215         * gnulib/import/Makefile.in: Re-generate.
2216         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2217         * gnulib/import/m4/onceonly.m4: Re-generate.
2218
2219 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
2220
2221         * target-descriptions.c (struct xml_test_tdesc): New.
2222         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
2223         (record_xml_tdesc): Update.
2224         (maintenance_check_xml_descriptions): Update.
2225         * target-descriptions.h (record_xml_tdesc): Update comment.
2226
2227 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
2228
2229         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
2230         checking array bounds are defined.
2231
2232 2018-07-30  Tom Tromey  <tom@tromey.com>
2233
2234         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
2235         irreflexivity violation.
2236
2237 2018-07-30  Tom Tromey  <tom@tromey.com>
2238
2239         * cli/cli-decode.c (lookup_cmd): Remove lint code.
2240         * value.c (unpack_long): Remove lint code.
2241         * valops.c (value_ind): Remove lint code.
2242         * valarith.c (value_x_binop, value_x_unop, value_equal)
2243         (value_pos): Remove lint code.
2244
2245 2018-07-28  Tom de Vries  <tdevries@suse.de>
2246
2247         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
2248         with undefined upper bound as <optimized out>.
2249
2250 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
2251
2252         * gcore.in: Rename variable "name" to "prefix".  Expand
2253         "usage" text.
2254
2255 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
2256
2257         * windows-nat.c (windows_nat_target::create_inferior): Update to
2258         call close() in global namespace.
2259
2260 2018-07-26  Tom Tromey  <tom@tromey.com>
2261
2262         * dwarf-index-write.c (add_address_entry): Don't add objfile
2263         offsets.
2264         * dbxread.c (find_stab_function): Rename from
2265         find_stab_function_addr.  Return a bound_minimal_symbol.
2266         (read_dbx_symtab): Use raw_text_low, raw_text_high.
2267         Don't add objfile offsets.
2268         (end_psymtab): Use raw_text_low, raw_text_high,
2269         MSYMBOL_VALUE_RAW_ADDRESS.
2270         (read_ofile_symtab): Update.
2271         (process_one_symbol): Update.
2272         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
2273         offsets.
2274         (dw2_relocate): Remove.
2275         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
2276         searching addrmap.
2277         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
2278         Update.
2279         (process_psymtab_comp_unit_reader, add_partial_symbol)
2280         (add_partial_subprogram, dwarf2_ranges_read): Update.
2281         (load_partial_dies): Update.
2282         (add_address_entry): Don't add objfile offsets.
2283         (dwarf2_build_include_psymtabs): Update.
2284         (create_addrmap_from_aranges): Don't add objfile offsets.
2285         (dw2_find_pc_sect_compunit_symtab): Update.
2286         * mdebugread.c (parse_symbol): Don't add objfile offsets.
2287         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
2288         Update.
2289         (parse_partial_symbols): Don't add objfile offsets.  Use
2290         raw_text_low, raw_text_high.  Update.
2291         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
2292         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
2293         or call 'relocate' quick function.  Clear psymbol_map.
2294         * psympriv.h (struct partial_symbol) <address>: Add section
2295         offset.
2296         <set_unrelocated_address>: Rename from set_address.
2297         <raw_text_low, raw_text_high>: New methods.
2298         <text_low, text_high>: Add objfile parameter.
2299         (add_psymbol_to_bcache): Add 'section' parameter.  Call
2300         set_unrelocated_address.
2301         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2302         (find_pc_psymbol): Update.
2303         (fixup_psymbol_section, relocate_psymtabs): Remove.
2304         (dump_psymtab, psym_functions): Update.
2305         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
2306         parameter.
2307         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
2308         (start_psymtab_common): Update.
2309         * symfile-debug.c (debug_qf_relocate): Remove.
2310         (debug_sym_quick_functions): Update.
2311         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
2312         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
2313         Update.
2314
2315 2018-07-26  Tom Tromey  <tromey@redhat.com>
2316
2317         * dbxread.c (end_psymtab): Use text_high_valid and
2318         text_low_valid.
2319         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
2320         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
2321         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
2322         Update comment.
2323         <text_low_valid, text_high_valid>: New fields.
2324         <set_text_low, set_text_high>: Update.
2325         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
2326
2327 2018-07-26  Tom Tromey  <tom@tromey.com>
2328
2329         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
2330         Update.
2331         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
2332         textlow and texthigh fields.
2333         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
2334         Update.
2335         * mdebugread.c (parse_lines, parse_partial_symbols)
2336         (psymtab_to_symtab_1): Update.
2337         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
2338         Rename fields.  Update comment.  Now private.
2339         <text_low, text_high, set_text_low, set_text_high>: New methods.
2340         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2341         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
2342         (start_psymtab_common, maintenance_info_psymtabs)
2343         (maintenance_check_psymtabs): Update.
2344         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
2345         texthigh fields.
2346         (scan_xcoff_symtab): Update.
2347
2348 2018-07-26  Tom Tromey  <tromey@redhat.com>
2349
2350         * psympriv.h (struct partial_symbol) <unrelocated_address,
2351         address, set_address>: New methods.
2352         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
2353         (fixup_psymbol_section, relocate_psymtabs): Update.
2354         (print_partial_symbols): Add 'objfile' parameter.  Update.
2355         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
2356         Update.
2357
2358 2018-07-26  Tom Tromey  <tom@tromey.com>
2359
2360         * dwarf-index-write.c (write_psymbols, debug_names::insert)
2361         (debug_names::write_psymbols): Update.
2362         * psympriv.h (struct partial_symbol): Derive from
2363         general_symbol_info.
2364         <obj_section>: New method.
2365         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
2366         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2367         (find_pc_sect_psymbol, fixup_psymbol_section)
2368         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
2369         (print_partial_symbols, recursively_search_psymtabs)
2370         (compare_psymbols, psymbol_hash, psymbol_compare)
2371         (add_psymbol_to_bcache, maintenance_check_psymtabs)
2372         (psymbol_name_matches, psym_fill_psymbol_map): Update.
2373
2374 2018-07-26  Tom Tromey  <tromey@redhat.com>
2375
2376         * dbxread.c (end_psymtab): Remove dead code.
2377
2378 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
2379
2380         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
2381         DWARF unwinders are disabled.
2382         * dwarf2-frame.c: Add dwarf2read.h include.
2383         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
2384         disabled.
2385         (dwarf2_frame_unwinders_enabled_p): Define.
2386         (show_dwarf_unwinders_enabled_p): New function.
2387         (_initialize_dwarf2_frame): Register switch to control DWARF
2388         unwinder use.
2389         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
2390         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
2391         (show_dwarf_cmdlist): Remove static keyword.
2392         * dwarf2read.h (set_dwarf_cmdlist): Declare.
2393         (show_dwarf_cmdlist): Declare.
2394         * NEWS: Document new feature.
2395
2396 2018-07-26  Tom de Vries  <tdevries@suse.de>
2397
2398         PR breakpoints/23366
2399         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
2400
2401 2018-07-26  Tom de Vries  <tdevries@suse.de>
2402
2403         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
2404         DW_AT_count can't be translated to a dynamic prop.
2405
2406 2018-07-25  Tom de Vries  <tdevries@suse.de>
2407
2408         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
2409         try/catch.
2410
2411 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
2412
2413         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
2414
2415 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
2416
2417         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
2418
2419 2018-07-24  Keith Seitz  <keiths@redhat.comt
2420
2421         PR symtab/23010
2422         * dwarf2read.c (dw2_add_symbol_to_list): New function.
2423         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
2424         instead of add_symbol_to_list.
2425         (read_file_scope): Call prepare_one_comp_unit before reading
2426         any other DIEs.
2427
2428 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
2429
2430         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
2431
2432 2018-07-24  Tom Tromey  <tom@tromey.com>
2433
2434         * utils.c (malloc, realloc, free): Don't declare.
2435         * configure, config.in: Rebuild.
2436         * configure.ac: Don't check for declarations of free, malloc, or
2437         realloc.
2438
2439 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
2440
2441         * aarch64-linux-nat.c
2442         (aarch64_linux_nat_target::stopped_data_address): Remove unused
2443         variable.
2444         * arm-linux-nat.c (fetch_regs): Likewise.
2445         (store_regs): Likewise.
2446         (fetch_vfp_regs): Likewise.
2447         (store_vfp_regs): Likewise.
2448         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
2449         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
2450         (arm_linux_nat_target::insert_watchpoint): Likewise.
2451         (arm_linux_nat_target::remove_watchpoint): Likewise.
2452         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
2453         Likewise.
2454         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
2455         Likewise.
2456         * ppc-linux-nat.c (fetch_register): Likewise.
2457         (fetch_all_gp_regs): Likewise.
2458         (fetch_ppc_registers): Likewise.
2459         (store_all_gp_regs): Likewise.
2460         (store_ppc_registers): Likewise.
2461         (hwdebug_insert_point): Likewise.
2462         (can_use_watchpoint_cond_accel): Likewise.
2463         * remote-sim.c (gdb_os_write_stdout): Likewise.
2464
2465 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
2466             Tom Tromey  <tom@tromey.com>
2467
2468         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
2469         test for it.
2470         * configure: Rebuild.
2471
2472 2018-07-22  Tom Tromey  <tom@tromey.com>
2473
2474         * regformats/regdat.sh: Define xmltarget_${name} inside
2475         #ifndef IN_PROCESS_AGENT.
2476
2477 2018-07-22  Tom Tromey  <tom@tromey.com>
2478
2479         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
2480
2481 2018-07-22  Tom Tromey  <tom@tromey.com>
2482
2483         * symfile.c (reread_symbols): Notify iter, not objfile.
2484
2485 2018-07-22  Tom Tromey  <tom@tromey.com>
2486
2487         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
2488         Use arch_ops.
2489         (ravenscar_thread_target::prepare_to_store): Likewise.
2490
2491 2018-07-22  Tom Tromey  <tom@tromey.com>
2492
2493         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
2494         unused variable.  Call value_fetch_lazy when needed.
2495         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
2496         Remove unused variable.  Call value_fetch_lazy when needed.
2497
2498 2018-07-22  Tom Tromey  <tom@tromey.com>
2499
2500         * m32c-tdep.c (mark_dma): Return void.
2501         (make_regs): Remove unused declarations.
2502
2503 2018-07-22  Tom Tromey  <tom@tromey.com>
2504
2505         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
2506         cmdscm_get_valid_command_smob_arg_unsafe for effect.
2507         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
2508         bkscm_get_valid_block_smob_arg_unsafe for effect.
2509
2510 2018-07-22  Tom Tromey  <tom@tromey.com>
2511
2512         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
2513         value_type.
2514
2515 2018-07-22  Tom Tromey  <tom@tromey.com>
2516
2517         * windows-nat.c (saved_context): Conditionally define.
2518         * remote.c (remote_target::remote_btrace_maybe_reopen):
2519         Conditionally declare "warned".
2520         * inflow.c (sigquit_ours): Conditionally define.
2521         (new_tty): Move "tty" declaration inside #if.
2522         * guile/guile.c (guile_datadir): Conditionally define.
2523         * charset.c (set_be_le_names): Move some declarations inside #if.
2524         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
2525         #if.
2526         (parse_xml_btrace_conf): Likewise.
2527
2528 2018-07-22  Tom Tromey  <tom@tromey.com>
2529
2530         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
2531
2532 2018-07-22  Tom Tromey  <tom@tromey.com>
2533
2534         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
2535         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
2536         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
2537         * buildsym-legacy.c (get_macro_table): Remove unused variable.
2538         * stack.c (frame_apply_level_command): Remove unused variable.
2539         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
2540         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
2541         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
2542         unused variable.
2543         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
2544         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
2545         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
2546         variable.
2547         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
2548         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
2549         variable.
2550         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
2551         Remove unused variable.
2552         * cli/cli-script.c (recurse_read_control_structure): Remove unused
2553         variable.
2554         * common/tdesc.c (print_xml_feature::visit): Remove unused
2555         variable.
2556         * compile/compile-object-load.c (store_regs): Remove unused
2557         variables.
2558         * complaints.c (clear_complaints): Remove unused variable.
2559         * corelow.c (core_target_open): Remove unused variable.
2560         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
2561         variable.
2562         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
2563         variable.
2564         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
2565         variable.
2566         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
2567         variable.
2568         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
2569         variable.
2570         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
2571         variable.
2572         * ia64-tdep.c (examine_prologue): Remove unused variable.
2573         * infcall.c (run_inferior_call): Remove unused variable.
2574         * inferior.c (exit_inferior): Remove unused variable.
2575         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
2576         * linespec.c (decode_line_2): Remove unused variable.
2577         * linux-nat.c (super_close): Remove.
2578         * linux-tdep.c (linux_info_proc): Remove unused variable.
2579         * mi/mi-main.c (mi_execute_command): Remove unused variable.
2580         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
2581         Remove unused variable.
2582         * parse.c (find_minsym_type_and_address): Remove unused variable.
2583         * printcmd.c (info_symbol_command, printf_floating): Remove unused
2584         variable.
2585         * python/py-breakpoint.c (bppy_set_commands): Remove unused
2586         variable.
2587         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
2588         variables.
2589         * record-btrace.c (record_btrace_target::store_registers): Remove
2590         unused variable.
2591         (cmd_show_record_btrace_cpu): Remove unused variable.
2592         * riscv-tdep.c (riscv_register_reggroup_p)
2593         (riscv_push_dummy_call, riscv_return_value): Remove unused
2594         variable.
2595         * rust-exp.y (literal): Remove unused variable.
2596         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
2597         unused variable.
2598         <STRUCTOP_ANONYMOUS>: Likewise.
2599         * s390-linux-tdep.c (s390_linux_init_abi_31)
2600         (s390_linux_init_abi_64): Remove unused variable.
2601         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
2602         (file_select_thread, net_windows_open, _initialize_ser_windows):
2603         Remove unused variables.
2604         * symtab.c (find_pc_sect_line): Remove unused variable.
2605         * target-memory.c (compute_garbled_blocks): Remove unused
2606         variable.
2607         (target_write_memory_blocks): Remove unused variable.
2608         * target.c (target_stack::unpush): Remove unused variables.
2609         * tracepoint.c (start_tracing, all_tracepoint_actions)
2610         (merge_uploaded_trace_state_variables)
2611         (print_one_static_tracepoint_marker): Remove unused variable.
2612         * unittests/basic_string_view/element_access/char/1.cc (test01):
2613         Remove unused variable.
2614         * windows-nat.c (windows_continue, windows_add_all_dlls)
2615         (do_initial_windows_stuff, windows_nat_target::create_inferior):
2616         Remove unused variables.
2617
2618 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
2619
2620         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
2621         attr_profile in HAVE_ELF.
2622         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
2623         HAVE_ELF.
2624
2625 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
2626
2627         * frame.c (frame_register_unwind): Change parameter name.
2628         (frame_unwind_register): Likewise.
2629         (frame_unwind_register_value): Likewise.
2630         (frame_unwind_register_signed): Likewise.
2631         (frame_unwind_register_unsigned): Likewise.
2632         * frame.h (frame_register_unwind): Likewise.
2633         (frame_unwind_register): Likewise.
2634         (frame_unwind_register_value): Likewise.
2635         (frame_unwind_register_signed): Likewise.
2636         (frame_unwind_register_unsigned): Likewise.
2637         (frame_unwind_arch): Likewise.
2638
2639 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
2640
2641         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
2642         ISA maintenance.
2643
2644 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
2645
2646         * mips-linux-nat.c (mips_linux_nat_target::read_description):
2647         Call `get_ptrace_pid' rather than extracting the ptrace PID by
2648         hand.
2649
2650 2018-07-20  Keith Seitz  <keiths@redhat.com>
2651
2652         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
2653         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
2654         m_compunit_symtab, m_language>: Add "m_" prefix.
2655         Update all uses.
2656         * buildsym.c: Update all uses.
2657
2658 2018-07-20  Tom Tromey  <tom@tromey.com>
2659
2660         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
2661         * buildsym.h (record_line_ftype): Remove typedef.
2662
2663 2018-07-20  Tom Tromey  <tom@tromey.com>
2664
2665         * buildsym-legacy.h (augment_type_symtab): Don't declare.
2666         (end_expandable_symtab): Likewise.
2667         (end_symtab_get_static_block): Likewise.
2668         (end_symtab_from_static_block): Likewise.
2669         * buildsym-legacy.c (augment_type_symtab): Remove.
2670         (end_expandable_symtab): Remove.
2671         (end_symtab_get_static_block): Remove.
2672         (end_symtab_from_static_block): Remove.
2673
2674 2018-07-20  Tom Tromey  <tom@tromey.com>
2675
2676         * dwarf2read.c: Include buildsym.h.
2677         (struct dwarf2_cu) <builder>: New method.
2678         (fixup_go_packaging): Update.
2679         (process_full_comp_unit, process_full_type_unit): Update.  Don't
2680         use scoped_free_pendings.
2681         (using_directives): Add "cu" parameter, remove "language".
2682         (read_import_statement, setup_type_unit_groups, )
2683         (read_func_scope, read_lexical_block_scope)
2684         (dwarf2_record_block_ranges, read_namespace): Update.
2685         (lnp_state_machine::lnp_state_machine): Add cu parameter.
2686         (lnp_state_machine::handle_end_sequence): Update.
2687         (class lnp_state_machine) <m_cu>: New member.
2688         <m_record_line_callback>: Remove.
2689         <m_currently_recording_lines>: New member.
2690         (lnp_state_machine::handle_set_file): Update.
2691         (noop_record_line): Remove.
2692         (dwarf_record_line_p): Add cu parameter.
2693         (dwarf_record_line_1, dwarf_finish_line): Likewise.
2694         (lnp_state_machine::record_line)
2695         (lnp_state_machine::lnp_state_machine)
2696         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
2697         (dwarf_decode_lines): Update.
2698         (dwarf2_start_subfile): Add cu parameter.
2699         (dwarf2_start_symtab, new_symbol): Update.
2700         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
2701         Remove dwarf2_per_objfile parameter.
2702         (dwarf_decode_macros): Update.
2703
2704 2018-07-20  Tom Tromey  <tom@tromey.com>
2705
2706         * stabsread.c (define_symbol): Update.
2707         * buildsym-legacy.h (get_buildsym_compunit): Declare.
2708         * dwarf2read.c (new_symbol): Update.
2709         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
2710         * cp-namespace.c: Include buildsym.h.
2711         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
2712         * buildsym-legacy.c (get_buildsym_compunit): New function.
2713
2714 2018-07-20  Tom Tromey  <tom@tromey.com>
2715
2716         * xcoffread.c: Include buildsym-legacy.h.
2717         * windows-nat.c: Include buildsym-legacy.h.
2718         * stabsread.c: Include buildsym-legacy.h.
2719         * mdebugread.c: Include buildsym-legacy.h.
2720         * buildsym-legacy.h: New file.
2721         * buildsym-legacy.c: New file, from buildsym.c.
2722         * go32-nat.c: Include buildsym-legacy.h.
2723         * dwarf2read.c: Include buildsym-legacy.h.
2724         * dbxread.c: Include buildsym-legacy.h.
2725         * cp-namespace.c: Include buildsym-legacy.h.
2726         * coffread.c: Include buildsym-legacy.h.
2727         * buildsym.h: Move some contents to buildsym-legacy.h.
2728         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
2729         buildsym-legacy.c.
2730         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
2731
2732 2018-07-20  Tom Tromey  <tom@tromey.com>
2733
2734         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
2735         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
2736         (buildsym_compunit::buildsym_compunit)
2737         (buildsym_compunit::~buildsym_compunit)
2738         (buildsym_compunit::get_macro_table): Define.
2739
2740 2018-07-20  Tom Tromey  <tom@tromey.com>
2741
2742         * buildsym.c (reset_symtab_globals): Remove.
2743         (buildsym_compunit::end_symtab_from_static_block): Update.
2744         (buildsym_compunit::augment_type_symtab): Update.
2745         (end_symtab_from_static_block): Call free_buildsym_compunit.
2746         (augment_type_symtab, end_symtab, end_expandable_symtab):
2747         Likewise.
2748
2749 2018-07-20  Tom Tromey  <tom@tromey.com>
2750
2751         * arch-utils.c: Do not include buildsym.h.
2752         * mipsread.c: Do not include buildsym.h.
2753         * machoread.c: Do not include buildsym.h.
2754         * elfread.c: Do not include buildsym.h.
2755
2756 2018-07-20  Tom Tromey  <tom@tromey.com>
2757
2758         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
2759         initialization.
2760         (buildsym_compunit): Add new constructor.
2761         (struct buildsym_compunit) <get_last_source_file, finish_block,
2762         record_block_range, start_subfile, patch_subfile_names,
2763         push_subfile, pop_subfile, record_line, get_compunit_symtab,
2764         set_last_source_start_addr, get_last_source_start_addr,
2765         get_local_using_directives, set_local_using_directives,
2766         get_global_using_directives, outermost_context_p,
2767         get_current_context_stack, get_context_stack_depth,
2768         get_current_subfile, get_local_symbols, get_file_symbols,
2769         get_global_symbols, record_debugformat, record_producer,
2770         push_context, pop_context, end_symtab_get_static_block,
2771         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
2772         New public methods.
2773         <record_pending_block, finish_block_internal, make_blockvector,
2774         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
2775         private methods.
2776         Update all users.
2777
2778 2018-05-22  Tom Tromey  <tom@tromey.com>
2779
2780         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
2781         parameter.
2782         (finish_block_internal): Update.
2783
2784 2018-07-20  Tom Tromey  <tom@tromey.com>
2785
2786         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
2787         parameter.
2788         (finish_block_internal): Update.
2789
2790 2018-07-20  Tom Tromey  <tom@tromey.com>
2791
2792         * buildsym.h (EXTERN): Don't define or undef.
2793         * buildsym.c (EXTERN): Don't define.
2794
2795 2018-07-20  Tom Tromey  <tom@tromey.com>
2796
2797         * buildsym.c: Remove TODO comment.
2798
2799 2018-07-20  Tom Tromey  <tom@tromey.com>
2800
2801         * coffread.c (coff_symtab_read): Update.
2802         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
2803         (xcoff_new_init): Update.
2804         * mipsread.c (mipscoff_new_init): Update.
2805         * mdebugread.c (mdebug_build_psymtabs): Update.
2806         * elfread.c (elf_new_init): Update.
2807         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
2808         Update.
2809         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
2810         (coffstab_build_psymtabs, elfstab_build_psymtabs)
2811         (stabsect_build_psymtabs): Update.
2812         * buildsym.h (buildsym_init): Don't declare.
2813         * buildsym.c: Update comment.
2814         (prepare_for_building): Remove.
2815         (start_symtab, restart_symtab): Update.
2816         (reset_symtab_globals): Update comment.
2817         (buildsym_init): Remove.
2818
2819 2018-07-20  Tom Tromey  <tom@tromey.com>
2820
2821         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
2822         * stabsread.c (patch_block_stabs, define_symbol, read_type)
2823         (read_enum_type, common_block_start, common_block_end)
2824         (cleanup_undefined_types_1, finish_global_stabs): Update.
2825         * mdebugread.c (psymtab_to_symtab_1): Update.
2826         * dwarf2read.c (fixup_go_packaging, read_func_scope)
2827         (read_lexical_block_scope, new_symbol): Update.
2828         * dbxread.c (process_one_symbol): Update.
2829         * coffread.c (coff_symtab_read, process_coff_symbol)
2830         (coff_read_enum_type): Update.
2831         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
2832         declare.
2833         (get_local_symbols, get_file_symbols, get_global_symbols): New
2834         functions.
2835         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
2836         m_global_symbols.
2837         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
2838         (~scoped_free_pendings): Update.
2839         (finish_block, prepare_for_building, reset_symtab_globals)
2840         (end_symtab_get_static_block, end_symtab_with_blockvector)
2841         (augment_type_symtab, push_context): Update.
2842         (get_local_symbols, get_file_symbols, get_global_symbols): New
2843         functions.
2844         (buildsym_init): Update.
2845
2846 2018-07-20  Tom Tromey  <tom@tromey.com>
2847
2848         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
2849         (process_full_type_unit): Likewise.
2850         (dwarf2_start_symtab): Set list_in_scope.
2851
2852 2018-07-20  Tom Tromey  <tom@tromey.com>
2853
2854         * dwarf2read.c (process_psymtab_comp_unit_reader)
2855         (build_type_psymtabs_reader): Do not set list_in_scope.
2856
2857 2018-07-20  Tom Tromey  <tom@tromey.com>
2858
2859         * buildsym.c (free_pendings): Remove.
2860         (add_symbol_to_list, scoped_free_pendings)
2861         (finish_block_internal, buildsym_init): Update.
2862
2863 2018-07-20  Tom Tromey  <tom@tromey.com>
2864
2865         * xcoffread.c (read_xcoff_symtab): Update.
2866         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
2867         Update.
2868         * dbxread.c (process_one_symbol): Update.
2869         * coffread.c (coff_symtab_read): Update.
2870         * buildsym.h (finish_block): Update.
2871         * buildsym.c (finish_block): Remove "listhead" argument.
2872         (end_symtab_get_static_block): Update.
2873
2874 2018-07-20  Tom Tromey  <tom@tromey.com>
2875
2876         * buildsym.h (class scoped_free_pendings): Remove constructor.
2877         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
2878         method.
2879         <m_pending_block_obstack, m_pending_blocks>: New members.
2880         (pending_block_obstack, pending_blocks): Remove.
2881         (scoped_free_pendings::scoped_free_pendings): Default.
2882         (~scoped_free_pendings): Update.
2883         (free_pending_blocks): Remove.
2884         (finish_block_internal, record_pending_block, make_blockvector)
2885         (end_symtab_get_static_block, augment_type_symtab, push_context)
2886         (buildsym_init): Update.
2887
2888 2018-07-20  Tom Tromey  <tom@tromey.com>
2889
2890         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
2891         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
2892         members.
2893         (pending_addrmap, pending_addrmap_obstack)
2894         (pending_addrmap_interesting): Remove.
2895         (scoped_free_pendings, record_block_range, make_blockvector)
2896         (prepare_for_building, reset_symtab_globals, buildsym_init):
2897         Update.
2898
2899 2018-07-20  Tom Tromey  <tom@tromey.com>
2900
2901         * xcoffread.c (process_linenos): Update.
2902         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
2903         * mdebugread.c (psymtab_to_symtab_1): Update.
2904         * dwarf2read.c (setup_type_unit_groups)
2905         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
2906         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
2907         * dbxread.c (process_one_symbol): Update.
2908         * coffread.c (coff_symtab_read, enter_linenos)
2909         (process_coff_symbol): Update.
2910         * buildsym.h (current_subfile): Don't declare.
2911         (get_current_subfile): Declare.
2912         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
2913         member.
2914         (start_subfile, free_buildsym_compunit, push_subfile)
2915         (prepare_for_building, start_symtab): Update.
2916         (get_current_subfile): New function.
2917
2918 2018-07-20  Tom Tromey  <tom@tromey.com>
2919
2920         * coffread.c (coff_symtab_read): Update.
2921         * xcoffread.c (read_xcoff_symtab): Update.
2922         * dwarf2read.c (new_symbol): Update.
2923         (read_func_scope, read_lexical_block_scope): Update.
2924         * dbxread.c (process_one_symbol): Update.
2925         * buildsym.h (context_stack, context_stack_depth): Don't declare.
2926         (outermost_context_p): Remove macro.
2927         (outermost_context_p, get_current_context_stack)
2928         (get_context_stack_depth): Declare.
2929         (pop_context): Return struct context_stack.
2930         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
2931         member.
2932         (context_stack_size): Remove.
2933         (INITIAL_CONTEXT_STACK_SIZE): Remove.
2934         (prepare_for_building, end_symtab_get_static_block)
2935         (augment_type_symtab, push_context): Update.
2936         (pop_context): Return struct context_stack.
2937         (outermost_context_p, get_current_context_stack)
2938         (get_context_stack_depth): New functions.
2939         (buildsym_init): Update.
2940
2941 2018-07-20  Tom Tromey  <tom@tromey.com>
2942
2943         * rust-exp.y: Now a pure parser.  Update all rules.
2944         (%union): Move earlier.
2945         (current_parser, work_obstack): Remove globals.
2946         (rust_parser, ~rust_parser): Update.
2947         (class rust_parser) <copy_name, concat3, crate_name, super_name,
2948         lex_character, lex_number, lex_string, lex_identifier,
2949         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
2950         convert_name, convert_params_to_expression,
2951         convert_ast_to_expression, ast_basic_type, ast_operation,
2952         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
2953         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
2954         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
2955         ast_array_type, ast_slice_type, ast_reference_type,
2956         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
2957         (rust_parse): Update.
2958         (rustyyerror, rustyylex): Add parser parameter.
2959         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
2960         (rust_lex_stringish_test, rust_lex_test_sequence)
2961         (rust_lex_test_trailing_dot, rust_lex_test_completion)
2962         (rust_lex_test_push_back, rust_lex_tests): Update.
2963
2964 2018-07-19  Pedro Alves  <palves@redhat.com>
2965
2966         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
2967         gdb::unique_xmalloc_ptr.
2968         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
2969         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
2970         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
2971         copy-initialization.
2972         * guile/scm-pretty-print.c (ppscm_print_children): Use
2973         gdb::unique_xmalloc_ptr instead of cleanups.
2974         (gdbscm_apply_val_pretty_printer): Remove cleanups.
2975         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
2976         gdb::unique_xmalloc_ptr.
2977         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2978         Adjust to use gdb::unique_xmalloc_ptr.
2979         * guile/scm-utils.c (extract_arg): Adjust.
2980         * guile/scm-value.c (gdbscm_value_field): Adjust to use
2981         gdb::unique_xmalloc_ptr instead of a cleanup.
2982
2983 2018-07-19  Tom Tromey  <tom@tromey.com>
2984
2985         * utils.c (do_value_free_to_mark)
2986         (make_cleanup_value_free_to_mark): Remove.
2987         * utils.h (make_cleanup_value_free_to_mark): Remove.
2988
2989 2018-07-19  Pedro Alves  <palves@redhat.com>
2990
2991         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
2992         forwarding reference.
2993
2994 2018-07-18  Pedro Alves  <palves@redhat.com>
2995
2996         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
2997         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
2998         cleanup.
2999
3000 2018-07-18  Pedro Alves  <palves@redhat.com>
3001
3002         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
3003         exceptions.
3004         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
3005         (gdbscm_wrap): New.
3006         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
3007         directly instead of a cleanup.
3008         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
3009         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
3010         (vlscm_binop_gdbthrow): New, factored out from ...
3011         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
3012         (vlscm_rich_compare): Use gdbscm_wrap.
3013         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
3014         instead of a cleanup.
3015         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
3016         cleanup.
3017         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
3018         Use xfree directly instead of a cleanup.
3019         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
3020         Adjust to use gdbscm_wrap and scoped_value_mark.
3021         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
3022         (gdbscm_value_address, gdbscm_value_dereference)
3023         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
3024         scoped_value_mark.
3025         (gdbscm_value_dynamic_type): Use scoped_value_mark.
3026         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
3027         scoped_value_mark.
3028         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
3029         gdbscm_wrap and scoped_value_mark.
3030         (gdbscm_value_to_string): Use xfree directly instead of a
3031         cleanup.  Move 'buffer' unique_ptr to TRY scope.
3032         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
3033         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
3034         scoped_value_mark.
3035         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
3036         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
3037         scoped_value_mark.
3038         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
3039         gdbscm_wrap.
3040
3041 2018-07-18  Tom de Vries  <tdevries@suse.de>
3042
3043         * findvar.c (default_read_var_value): Also resolve dynamic type for
3044         LOC_OPTIMIZED_OUT vars.
3045
3046 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
3047
3048         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
3049         decoding.
3050
3051 2018-07-17  Tom Tromey  <tom@tromey.com>
3052
3053         * guile/scm-param.c (pascm_set_func, pascm_show_func)
3054         (compute_enum_list, pascm_set_param_value_x)
3055         (gdbscm_parameter_value): Update.
3056         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
3057         (gdbscm_scm_to_host_string): Update.
3058         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
3059         Update.
3060         * guile/scm-cmd.c (cmdscm_add_completion): Update.
3061         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
3062         * guile/scm-string.c (gdbscm_scm_to_string): Return
3063         unique_xmalloc_ptr.
3064         (gdbscm_scm_to_host_string): Likewise.
3065
3066 2018-07-17  Tom Tromey  <tom@tromey.com>
3067
3068         * guile/guile.c (gdbscm_eval_from_control_command): Update.
3069         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
3070         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
3071         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
3072         unique_xmalloc_ptr.
3073
3074 2018-07-17  Tom Tromey  <tom@tromey.com>
3075
3076         * guile/scm-param.c (pascm_signal_setshow_error): Update.
3077         * guile/guile-internal.h (gdbscm_exception_message_to_string):
3078         Update.
3079         * guile/scm-cmd.c (cmdscm_function): Update.
3080         * guile/scm-pretty-print.c
3081         (ppscm_print_exception_unless_memory_error): Update.
3082         * guile/scm-exception.c (gdbscm_exception_message_to_string):
3083         Return unique_xmalloc_ptr.
3084
3085 2018-07-17  Tom Tromey  <tom@tromey.com>
3086
3087         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
3088         Use string_printf.
3089
3090 2018-07-17  Jim Wilson  <jimw@sifive.com>
3091
3092         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
3093         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
3094         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
3095         unecessary braces after EF_RISCV_RVC test.  Delete call to
3096         set_gdbarch_decr_pc_after_break.
3097
3098         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
3099         RISCV_LAST_FP_REGNUM + 1.
3100         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
3101
3102 2018-07-17  Tom Tromey  <tom@tromey.com>
3103
3104         * configure.ac: Remove --disable-gdbcli.
3105         * configure: Rebuild.
3106         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
3107         (SUBDIR_CLI_CFLAGS): Remove.
3108         (SFILES): Use SUBDIR_CLI_SRCS.
3109         (COMMON_OBS): Use SUBDIR_CLI_OBS.
3110
3111 2018-07-17  Tom Tromey  <tom@tromey.com>
3112
3113         PR gdb/18624:
3114         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
3115
3116 2018-07-16  Jim Wilson  <jimw@sifive.com>
3117
3118         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
3119
3120 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
3121
3122         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
3123         variable.
3124         (libunwind_frame_sniffer): Likewise.
3125         (libunwind_frame_prev_register): Likewise.
3126         (libunwind_sigtramp_frame_sniffer): Likewise.
3127         * ia64-tdep.c (ia64_access_reg): Likewise.
3128         (ia64_access_rse_reg): Likewise.
3129         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
3130         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
3131
3132 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
3133
3134         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
3135
3136 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
3137
3138         * remote-sim.c (gdbsim_target::close,
3139         gdbsim_target::mourn_inferior): Remove unused variables.
3140
3141 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
3142
3143         * ia64-tdep.c (ktab_buf): New global.
3144         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
3145         (get_kernel_table): Adjust.
3146
3147 2018-07-16  Tom Tromey  <tom@tromey.com>
3148
3149         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
3150         * dwarf2read.c (using_directives, new_symbol): Use
3151         outermost_context_p.
3152         * dbxread.c (process_one_symbol): Use outermost_context_p.
3153         * coffread.c (coff_symtab_read): Use outermost_context_p.
3154
3155 2018-07-16  Tom Tromey  <tom@tromey.com>
3156
3157         * dwarf2read.c (using_directives, read_func_scope)
3158         (read_lexical_block_scope): Update.
3159         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
3160         * buildsym.h (local_using_directives, global_using_directives):
3161         Don't declare.
3162         (get_local_using_directives, set_local_using_directives)
3163         (get_global_using_directives): Declare.
3164         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
3165         m_global_using_directives>: New members.
3166         (finish_block_internal, prepare_for_building)
3167         (reset_symtab_globals, end_symtab_get_static_block)
3168         (push_context): Update.
3169         (get_local_using_directives, set_local_using_directives)
3170         (get_global_using_directives): New functions.
3171         (buildsym_init): Update.
3172
3173 2018-07-16  Tom Tromey  <tom@tromey.com>
3174
3175         * xcoffread.c (xcoff_initial_scan): Don't call
3176         free_pending_blocks.
3177         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
3178         * buildsym.h (class scoped_free_pendings): Add constructor.
3179         (free_pending_blocks): Don't declare.
3180         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
3181         (free_pending_blocks): Now static.
3182
3183 2018-07-16  Tom Tromey  <tom@tromey.com>
3184
3185         * buildsym.h (push_subfile, pop_subfile): Update declarations.
3186         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
3187         member.
3188         (struct subfile_stack): Remove.
3189         (subfile_stack): Remove.
3190         (push_subfile, pop_subfile, buildsym_init): Update.
3191
3192 2018-07-16  Tom Tromey  <tom@tromey.com>
3193
3194         * buildsym.c (push_subfile): Use gdb_assert.
3195         (pop_subfile): Use gdb_assert.
3196
3197 2018-07-16  Tom Tromey  <tom@tromey.com>
3198
3199         * buildsym.h (merge_symbol_lists): Remove.
3200         * buildsym.c (merge_symbol_lists): Remove.
3201
3202 2018-07-16  Tom Tromey  <tom@tromey.com>
3203
3204         * stabsread.c (scan_file_globals): Update comment.
3205         * stabsread.h (scan_file_globals): Move from buildsym.h.
3206         * buildsym.h (scan_file_globals): Move to stabsread.h.
3207
3208 2018-07-16  Tom Tromey  <tom@tromey.com>
3209
3210         * xcoffread.c (xcoff_new_init): Update.
3211         * mipsread.c (mipscoff_new_init): Update.
3212         * mdebugread.c (mdebug_build_psymtabs): Update.
3213         * elfread.c (elf_new_init): Update.
3214         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
3215         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
3216         * buildsym.h (buildsym_new_init): Don't declare.
3217         * buildsym.c (buildsym_new_init): Remove.
3218
3219 2018-07-16  Tom Tromey  <tom@tromey.com>
3220
3221         * stabsread.h (within_function): Move from buildsym.h.
3222         * stabsread.c (start_stabs): Clear within_function.
3223         * coffread.c (coff_start_symtab): Clear within_function.
3224         * buildsym.h (within_function): Move to stabsread.h.
3225         * buildsym.c (prepare_for_building): Update.
3226
3227 2018-07-16  Tom Tromey  <tom@tromey.com>
3228
3229         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
3230         * dwarf2read.c (dwarf2_start_symtab): Don't set
3231         processing_gcc_compilation.
3232         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
3233
3234 2018-07-16  Tom Tromey  <tom@tromey.com>
3235
3236         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
3237         (next_symbol_text_func): Move from buildsym.h.
3238         * stabsread.c (hashname): Move from buildsym.c.
3239         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
3240         (next_symbol_text_func, hashname): Move to stabsread.h.
3241         * buildsym.c: Don't include bcache.h
3242         (hashname): Move to stasbread.c.
3243
3244 2018-07-16  Tom Tromey  <tom@tromey.com>
3245
3246         * buildsym.h (context_stack_size): Don't declare.
3247         * buildsym.c (context_stack_size): New global.
3248
3249 2018-07-16  Tom Tromey  <tom@tromey.com>
3250
3251         * dbxread.c (processing_acc_compilation): New global.
3252         * buildsym.h (processing_acc_compilation): Don't declare.
3253
3254 2018-07-16  Tom Tromey  <tom@tromey.com>
3255
3256         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
3257         * dbxread.c (read_ofile_symtab): Update.
3258         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
3259         * buildsym.h (last_source_start_addr): Remove.
3260         (set_last_source_start_addr, get_last_source_start_addr):
3261         Declare.
3262         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
3263         parameter.
3264         (struct buildsym_compunit) <m_last_source_start_addr>: New
3265         member.
3266         (prepare_for_building): Remove start_addr parameter.
3267         (start_symtab, restart_symtab, end_symtab_get_static_block)
3268         (end_symtab_with_blockvector): Update.
3269         (set_last_source_start_addr, get_last_source_start_addr): New
3270         functions.
3271
3272 2018-07-16  Tom Tromey  <tom@tromey.com>
3273
3274         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
3275         member.
3276         (have_line_numbers): Remove.
3277         (record_line, prepare_for_building, end_symtab_get_static_block)
3278         (augment_type_symtab): Update.
3279
3280 2018-07-16  Tom Tromey  <tom@tromey.com>
3281
3282         * buildsym.c (~buildsym_compunit): Free the macro table.
3283         (struct buildsym_compunit) <get_macro_table, release_macros>: New
3284         methods.
3285         <m_pending_macros>: New member.
3286         (pending_macros): Remove.
3287         (~scoped_free_pendings, get_macro_table, prepare_for_building)
3288         (reset_symtab_globals, end_symtab_get_static_block)
3289         (end_symtab_with_blockvector, augment_type_symtab)
3290         (buildsym_init): Update.
3291
3292 2018-07-16  Tom Tromey  <tom@tromey.com>
3293
3294         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
3295         parameter.
3296         (buildsym_compunit::set_last_source_file): New method.
3297         <m_last_source_file>: New member.
3298         (prepare_for_building): Remove "name" parameter.
3299         (start_symtab, restart_symtab, reset_symtab_globals): Update.
3300         (last_source_file): Remove.
3301         (set_last_source_file, get_last_source_file): Update.
3302
3303 2018-07-16  Tom Tromey  <tom@tromey.com>
3304
3305         * buildsym.c (prepare_for_building): Add assert.
3306
3307 2018-07-16  Tom Tromey  <tom@tromey.com>
3308
3309         * buildsym.c (~buildsym_compunit): Update.
3310         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
3311         (start_subfile, patch_subfile_names)
3312         (end_symtab_with_blockvector): Update.
3313
3314 2018-07-16  Tom Tromey  <tom@tromey.com>
3315
3316         * buildsym.c (struct buildsym_compunit): Add constructor,
3317         destructor, initializers.
3318         (start_buildsym_compunit): Remove.
3319         (free_buildsym_compunit): Use "delete".
3320         (start_symtab, restart_symtab): Use "new".
3321
3322 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
3323
3324         * symfile.c (set_objfile_default_section_offset): Remove struct
3325         keyword.
3326
3327 2018-07-14  Stafford Horne  <shorne@gmail.com>
3328
3329         * (Responsible Maintainers): Add myself as or1k maintainer.
3330
3331 2018-07-13  Tom Tromey  <tom@tromey.com>
3332
3333         * symfile.c (set_objfile_default_section_offset): Use extra braces
3334         around initializer.
3335
3336 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3337
3338         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
3339         non-branching basr.
3340
3341 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3342
3343         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3344         unittests/cli-utils-selftests.c
3345         * unittests/cli-utils-selftests.c: New file.
3346
3347 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3348
3349         * NEWS: Mention new commands. Mention change to 'thread apply'.
3350
3351 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3352
3353         * thread.c (thr_try_catch_cmd): New function.
3354         (thread_apply_all_command): Handle qcs flags.
3355         (thread_apply_command): Handle qcs flags.
3356         (taas_command): New function.
3357         (tfaas_command): New function.
3358         (_initialize_thread): Update to setup the new commands 'taas
3359         and 'tfaas'. Change doc string for 'thread apply'.
3360
3361 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3362
3363         * stack.c: (trailing_outermost_frame): New function, mostly
3364         extracted from backtrace_command_1.
3365         (leading_innermost_frame): New function.
3366         (backtrace_command_1): Update to call trailing_outermost_frame.
3367         (frame_apply_command_count): New function.
3368         (frame_apply_level_command): New function.
3369         (frame_apply_all_command): New function.
3370         (frame_apply_command): New function.
3371         (faas_command): New function.
3372         (frame_cmd_list): New variable.
3373         (_initialize_stack): Update to setup the new commands 'frame apply'
3374         and 'faas'.
3375
3376 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3377
3378         * cli-utils.c (number_or_range_parser::get_number): Only handle
3379         numbers or convenience var as numbers.
3380         (parse_flags): New function.
3381         (parse_flags_qcs): New function.
3382         (number_or_range_parser::finished): Ensure parsing end is detected
3383         before end of string.
3384         * cli-utils.h (parse_flags): New function.
3385         (parse_flags_qcs): New function.
3386         (number_or_range_parser): Remove m_finished bool.
3387         (number_or_range_parser::skip_range): Set m_in_range to false.
3388
3389 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
3390
3391         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
3392         on Windows.
3393
3394 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
3395             Jan Kratochvil  <jan.kratochvil@redhat.com>
3396             Paul Fertser  <fercerpav@gmail.com>
3397             Tsutomu Seki  <sekiriki@gmail.com>
3398             Pedro Alves  <palves@redhat.com>
3399
3400         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3401         'unittests/parse-connection-spec-selftests.c'.
3402         (COMMON_SFILES): Add 'common/netstuff.c'.
3403         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
3404         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
3405         * common/netstuff.c: New file.
3406         * common/netstuff.h: New file.
3407         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
3408         (wait_for_connect): Update comment.  New parameter
3409         'gdb::optional<int> sock' instead of 'struct serial *scb'.
3410         Use 'sock' directly instead of 'scb->fd'.
3411         (try_connect): New function, with code from 'net_open'.
3412         (net_open): Rewrite main loop to deal with multiple
3413         sockets/addresses.  Handle IPv6-style hostnames; implement
3414         support for IPv6 connections.
3415         * unittests/parse-connection-spec-selftests.c: New file.
3416
3417 2018-07-11  Pedro Alves  <palves@redhat.com>
3418
3419         PR gdb/23377
3420         * remote.c (remote_target::remote_detach_pid): Call
3421         set_current_process.
3422
3423 2018-07-11  Pedro Alves  <palves@redhat.com>
3424
3425         * h8300-tdep.c (h8300_gdbarch_init): Remove
3426         set_gdbarch_ecoff_reg_to_regnum calls.
3427
3428 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
3429
3430         PR c++/23373
3431         * c-typeprint.c (c_type_print_base_struct_union): Don't print
3432         offsets/sizes for static members of a class/struct.
3433
3434 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
3435
3436         * target-descriptions.c (tdesc_register_bitsize): Rename.
3437         * target-descriptions.h (tdesc_register_bitsize): Likewise.
3438         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
3439         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
3440
3441 2018-07-10  Tom Tromey  <tom@tromey.com>
3442
3443         * breakpoint.c (moribund_locations): Now static and a
3444         std::vector.
3445         (breakpoint_init_inferior, moribund_breakpoint_here_p)
3446         (build_bpstat_chain, update_global_location_list)
3447         (breakpoint_retire_moribund): Update.
3448         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
3449         VEC.
3450
3451 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
3452
3453         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
3454         (riscv_register_reggroup_p): Use new function, remove unneeded
3455         parenthesis.
3456         (riscv_push_dummy_call): Extend assert to compare against xlen or
3457         flen based on register type.
3458
3459 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
3460
3461         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
3462
3463 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
3464
3465         * remote.c (show_hardware_watchpoint_limit): New function.
3466         (show_hardware_watchpoint_length_limit): New function.
3467         (show_hardware_breakpoint_limit): New function.
3468         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
3469         where appropriate, update help text.
3470
3471 2018-07-09  Tom Tromey  <tom@tromey.com>
3472
3473         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
3474         (CLIBS): Don't mention NAT_CLIBS.
3475
3476 2018-07-09  Tom Tromey  <tom@tromey.com>
3477
3478         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
3479         (LIBGDB_OBS, clean mostlyclean): Update.
3480         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
3481
3482 2018-07-09  Tom Tromey  <tom@tromey.com>
3483
3484         * Makefile.in (%.c: %.y): Use ECHO_YACC.
3485         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
3486         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
3487
3488 2018-07-09  Tom Tromey  <tom@tromey.com>
3489
3490         * Makefile.in (ALLDEPFILES): Remove exec.c.
3491         (COMMON_OBS): Remove exec.o.
3492         (COMMON_SFILES): Add exec.c.
3493
3494 2018-07-09  Tom Tromey  <tom@tromey.com>
3495
3496         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
3497
3498 2018-07-09  Tom Tromey  <tom@tromey.com>
3499
3500         * Makefile.in (clean mostlyclean): Remove stamp-version.
3501         (version.c): Depend on stamp-version.
3502         (stamp-version): New rule, from version.c rule.
3503
3504 2018-07-09  Tom Tromey  <tom@tromey.com>
3505
3506         * Makefile.in (init.c): Depend on stamp-init.
3507         (stamp-init): New rule, from init.c rule.
3508         (clean mostlyclean): Remove stamp-init.
3509
3510 2018-07-09  Tom Tromey  <tom@tromey.com>
3511
3512         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
3513         SUBDIR_GCC_COMPILE_SRCS.
3514
3515 2018-07-09  Tom Tromey  <tom@tromey.com>
3516
3517         * Makefile.in (init.c): Remove some unused sed rules.
3518
3519 2018-07-09  Tom Tromey  <tom@tromey.com>
3520
3521         * Makefile.in (TSOBS): Remove.
3522         (INIT_FILES): Update.
3523         (LIBGDB_OBS): Update.
3524         (COMMON_SFILES): Add inflow.c.
3525         (SFILES): Remove inflow.c.
3526
3527 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
3528
3529         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
3530
3531 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
3532
3533         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
3534         get_saveloc_name, is_signal_frame_name, step_name,
3535         init_remote_name, create_addr_space_name,
3536         destroy_addr_space_name, search_unwind_table_name,
3537         find_dyn_list_name): Constify.
3538
3539 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
3540
3541         * darwin-nat.c (darwin_pthread_kill): New function.
3542         (darwin_resume_thread): Use darwin_pthread_kill.
3543
3544 2018-07-05  Tom de Vries  <tdevries@suse.de>
3545
3546         * macroexp.c (macro_buffer) <operator=>: New member function.
3547
3548 2018-07-04  Tom Tromey  <tom@tromey.com>
3549
3550         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
3551
3552 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
3553
3554         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
3555         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
3556         * maint.c: Likewise.
3557         * top.c: Likewise.
3558
3559 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
3560
3561         * NEWS: Create a new section for the next release branch.
3562         Rename the section of the current branch, now that it has
3563         been cut.
3564
3565 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
3566
3567         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
3568         * version.in: Bump version to 8.2.50.DATE-git.
3569
3570 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
3571             Pedro Alves  <palves@redhat.com>
3572
3573         * linux-nat.c (linux_init_ptrace): Rename to ...
3574         (linux_init_ptrace_procfs): ... this.  Call
3575         linux_proc_init_warnings.
3576         (linux_nat_target::post_attach)
3577         (linux_nat_target::post_startup_inferior): Adjust.
3578         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
3579         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
3580
3581 2018-07-04  Tom de Vries  <tdevries@suse.de>
3582
3583         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
3584         check ...
3585         (read_comp_unit_head): ... here.
3586
3587 2018-07-03  Tom Tromey  <tom@tromey.com>
3588
3589         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
3590         (stop_tracing, tstatus_command)
3591         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
3592         (print_one_static_tracepoint_marker): Update.
3593         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
3594         std::vector.
3595         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
3596         VEC.
3597         (all_tracepoints, static_tracepoints_here): Return std::vector.
3598
3599 2018-07-03  Tom Tromey  <tom@tromey.com>
3600
3601         * common/ptid.c (ptid_equal): Remove.
3602         * common/ptid.h (ptid_equal): Don't declare.
3603         * ada-tasks.c: Update.
3604         * breakpoint.c: Update.
3605         * common/agent.c: Update.
3606         * corelow.c: Update.
3607         * darwin-nat-info.c: Update.
3608         * darwin-nat.c: Update.
3609         * dcache.c: Update.
3610         * dtrace-probe.c: Update.
3611         * dummy-frame.c: Update.
3612         * fbsd-nat.c: Update.
3613         * frame.c: Update.
3614         * gdbthread.h: Update.
3615         * gnu-nat.c: Update.
3616         * go32-nat.c: Update.
3617         * inf-loop.c: Update.
3618         * inf-ptrace.c: Update.
3619         * infcall.c: Update.
3620         * infcmd.c: Update.
3621         * inflow.c: Update.
3622         * infrun.c: Update.
3623         * linux-fork.c: Update.
3624         * linux-nat.c: Update.
3625         * linux-thread-db.c: Update.
3626         * mi/mi-cmd-var.c: Update.
3627         * mi/mi-interp.c: Update.
3628         * mi/mi-main.c: Update.
3629         * nto-procfs.c: Update.
3630         * ppc-linux-tdep.c: Update.
3631         * procfs.c: Update.
3632         * python/py-inferior.c: Update.
3633         * python/py-record-btrace.c: Update.
3634         * python/py-record.c: Update.
3635         * ravenscar-thread.c: Update.
3636         * regcache.c: Update.
3637         * remote-sim.c: Update.
3638         * remote.c: Update.
3639         * sol-thread.c: Update.
3640         * solib.c: Update.
3641         * target.c: Update.
3642         * tui/tui-stack.c: Update.
3643         * varobj.c: Update.
3644         * windows-nat.c: Update.
3645         * windows-tdep.c: Update.
3646
3647 2018-07-03  Tom Tromey  <tom@tromey.com>
3648
3649         * common/ptid.c (ptid_match): Remove.
3650         * common/ptid.h (ptid_match): Don't declare.
3651         * fbsd-nat.c: Update.
3652         * infcmd.c: Update.
3653         * infrun.c: Update.
3654         * linux-nat.c: Update.
3655         * record-btrace.c: Update.
3656         * regcache.c: Update.
3657         * remote.c: Update.
3658
3659 2018-07-03  Tom Tromey  <tom@tromey.com>
3660
3661         * common/ptid.c (ptid_tid_p): Remove.
3662         * common/ptid.h (ptid_tid_p): Don't declare.
3663         * sol-thread.c: Update.
3664
3665 2018-07-03  Tom Tromey  <tom@tromey.com>
3666
3667         * common/ptid.c (ptid_lwp_p): Remove.
3668         * common/ptid.h (ptid_lwp_p): Don't declare.
3669         * fbsd-nat.c: Update.
3670         * linux-nat.c: Update.
3671         * nat/linux-procfs.c: Update.
3672         * nat/x86-linux-dregs.c: Update.
3673         * sol-thread.c: Update.
3674
3675 2018-07-03  Tom Tromey  <tom@tromey.com>
3676
3677         * common/ptid.c (ptid_is_pid): Remove.
3678         * common/ptid.h (ptid_is_pid): Don't declare.
3679         * infrun.c: Update.
3680         * linux-nat.c: Update.
3681         * mi/mi-interp.c: Update.
3682         * remote.c: Update.
3683         * thread.c: Update.
3684
3685 2018-07-03  Tom Tromey  <tom@tromey.com>
3686
3687         * common/ptid.c (ptid_get_tid): Remove.
3688         * common/ptid.h (ptid_get_tid): Don't declare.
3689         * ada-tasks.c: Update.
3690         * aix-thread.c: Update.
3691         * bsd-uthread.c: Update.
3692         * darwin-nat.c: Update.
3693         * fbsd-nat.c: Update.
3694         * i386-darwin-nat.c: Update.
3695         * infrun.c: Update.
3696         * linux-tdep.c: Update.
3697         * nto-procfs.c: Update.
3698         * ppc-ravenscar-thread.c: Update.
3699         * python/py-infthread.c: Update.
3700         * ravenscar-thread.c: Update.
3701         * sol-thread.c: Update.
3702         * sparc-ravenscar-thread.c: Update.
3703         * windows-nat.c: Update.
3704
3705 2018-07-03  Tom Tromey  <tom@tromey.com>
3706
3707         * common/ptid.c (ptid_get_lwp): Remove.
3708         * common/ptid.h (ptid_get_lwp): Don't declare.
3709         * aarch64-linux-nat.c: Update.
3710         * ada-tasks.c: Update.
3711         * aix-thread.c: Update.
3712         * amd64-linux-nat.c: Update.
3713         * arm-linux-nat.c: Update.
3714         * corelow.c: Update.
3715         * fbsd-nat.c: Update.
3716         * fbsd-tdep.c: Update.
3717         * gnu-nat.c: Update.
3718         * i386-cygwin-tdep.c: Update.
3719         * i386-gnu-nat.c: Update.
3720         * i386-linux-nat.c: Update.
3721         * ia64-linux-nat.c: Update.
3722         * inf-ptrace.c: Update.
3723         * infrun.c: Update.
3724         * linux-fork.c: Update.
3725         * linux-nat.c: Update.
3726         * linux-tdep.c: Update.
3727         * linux-thread-db.c: Update.
3728         * mips-linux-nat.c: Update.
3729         * nat/aarch64-linux-hw-point.c: Update.
3730         * nat/aarch64-linux.c: Update.
3731         * nat/linux-btrace.c: Update.
3732         * nat/linux-osdata.c: Update.
3733         * nat/linux-procfs.c: Update.
3734         * nat/x86-linux-dregs.c: Update.
3735         * obsd-nat.c: Update.
3736         * ppc-fbsd-nat.c: Update.
3737         * ppc-linux-nat.c: Update.
3738         * procfs.c: Update.
3739         * python/py-infthread.c: Update.
3740         * ravenscar-thread.c: Update.
3741         * remote.c: Update.
3742         * s390-linux-nat.c: Update.
3743         * sol-thread.c: Update.
3744         * sol2-tdep.c: Update.
3745         * spu-linux-nat.c: Update.
3746         * x86-linux-nat.c: Update.
3747         * xtensa-linux-nat.c: Update.
3748
3749 2018-07-03  Tom Tromey  <tom@tromey.com>
3750
3751         * common/ptid.c (ptid_get_pid): Remove.
3752         * common/ptid.h (ptid_get_pid): Don't declare.
3753         * aarch64-linux-nat.c: Update.
3754         * ada-lang.c: Update.
3755         * aix-thread.c: Update.
3756         * alpha-bsd-nat.c: Update.
3757         * amd64-fbsd-nat.c: Update.
3758         * amd64-linux-nat.c: Update.
3759         * arm-linux-nat.c: Update.
3760         * arm-nbsd-nat.c: Update.
3761         * auxv.c: Update.
3762         * break-catch-syscall.c: Update.
3763         * breakpoint.c: Update.
3764         * bsd-uthread.c: Update.
3765         * corelow.c: Update.
3766         * ctf.c: Update.
3767         * darwin-nat.c: Update.
3768         * fbsd-nat.c: Update.
3769         * fbsd-tdep.c: Update.
3770         * gcore.c: Update.
3771         * gnu-nat.c: Update.
3772         * hppa-nbsd-nat.c: Update.
3773         * hppa-obsd-nat.c: Update.
3774         * i386-fbsd-nat.c: Update.
3775         * ia64-linux-nat.c: Update.
3776         * inf-ptrace.c: Update.
3777         * infcmd.c: Update.
3778         * inferior.c: Update.
3779         * inferior.h: Update.
3780         * inflow.c: Update.
3781         * infrun.c: Update.
3782         * linux-fork.c: Update.
3783         * linux-nat.c: Update.
3784         * linux-tdep.c: Update.
3785         * linux-thread-db.c: Update.
3786         * m68k-bsd-nat.c: Update.
3787         * mi/mi-interp.c: Update.
3788         * mi/mi-main.c: Update.
3789         * mips-linux-nat.c: Update.
3790         * mips-nbsd-nat.c: Update.
3791         * mips64-obsd-nat.c: Update.
3792         * nat/aarch64-linux-hw-point.c: Update.
3793         * nat/aarch64-linux.c: Update.
3794         * nat/linux-btrace.c: Update.
3795         * nat/linux-osdata.c: Update.
3796         * nat/linux-procfs.c: Update.
3797         * nat/x86-linux-dregs.c: Update.
3798         * nto-procfs.c: Update.
3799         * obsd-nat.c: Update.
3800         * ppc-linux-nat.c: Update.
3801         * ppc-nbsd-nat.c: Update.
3802         * ppc-obsd-nat.c: Update.
3803         * proc-service.c: Update.
3804         * procfs.c: Update.
3805         * python/py-inferior.c: Update.
3806         * python/py-infthread.c: Update.
3807         * ravenscar-thread.c: Update.
3808         * record.c: Update.
3809         * remote-sim.c: Update.
3810         * remote.c: Update.
3811         * rs6000-nat.c: Update.
3812         * s390-linux-nat.c: Update.
3813         * sh-nbsd-nat.c: Update.
3814         * sol-thread.c: Update.
3815         * sparc-nat.c: Update.
3816         * sparc64-tdep.c: Update.
3817         * spu-linux-nat.c: Update.
3818         * spu-tdep.c: Update.
3819         * target-debug.h: Update.
3820         * target.c: Update.
3821         * thread.c: Update.
3822         * tid-parse.c: Update.
3823         * tracefile-tfile.c: Update.
3824         * vax-bsd-nat.c: Update.
3825         * windows-nat.c: Update.
3826         * x86-linux-nat.c: Update.
3827         * x86-nat.c: Update.
3828
3829 2018-07-03  Tom Tromey  <tom@tromey.com>
3830
3831         * common/ptid.c (pid_to_ptid): Remove.
3832         * common/ptid.h (pid_to_ptid): Don't declare.
3833         * aix-thread.c: Update.
3834         * arm-linux-nat.c: Update.
3835         * common/ptid.c: Update.
3836         * common/ptid.h: Update.
3837         * corelow.c: Update.
3838         * ctf.c: Update.
3839         * darwin-nat.c: Update.
3840         * fbsd-nat.c: Update.
3841         * fork-child.c: Update.
3842         * gnu-nat.c: Update.
3843         * go32-nat.c: Update.
3844         * inf-ptrace.c: Update.
3845         * infcmd.c: Update.
3846         * inferior.c: Update.
3847         * infrun.c: Update.
3848         * linux-fork.c: Update.
3849         * linux-nat.c: Update.
3850         * nat/aarch64-linux-hw-point.c: Update.
3851         * nat/fork-inferior.c: Update.
3852         * nat/x86-linux-dregs.c: Update.
3853         * nto-procfs.c: Update.
3854         * obsd-nat.c: Update.
3855         * procfs.c: Update.
3856         * progspace.c: Update.
3857         * remote.c: Update.
3858         * rs6000-nat.c: Update.
3859         * s390-linux-nat.c: Update.
3860         * sol-thread.c: Update.
3861         * spu-linux-nat.c: Update.
3862         * target.c: Update.
3863         * top.c: Update.
3864         * tracefile-tfile.c: Update.
3865         * windows-nat.c: Update.
3866
3867 2018-07-03  Tom Tromey  <tom@tromey.com>
3868
3869         * common/ptid.h (ptid_build): Don't declare.
3870         * common/ptid.c (ptid_build): Remove.
3871         * aix-thread.c: Update.
3872         * bsd-kvm.c: Update.
3873         * bsd-uthread.c: Update.
3874         * common/agent.c: Update.
3875         * common/ptid.c: Update.
3876         * common/ptid.h: Update.
3877         * corelow.c: Update.
3878         * darwin-nat.c: Update.
3879         * fbsd-nat.c: Update.
3880         * gnu-nat.c: Update.
3881         * linux-fork.c: Update.
3882         * linux-nat.c: Update.
3883         * linux-thread-db.c: Update.
3884         * nat/linux-osdata.c: Update.
3885         * nat/linux-procfs.c: Update.
3886         * nto-procfs.c: Update.
3887         * obsd-nat.c: Update.
3888         * proc-service.c: Update.
3889         * procfs.c: Update.
3890         * ravenscar-thread.c: Update.
3891         * remote-sim.c: Update.
3892         * remote.c: Update.
3893         * sol-thread.c: Update.
3894         * target.c: Update.
3895         * windows-nat.c: Update.
3896
3897 2018-07-03  Tom Tromey  <tom@tromey.com>
3898
3899         * infrun.c (follow_exec): Use exit_inferior_silent.
3900         * inferior.c (exit_inferior_num_silent): Remove.
3901         * inferior.h (exit_inferior_num_silent): Don't declare.
3902
3903 2018-07-03  Tom Tromey  <tom@tromey.com>
3904
3905         PR cli/23340:
3906         * darwin-nat.c (darwin_attach_pid): Reset inferior and
3907         inferior_ptid on error.
3908
3909 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
3910             Simon Marchi  <simon.marchi@polymtl.ca>
3911
3912         PR tdep/8282
3913         * disasm.h (gdb_disassembler): Add
3914         `m_disassembler_options_holder'. member
3915         * disasm.c (get_all_disassembler_options): New function.
3916         (gdb_disassembler::gdb_disassembler): Use it.
3917         (gdb_buffered_insn_length_init_dis): Likewise.
3918         (gdb_buffered_insn_length): Adjust accordingly.
3919         (set_disassembler_options): Handle options with arguments.
3920         (show_disassembler_options_sfunc): Likewise.  Add a leading new
3921         line if showing options with descriptions.
3922         (disassembler_options_completer): Adapt to using the
3923         `disasm_options_and_args_t' structure.
3924         * mips-tdep.c (mips_disassembler_options): New variable.
3925         (mips_disassembler_options_o32): Likewise.
3926         (mips_disassembler_options_n32): Likewise.
3927         (mips_disassembler_options_n64): Likewise.
3928         (gdb_print_insn_mips): Don't set `disassembler_options'.
3929         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
3930         functions.
3931         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
3932         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
3933         `gdbarch_disassembler_options_implicit' and
3934         `gdbarch_valid_disassembler_options'.
3935         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
3936         `disasm_options_and_args_t' structure.
3937         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
3938         method.
3939         (valid_disassembler_options): Switch from `disasm_options_t' to
3940         the `disasm_options_and_args_t' structure.
3941         * NEWS: Document `set disassembler-options' support for the MIPS
3942         target.
3943         * gdbarch.h: Regenerate.
3944         * gdbarch.c: Regenerate.
3945
3946 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
3947
3948         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
3949
3950 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
3951
3952         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
3953         parameter in call to amd64_target_description.
3954         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
3955         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
3956         (amd64fbsd_init_abi): Likewise.
3957         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
3958         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
3959         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
3960         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
3961
3962 2018-06-29  Pedro Alves  <palves@redhat.com>
3963
3964         * gdb/amd64-tdep.h (amd64_create_target_description): Add
3965         "segments" parameter.
3966         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
3967         (_initialize_amd64_tdep): Update call to
3968         amd64_create_target_description.
3969         (amd64_target_description): Add "segments" parameter.  Adjust
3970         the implementation to use it.
3971         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
3972         call to amd64_create_target_description.
3973         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
3974         * gdb/arch/amd64.h (amd64_create_target_description): Add
3975         "segments" register.
3976         * gdb/arch/amd64.c (amd64_create_target_description): Add
3977         "segments" parameter.  Call create_feature_i386_64bit_segments
3978         only if SEGMENTS is true.
3979         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
3980         call to amd64_create_target_description.
3981
3982 2018-06-29  Pedro Alves  <palves@redhat.com>
3983
3984         * thread.c (thread_target_id_str): New, factored out from ...
3985         (print_thread_info_1): ... here.  Use it to compute the max
3986         "Target Id" column width.
3987
3988 2018-06-29  Pedro Alves  <palves@redhat.com>
3989
3990         * remote.c (remote_target::extra_thread_info): Delete
3991         'display_buf' and 'n' locals.  from the cache, regardless of
3992         packet mechanims is in use.  Use cache for qThreadExtra and qP
3993         methods too.
3994
3995 2018-06-29  Pedro Alves  <palves@redhat.com>
3996
3997         * blockframe.c (find_pc_sect_containing_function): New function.
3998         * breakpoint.c (print_breakpoint_location): Don't call
3999         find_pc_sect_function.
4000         * linespec.c (create_sals_line_offset): Record the location's
4001         symbol in the sal.
4002         * linespec.c (convert_address_location_to_sals): Fill in sal's
4003         symbol with find_pc_sect_containing_function.
4004         * symtab.c (find_function_start_sal): Rename to ...
4005         (find_function_start_sal_1): ... this.
4006         (find_function_start_sal): Reimplement as wrapper around
4007         find_function_start_sal_1, and use
4008         find_pc_sect_containing_function to fill in the sal's symbol.
4009         (find_function_start_sal(symbol*, bool)): Adjust.
4010         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
4011         comments.
4012         (find_pc_sect_containing_function): Declare.
4013
4014 2018-06-29  Pedro Alves  <palves@redhat.com>
4015
4016         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
4017         true if the the location has no symbol.
4018
4019 2018-06-28  Tom Tromey  <tom@tromey.com>
4020
4021         * NEWS: Mention --enable-codesign.
4022         * silent-rules.mk (ECHO_SIGN): New variable.
4023         * configure.ac: Add --enable-codesign.
4024         * configure: Rebuild.
4025         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
4026         (gdb$(EXEEXT)): Optionally invoke codesign.
4027
4028 2018-06-28  Pedro Alves  <palves@redhat.com>
4029
4030         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
4031         comments.
4032         (switch_to_thread_no_regs): Adjust comment.
4033         * infcmd.c (stop_pc): Delete.
4034         (post_create_inferior, info_program_command): Replace references
4035         to stop_pc with references to thread_info->suspend.stop_pc.
4036         * inferior.h (stop_pc): Delete declaration.
4037         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
4038         (handle_inferior_event_1, handle_signal_stop)
4039         (process_event_stop_test, keep_going_stepped_thread)
4040         (handle_step_into_function, handle_step_into_function_backward)
4041         (print_stop_location): Replace references to stop_pc with
4042         references to thread_info->suspend.stop_pc.
4043         (struct infcall_suspend_state) <stop_pc>: Delete field.
4044         (save_infcall_suspend_state, restore_infcall_suspend_state):
4045         Remove references to inf_stat->stop_pc.
4046         * linux-fork.c (fork_load_infrun_state): Likewise.
4047         * record-btrace.c (record_btrace_set_replay): Likewise.
4048         * record-full.c (record_full_goto_entry): Likewise.
4049         * remote.c (print_one_stopped_thread): Likewise.
4050         * target.c (target_resume): Extend comment.
4051         * thread.c (set_executing_thread): New.
4052         (set_executing): Use it.
4053         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
4054         Remove references to stop_pc.
4055
4056 2018-06-28  Pedro Alves  <palves@redhat.com>
4057
4058         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
4059         Moving fetching stop_pc until after ecs->event_thread is refreshed.
4060
4061 2018-06-28  Tom Tromey  <tom@tromey.com>
4062
4063         * coffread.c (coff_symfile_finish): Update.
4064         * xcoffread.c (xcoff_symfile_finish): Update.
4065         * elfread.c (elf_symfile_finish): Update.
4066         * symfile.h (dwarf2_free_objfile): Don't declare.
4067         * dwarf2read.c (_initialize_dwarf2_read): Use
4068         register_objfile_data_with_cleanup.
4069         (dwarf2_free_objfile): Now static.  Change signature.
4070
4071 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4072
4073         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
4074         option "-o" to add-symbol-file-load to add an offset to each
4075         section's load address.
4076         * symfile.c (set_objfile_default_section_offset): New function.
4077
4078 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4079
4080         * symfile.c (add_symbol_file_command): Make sure that sections
4081         with the same name are sorted in the same order.
4082
4083 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4084
4085         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
4086         require the second argument.  If omitted, load sections at the
4087         addresses specified in the file.
4088
4089 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4090
4091         * symfile.c (symbol_file_command, symbol_file_add_main_1)
4092         (_initialize_symfile): Add option "-o" to symbol-file to add an
4093         offset to each section of the symbol file.
4094
4095 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4096
4097         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
4098
4099 2018-06-27  Tom Tromey  <tom@tromey.com>
4100
4101         * stack.c (_initialize_stack): Update "func" help text.
4102
4103 2018-06-27  Tom Tromey  <tom@tromey.com>
4104
4105         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
4106         std::vector.
4107         (unwind_infopy_str, pyuw_create_unwind_info)
4108         (unwind_infopy_add_saved_register, pyuw_sniffer)
4109         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
4110         Update.
4111         (struct saved_reg): Add constructor.
4112         <value>: Now a gdbpy_ref<>.
4113
4114 2018-06-27  Tom Tromey  <tom@tromey.com>
4115
4116         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
4117
4118 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4119
4120         * gdb-gdb.py.in: Format using autopep8.
4121
4122 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4123
4124         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
4125         (type_lookup_function): Recognize CORE_ADDR values.
4126
4127 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4128
4129         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
4130         print tag_name.
4131
4132 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4133
4134         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
4135         <__lt__>: Add.
4136
4137 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4138
4139         * gdb-gdb.py: Move to...
4140         * gdb-gdb.py.in: ... here.
4141         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
4142         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
4143         dependencies.
4144         (distclean): Remove gdb-gdb.py when cleaning.
4145         (gdb-gdb.py, gdb-gdb.gdb): New rules.
4146         * configure: Re-generate.
4147
4148 2018-06-27  Pedro Alves  <palves@redhat.com>
4149
4150         * proc-service.c (get_ps_regcache): New.
4151         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4152         (ps_lsetfpregs): Use it.
4153
4154 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
4155
4156         PR gdb/21695
4157         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
4158         (dwarf_decode_lines_1): Adjust.
4159
4160 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4161
4162         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
4163         override.
4164         <info_proc>: Likewise.
4165
4166 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
4167
4168         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
4169         to windows_fetch_one_register, and only handle the case of
4170         fetching one register.  Move the code that reloads the context
4171         and iterates over all registers if R is negative to...
4172         (windows_nat_target::fetch_registers): ... here.
4173         (do_windows_store_inferior_registers): Rename to
4174         windows_store_one_register, and only handle the case of storing
4175         one register.  Move the code that handles the case where r is
4176         negative to...
4177         (windows_nat_target::store_registers) ... here.
4178
4179 2018-06-26  Tom Tromey  <tom@tromey.com>
4180
4181         PR rust/22574:
4182         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
4183         * rust-lang.c (rust_print_struct_def): Add podata parameter.
4184         Update.
4185         (rust_internal_print_type): Add podata parameter.
4186         (rust_print_type): Update.
4187
4188 2018-06-26  Tom Tromey  <tom@tromey.com>
4189
4190         * typeprint.h (struct print_offset_data) <update, finish,
4191         maybe_print_hole>: New methods.
4192         <indentation>: New constant.
4193         * typeprint.c (print_offset_data::indentation): Define.
4194         (print_offset_data::maybe_print_hole, print_offset_data::update)
4195         (print_offset_data::finish): Move from c-typeprint.c and rename.
4196         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
4197         (print_spaces_filtered_with_print_options): Update.
4198         (c_print_type_union_field_offset, maybe_print_hole)
4199         (c_print_type_struct_field_offset): Move to typeprint.c and
4200         rename.
4201         (c_type_print_base_struct_union): Update.
4202
4203 2018-06-25  Pedro Alves  <palves@redhat.com>
4204
4205         * gdbthread.h (thread_info_ref, delete_thread)
4206         (delete_thread_silent, first_thread_of_inferior)
4207         (any_thread_of_inferior, switch_to_thread)
4208         (enable_thread_stack_temporaries)
4209         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4210         (get_last_thread_stack_temporary)
4211         (value_in_thread_stack_temporaries, can_access_registers_thread):
4212         Spell out "struct thread_info" instead of just "thread_info".
4213         * inferior.h (notice_new_inferior): Likewise.
4214
4215 2018-06-25  Pedro Alves  <palves@redhat.com>
4216
4217         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
4218         pass thread_info pointer to delete_thread.
4219         (windows_nat_target::detach): Pass inferior pointer to
4220         detach_inferior.
4221         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
4222         delete_thread.
4223         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
4224         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
4225         and pass a thread_info pointer to delete_thread.
4226         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
4227         pass thread_info pointer to delete_thread.
4228         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
4229         delete_thread_silent call.
4230         * procfs.c (procfs_target::detach): Pass inferior pointer to
4231         detach_inferior.
4232         (procfs_target::wait): Pass thread_info pointer to delete_thread.
4233         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
4234         delete_thread_silent call.
4235         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
4236         pass thread_info pointer to delete_thread.
4237         (windows_nat_target::detach): Pass inferior pointer to
4238         delete_inferior.
4239
4240 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
4241
4242         * regcache.c (readable_regcache::read_part): Fix asserts.
4243         (reg_buffer::raw_collect_part): New function.
4244         (regcache::write_part): Fix asserts.
4245         (reg_buffer::raw_supply_part): New function.
4246         (regcache::transfer_regset_register): New helper function.
4247         (regcache::transfer_regset): Call new functions.
4248         (regcache_supply_regset): Use gdb_byte*.
4249         (regcache::supply_regset): Likewise.
4250         (regcache_collect_regset): Likewise.
4251         (regcache::collect_regset): Likewise.
4252         * regcache.h (reg_buffer::raw_collect_part): New declaration.
4253         (reg_buffer::raw_supply_part): Likewise.
4254         (regcache::transfer_regset_register): Likewise.
4255         (regcache::transfer_regset): Use gdb_byte*.
4256
4257 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
4258
4259         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
4260
4261 2018-06-21  Pedro Alves  <palves@redhat.com>
4262
4263         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
4264         instead of a ptid_t.  All callers adjusted.
4265         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
4266         adjusted.
4267         (print_ada_task_info, display_current_task_id, task_command_1):
4268         Adjust.
4269         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
4270         inferior_thread.
4271         (breakpoint_kind): Adjust.
4272         (remove_breakpoints_pid): Rename to ...
4273         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
4274         pointer.  All callers adjusted.
4275         (bpstat_clear_actions): Use inferior_thread.
4276         (get_bpstat_thread): New.
4277         (bpstat_do_actions): Use it.
4278         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
4279         to take a thread_info pointer.  All callers adjusted.
4280         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
4281         (breakpoint_re_set_thread): Use inferior_thread.
4282         * breakpoint.h (struct inferior): Forward declare.
4283         (bpstat_stop_status): Update.
4284         (remove_breakpoints_pid): Delete.
4285         (remove_breakpoints_inf): New.
4286         * bsd-uthread.c (bsd_uthread_target::wait)
4287         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
4288         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
4289         (maint_btrace_packet_history_cmd)
4290         (maint_btrace_clear_packet_history_cmd): Adjust.
4291         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
4292         inferior_thread.
4293         * cli/cli-interp.c: Include "inferior.h".
4294         * common/refcounted-object.h (struct
4295         refcounted_object_ref_policy): New.
4296         * compile/compile-object-load.c: Include gdbthread.h.
4297         (store_regs): Use inferior_thread.
4298         * corelow.c (core_target::close): Use current_inferior.
4299         (core_target_open): Adjust to use first_thread_of_inferior and use
4300         the current inferior.
4301         * ctf.c (ctf_target::close): Adjust to use current_inferior.
4302         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
4303         <thread>: ... this new field.  All references adjusted.
4304         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
4305         Take a thread_info pointer instead of a ptid_t.
4306         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
4307         (dummy_frame_discard, register_dummy_frame_dtor): Take a
4308         thread_info pointer instead of a ptid_t.
4309         * elfread.c: Include "inferior.h".
4310         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
4311         Use inferior_thread.
4312         * eval.c (evaluate_subexp): Likewise.
4313         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
4314         inferior_thread.
4315         * gdb_proc_service.h (struct thread_info): Forward declare.
4316         (struct ps_prochandle) <ptid>: Delete, replaced by ...
4317         <thread>: ... this new field.  All references adjusted.
4318         * gdbarch.h, gdbarch.c: Regenerate.
4319         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
4320         'thread' parameter.  All implementations and callers adjusted.
4321         * gdbthread.h (thread_info) <set_running>: New method.
4322         (delete_thread, delete_thread_silent): Take a thread_info pointer
4323         instead of a ptid.
4324         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
4325         (first_thread_of_process): Delete, replaced by ...
4326         (first_thread_of_inferior): ... this new function.  All callers
4327         adjusted.
4328         (any_live_thread_of_process): Delete, replaced by ...
4329         (any_live_thread_of_inferior): ... this new function.  All callers
4330         adjusted.
4331         (switch_to_thread, switch_to_no_thread): Declare.
4332         (is_executing): Delete.
4333         (enable_thread_stack_temporaries): Update comment.
4334         <enable_thread_stack_temporaries>: Take a thread_info pointer
4335         instead of a ptid_t.  Incref the thread.
4336         <~enable_thread_stack_temporaries>: Decref the thread.
4337         <m_ptid>: Delete
4338         <m_thr>: New.
4339         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4340         (get_last_thread_stack_temporary)
4341         (value_in_thread_stack_temporaries, can_access_registers_thread):
4342         Take a thread_info pointer instead of a ptid_t.  All callers
4343         adjusted.
4344         * infcall.c (get_call_return_value): Use inferior_thread.
4345         (run_inferior_call): Work with thread pointers instead of ptid_t.
4346         (call_function_by_hand_dummy): Work with thread pointers instead
4347         of ptid_t.  Use thread_info_ref.
4348         * infcmd.c (proceed_thread_callback): Access thread's state
4349         directly.
4350         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
4351         access thread's state directly.
4352         (continue_command): Use inferior_thread.
4353         (info_program_command): Use find_thread_ptid and access thread
4354         state directly.
4355         (proceed_after_attach_callback): Use thread state directly.
4356         (notice_new_inferior): Take a thread_info pointer instead of a
4357         ptid_t.  All callers adjusted.
4358         (exit_inferior): Take an inferior pointer instead of a pid.  All
4359         callers adjusted.
4360         (exit_inferior_silent): New.
4361         (detach_inferior): Delete.
4362         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
4363         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
4364         (detach_inferior_command, kill_inferior_command): Use
4365         find_inferior_id instead of valid_gdb_inferior_id and
4366         gdb_inferior_id_to_pid.
4367         (inferior_command): Use inferior and thread pointers.
4368         * inferior.h (struct thread_info): Forward declare.
4369         (notice_new_inferior): Take a thread_info pointer instead of a
4370         ptid_t.  All callers adjusted.
4371         (detach_inferior): Delete declaration.
4372         (exit_inferior, exit_inferior_silent): Take an inferior pointer
4373         instead of a pid.  All callers adjusted.
4374         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
4375         (valid_gdb_inferior_id): Delete.
4376         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
4377         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
4378         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
4379         ...
4380         <inf>: ... this new field.
4381         <step_ptid>: Delete, replaced by ...
4382         <step_thread>: ... this new field.
4383         (get_displaced_stepping_state): Take an inferior pointer instead
4384         of a pid.  All callers adjusted.
4385         (displaced_step_in_progress_any_inferior): Adjust.
4386         (displaced_step_in_progress_thread): Take a thread pointer instead
4387         of a ptid_t.  All callers adjusted.
4388         (displaced_step_in_progress, add_displaced_stepping_state): Take
4389         an inferior pointer instead of a pid.  All callers adjusted.
4390         (get_displaced_step_closure_by_addr): Adjust.
4391         (remove_displaced_stepping_state): Take an inferior pointer
4392         instead of a pid.  All callers adjusted.
4393         (displaced_step_prepare_throw, displaced_step_prepare)
4394         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
4395         All callers adjusted.
4396         (start_step_over): Adjust.
4397         (infrun_thread_ptid_changed): Remove bit updating ptids in the
4398         displaced step queue.
4399         (do_target_resume): Adjust.
4400         (fetch_inferior_event): Use inferior_thread.
4401         (context_switch, get_inferior_stop_soon): Take an
4402         execution_control_state pointer instead of a ptid_t.  All callers
4403         adjusted.
4404         (switch_to_thread_cleanup): Delete.
4405         (stop_all_threads): Use scoped_restore_current_thread.
4406         * inline-frame.c: Include "gdbthread.h".
4407         (inline_state) <inline_state>: Take a thread pointer instead of a
4408         ptid_t.  All callers adjusted.
4409         <ptid>: Delete, replaced by ...
4410         <thread>: ... this new field.
4411         (find_inline_frame_state): Take a thread pointer instead of a
4412         ptid_t.  All callers adjusted.
4413         (skip_inline_frames, step_into_inline_frame)
4414         (inline_skipped_frames, inline_skipped_symbol): Take a thread
4415         pointer instead of a ptid_t.  All callers adjusted.
4416         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
4417         (inline_skipped_frames, inline_skipped_symbol): Likewise.
4418         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
4419         pointers directly.
4420         * linux-nat.c (get_detach_signal): Likewise.
4421         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
4422         (thread_db_notice_clone): Adjust.
4423         (thread_db_find_new_threads_silently)
4424         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
4425         a thread pointer instead of a ptid_t.  All callers adjusted.
4426         * mi/mi-cmd-var.c: Include "inferior.h".
4427         (mi_cmd_var_update_iter): Update to use thread pointers.
4428         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
4429         inferior directly.
4430         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
4431         out to ...
4432         (mi_output_running): ... this new function.
4433         (mi_on_resume_1): Adjust to use it.
4434         (mi_user_selected_context_changed): Adjust to use inferior_thread.
4435         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
4436         directly.
4437         (interrupt_thread_callback): : Adjust to use thread and inferior
4438         pointers.
4439         * proc-service.c: Include "gdbthread.h".
4440         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
4441         * progspace-and-thread.c: Include "inferior.h".
4442         * progspace.c: Include "inferior.h".
4443         * python/py-exitedevent.c (create_exited_event_object): Adjust to
4444         hold a reference to an inferior_object.
4445         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
4446         inferior_thread.
4447         * python/py-inferior.c (struct inferior_object): Give the type a
4448         tag name instead of a typedef.
4449         (python_on_normal_stop): No need to check if the current thread is
4450         listed.
4451         (inferior_to_inferior_object): Change return type to
4452         inferior_object.  All callers adjusted.
4453         (find_thread_object): Delete, bits factored out to ...
4454         (thread_to_thread_object): ... this new function.
4455         * python/py-infthread.c (create_thread_object): Use
4456         inferior_to_inferior_object.
4457         (thpy_is_stopped): Use thread pointer directly.
4458         (gdbpy_selected_thread): Use inferior_thread.
4459         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
4460         field, replaced with ...
4461         <thread>: ... this new field.  All users adjusted.
4462         (btpy_insn_or_gap_new): Drop const.
4463         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
4464         callers adjusted.
4465         * python/py-record.c: Include "gdbthread.h".
4466         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
4467         a ptid_t.  All callers adjusted.
4468         (gdbpy_current_recording): Use inferior_thread.
4469         * python/py-record.h (recpy_record_object) <ptid>: Delete
4470         field, replaced with ...
4471         <thread>: ... this new field.  All users adjusted.
4472         (recpy_element_object) <ptid>: Delete
4473         field, replaced with ...
4474         <thread>: ... this new field.  All users adjusted.
4475         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
4476         a ptid_t.  All callers adjusted.
4477         * python/py-threadevent.c: Include "gdbthread.h".
4478         (get_event_thread): Use thread_to_thread_object.
4479         * python/python-internal.h (struct inferior_object): Forward
4480         declare.
4481         (find_thread_object, find_inferior_object): Delete declarations.
4482         (thread_to_thread_object, inferior_to_inferior_object): New
4483         declarations.
4484         * record-btrace.c: Include "inferior.h".
4485         (require_btrace_thread): Use inferior_thread.
4486         (record_btrace_frame_sniffer)
4487         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
4488         (get_thread_current_frame): Use scoped_restore_current_thread and
4489         switch_to_thread.
4490         (get_thread_current_frame): Use thread pointer directly.
4491         (record_btrace_replay_at_breakpoint): Use thread's inferior
4492         pointer directly.
4493         * record-full.c: Include "inferior.h".
4494         * regcache.c: Include "gdbthread.h".
4495         (get_thread_arch_regcache): Use the inferior's address space
4496         directly.
4497         (get_thread_regcache, registers_changed_thread): New.
4498         * regcache.h (get_thread_regcache(thread_info *thread)): New
4499         overload.
4500         (registers_changed_thread): New.
4501         (remote_target) <remote_detach_1>: Swap order of parameters.
4502         (remote_add_thread): <remote_add_thread>: Return the new thread.
4503         (get_remote_thread_info(ptid_t)): New overload.
4504         (remote_target::remote_notice_new_inferior): Use thread pointers
4505         directly.
4506         (remote_target::process_initial_stop_replies): Use
4507         thread_info::set_running.
4508         (remote_target::remote_detach_1, remote_target::detach)
4509         (extended_remote_target::detach): Adjust.
4510         * stack.c (frame_show_address): Use inferior_thread.
4511         * target-debug.h (target_debug_print_thread_info_pp): New.
4512         * target-delegates.c: Regenerate.
4513         * target.c (default_thread_address_space): Delete.
4514         (memory_xfer_partial_1): Use current_inferior.
4515         (target_detach): Use current_inferior.
4516         (target_thread_address_space): Delete.
4517         (generic_mourn_inferior): Use current_inferior.
4518         * target.h (struct target_ops) <thread_address_space>: Delete.
4519         (target_thread_address_space): Delete.
4520         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
4521         pointers directly.
4522         (delete_thread_1, delete_thread, delete_thread_silent): Take a
4523         thread pointer instead of a ptid_t.  Adjust all callers.
4524         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
4525         (first_thread_of_process): Delete, replaced by ...
4526         (first_thread_of_inferior): ... this new function.  All callers
4527         adjusted.
4528         (any_thread_of_process): Rename to ...
4529         (any_thread_of_inferior): ... this, and take an inferior pointer.
4530         (any_live_thread_of_process): Rename to ...
4531         (any_live_thread_of_inferior): ... this, and take an inferior
4532         pointer.
4533         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4534         (value_in_thread_stack_temporaries)
4535         (get_last_thread_stack_temporary): Take a thread pointer instead
4536         of a ptid_t.  Adjust all callers.
4537         (thread_info::set_running): New.
4538         (validate_registers_access): Use inferior_thread.
4539         (can_access_registers_ptid): Rename to ...
4540         (can_access_registers_thread): ... this, and take a thread
4541         pointer.
4542         (print_thread_info_1): Adjust to compare thread pointers instead
4543         of ptids.
4544         (switch_to_no_thread, switch_to_thread): Make extern.
4545         (scoped_restore_current_thread::~scoped_restore_current_thread):
4546         Use m_thread pointer directly.
4547         (scoped_restore_current_thread::scoped_restore_current_thread):
4548         Use inferior_thread.
4549         (thread_command): Use thread pointer directly.
4550         (thread_num_make_value_helper): Use inferior_thread.
4551         * top.c (execute_command): Use inferior_thread.
4552         * tui/tui-interp.c: Include "inferior.h".
4553         * varobj.c (varobj_create): Use inferior_thread.
4554         (value_of_root_1): Use find_thread_global_id instead of
4555         global_thread_id_to_ptid.
4556
4557 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
4558
4559         * regcache.c (readable_regcache::read_part): Avoid memcpy when
4560         possible.
4561         (regcache::write_part): Likewise.
4562         (readable_regcache::cooked_read_part): Update comment.
4563         (readable_regcache::cooked_write_part): Likewise.
4564         * regcache.h: (readable_regcache::read_part): Likewise.
4565         (regcache::write_part): Likewise.
4566
4567 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
4568             Dirk Schubert  <dirk.schubert@arm.com>
4569
4570         * aarch64-linux-nat.c (post_attach): New.
4571         (aarch64_linux_nat_target::post_attach): Override post_attach to
4572         record the number of hardware debug registers.
4573
4574 2018-06-20  Tom Tromey  <tom@tromey.com>
4575
4576         * python/py-param.c (add_setshow_generic): Make parameters const.
4577         (parmpy_init): Update.
4578
4579 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
4580
4581         * regcache.h (regcache_cooked_read_ftype): Rename to...
4582         (register_read_ftype): ...this, change type to function_view.
4583         (class reg_buffer) <save>: Remove src parameter.
4584         (readonly_detached_regcache) <readonly_detached_regcache>: Make
4585         parameter non-const in first overload.  Remove src parameter in
4586         second overload.
4587         * regcache.c (do_cooked_read): Remove.
4588         (readonly_detached_regcache::readonly_detached_regcache): Make
4589         parameter non-const, adjust call to other constructor.
4590         (reg_buffer::save): Remove src parameter.
4591         * frame.c (do_frame_register_read): Remove.
4592         (frame_save_as_regcache): Use lambda function.
4593         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
4594         parameter to ppu2spu_data *.
4595         (ppu2spu_sniffer): Use lambda function.
4596
4597 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
4598
4599         * record-full.c (record_full_target::insert_breakpoint): Remove
4600         "struct" keyword, add const.
4601
4602 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
4603
4604         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
4605         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
4606         * configure.ac: Remove AC_PREREQ, add missing quoting.
4607         * gnulib/configure.ac: Modernize usage of
4608         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
4609         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
4610         (AUTOMAKE_VERSION): Bump to 1.15.1.
4611         * configure: Re-generate.
4612         * config.in: Re-generate.
4613         * aclocal.m4: Re-generate.
4614         * gnulib/aclocal.m4: Re-generate.
4615         * gnulib/config.in: Re-generate.
4616         * gnulib/configure: Re-generate.
4617         * gnulib/import/Makefile.in: Re-generate.
4618
4619 2018-06-19  Pedro Alves  <palves@redhat.com>
4620
4621         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
4622         (lookup_minimal_symbol_by_pc_section): ... here with
4623         gdb_assert_not_reached added.
4624
4625 2018-06-19  Pedro Alves  <palves@redhat.com>
4626
4627         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
4628         parameter with a block parameter.  Compare location's block symbol
4629         with the frame's block instead of addresses.
4630         (skip_inline_frames): Pass the current block instead of the
4631         frame's address.  Break out as soon as we determine the frame
4632         should not be skipped.
4633
4634 2018-06-18  Tom Tromey  <tom@tromey.com>
4635
4636         * solib-aix.c (solib_aix_get_section_offsets): Return
4637         unique_xmalloc_ptr.
4638         (solib_aix_solib_create_inferior_hook): Update.
4639
4640 2018-06-18  Tom Tromey  <tom@tromey.com>
4641
4642         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
4643
4644 2018-06-18  Tom Tromey  <tom@tromey.com>
4645
4646         * solib-frv.c (frv_relocate_main_executable): Use
4647         unique_xmalloc_ptr.
4648         * solib-dsbt.c (dsbt_relocate_main_executable): Use
4649         unique_xmalloc_ptr.
4650
4651 2018-06-18  Tom Tromey  <tom@tromey.com>
4652
4653         * objfiles.h (inhibit_section_map_updates): Update.
4654         (resume_section_map_updates, resume_section_map_updates_cleanup):
4655         Remove.
4656         * solib-svr4.c (svr4_handle_solib_event): Update.
4657         * objfiles.c (inhibit_section_map_updates): Return
4658         scoped_restore_tmpl<int>.
4659         (resume_section_map_updates, resume_section_map_updates_cleanup):
4660         Remove.
4661
4662 2018-06-18  Tom Tromey  <tom@tromey.com>
4663
4664         * valprint.h (read_string): Update.
4665         * valprint.c (read_string): Change type of "buffer".
4666         (val_print_string): Update.
4667         * python/py-value.c (valpy_string): Update.
4668         * language.h (struct language_defn) <la_get_string>: Change
4669         type of "buffer".
4670         (default_get_string, c_get_string): Update.
4671         * language.c (default_get_string): Change type of "buffer".
4672         * guile/scm-value.c (gdbscm_value_to_string): Update.
4673         * c-lang.c (c_get_string): Change type of "buffer".
4674
4675 2018-06-18  Tom Tromey  <tom@tromey.com>
4676
4677         * ser-mingw.c (struct pipe_state_destroyer): New.
4678         (pipe_state_up): New typedef.
4679         (cleanup_pipe_state): Remove.
4680         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
4681
4682 2018-06-18  Tom Tromey  <tom@tromey.com>
4683
4684         * rust-lang.h (rust_yyerror): Don't declare.
4685         * rust-lang.c (rust_language_defn): Update.
4686         * rust-exp.y (yyerror): Now static.
4687         * parse.c (parse_exp_in_context_1): Update.
4688         * p-lang.h (p_yyerror): Don't declare.
4689         * p-lang.c (p_language_defn): Update.
4690         * p-exp.y (yyerror): Now static.
4691         * opencl-lang.c (opencl_language_defn): Update.
4692         * objc-lang.c (objc_language_defn): Update.
4693         * m2-lang.h (m2_yyerror): Don't declare.
4694         * m2-lang.c (m2_language_defn): Update.
4695         * m2-exp.y (yyerror): Now static.
4696         * language.h (struct language_defn) <la_error>: Remove.
4697         * language.c (unk_lang_error): Remove.
4698         (unknown_language_defn, auto_language_defn): Remove.
4699         * go-lang.h (go_yyerror): Don't declare.
4700         * go-lang.c (go_language_defn): Update.
4701         * go-exp.y (yyerror): Now static.
4702         * f-lang.h (f_yyerror): Don't declare.
4703         * f-lang.c (f_language_defn): Update.
4704         * f-exp.y (yyerror): Now static.
4705         * d-lang.h (d_yyerror): Don't declare.
4706         * d-lang.c (d_language_defn): Update.
4707         * d-exp.y (yyerror): Now static.
4708         * c-lang.h (c_yyerror): Don't declare.
4709         * c-lang.c (c_language_defn, cplus_language_defn)
4710         (asm_language_defn, minimal_language_defn): Update.
4711         * c-exp.y (yyerror): Now static.
4712         * ada-lang.h (ada_yyerror): Don't declare.
4713         * ada-lang.c (ada_language_defn): Update.
4714         * ada-exp.y (yyerror): Now static.
4715
4716 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
4717
4718         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
4719         (store_sveregs_to_thread): Likewise.
4720         (aarch64_linux_fetch_inferior_registers): Check for SVE.
4721         (aarch64_linux_store_inferior_registers): Likewise.
4722         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
4723         function.
4724         (aarch64_sve_regs_copy_to_regcache): Likewise.
4725         (aarch64_sve_regs_copy_from_regcache): Likewise.
4726         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
4727         declaration.
4728         (aarch64_sve_regs_copy_to_regcache): Likewise.
4729         (aarch64_sve_regs_copy_from_regcache): Likewise.
4730         (sve_context): Structure from Linux headers.
4731         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
4732         (SVE_SIG_ZREG_SIZE): Likewise.
4733         (SVE_SIG_PREG_SIZE): Likewise.
4734         (SVE_SIG_FFR_SIZE): Likewise.
4735         (SVE_SIG_REGS_OFFSET): Likewise.
4736         (SVE_SIG_ZREGS_OFFSET): Likewise.
4737         (SVE_SIG_ZREG_OFFSET): Likewise.
4738         (SVE_SIG_ZREGS_SIZE): Likewise.
4739         (SVE_SIG_PREGS_OFFSET): Likewise.
4740         (SVE_SIG_PREG_OFFSET): Likewise.
4741         (SVE_SIG_PREGS_SIZE): Likewise.
4742         (SVE_SIG_FFR_OFFSET): Likewise.
4743         (SVE_SIG_REGS_SIZE): Likewise.
4744         (SVE_SIG_CONTEXT_SIZE): Likewise.
4745         (SVE_PT_REGS_MASK): Likewise.
4746         (SVE_PT_REGS_FPSIMD): Likewise.
4747         (SVE_PT_REGS_SVE): Likewise.
4748         (SVE_PT_VL_INHERIT): Likewise.
4749         (SVE_PT_VL_ONEXEC): Likewise.
4750         (SVE_PT_REGS_OFFSET): Likewise.
4751         (SVE_PT_FPSIMD_OFFSET): Likewise.
4752         (SVE_PT_FPSIMD_SIZE): Likewise.
4753         (SVE_PT_SVE_ZREG_SIZE): Likewise.
4754         (SVE_PT_SVE_PREG_SIZE): Likewise.
4755         (SVE_PT_SVE_FFR_SIZE): Likewise.
4756         (SVE_PT_SVE_FPSR_SIZE): Likewise.
4757         (SVE_PT_SVE_FPCR_SIZE): Likewise.
4758         (__SVE_SIG_TO_PT): Likewise.
4759         (SVE_PT_SVE_OFFSET): Likewise.
4760         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
4761         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
4762         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
4763         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
4764         (SVE_PT_SVE_PREG_OFFSET): Likewise.
4765         (SVE_PT_SVE_PREGS_SIZE): Likewise.
4766         (SVE_PT_SVE_FFR_OFFSET): Likewise.
4767         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
4768         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
4769         (SVE_PT_SVE_SIZE): Likewise.
4770         (SVE_PT_SIZE): Likewise.
4771         (HAS_SVE_STATE): New define.
4772
4773 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
4774
4775         * nat/aarch64-sve-linux-sigcontext.h: New file.
4776         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
4777         new files.
4778         (SVE_VQ_MIN): Likewise.
4779         (SVE_VQ_MAX): Likewise.
4780         (SVE_VL_MIN): Likewise.
4781         (SVE_VL_MAX): Likewise.
4782         (SVE_NUM_ZREGS): Likewise.
4783         (SVE_NUM_PREGS): Likewise.
4784         (sve_vl_valid): Likewise.
4785         (struct user_sve_header): Likewise.
4786
4787 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
4788             Richard Bunt <Richard.Bunt@arm.com>
4789
4790         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
4791         was requested by GDB.
4792
4793 2018-06-15  Tom de Vries  <tdevries@suse.de>
4794
4795         * MAINTAINERS (Write After Approval): Add Tom de Vries.
4796
4797 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
4798
4799         * gnulib/update-gnulib.sh: Print expected versions of
4800         autoconf/aclocal.
4801
4802 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
4803
4804         * arch-utils.c (default_type_align): Use type_length_units.
4805         * gdbtypes.c (type_align): Use type_length_units.
4806
4807 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4808
4809         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
4810         of 'define' command.
4811
4812 2018-06-14  Tom de Vries  <tdevries@suse.de>
4813
4814         PR cli/22573
4815         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
4816         get_no_prettyformat_print_options.
4817
4818 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
4819
4820         * sparc-nat.h: Include target.h.
4821         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
4822         <fetch_registers>: Remove this argument in function call.
4823         <store_registers>: Remove this argument in function call, remove
4824         extra semicolon.
4825         <low_forget_process>: Call sparc64_forget_process instead of
4826         sparc_forget_process.
4827
4828 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4829
4830         * procfs.c (_initialize_procfs): Use add_inf_child_target.
4831         (procfs_target::make_corefile_notes): Adjust to new
4832         target_read_alloc return type.
4833
4834 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
4835             Stephen Roberts  <stephen.roberts@arm.com>
4836
4837         PR gdb/22882
4838         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
4839         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
4840         Move should_notify_stop local into more inner scope.
4841
4842 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
4843             Stephen Roberts  <stephen.roberts@arm.com>
4844
4845         PR gdb/22882
4846         * infrun.c (resume_1): Add call to mark_async_event_handler.
4847
4848 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
4849
4850         * infrun.c (do_target_wait): Change old version of $pc printed.
4851
4852 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
4853
4854         * dwarf2read.c (read_index_from_section): Rename to...
4855         (read_gdb_index_from_section): ... this, update all callers.
4856         (dwarf2_read_index): Rename to...
4857         (dwarf2_read_gdb_index): ... this, update all callers.
4858
4859 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
4860
4861         * gdb/hppa-linux-nat.c
4862         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
4863         hppa_linux_nat_target::fetch_registers.
4864
4865 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
4866
4867         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
4868         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
4869         (AARCH64_DWARF_SVE_FFR): Likewise.
4870         (AARCH64_DWARF_SVE_P0): Likewise.
4871         (AARCH64_DWARF_SVE_Z0): Likewise.
4872
4873 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
4874
4875         * common/common-regcache.h (raw_compare): New function.
4876         * regcache.c (regcache::raw_compare): Likewise.
4877         * regcache.h (regcache::raw_compare): New declaration.
4878
4879 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
4880
4881         * common/common-regcache.h (reg_buffer_common): New structure.
4882         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
4883         (reg_buffer::raw_supply): Likewise.
4884         (reg_buffer::raw_supply_integer): Likewise.
4885         (reg_buffer::raw_supply_zeroed): Likewise.
4886         (reg_buffer::raw_collect): Likewise.
4887         (reg_buffer::raw_collect_integer): Likewise.
4888         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
4889         (reg_buffer::raw_supply): Likewise.
4890         (reg_buffer::raw_supply_integer): Likewise.
4891         (reg_buffer::raw_supply_zeroed): Likewise.
4892         (reg_buffer::raw_collect): Likewise.
4893         (reg_buffer::raw_collect_integer): Likewise.
4894
4895 2018-06-10  Tom Tromey  <tom@tromey.com>
4896
4897         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
4898         (class remote_state) <stop_reply_queue>: Now std::vector.
4899         (remote_state::~remote_state)
4900         (remote_target::stop_reply_queue_length): Update.
4901         (struct queue_iter_param, remove_child_of_pending_fork)
4902         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
4903         (check_pending_event_prevents_wildcard_vcont_callback)
4904         (remove_stop_reply_for_inferior)
4905         (remove_stop_reply_of_remote_state)
4906         (remote_notif_remove_once_on_match)
4907         (stop_reply_match_ptid_and_ws)
4908         (remote_kill_child_of_pending_fork): Remove.
4909         (remote_target::remove_new_fork_children)
4910         (remote_target::check_pending_events_prevent_wildcard_vcont)
4911         (remote_target::discard_pending_stop_replies)
4912         (remote_target::discard_pending_stop_replies_in_queue)
4913         (remote_target::remote_notif_remove_queued_reply)
4914         (remote_target::queued_stop_reply)
4915         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
4916         (remote_target::wait, remote_target::kill_new_fork_children)
4917         (remote_target::async): Update.
4918
4919 2018-06-10  Tom Tromey  <tom@tromey.com>
4920
4921         * record-full.c (record_full_arch_list_cleanups): Remove.
4922         (record_full_message): Use try/catch.
4923         (record_full_wait_cleanups): Remove.
4924         (record_full_wait_1): Use try/catch.
4925         (record_full_restore): Likewise.
4926
4927 2018-06-10  Tom Tromey  <tom@tromey.com>
4928
4929         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
4930         declare VEC.  Add constructor.
4931         <in_target_beneath>: Now bool.
4932         (record_full_breakpoints): Now a std::vector, static.
4933         (record_full_sync_record_breakpoints)
4934         (record_full_init_record_breakpoints)
4935         (record_full_target::insert_breakpoint)
4936         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
4937
4938 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
4939
4940         * dwarf2read.c (process_cu_includes): Remove struct keyword.
4941         * serial.c (serial_interface_lookup): Remove struct keyword.
4942
4943 2018-06-10  Tom Tromey  <tom@tromey.com>
4944
4945         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
4946         method.
4947         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
4948         a method.
4949         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
4950         method.
4951         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
4952         "beneath" as a method.
4953         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
4954         Use "beneath" as a method.
4955
4956 2018-06-10  Tom Tromey  <tom@tromey.com>
4957
4958         * tracefile.c (struct trace_file_writer_deleter): New.
4959         <operator()>: Rename from trace_file_writer_xfree.
4960         (trace_file_writer_up): New typedef.
4961         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
4962
4963 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
4964
4965         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
4966         <m_registers, m_register_status>: Change type to
4967         std::unique_ptr.
4968         * regcache.c (reg_buffer::reg_buffer): Use new instead of
4969         XCNEWVEC.
4970
4971 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
4972
4973         * common/common-regcache.h (enum register_status): Add
4974         underlying type "signed char".
4975         * regcache.h (reg_buffer) <m_register_status>: Change type to
4976         register_status *.
4977         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
4978         register_status instead of signed char.
4979         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
4980         (reg_buffer::get_register_status): Remove cast.
4981         (readable_regcache::raw_read): Remove cast.
4982         (readable_regcache::cooked_read): Remove cast.
4983
4984 2018-06-09  Tom Tromey  <tom@tromey.com>
4985
4986         * source.c (reverse_search_command, forward_search_command): Use
4987         scoped_fd.
4988
4989 2018-06-09  Tom Tromey  <tom@tromey.com>
4990
4991         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
4992         (serial_ops_list): Now static, std::vector.
4993         (serial_interface_lookup, serial_add_interface): Update.
4994
4995 2018-06-09  Tom Tromey  <tom@tromey.com>
4996
4997         * dwarf2read.c (process_cu_includes): Update.
4998         (process_full_comp_unit): Update.
4999         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
5000         std::vector.
5001
5002 2018-06-08  Paul Koning  <paul_koning@dell.com>
5003
5004         PR gdb/23252
5005
5006         * python/python.c (do_start_initialization):
5007         Avoid call to internal Python API.
5008         (init__gdb_module): New function.
5009
5010 2018-06-08  Gary Benson <gbenson@redhat.com>
5011
5012         * linux-thread-db.c (valprint.h): New include.
5013         (struct check_thread_db_info): New structure.
5014         (check_thread_db_on_load, tdb_testinfo): New static globals.
5015         (check_thread_db, check_thread_db_callback): New functions.
5016         (try_thread_db_load_1): Run integrity checks if requested.
5017         (maintenance_check_libthread_db): New function.
5018         (_initialize_thread_db): Register "maint check libthread-db"
5019         and "maint set/show check-libthread-db".
5020         * NEWS: Mention the above new commands.
5021
5022 2018-06-08  Tom Tromey  <tom@tromey.com>
5023
5024         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
5025         now a method.
5026
5027 2018-06-08  Tom Tromey  <tom@tromey.com>
5028
5029         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
5030
5031 2018-06-08  Tom Tromey  <tom@tromey.com>
5032
5033         * common/btrace-common.h (struct btrace_data): Add constructor,
5034         destructor, move assignment operator.
5035         <empty, clear, fini>: New methods.
5036         <format>: Initialize.
5037         (btrace_data_init, btrace_data_fini, btrace_data_clear)
5038         (btrace_data_empty): Don't declare.
5039         * common/btrace-common.c (btrace_data_init): Remove.
5040         (btrace_data::fini): Rename from btrace_data_fini.
5041         (btrace_data::empty): Rename from btrace_data_empty.
5042         (btrace_data::clear): Rename from btrace_data_clear.  Return
5043         bool.
5044         * btrace.h (make_cleanup_btrace_data): Don't declare.
5045         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
5046         (parse_xml_btrace): Update.
5047         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
5048         (maint_btrace_clear_packet_history_cmd): Update.
5049
5050 2018-06-07  Pedro Alves  <palves@redhat.com>
5051
5052         * target.h (target_ops) <beneath>: Now a method.  All references
5053         updated.
5054         (class target_stack): New.
5055         * target.c (g_target_stack): New.
5056         (g_current_top_target): Delete.
5057         (current_top_target): Get the top target out of g_target_stack.
5058         (target_stack::push, target_stack::unpush): New.
5059         (push_target, unpush_target): Reimplement.
5060         (target_is_pushed): Reimplement in terms of g_target_stack.
5061         (target_ops::beneath, target_stack::find_beneath): New.
5062
5063 2018-06-07  Pedro Alves  <palves@redhat.com>
5064
5065         * target.h (find_target_beneath): Delete declaration.
5066         * target.c (find_target_beneath): Delete definition.
5067         * aix-thread.c: All callers of find_target_beneath adjusted to
5068         call target_ops::beneath instead.
5069         * bsd-uthread.c: Likewise.
5070         * linux-thread-db.c: Likewise.
5071         * ravenscar-thread.c: Likewise.
5072         * sol-thread.c: Likewise.
5073         * spu-multiarch.c: Likewise.
5074
5075 2018-06-07  Pedro Alves  <palves@redhat.com>
5076
5077         * target.h (target_ops) <beneath>: Now a method.  All references
5078         updated.
5079         (target_ops) <m_beneath>: New.
5080         * target.c (target_ops::beneath): New.
5081         * corelow.c: Adjust all references to target_ops::beneath.
5082         * linux-thread-db.c: Likewise.
5083         * make-target-delegates: Likewise.
5084         * record-btrace.c: Likewise.
5085         * record-full.c: Likewise.
5086         * remote.c: Likewise.
5087         * target.c: Likewise.
5088         * target-delegates.c: Regenerate.
5089
5090 2018-06-07  Pedro Alves  <palves@redhat.com>
5091
5092         * target.h (target_stack): Delete.
5093         (current_top_target): Declare function.
5094         * target.c (target_stack): Delete.
5095         (g_current_top_target): New.
5096         (current_top_target): New function.
5097         * auxv.c: Use current_top_target instead of target_stack
5098         throughout.
5099         * avr-tdep.c: Likewise.
5100         * breakpoint.c: Likewise.
5101         * corefile.c: Likewise.
5102         * elfread.c: Likewise.
5103         * eval.c: Likewise.
5104         * exceptions.c: Likewise.
5105         * frame.c: Likewise.
5106         * gdbarch-selftests.c: Likewise.
5107         * gnu-v3-abi.c: Likewise.
5108         * ia64-tdep.c: Likewise.
5109         * ia64-vms-tdep.c: Likewise.
5110         * infcall.c: Likewise.
5111         * infcmd.c: Likewise.
5112         * infrun.c: Likewise.
5113         * linespec.c: Likewise.
5114         * linux-tdep.c: Likewise.
5115         * minsyms.c: Likewise.
5116         * ppc-linux-nat.c: Likewise.
5117         * ppc-linux-tdep.c: Likewise.
5118         * procfs.c: Likewise.
5119         * regcache.c: Likewise.
5120         * remote.c: Likewise.
5121         * rs6000-tdep.c: Likewise.
5122         * s390-linux-nat.c: Likewise.
5123         * s390-tdep.c: Likewise.
5124         * solib-aix.c: Likewise.
5125         * solib-darwin.c: Likewise.
5126         * solib-dsbt.c: Likewise.
5127         * solib-spu.c: Likewise.
5128         * solib-svr4.c: Likewise.
5129         * solib-target.c: Likewise.
5130         * sparc-tdep.c: Likewise.
5131         * sparc64-tdep.c: Likewise.
5132         * spu-tdep.c: Likewise.
5133         * symfile.c: Likewise.
5134         * symtab.c: Likewise.
5135         * target-descriptions.c: Likewise.
5136         * target-memory.c: Likewise.
5137         * target.c: Likewise.
5138         * target.h: Likewise.
5139         * tracefile-tfile.c: Likewise.
5140         * tracepoint.c: Likewise.
5141         * valops.c: Likewise.
5142         * valprint.c: Likewise.
5143         * value.c: Likewise.
5144         * windows-tdep.c: Likewise.
5145         * mi/mi-main.c: Likewise.
5146
5147 2018-06-07  Tom Tromey  <tom@tromey.com>
5148
5149         * valprint.h (build_address_symbolic): Declare.
5150         * printcmd.c (print_address_symbolic): Update.
5151         (build_address_symbolic): Change "name" and "filename" to
5152         std::string.
5153         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
5154         Update.
5155         * defs.h (build_address_symbolic): Remove declaration.
5156
5157 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
5158
5159         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
5160         (aarch64_vnv_type): Add function.
5161         (aarch64_pseudo_register_name): Add V regs for SVE.
5162         (aarch64_pseudo_register_type): Likewise.
5163         (aarch64_pseudo_register_reggroup_p): Likewise.
5164         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
5165         (aarch64_pseudo_read_value): Add V regs for SVE.
5166         (aarch64_pseudo_write_2): Use V0 offset for SVE
5167         (aarch64_pseudo_write): Add V regs for SVE.
5168         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
5169
5170 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
5171
5172         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
5173         (sve_vl_from_vq): Likewise.
5174
5175 2018-06-05  Tom Tromey  <tom@tromey.com>
5176
5177         * cli/cli-cmds.c (show_version): Update.
5178         * top.c (print_gdb_version): Add "interactive" parameter.
5179         Update.
5180         * main.c (captured_main_1): Update.
5181         * top.h (print_gdb_version): Add "interactive" parameter and a
5182         comment.
5183
5184 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
5185
5186         * common/enum-flags.h: Add trailing semicolon to example in
5187         comment.
5188
5189 2018-06-05  Tom Tromey  <tom@tromey.com>
5190
5191         PR cli/12326:
5192         * NEWS: Add entry about pager.
5193         * utils.c (pagination_disabled_for_command): New global.
5194         (prompt_for_continue): Allow "c" response to prompt.
5195         (reinitialize_more_filter): Clear
5196         pagination_disabled_for_command.
5197         (fputs_maybe_filtered): Check pagination_disabled_for_command.
5198
5199 2018-06-04  Tom Tromey  <tom@tromey.com>
5200
5201         * ada-lang.h (ada_lookup_symbol_list): Update.
5202         * ada-lang.c (resolve_subexp): Update.
5203         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
5204         parameter.
5205         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
5206         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
5207         results parameter to std::vector.
5208         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
5209         Update.
5210         * ada-exp.y (block_lookup): Update.
5211         (select_possible_type_sym): Change type of syms.  Remove nsyms
5212         parameter.
5213         (write_var_or_type, write_name_assoc): Update.
5214
5215 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
5216
5217         * windows-nat.c (windows_nat_target::xfer_partial): Return
5218         TARGET_XFER_E_IO if we need to delegate to the target beneath
5219         but BENEATH is NULL.
5220
5221 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
5222
5223         * Makefile.in (config.status): Add configure.nat as a
5224         dependency.
5225
5226 2018-06-04  Tom Tromey  <tom@tromey.com>
5227
5228         * cp-name-parser.y (cpname_state): Add method declarations.
5229         (HANDLE_QUAL): Update.
5230         (cpname_state::d_grab, cpname_state::fill_comp)
5231         (cpname_state::make_operator, cpname_state::make_dtor)
5232         (cpname_state::make_builtin_type, cpname_state::make_name)
5233         (cpname_state::d_qualify, cpname_state::d_int_type)
5234         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
5235         (%union): Move earlier.
5236
5237 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5238
5239         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
5240
5241 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5242
5243         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
5244         (aarch64_pseudo_write_1): Likewise.
5245         (aarch64_pseudo_read_value): Use helper.
5246         (aarch64_pseudo_write): Likewise.
5247
5248 2018-06-04  Pedro Alves  <palves@redhat.com>
5249
5250         * darwin-nat.c (darwin_ops): Delete.
5251         (darwin_attach_pid): Use get_native_target.
5252
5253 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5254
5255         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
5256         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
5257
5258 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5259
5260         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
5261         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
5262         (aarch64_gdbarch_init): Check for SVE.
5263         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
5264
5265 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5266
5267         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
5268         * aarch64-tdep.h (aarch64_read_description): Likewise.
5269         * arch/aarch64.c (aarch64_create_target_description): Likewise.
5270         * arch/aarch64.h (aarch64_create_target_description): Likewise.
5271         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
5272         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
5273         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
5274
5275 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
5276
5277         * value.c (value_fetch_lazy_bitfield): New.
5278         (value_fetch_lazy_memory): New.
5279         (value_fetch_lazy_register): New.
5280         (value_fetch_lazy): Factor out to smaller functions.
5281
5282 2018-06-01  Tom Tromey  <tom@tromey.com>
5283
5284         * cp-name-parser.y (backslashable, represented): Now const.
5285
5286 2018-06-01  Tom Tromey  <tom@tromey.com>
5287
5288         * cp-name-parser.y: Include parser-defs.h.
5289         (parser_fprintf): Remove declaration.
5290
5291 2018-06-01  Tom Tromey  <tom@tromey.com>
5292
5293         * cp-name-parser.y: Use %pure-parser, %lex-param, and
5294         %parse-param.
5295         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
5296         (global_result): Remove globals.
5297         (struct cpname_state): New.
5298         (yyparse): Don't declare.
5299         (yylex, yyerror): Move declarations after %union.
5300         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
5301         (make_name): Add state parameter.
5302         Update all callers.
5303         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
5304         parameter.
5305         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
5306         Update.
5307         (yylex): Add lvalp, state parameters.
5308         (yyerror): Add state parameter.
5309         (cp_demangled_name_to_comp): Update.
5310
5311 2018-06-01  Tom Tromey  <tom@tromey.com>
5312
5313         * cp-name-parser.y (parser_fprintf): Declare.
5314         (GDB_YY_REMAP_PREFIX): Define.
5315         Include yy-remap.h.  Don't redefine yy* identifiers.
5316
5317 2018-06-01  Tom Tromey  <tom@tromey.com>
5318
5319         * python/py-type.c (typy_legacy_template_argument): Update.
5320         * cp-support.h (cp_demangled_name_to_comp): Update.
5321         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
5322         parameter to be a "std::string *".
5323         (main): Update.
5324
5325 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
5326
5327         * ada-lex.l: Include "diagnostics.h" instead of
5328         "common/diagnostics.h".
5329         * unittests/environ-selftests.c: Likewise.
5330         * common/diagnostics.h: Moved to ../include.
5331
5332 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
5333
5334         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
5335         to language_mode_manual while calling breakpoint_re_set_one.
5336
5337 2018-06-01  Tom Tromey  <tom@tromey.com>
5338
5339         * valops.c (value_cast_structs, destructor_name_p): Update.
5340         * symtab.c (gdb_mangle_name): Update.
5341         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
5342         Update.
5343         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
5344         (pascal_object_print_value_fields, pascal_object_print_value):
5345         Update.
5346         * p-typeprint.c (pascal_type_print_derivation_info): Update.
5347         * linespec.c (find_methods): Update.
5348         * gdbtypes.h (type_name_no_tag): Remove.
5349         (type_name_or_error): Rename from type_name_no_tag_or_error.
5350         * gdbtypes.c (type_name_no_tag): Remove.
5351         (type_name_or_error): Rename from type_name_no_tag_or_error.
5352         (lookup_struct_elt_type, check_typedef): Update.
5353         * expprint.c (print_subexp_standard): Update.
5354         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
5355         * d-namespace.c (d_lookup_nested_symbol): Update.
5356         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
5357         (cp_print_class_member): Update.
5358         * cp-namespace.c (cp_lookup_nested_symbol): Update.
5359         * completer.c (add_struct_fields): Update.
5360         * c-typeprint.c (cp_type_print_derivation_info)
5361         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
5362         Update.
5363         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
5364         (ada_prefer_type, ada_is_exception_sym): Update.
5365
5366 2018-06-01  Tom Tromey  <tom@tromey.com>
5367
5368         * valops.c (enum_constant_from_type, value_namespace_elt)
5369         (value_maybe_namespace_elt): Update.
5370         * valarith.c (find_size_for_pointer_math): Update.
5371         * target-descriptions.c (make_gdb_type): Update.
5372         * symmisc.c (print_symbol): Update.
5373         * stabsread.c (define_symbol, read_type)
5374         (complain_about_struct_wipeout, add_undefined_type)
5375         (cleanup_undefined_types_1): Update.
5376         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
5377         (rust_range_type_p, val_print_struct, rust_print_struct_def)
5378         (rust_internal_print_type, rust_composite_type)
5379         (rust_evaluate_funcall, rust_evaluate_subexp)
5380         (rust_inclusive_range_type_p): Update.
5381         * python/py-type.c (typy_get_tag): Update.
5382         * p-typeprint.c (pascal_type_print_base): Update.
5383         * mdebugread.c (parse_symbol, parse_type): Update.
5384         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
5385         Update.
5386         * guile/scm-type.c (gdbscm_type_tag): Update.
5387         * go-lang.c (sixg_string_p): Update.
5388         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
5389         Update.
5390         * gdbtypes.h (struct main_type) <tag_name>: Remove.
5391         (TYPE_TAG_NAME): Remove.
5392         * gdbtypes.c (type_name_no_tag): Simplify.
5393         (check_typedef, check_types_equal, recursive_dump_type)
5394         (copy_type_recursive, arch_composite_type): Update.
5395         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
5396         in summary mode when needed.
5397         * eval.c (evaluate_funcall): Update.
5398         * dwarf2read.c (fixup_go_packaging, read_structure_type)
5399         (process_structure_scope, read_enumeration_type)
5400         (read_namespace_type, read_module_type, determine_prefix): Update.
5401         * cp-support.c (inspect_type): Update.
5402         * coffread.c (process_coff_symbol, decode_base_type): Update.
5403         * c-varobj.c (c_is_path_expr_parent): Update.
5404         * c-typeprint.c (c_type_print_base_struct_union): Update.
5405         (c_type_print_base_1): Update.  Print struct/class/union/enum in
5406         summary when using C language.
5407         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
5408         (gen_maybe_namespace_elt): Update.
5409         * ada-lang.c (ada_type_name): Simplify.
5410         (empty_record, ada_template_to_fixed_record_type_1)
5411         (template_to_static_fixed_type)
5412         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
5413
5414 2018-06-01  Tom Tromey  <tom@tromey.com>
5415
5416         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
5417         c_print_type.
5418         * c-typeprint.c (c_print_type_1): Add "language" parameter.
5419         (c_print_type): Update.
5420         (c_print_type): New overload.
5421         (c_type_print_varspec_prefix, c_type_print_args)
5422         (c_type_print_varspec_suffix, c_print_type_no_offsets)
5423         (c_type_print_base_struct_union, c_type_print_base_1)
5424         (cp_type_print_method_args): Add "language" parameter.
5425         (c_type_print_base): Update.
5426         * c-lang.h (c_print_type): Add new overload.
5427
5428 2018-06-01  Tom Tromey  <tom@tromey.com>
5429
5430         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
5431         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
5432
5433 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
5434
5435         * aarch64-tdep.c (aarch64_sve_register_names): New const
5436         var.
5437         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
5438         (AARCH64_SVE_Z_REGS_NUM): New define.
5439         (AARCH64_SVE_P_REGS_NUM): Likewise.
5440         (AARCH64_SVE_NUM_REGS): Likewise.
5441
5442 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
5443
5444         * nat/linux-ptrace.h [__alpha__]
5445         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
5446         definitions.
5447
5448 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
5449
5450         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
5451         the endianness selected.
5452         * NEWS: Document `set endian auto' mode operation update.
5453
5454 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
5455
5456         * Makefile.in: Add new header.
5457         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
5458         (sve_vl_from_vg): Likewise.
5459         (sve_vq_from_vl): Likewise.
5460         (sve_vl_from_vq): Likewise.
5461         (sve_vq_from_vg): Likewise.
5462         (sve_vg_from_vq): Likewise.
5463         * configure.nat: Add new c file.
5464         * nat/aarch64-sve-linux-ptrace.c: New file.
5465         * nat/aarch64-sve-linux-ptrace.h: New file.
5466
5467 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
5468
5469         * aarch64-linux-nat.c (aarch64_linux_read_description):
5470         Add parmeter zero.
5471         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
5472         Likewise.
5473         * aarch64-tdep.c (tdesc_aarch64_list): Add.
5474         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
5475         (aarch64_gdbarch_init): Add parmeter zero.
5476         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
5477         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
5478         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
5479         parmeter.
5480         * doc/gdb.texinfo: Describe SVE feature
5481         * features/aarch64-sve.c: New file.
5482
5483 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
5484
5485         PR gdb/23210
5486         * gdbarch.sh (significant_addr_bit): Default to zero when
5487         not set by target architecture.
5488         * gdbarch.c: Re-generated.
5489         * utils.c (address_significant): Update.
5490
5491 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
5492
5493         * stack.c (func_command): Remove trailing newline in call to error.
5494
5495 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5496
5497         * regcache.h (regcache_raw_collect): Remove, update callers to
5498         use regcache::raw_collect.
5499         * regcache.c (regcache_raw_collect): Remove.
5500
5501 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5502
5503         * regcache.h (regcache_raw_supply): Remove, update callers to
5504         use detached_regcache::raw_supply.
5505         * regcache.c (regcache_raw_supply): Remove.
5506
5507 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5508
5509         * regcache.h (regcache_cooked_write_part): Remove, update
5510         callers to use regcache::cooked_write_part.
5511         * regcache.c (regcache_cooked_write_part): Remove.
5512
5513 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5514
5515         * regcache.h (regcache_cooked_read_part): Remove, update callers
5516         to use readable_regcache::cooked_read_part.
5517         * regcache.c (regcache_cooked_read_part): Remove.
5518
5519 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5520
5521         * regcache.h (regcache_cooked_read_value): Remove, update
5522         callers to use readable_regcache::cooked_read_value.
5523         * regcache.c (regcache_cooked_read_value): Remove.
5524
5525 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5526
5527         * regcache.h (regcache_cooked_write): Remove, update callers to
5528         use regcache::cooked_write.
5529         * regcache.c (regcache_cooked_write): Remove.
5530
5531 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5532
5533         * regcache.h (regcache_invalidate): Remove, update callers to
5534         use detached_regcache::invalidate instead.
5535         * regcache.c (regcache_invalidate): Remove.
5536
5537 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5538
5539         * regcache.h (regcache_raw_write_part): Remove, update callers
5540         to use regcache::raw_write_part instead.
5541         * regcache.c (regcache_raw_write_part): Remove.
5542
5543 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5544
5545         * regcache.h (regcache_raw_read_part): Remove, update callers to
5546         use readable_regcache::raw_read_part instead.
5547         * regcache.c (regcache_raw_read_part): Remove.
5548
5549 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5550
5551         * regcache.h (regcache_cooked_read): Remove, update callers to
5552         use readable_regcache::cooked_read instead.
5553         * regcache.c (regcache_cooked_read): Remove.
5554
5555 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5556
5557         * regcache.h (regcache_raw_write): Remove, update callers to use
5558         regcache::raw_write instead.
5559         * regcache.c (regcache_raw_write): Remove.
5560
5561 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5562
5563         * regcache.h (regcache_raw_read): Remove, update callers to use
5564         readable_regcache::raw_read instead.
5565         * regcache.c (regcache_raw_read): Remove.
5566
5567 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5568
5569         * regcache.h (regcache_raw_update): Remove, update callers to
5570         use readable_regcache::raw_update instead.
5571         * regcache.c (regcache_raw_update): Remove.
5572
5573 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5574
5575         * regcache.h (regcache_register_status): Remove, update callers
5576         to use reg_buffer::get_register_status directly instead.
5577         * regcache.c (regcache_register_status): Remove.
5578
5579 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5580
5581         * regcache.h (regcache_get_ptid): Remove, update all callers to
5582         call regcache::ptid instead.
5583         * regcache.c (regcache_get_ptid): Remove.
5584
5585 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5586
5587         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
5588
5589 2018-05-30  Pedro Alves  <palves@redhat.com>
5590
5591         * common/common-exceptions.h (exception_rethrow): Use
5592         ATTRIBUTE_NORETURN.
5593
5594 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
5595
5596         * breakpoint.c (print_solib_event, check_status_catch_solib):
5597         Remove struct keyword in range-based for loops.
5598         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
5599         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
5600         Likewise.
5601         * linespec.c (find_superclass_methods, search_minsyms_for_name):
5602         Likewise.
5603         * symfile.c (addr_info_make_relative): Likewise.
5604         * thread.c (value_in_thread_stack_temporaries): Likewise.
5605
5606 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
5607
5608         PR gdb/16841
5609         * valops.c (value_struct_elt_for_reference): Call check_typedef on
5610         aggregate type to get its real type before accessing it.
5611
5612 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
5613
5614         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
5615         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
5616         * coff-pe-read.c (add_pe_forwarded_sym): Replace
5617         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
5618         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
5619         * jit.c (jit_breakpoint_re_set_internal): Likewise.
5620         * printcmd.c (info_address_command): Likewise.
5621
5622 2018-05-29  Tom Tromey  <tom@tromey.com>
5623
5624         * windows-nat.c (handle_exception): Update fall-through comment.
5625
5626 2018-05-29  Tom Tromey  <tom@tromey.com>
5627
5628         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
5629         (struct program_space) <added_solibs>: Now a std::vector.
5630         * breakpoint.c (print_solib_event): Update.
5631         (check_status_catch_solib): Update.
5632         * progspace.c (clear_program_space_solib_cache): Update.
5633         * solib.c (update_solib_list): Update.
5634
5635 2018-05-29  Tom Tromey  <tom@tromey.com>
5636
5637         * python/py-type.c (typy_richcompare): Update.
5638         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
5639         * gdbtypes.h (types_deeply_equal): Return bool.
5640         (types_equal): Likewise.
5641         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
5642         declare VEC.
5643         (check_types_equal): Change worklist to std::vector.  Return
5644         bool.
5645         (struct type_equality_entry): Add constructor.
5646         (compare_maybe_null_strings): Return bool.
5647         (check_types_worklist): Return bool.  Change worklist to
5648         std::vector.
5649         (types_deeply_equal): Use std::vector.
5650         (types_equal): Return bool.
5651         (compare_maybe_null_strings): Simplify.
5652
5653 2018-05-29  Tom Tromey  <tom@tromey.com>
5654
5655         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
5656
5657 2018-05-29  Tom Tromey  <tom@tromey.com>
5658
5659         * objc-lang.h: Don't include cp-support.h.
5660         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
5661         declare VEC.
5662
5663 2018-05-27  Tom Tromey  <tom@tromey.com>
5664
5665         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
5666
5667 2018-05-25  Tom Tromey  <tom@tromey.com>
5668
5669         * value.c (value::location): Initialize.
5670
5671 2018-05-25  Tom Tromey  <tom@tromey.com>
5672
5673         * dbxread.c (init_bincl_list): Remove.
5674         (bincl_list): Now a std::vector.
5675         (bincls_allocated, next_bincl): Remove.
5676         (free_bincl_list, do_free_bincl_list_cleanup)
5677         (make_cleanup_free_bincl_list): Remove.
5678         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
5679         unique_xmalloc_ptr.
5680         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
5681         (struct header_file_location): Add constructor.
5682         (add_bincl_to_list): Remove.
5683
5684 2018-05-25  Tom Tromey  <tom@tromey.com>
5685
5686         * tui/tui.c (tui_enable): Update.
5687         * mi/mi-interp.c (mi_interp::init): Update.
5688         * interps.h (class interp) <name>: New method.
5689         <m_name>: Rename from name.
5690         (~scoped_restore_interp): Update.
5691         * interps.c (interp::interp): Update.
5692         (interp_add, interp_set, interp_lookup_existing)
5693         (current_interp_named_p): Update.
5694
5695 2018-05-25  Tom Tromey  <tom@tromey.com>
5696
5697         * interps.c (interp_name): Remove.
5698         * mi/mi-interp.c (mi_interp::init): Update.
5699         * interps.h (interp_name): Remove.
5700         (~scoped_restore_interp): Update.
5701         * tui/tui.c (tui_enable): Update.
5702
5703 2018-05-25  Tom Tromey  <tom@tromey.com>
5704
5705         * utils.c (fputs_maybe_filtered): Update.
5706         * linespec.c (decode_line_full): Update.
5707         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
5708         (mi_print_breakpoint_for_event, mi_solib_loaded)
5709         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
5710         (mi_user_selected_context_changed): Update.
5711         * mi/mi-main.c (mi_execute_command): Update.
5712         * cli/cli-script.c (execute_control_command): Update.
5713         * python/python.c (execute_gdb_command): Update.
5714         * solib.c (info_sharedlibrary_command): Update.
5715         * interps.c (interp_ui_out): Remove.
5716         * interps.h (interp_ui_out): Remove.
5717
5718 2018-05-25  Tom Tromey  <tom@tromey.com>
5719
5720         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
5721         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
5722         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
5723
5724 2018-05-25  Tom Tromey  <tom@tromey.com>
5725
5726         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
5727         * interps.c (interp_exec): Use scoped_restore.
5728
5729 2018-05-25  Tom Tromey  <tom@tromey.com>
5730
5731         * remote.c (remote_target::remote_file_get): Use
5732         gdb::byte_vector.
5733         (remote_target::remote_file_put): Likewise.
5734
5735 2018-05-25  Tom Tromey  <tom@tromey.com>
5736
5737         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
5738         a std::string.
5739         (get_pe_section_index, add_pe_exported_sym): Update.
5740         (read_pe_exported_syms): Use gdb::def_vector.
5741
5742 2018-05-25  Tom Tromey  <tom@tromey.com>
5743
5744         * frame.c (remove_prev_frame): Remove.
5745         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
5746
5747 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
5748
5749         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
5750         Remove prototypes.
5751         * mips-linux-nat.c (supply_fpregset): Always call
5752         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
5753         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
5754         `mips_fill_fpregset'.
5755         * mips-linux-tdep.c (mips_supply_fpregset)
5756         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
5757         (mips_fill_fpregset_wrapper): Remove functions.
5758         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
5759         (mips_linux_fpregset): Remove variable.
5760         (mips_linux_iterate_over_regset_sections): Use
5761         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
5762         (mips_linux_o32_sigframe_init): Remove comment.
5763
5764 2018-05-25  Pedro Alves  <palves@redhat.com>
5765
5766         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
5767         (struct readahead_cache, struct packet_reg, struct
5768         remote_arch_state, class remote_state): Move higher up in the
5769         file.
5770         (remote_target::m_remote_state): Now an object instead of a pointer.
5771         (remote_target::get_remote_state): Adjust.
5772
5773 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
5774
5775         * stack.c (select_and_print_frame): Delete.
5776         (struct function_bounds): Move struct within function.
5777         (func_command): Most content moved into new function
5778         find_frame_for_function, use new function, print result, add
5779         function comment.
5780         (find_frame_for_function): New function, now returns a result.
5781
5782 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5783
5784         * stack.c (iterate_over_block_arg_vars): Fix comment.
5785         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
5786
5787 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
5788
5789         PR gdb/23203
5790         * frame.c
5791         (scoped_restore_selected_frame::scoped_restore_selected_frame):
5792         Define.
5793         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
5794         Define.
5795         * frame.h (class scoped_restore_selected_frame): New class.
5796         * stack.c (print_frame_local_vars): Remove catching and rethrowing
5797         of any exception, use scoped_restore_selected_frame to restore the
5798         frame instead.
5799
5800 2018-05-24  Pedro Alves  <palves@redhat.com>
5801
5802         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
5803         override.
5804
5805 2018-05-23  Tom Tromey  <tom@tromey.com>
5806
5807         * complaints.c (struct complaints): Remove.
5808         (symfile_complaint_book): Remove.
5809         (series): New global.
5810         (complaint_internal): Update.
5811         (clear_complaints): Update.
5812
5813 2018-05-23  Tom Tromey  <tom@tromey.com>
5814
5815         * complaints.c (counters): New global.
5816         (struct complain): Remove.
5817         (struct complaints) <root>: Remove.
5818         (complaint_sentinel): Remove.
5819         (symfile_complaint_book): Update.
5820         (find_complaint) Remove.
5821         (complaint_internal, clear_complaints): Update.
5822
5823 2018-05-23  Tom Tromey  <tom@tromey.com>
5824
5825         * complaints.c (struct complain) <file, line>: Remove.
5826         (find_complaint): Remove file, line parameters.
5827         (complaint_internal): Update.
5828
5829 2018-05-23  Tom Tromey  <tom@tromey.com>
5830
5831         * complaints.c (vcomplaint): Remove.
5832         (complaint_internal) Merge in contents of vcomplaint.
5833
5834 2018-05-23  Tom Tromey  <tom@tromey.com>
5835
5836         * complaints.c (struct complaints) <explanation>: Remove.
5837         (symfile_explanations): Remove.
5838         (symfile_complaint_book): Update.
5839         (vcomplaint): Update.
5840         (struct explanation): Remove.
5841
5842 2018-05-23  Tom Tromey  <tom@tromey.com>
5843
5844         * complaints.c (symfile_complaints): Remove.
5845         (complaint_internal): Remove "complaints" parameter.
5846         (clear_complaints, vcomplaint): Remove "c" parameter.
5847         (get_complaints): Remove.
5848         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
5849         (dwarf2_debug_line_missing_file_complaint)
5850         (dwarf2_debug_line_missing_end_sequence_complaint)
5851         (dwarf2_complex_location_expr_complaint)
5852         (dwarf2_const_value_length_mismatch_complaint)
5853         (dwarf2_section_buffer_overflow_complaint)
5854         (dwarf2_macro_malformed_definition_complaint)
5855         (dwarf2_invalid_attrib_class_complaint)
5856         (create_addrmap_from_index, dw2_symtab_iter_next)
5857         (dw2_expand_marked_cus)
5858         (dw2_debug_names_iterator::find_vec_in_debug_names)
5859         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
5860         (create_debug_type_hash_table, init_cutu_and_read_dies)
5861         (partial_die_parent_scope, add_partial_enumeration)
5862         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
5863         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
5864         (read_import_statement, read_file_scope, create_dwo_cu_reader)
5865         (create_cus_hash_table, create_dwp_hash_table)
5866         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
5867         (dwarf2_rnglists_process, dwarf2_ranges_process)
5868         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
5869         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
5870         (handle_struct_member_die, process_structure_scope)
5871         (read_array_type, read_common_block, read_module_type)
5872         (read_tag_pointer_type, read_typedef, read_base_type)
5873         (read_subrange_type, load_partial_dies, partial_die_info::read)
5874         (partial_die_info::read, partial_die_info::read)
5875         (partial_die_info::read, read_checked_initial_length_and_offset)
5876         (dwarf2_string_attr, read_formatted_entries)
5877         (dwarf_decode_line_header)
5878         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
5879         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
5880         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
5881         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5882         (get_signatured_type, get_DW_AT_signature_type)
5883         (decode_locdesc, file_file_name, consume_improper_spaces)
5884         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
5885         (dwarf_decode_macro_bytes, dwarf_decode_macros)
5886         (dwarf2_symbol_mark_computed, set_die_type)
5887         (read_attribute_value): Update.
5888         * stap-probe.c (handle_stap_probe, get_stap_base_address):
5889         Update.
5890         * dbxread.c (unknown_symtype_complaint)
5891         (lbrac_mismatch_complaint, repeated_header_complaint)
5892         (set_namestring, function_outside_compilation_unit_complaint)
5893         (read_dbx_symtab, process_one_symbol): Update.
5894         * gdbtypes.c (stub_noname_complaint): Update.
5895         * windows-nat.c (handle_unload_dll): Update.
5896         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
5897         (decode_base_type): Update.
5898         * xcoffread.c (bf_notfound_complaint, ef_complaint)
5899         (eb_complaint, record_include_begin, record_include_end)
5900         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
5901         (process_xcoff_symbol, read_symbol)
5902         (function_outside_compilation_unit_complaint)
5903         (scan_xcoff_symtab): Update.
5904         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
5905         * buildsym.c (finish_block_internal, make_blockvector)
5906         (end_symtab_get_static_block, augment_type_symtab): Update.
5907         * dtrace-probe.c (dtrace_process_dof)
5908         (dtrace_static_probe_ops::get_probes): Update.
5909         * complaints.h (struct complaint): Don't declare.
5910         (symfile_complaints): Remove.
5911         (complaint_internal): Remove "complaints" parameter.
5912         (complaint): Likewise.
5913         (clear_complaints): Likewise.
5914         * symfile.c (syms_from_objfile_1, finish_new_objfile)
5915         (reread_symbols): Update.
5916         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
5917         (dwarf2_frame_cache, decode_frame_entry): Update.
5918         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
5919         * objc-lang.c (lookup_objc_class, lookup_child_selector)
5920         (info_selectors_command): Update.
5921         * macrotab.c (macro_include, check_for_redefinition)
5922         (macro_undef): Update.
5923         * objfiles.c (filter_overlapping_sections): Update.
5924         * stabsread.c (invalid_cpp_abbrev_complaint)
5925         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
5926         (define_symbol, error_type, read_type, rs6000_builtin_type)
5927         (stabs_method_name_from_physname, read_member_functions)
5928         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
5929         (attach_fields_to_type, complain_about_struct_wipeout)
5930         (read_range_type, read_args, common_block_start)
5931         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
5932         Update.
5933         * mdebugread.c (index_complaint, unknown_ext_complaint)
5934         (basic_type_complaint, bad_tag_guess_complaint)
5935         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
5936         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
5937         (parse_procedure, parse_lines)
5938         (function_outside_compilation_unit_complaint)
5939         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
5940         (bad_tag_guess_complaint, reg_value_complaint): Update.
5941         * cp-support.c (demangled_name_complaint): Update.
5942         * macroscope.c (sal_macro_scope): Update.
5943         * dwarf-index-write.c (class debug_names): Update.
5944
5945 2018-05-23  Tom Tromey  <tom@tromey.com>
5946
5947         * complaints.c (clear_complaints): Remove "noisy" parameter.
5948         * complaints.h (clear_complaints): Update.
5949         * symfile.c (syms_from_objfile_1, finish_new_objfile)
5950         (reread_symbols): Update.
5951
5952 2018-05-23  Tom Tromey  <tom@tromey.com>
5953
5954         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
5955         SUBSEQUENT_MESSAGE.
5956         (vcomplaint, clear_complaints): Update.
5957         (symfile_explanations): Remove some messages.
5958
5959 2018-05-23  Tom Tromey  <tom@tromey.com>
5960
5961         * complaints.c (internal_complaint): Remove.
5962         * complaints.h (internal_complaint): Remove.
5963
5964 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
5965
5966         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
5967
5968 2018-05-22  Pedro Alves  <palves@redhat.com>
5969
5970         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
5971         (remote_fileio_badfd, remote_fileio_return_errno)
5972         (remote_fileio_return_success, remote_fileio_func_open)
5973         (remote_fileio_func_open, remote_fileio_func_close)
5974         (remote_fileio_func_read, remote_fileio_func_write)
5975         (remote_fileio_func_lseek, remote_fileio_func_rename)
5976         (remote_fileio_func_unlink, remote_fileio_func_stat)
5977         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
5978         (remote_fileio_func_isatty, remote_fileio_func_system): Add
5979         remote_target parameter.
5980         (remote_fio_func_map) <func>: Add remote_target parameter.
5981         (do_remote_fileio_request, remote_fileio_request):
5982         * remote-fileio.h (remote_fileio_request):
5983         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
5984         remote_target parameter.
5985         (remote_notif_process, handle_notification): Adjust to pass down
5986         the remote.
5987         (remote_notif_state_allocate): Add remote_target parameter.  Save
5988         it.
5989         * remote-notif.h (struct remote_target): Forward declare.
5990         (struct notif_client) <parse, ack, can_get_pending_events>: Add
5991         remote_target parameter.
5992         (struct remote_notif_state) <remote>: New field.
5993         (remote_notif_ack, remote_notif_parse): Add remote_target
5994         parameter.
5995         (remote_notif_state_allocate, remote_notif_state_allocate): Add
5996         remote_target parameter.
5997         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
5998         (threads_listing_context, rmt_thread_action, protocol_feature)
5999         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
6000         (packet_result, struct threads_listing_context, remote_state):
6001         Move definitions and declarations higher up.
6002         (remote_target) <~remote_target>: Declare.
6003         (remote_download_command_source, remote_file_put, remote_file_get)
6004         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
6005         (remote_hostio_pread_vFile, remote_hostio_send_command)
6006         (remote_hostio_set_filesystem, remote_hostio_open)
6007         (remote_hostio_close, remote_hostio_unlink, remote_state)
6008         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
6009         (get_memory_write_packet_size, get_memory_read_packet_size)
6010         (append_pending_thread_resumptions, remote_detach_1)
6011         (append_resumption, remote_resume_with_vcont)
6012         (add_current_inferior_and_thread, wait_ns, wait_as)
6013         (process_stop_reply, remote_notice_new_inferior)
6014         (process_initial_stop_replies, remote_add_thread)
6015         (btrace_sync_conf, remote_btrace_maybe_reopen)
6016         (remove_new_fork_children, kill_new_fork_children)
6017         (discard_pending_stop_replies, stop_reply_queue_length)
6018         (check_pending_events_prevent_wildcard_vcont)
6019         (discard_pending_stop_replies_in_queue, stop_reply)
6020         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
6021         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
6022         (remote_interrupt_as, remote_interrupt_ns)
6023         (remote_get_noisy_reply, remote_query_attached)
6024         (remote_add_inferior, remote_current_thread, get_current_thread)
6025         (set_thread, set_general_thread, set_continue_thread)
6026         (set_general_process, write_ptid)
6027         (remote_unpack_thread_info_response, remote_get_threadinfo)
6028         (parse_threadlist_response, remote_get_threadlist)
6029         (remote_threadlist_iterator, remote_get_threads_with_ql)
6030         (remote_get_threads_with_qxfer)
6031         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
6032         (get_offsets, remote_check_symbols, remote_supported_packet)
6033         (remote_query_supported, remote_packet_size)
6034         (remote_serial_quit_handler, remote_detach_pid)
6035         (remote_vcont_probe, remote_resume_with_hc)
6036         (send_interrupt_sequence, interrupt_query)
6037         (remote_notif_get_pending_events, fetch_register_using_p)
6038         (send_g_packet, process_g_packet, fetch_registers_using_g)
6039         (store_register_using_P, store_registers_using_G)
6040         (set_remote_traceframe, check_binary_download)
6041         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
6042         (remote_xfer_live_readonly_partial, remote_read_bytes)
6043         (remote_send_printf, remote_flash_write, readchar)
6044         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
6045         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
6046         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
6047         (extended_remote_disable_randomization, extended_remote_run)
6048         (send_environment_packet, extended_remote_environment_support)
6049         (extended_remote_set_inferior_cwd, remote_write_qxfer)
6050         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
6051         (packet_command): Now methods of ...
6052         (remote_target): ... this class.
6053         (m_remote_state) <remote_target>: New field.
6054         (struct remote_state) <stop_reply_queue,
6055         remote_async_inferior_event_token, wait_forever_enabled_p>: New
6056         fields.
6057         (remote_state::remote_state): Allocate stop_reply_queue.
6058         (remote_state): Delete global.
6059         (get_remote_state_raw): Delete.
6060         (remote_target::get_remote_state): Allocate m_remote_state on
6061         demand.
6062         (get_current_remote_target): New.
6063         (remote_ops, extended_remote_ops): Delete.
6064         (wait_forever_enabled_p, remote_async_inferior_event_token):
6065         Delete, moved to struct remote_state.
6066         (remote_target::close): Delete self.  Destruction bits split to
6067         ...
6068         (remote_target::~remote_target): ... this.
6069         (show_memory_packet_size): Adjust to use
6070         get_current_remote_target.
6071         (struct protocol_feature) <func>: Add remote_target parameter.
6072         All callers adjusted.
6073         (curr_quit_handler_target): New.
6074         (remote_serial_quit_handler): Reimplement.
6075         (remote_target::open_1): Adjust to use get_current_remote_target.
6076         Heap-allocate remote_target/extended_remote_target instances.
6077         (vcont_builder::vcont_builder): Add remote_target parameter, and
6078         save it in m_remote.  All callers adjusted.
6079         (vcont_builder::m_remote): New field.
6080         (vcont_builder::restart, vcont_builder::flush)
6081         (vcont_builder::push_action): Use it.
6082         (remote_target::commit_resume): Use it.
6083         (struct queue_iter_param) <remote>: New field.
6084         (remote_target::remove_new_fork_children): Fill in 'remote' field.
6085         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
6086         (check_pending_event_prevents_wildcard_vcont_callback)
6087         (remote_target::check_pending_events_prevent_wildcard_vcont)
6088         (remote_target::discard_pending_stop_replies)
6089         (remote_target::discard_pending_stop_replies_in_queue)
6090         (remote_target::remote_notif_remove_queued_reply): Fill in
6091         'remote' field.
6092         (remote_notif_get_pending_events): New.
6093         (remote_target::readchar, remote_target::remote_serial_write):
6094         Save/restore curr_quit_handler_target.
6095         (putpkt): New.
6096         (kill_new_fork_children): Fill in 'remote' field.
6097         (packet_command): Use get_current_remote_target, defer to
6098         remote_target method of same name.
6099         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
6100         parameter, and save it in m_remote.  All callers adjusted.
6101         (scoped_remote_fd::release): Use m_remote.
6102         (scoped_remote_fd::m_remote): New field.
6103         (remote_file_put, remote_file_get, remote_file_delete): Use
6104         get_current_remote_target, defer to remote_target method of same
6105         name.
6106         (remote_btrace_reset): Add remote_state paremeter.  Update all
6107         callers.
6108         (remote_async_inferior_event_handler). Pass down 'data'.
6109         (remote_new_objfile): Use get_current_remote_target.
6110         (remote_target::vcont_r_supported): New.
6111         (set_range_stepping): Use get_current_remote_target and
6112         remote_target::vcont_r_supported.
6113         (_initialize_remote): Don't allocate 'remote_state' and
6114         'stop_reply_queue' globals.
6115         * remote.h (struct remote_target): Forward declare.
6116         (getpkt, putpkt, remote_notif_get_pending_events): Add
6117         'remote_target' parameter.
6118
6119 2018-05-22  Pedro Alves  <palves@redhat.com>
6120
6121         * remote.c (vcont_builder): Now a class.  Make all data members
6122         private.
6123         (vcont_builder) <vcont_builder, restart, flush, push_action>:
6124         Declare methods.
6125         (vcont_builder_restart): Rename to ...
6126         (vcont_builder::restart): ... this.
6127         (vcont_builder_flush): Rename to ...
6128         (vcont_builder::flush): ... this.
6129         (vcont_builder_push_action): Rename to ...
6130         (vcont_builder::push_action): ... this.
6131         (remote_target::commit_resume): Adjust.
6132
6133 2018-05-22  Pedro Alves  <palves@redhat.com>
6134
6135         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
6136         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
6137         (get_fixed_memory_packet_size): New.
6138         (get_memory_packet_size): Use it.
6139         (set_memory_packet_size): Don't override the config size with
6140         DEFAULT_MAX_MEMORY_PACKET_SIZE.
6141         (show_memory_packet_size): Use get_fixed_memory_packet_size.
6142         Don't refer to get_memory_packet_size if not connected to a remote
6143         target.  Show "(default)" if configured size is 0.
6144
6145 2018-05-22  Pedro Alves  <palves@redhat.com>
6146
6147         * remote.c (remote_target::mourn_inferior): Move
6148         discard_pending_stop_replies call here from ...
6149         (_initialize_remote): ... here.
6150
6151 2018-05-22  Pedro Alves  <palves@redhat.com>
6152
6153         * remote.c (compare_section_command): Remove set_general_process
6154         call.
6155
6156 2018-05-22  Pedro Alves  <palves@redhat.com>
6157
6158         * remote.c (struct packet_reg, struct remote_arch_state):
6159         Move higher up in the file.
6160         (remote_state) <m_arch_states>: Store remote_arch_state values
6161         instead of remote_arch_state pointers.
6162         (remote_state::get_remote_arch_state): Adjust.
6163
6164 2018-05-22  Pedro Alves  <palves@redhat.com>
6165
6166         * remote.c: Include <unordered_map>.
6167         (remote_state): Now a class.
6168         (remote_state) <get_remote_arch_state>: Declare method.
6169         <get_remote_arch_state>: New field.
6170         (remote_arch_state) <remote_arch_state>: Declare ctor.
6171         <regs>: Now a unique_ptr.
6172         (remote_gdbarch_data_handle): Delete.
6173         (get_remote_arch_state): Delete.
6174         (remote_state::get_remote_arch_state): New.
6175         (get_remote_state): Adjust to call remote_state's
6176         get_remote_arch_state method.
6177         (init_remote_state): Delete, bits factored out to ...
6178         (remote_arch_state::remote_arch_state): ... this new method.
6179         (get_remote_packet_size, get_memory_packet_size)
6180         (process_g_packet, remote_target::fetch_registers)
6181         (remote_target::prepare_to_store, store_registers_using_G)
6182         (remote_target::store_registers, remote_target::get_trace_status):
6183         Adjust to call remote_state's method.
6184         (_initialize_remote): Remove reference to
6185         remote_gdbarch_data_handle.
6186
6187 2018-05-22  Pedro Alves  <palves@redhat.com>
6188
6189         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
6190         pread>: New method declarations.
6191         (remote_target::open_1): Adjust.
6192         (readahead_cache_invalidate): Rename to ...
6193         (readahead_cache::invalidate): ... this, and adjust to be a class
6194         method.
6195         (readahead_cache_invalidate_fd): Rename to ...
6196         (readahead_cache::invalidate_fd): ... this, and adjust to be a
6197         class method.
6198         (remote_hostio_pwrite): Adjust.
6199         (remote_hostio_pread_from_cache): Rename to ...
6200         (readahead_cache::pread): ... this, and adjust to be a class
6201         method.
6202         (remote_hostio_close): Adjust.
6203
6204 2018-05-22  Pedro Alves  <palves@redhat.com>
6205
6206         * remote.c (remote_hostio_close_cleanup): Delete.
6207         (class scoped_remote_fd): New.
6208         (remote_file_put, remote_file_get): Use it.
6209
6210 2018-05-22  Pedro Alves  <palves@redhat.com>
6211
6212         (struct vCont_action_support): Use bool and initialize all fields.
6213         (struct readahead_cache): Initialize all fields.
6214         (remote_state): Use bool and initialize all fields.
6215         (remote_state::remote_state, remote_state::~remote_state): New.
6216         (new_remote_state): Delete.
6217         (_initialize_remote): Use new to allocate remote_state.
6218
6219 2018-05-22  Pedro Alves  <palves@redhat.com>
6220             張俊芝  <zjz@zjz.name>
6221
6222         PR gdb/22973
6223         * c-exp.y: Include "c-support.h".
6224         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
6225         of tolower.  Use c_ident_is_alpha to scan names.
6226         * c-lang.c: Include "c-support.h".
6227         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
6228         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
6229         * c-support.h: New file, with bits factored out from ...
6230         * cp-name-parser.y: ... this file.
6231         Include "c-support.h".
6232         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
6233         c-support.h and renamed.
6234         (symbol_end, yylex): Adjust.
6235
6236 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6237
6238         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
6239         parameter type to CORE_ADDR.
6240         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
6241         parameter type in declaration to CORE_ADDR.
6242         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
6243         target_auxv_search to get AT_HWCAP and use the result to get the
6244         target description.
6245         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
6246         to CORE_ADDR. Remove the cast of the return value to unsigned
6247         long. Fix error predicate of target_auxv_search.
6248         (ppc_linux_nat_target::read_description): Change the type of the
6249         hwcap variable to CORE_ADDR.
6250
6251 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6252
6253         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
6254         if the size of fpscr is larger than 32 bits.
6255
6256 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6257
6258         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
6259         (ppc32_linux_vsxregmap): New global.
6260         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
6261         regcache_supply_regset, and regcache_collect_regset.
6262         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
6263         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
6264         (fetch_vsx_register, store_vsx_register): Remove.
6265         (fetch_vsx_registers): Add regno parameter. Get regset using
6266         ppc_linux_vsxregset. Use regset to supply registers.
6267         (store_vsx_registers): Add regno parameter. Get regset using
6268         ppc_linux_vsxregset. Use regset to collect registers.
6269         (fetch_register): Call fetch_vsx_registers instead of
6270         fetch_vsx_register.
6271         (store_register): Call store_vsx_registers instead of
6272         store_vsx_register.
6273         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
6274         new regno parameter.
6275         (store_ppc_registers): Call store_vsx_registers with -1 for the
6276         new regno parameter.
6277         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
6278         (ppc_collect_vsxregset): Remove.
6279
6280 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6281
6282         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
6283         offset fields.
6284         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
6285         for vector register offset fields.
6286         (ppc64_fbsd_reg_offsets): Likewise.
6287         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
6288         to vector register offset fields.
6289         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
6290         to vector register offset fields.
6291         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
6292         vector register offset fields.
6293         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
6294         initializers for vector register offset fields.
6295         (rs6000_aix64_reg_offsets): Likewise.
6296         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
6297         (ppc_supply_vrregset): Remove.
6298         (ppc_collect_vrregset): Remove.
6299         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
6300         (ppc_linux_vrregset) : New function.
6301         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
6302         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
6303         (ppc32_linux_vrregset): Remove.
6304         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
6305         and use result instead of ppc32_linux_vrregset.
6306         (ppc32_linux_reg_offsets): Remove initializers for vector register
6307         offset fields.
6308         (ppc64_linux_reg_offsets): Likewise.
6309         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
6310         * ppc-linux-nat.c: Include regset.h.
6311         (gdb_vrregset_t): Adjust comment to account for little-endian
6312         mode.
6313         (supply_vrregset, fill_vrregset): Remove.
6314         (fetch_altivec_register, store_altivec_register): Remove.
6315         (fetch_altivec_registers): Add regno parameter. Get regset using
6316         ppc_linux_vrregset. Use regset to supply registers.
6317         (store_altivec_registers): Add regno parameter. Get regset using
6318         ppc_linux_vrregset. Use regset to collect registers.
6319         (fetch_register): Call fetch_altivec_registers instead of
6320         fetch_altivec_register.
6321         (store_register): Call store_altivec_registers instead of
6322         store_altivec_register.
6323         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
6324         the new regno parameter.
6325         (store_ppc_registers): Call store_altivec_registers with -1 for
6326         the new regno parameter.
6327
6328 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6329
6330         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
6331         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
6332         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
6333         (gdb_vrregset_t): Change array type size to
6334         PPC_LINUX_SIZEOF_VRREGSET.
6335         (gdb_vsxregset_t): Change array type size to
6336         PPC_LINUX_SIZEOF_VSXREGSET.
6337         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
6338         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
6339         PPC_LINUX_SIZEOF_VSXREGSET.
6340
6341 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6342
6343         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
6344         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
6345         nat/ppc-linux.c.
6346         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
6347         ppc_linux_target_wordsize with tid.
6348         (ppc_linux_nat_target::read_description): Call ppc_linux_target
6349         wordsize with tid.
6350         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
6351         (ppc64_64bit_inferior_p): Add static and inline specifiers.
6352         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
6353         tid parameter. Remove static specifier.
6354         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
6355         (ppc_linux_target_wordsize): New declaration.
6356
6357 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6358
6359         * arch/ppc-linux-common.c: New file.
6360         * arch/ppc-linux-common.h: New file.
6361         * arch/ppc-linux-tdesc.h: New file.
6362         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
6363         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
6364         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
6365         arch/ppc-linux-tdesc.h.
6366         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
6367         arch/ppc-linux-tdesc.h.
6368         (ppc_linux_nat_target::read_description): Remove target
6369         description matching code. Fill a ppc_linux_features struct and
6370         call ppc_linux_match_description with it. Move comment about ISA
6371         2.05 to ppc-linux-common.c.
6372         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
6373         arch/ppc-linux-tdesc.h.
6374         (ppc_linux_core_read_description): Remove target description
6375         matching code. Fill a ppc_linux_features struct and call
6376         ppc_linux_match_description with it.
6377         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
6378         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
6379         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
6380         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
6381         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
6382         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
6383         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
6384         (tdesc_powerpc_e500l): Remove.
6385
6386 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
6387
6388         * ada-lang.c (catch_assert_command): Pass empty string instead
6389         of NULL for excep_string argument.
6390
6391 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
6392
6393         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
6394         the width of the requested register exceeds the width of the
6395         `ptrace' data type.
6396
6397 2018-05-21  Tom Tromey  <tom@tromey.com>
6398
6399         * printcmd.c (output_command): Remove.
6400         (output_command_const): Rename to output_command.
6401         * valprint.h (output_command): Rename from output_command_const.
6402         * tracepoint.c (trace_dump_actions): Call output_command.
6403
6404 2018-05-21  Tom Tromey  <tom@tromey.com>
6405
6406         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
6407         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
6408         * ada-lang.h (create_ada_exception_catchpoint): Update.
6409         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
6410         std::string.
6411         (create_excep_cond_exprs, ~ada_catchpoint)
6412         (should_stop_exception, print_one_exception)
6413         (print_mention_exception, print_recreate_exception): Update.
6414         (ada_get_next_arg): Remove.
6415         (catch_ada_exception_command_split): Use std::string.  Change type
6416         of "excep_string", "cond_string".
6417         (catch_ada_exception_command): Update.
6418         (create_ada_exception_catchpoint): Change type of excep_string.
6419         (ada_exception_sal): Remove excep_string parameter.
6420         (~ada_catchpoint): Remove.
6421
6422 2018-05-21  Tom Tromey  <tom@tromey.com>
6423
6424         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
6425         cleanup.
6426
6427 2018-05-21  Tom Tromey  <tom@tromey.com>
6428
6429         * ada-lang.c (ada_exception_message_1, ada_exception_message):
6430         Return unique_xmalloc_ptr.
6431         (print_it_exception): Update.
6432
6433 2018-05-21  Tom Tromey  <tom@tromey.com>
6434
6435         * tracepoint.c (trace_dump_actions): Use std::string.
6436
6437 2018-05-21  Tom Tromey  <tom@tromey.com>
6438
6439         * symfile.c (reread_symbols): Use std::string for original_name.
6440
6441 2018-05-21  Tom Tromey  <tom@tromey.com>
6442
6443         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
6444         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
6445         constructor.
6446
6447 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
6448
6449         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
6450         instance to...
6451         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
6452         * objfiles.c (get_objfile_bfd_data): Allocate
6453         objfile_per_bfd_storage with obstack_new when allocating on
6454         obstack.
6455
6456 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
6457
6458         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
6459         OBSTACK_ZALLOC.
6460         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
6461         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
6462         * mdebugread.c (mdebug_build_psymtabs): Likewise.
6463         (add_pending): Likewise.
6464         (parse_symbol): Likewise.
6465         (parse_partial_symbols): Likewise.
6466         (psymtab_to_symtab_1): Likewise.
6467         (new_psymtab): Likewise.
6468         (elfmdebug_build_psymtabs): Likewise.
6469         * minsyms.c (terminate_minimal_symbol_table): Likewise.
6470         * objfiles.c (get_objfile_bfd_data): Likewise.
6471         (objfile_register_static_link): Likewise.
6472         * psymtab.c (allocate_psymtab): Likewise.
6473         * stabsread.c (read_member_functions): Likewise.
6474         * xcoffread.c (xcoff_end_psymtab): Likewise.
6475
6476 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
6477
6478         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
6479         compiler supports std::is_trivially_constructible.
6480         * common/poison.h: Include obstack.h.
6481         (IsMallocable): Define to is_trivially_constructible if the
6482         compiler supports it, define to true_type otherwise.
6483         (xobnew): New.
6484         (XOBNEW): Redefine.
6485         (xobnewvec): New.
6486         (XOBNEWVEC): Redefine.
6487         * gdb_obstack.h (obstack_zalloc): New.
6488         (OBSTACK_ZALLOC): Redefine.
6489         (obstack_calloc): New.
6490         (OBSTACK_CALLOC): Redefine.
6491         (obstack_new): New.
6492         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
6493         (gdbarch_obstack): New declaration in gdbarch.h, definition in
6494         gdbarch.c.
6495         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
6496         obstack_calloc/obstack_zalloc.
6497         (gdbarch_obstack_zalloc): Remove.
6498         * target-descriptions.c (tdesc_data_init): Use obstack_new.
6499
6500 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6501
6502         * stack.c (backtrace_command_1): Remove useless variable int i.
6503
6504 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6505
6506         * stack.c (print_frame_info): Fix comment.
6507
6508 2018-05-18  Tom Tromey  <tom@tromey.com>
6509
6510         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
6511         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
6512         (~dwarf2_per_objfile): Update
6513         (dwarf2_get_dwz_file): Use new.
6514         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
6515         unique_ptr.
6516
6517 2018-05-18  Tom Tromey  <tom@tromey.com>
6518
6519         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
6520         unique_ptr.
6521         * dwarf2read.c (struct dwp_file): Add constructor and
6522         initializers.
6523         (open_and_init_dwp_file): Return a unique_ptr.
6524         (dwarf2_per_objfile, create_dwp_hash_table)
6525         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
6526         (lookup_dwo_unit_in_dwp): Update.
6527         (open_and_init_dwp_file, get_dwp_file): Update.
6528
6529 2018-05-18  Tom Tromey  <tom@tromey.com>
6530
6531         * dwarf2read.c (dwarf2_per_objfile): Update.
6532         (struct mapped_index): Add initializers.
6533         (dwarf2_read_index): Use new.
6534         (dw2_symtab_iter_init): Update.
6535         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
6536         unique_ptr.
6537
6538 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
6539
6540         * dwarf2read.c (mapped_index) <total_size>: Remove.
6541
6542 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
6543
6544         * unittests/format_pieces-selftests.c (test_format_specifier):
6545         Add ARI comments.
6546
6547 2018-05-18  Tom Tromey  <tom@tromey.com>
6548
6549         * c-typeprint.c (maybe_print_hole): New function.
6550         (c_print_type_struct_field_offset): Update.
6551         (c_type_print_base_struct_union): Call maybe_print_hole.
6552
6553 2018-05-17  Keith Seitz  <keiths@redhat.com>
6554
6555         * breakpoint.c (build_bpstat_chain): New function, moved from
6556         bpstat_stop_status.
6557         (bpstat_stop_status): Add optional parameter, `stop_chain'.
6558         If no stop chain is passed, call build_bpstat_chain to build it.
6559         * breakpoint.h (build_bpstat_chain): Declare.
6560         (bpstat_stop_status): Move documentation here from breakpoint.c.
6561         * infrun.c (handle_signal_stop): Before eliding inlined frames,
6562         build the stop chain and pass it to skip_inline_frames.
6563         Pass this stop chain to bpstat_stop_status.
6564         * inline-frame.c: Include breakpoint.h.
6565         (stopped_by_user_bp_inline_frame): New function.
6566         (skip_inline_frames): Add parameter `stop_chain'.
6567         Move documention to inline-frame.h.
6568         If non-NULL, use stopped_by_user_bp_inline_frame to determine
6569         whether the frame should be elided.
6570         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
6571         Add moved documentation and update for new parameter.
6572
6573 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
6574
6575         PR cli/14975
6576         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6577         unittests/format_pieces-selftests.c.
6578         * common/format.h (format_piece) <operator==>: New.
6579         (format_pieces) <operator[]>: Remove.
6580         * common/format.c (format_pieces::format_pieces): Handle \e.
6581         * unittests/format_pieces-selftests.c: New.
6582
6583 2018-05-17  Tom Tromey  <tom@tromey.com>
6584
6585         PR symtab/23010:
6586         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
6587         (dw2_instantiate_symtab): Add skip_partial parameter.
6588         (dw2_find_last_source_symtab, dw2_map_expand_apply)
6589         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
6590         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
6591         (dw2_expand_symtabs_matching_one)
6592         (dw2_find_pc_sect_compunit_symtab)
6593         (dw2_debug_names_lookup_symbol)
6594         (dw2_debug_names_expand_symtabs_for_function): Update.
6595         (init_cutu_and_read_dies): Add skip_partial parameter.
6596         (process_psymtab_comp_unit, build_type_psymtabs_1)
6597         (process_skeletonless_type_unit, load_partial_comp_unit)
6598         (psymtab_to_symtab_1): Update.
6599         (load_full_comp_unit): Add skip_partial parameter.
6600         (process_imported_unit_die, dwarf2_read_addr_index)
6601         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
6602         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
6603         (read_signatured_type): Update.
6604
6605 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
6606
6607         * value.c (release_value): Remove unused variable.
6608         (record_latest_value): Likewise.
6609         (access_value_history): Likewise.
6610         (preserve_values): Likewise.
6611
6612 2018-05-17  Tom Tromey  <tom@tromey.com>
6613
6614         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
6615         Initialize.
6616
6617 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
6618
6619         PR gdb/22286
6620         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
6621         Also handle registers whose width is not a multiple of
6622         PTRACE_TYPE_RET.
6623         (linux_nat_trad_target::store_register): Likewise.
6624
6625 2018-05-16  Tom Tromey  <tom@tromey.com>
6626
6627         * gdbcore.h (core_bfd): Redefine.
6628         * corelow.c (core_target::close): Update.
6629         (core_target_open): Update.
6630         * progspace.h (struct program_space) <cbfd>: Now a
6631         gdb_bfd_ref_ptr.
6632
6633 2018-05-16  Tom Tromey  <tom@tromey.com>
6634
6635         PR cli/19551:
6636         * symfile-add-flags.h (enum symfile_add_flags)
6637         <SYMFILE_NOT_FILENAME>: New constant.
6638         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
6639         objfile name from BFD.
6640         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
6641         * minidebug.c (find_separate_debug_file_in_section): Put
6642         ".gnu_debugdata" into BFD's file name.
6643
6644 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
6645
6646         * regcache.c (regcache_read_ftype, regcache_write_ftype):
6647         Remove.
6648
6649 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
6650
6651         PR binutils/21446
6652         * aarch64-tdep.c (aarch64_analyze_prologue,
6653         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
6654         Indicate not interested in errors.
6655
6656 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
6657
6658         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
6659         Supply the MIPS_ZERO_REGNUM register.
6660
6661 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
6662
6663         * mips-tdep.c (mask_address_var): Make variable static.
6664
6665 2018-05-14  Tom Tromey  <tom@tromey.com>
6666
6667         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
6668
6669 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
6670
6671         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
6672         FXSAVE_ADDR for the mxcsr register.
6673
6674 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
6675
6676         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
6677
6678 2018-05-11  Pedro Alves  <palves@redhat.com>
6679
6680         * corelow.c (core_target) <core_target>: No longer inline.
6681         Initialize m_core_gdbarch, m_core_vec and build the section table
6682         here.
6683         <~core_target>: New.
6684         <core_gdbarch, get_core_register_section>: New methods.
6685         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
6686         factored out from ...
6687         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
6688         (core_ops): Delete.
6689         (sniff_core_bfd): Add gdbarch parameter.
6690         (core_close): Delete, merged into ...
6691         (core_target::close): ... here.  Delete self.
6692         (core_close_cleanup): Delete.
6693         (core_target_open): Allocate a core_target on the heap.  Use a
6694         unique_ptr instead of a cleanup.  Bits moved into the core_target
6695         ctor.  Adjust to use core_target methods instead of globals.
6696         (get_core_register_section): Rename to ...
6697         (core_target::get_core_register_section): ... this and adjust.
6698         (struct get_core_registers_cb_data): New.
6699         (get_core_registers_cb): Use it.  Use bool.
6700         (core_target::fetch_registers, core_target::files_info)
6701         (core_target::xfer_partial, core_target::read_description)
6702         (core_target::pid_to, core_target::thread_name): Adjust to
6703         reference class fields instead of globals.
6704         * target.h (struct target_ops_deleter, target_ops_up): New.
6705
6706 2018-05-11  Pedro Alves  <palves@redhat.com>
6707
6708         * corefile.c (core_file_command): Move to corelow.c.
6709         * corelow.c (the_core_target): Delete.
6710         (core_file_command): Moved from corefile.c.  Check exec_bfd
6711         instead of the_core_target.  Use target_detach instead of calling
6712         into the_core_target directly.
6713         (maybe_say_no_core_file_now): New.
6714         (core_target::detach): Use it.
6715         (_initialize_corelow): Remove references to the_core_target.
6716         * gdbcore.h (the_core_target): Delete.
6717
6718 2018-05-11  Tom Tromey  <tromey@redhat.com>
6719             Pedro Alves  <palves@redhat.com>
6720
6721         * corefile.c (core_bfd): Remove.
6722         * gdbcore.h (core_bfd): Now a macro.
6723         * progspace.h (struct program_space) <cbfd>: New field.
6724
6725 2018-05-11  Tom Tromey  <tom@tromey.com>
6726
6727         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
6728         gdb::def_vector.
6729
6730 2018-05-10  Tom Tromey  <tom@tromey.com>
6731
6732         * configure: Rebuild.
6733         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
6734
6735 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
6736
6737         PR server/23158:
6738         * regformats/regdat.sh: Adjust script, following the addition
6739         of the new expedite_regs parameter to init_target_desc.
6740
6741 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
6742     
6743         PR gdb/23127
6744         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
6745         set_gdbarch_significant_addr_bit.
6746         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
6747         set_gdbarch_significant_addr_bit.
6748         * utils.c (address_significant): Update to sign extend addr.
6749
6750 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
6751
6752         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
6753         (xtensa_linux_init_abi): Limit tdep->num_regs by
6754         tdep->num_nopriv_regs.
6755         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
6756         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
6757         not initialized.
6758
6759 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
6760
6761         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
6762
6763 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
6764
6765         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
6766         (I387_MXCSR_INIT_VAL): New constant.
6767         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
6768         buffer if it was supplied by the inferior.
6769         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
6770         (i387_xsave_get_clear_bv): New function.
6771         (i387_supply_xsave): Only read x87 control registers from the
6772         xsave buffer if the feature is enabled, and the state will have
6773         been written, otherwise, provide a suitable default.
6774         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
6775         including x87 control registers.  Update control registers if they
6776         have changed from the default value, and mark features as enabled
6777         as required.
6778         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
6779
6780 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
6781
6782         * spu-tdep.c (info_spu_event_command): Fix output formatting.
6783
6784 2018-05-07  Tom Tromey  <tom@tromey.com>
6785
6786         * configure: Rebuild.
6787         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
6788
6789 2018-05-07  Tom Tromey  <tom@tromey.com>
6790
6791         PR tdep/20362:
6792         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
6793         bit.  Use correct value for VDIV.
6794
6795 2018-05-04  Tom Tromey  <tom@tromey.com>
6796
6797         * configure: Rebuild.
6798         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
6799
6800 2018-05-04  Tom Tromey  <tom@tromey.com>
6801
6802         * linux-record.c (record_linux_system_call) <case
6803         RECORD_SYS_RECVFROM>: Add "break".
6804
6805 2018-05-04  Tom Tromey  <tom@tromey.com>
6806
6807         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
6808         Add missing "break".
6809         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
6810         Add missing "break".
6811
6812 2018-05-04  Tom Tromey  <tom@tromey.com>
6813
6814         * rs6000-tdep.c (ppc_process_record_op4)
6815         (ppc_process_record_op63): Add fall-through comment.
6816
6817 2018-05-04  Tom Tromey  <tom@tromey.com>
6818
6819         * i386-tdep.c (i386_process_record): Add fall-through comment.
6820
6821 2018-05-04  Tom Tromey  <tom@tromey.com>
6822
6823         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
6824         comment.
6825
6826 2018-05-04  Tom Tromey  <tom@tromey.com>
6827
6828         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
6829         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
6830         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
6831         comment.
6832         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
6833         comment.
6834         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
6835         comment.
6836
6837 2018-05-04  Tom Tromey  <tom@tromey.com>
6838
6839         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
6840
6841 2018-05-04  Tom Tromey  <tom@tromey.com>
6842
6843         * s390-tdep.c (s390_process_record): Fix fall-through comments.
6844         * xcoffread.c (scan_xcoff_symtab): Move comment later.
6845         * symfile.c (section_is_mapped): Fix fall-through comment.
6846         * stabsread.c (define_symbol, read_member_functions): Fix
6847         fall-through comment.
6848         * s390-linux-tdep.c (s390_process_record): Fix fall-through
6849         comment.
6850         * remote.c (remote_wait_as): Fix fall-through comment.
6851         * p-exp.y (yylex): Fix fall-through comment.
6852         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
6853         comment.
6854         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
6855         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
6856         * jv-exp.y (yylex): Fix fall-through comment.
6857         * go-exp.y (lex_one_token): Fix fall-through comment.
6858         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
6859         fall-through comment.
6860         * f-exp.y (yylex): Fix fall-through comment.
6861         * dwarf2read.c (process_die): Fix fall-through comments.
6862         * dbxread.c (process_one_symbol): Fix fall-through comment.
6863         * d-exp.y (lex_one_token): Fix fall-through comment.
6864         * cp-name-parser.y (yylex): Fix fall-through comment.
6865         * coffread.c (coff_symtab_read): Fix fall-through comment.
6866         * c-exp.y (lex_one_token): Fix fall-through comment.
6867         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
6868         comment.
6869         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
6870         comment.
6871
6872 2018-05-04  Tom Tromey  <tom@tromey.com>
6873
6874         PR python/22730:
6875         * NEWS: Mention gdb.execute change.
6876         * gdbcmd.h (execute_control_command): Don't declare.
6877         * python/python.c (execute_gdb_command): Use read_command_lines_1,
6878         execute_control_commands, execute_control_commands_to_string.
6879         * cli/cli-script.h (execute_control_commands)
6880         (execute_control_commands_to_string): Declare.
6881         (execute_control_command): Add from_tty parameter.
6882         * cli/cli-script.c (execute_control_commands)
6883         (execute_control_commands_to_string): New functions.
6884         (execute_user_command): Use execute_control_commands.
6885         (execute_control_command_1): Add "from_tty" parameter.  Update.
6886         (execute_control_command): Likewise.
6887
6888 2018-05-04  Tom Tromey  <tom@tromey.com>
6889
6890         PR python/22731:
6891         * NEWS: Mention that breakpoint commands are writable.
6892         * python/py-breakpoint.c (bppy_set_commands): New function.
6893         (breakpoint_object_getset) <"commands">: Use it.
6894
6895 2018-05-04  Tom Tromey  <tom@tromey.com>
6896
6897         * tracepoint.c (actions_command): Update.
6898         * mi/mi-cmd-break.c (mi_command_line_array)
6899         (mi_command_line_array_cnt, mi_command_line_array_ptr)
6900         (mi_read_next_line): Remove.
6901         (mi_cmd_break_commands): Update.
6902         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
6903         function_view.
6904         * cli/cli-script.c (get_command_line): Update.
6905         (process_next_line): Use function_view.  Constify.
6906         (recurse_read_control_structure, read_command_lines)
6907         (read_command_lines_1): Change argument types to function_view.
6908         (do_define_command, document_command): Update.
6909         * breakpoint.h (check_tracepoint_command): Don't declare.
6910         * breakpoint.c (check_tracepoint_command): Remove.
6911         (commands_command_1, create_tracepoint_from_upload): Update.
6912
6913 2018-05-04  Tom Tromey  <tom@tromey.com>
6914
6915         PR gdb/11750:
6916         * cli/cli-script.h (enum command_control_type) <define_control>:
6917         New constant.
6918         * cli/cli-script.c (multi_line_command_p): Handle define_control.
6919         (build_command_line, execute_control_command_1)
6920         (process_next_line): Likewise.
6921         (do_define_command): New function, extracted from define_command.
6922         (define_command): Use it.
6923
6924 2018-05-04  Tom Tromey  <tom@tromey.com>
6925
6926         * tracepoint.c (actions_command): Update.
6927         * cli/cli-script.h (read_command_lines): Update.
6928         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
6929         (MAX_TMPBUF): Remove define.
6930         (define_command): Use string_printf.
6931         (document_command): Likewise.
6932         * breakpoint.c (commands_command_1): Update.
6933
6934 2018-05-04  Tom Tromey  <tom@tromey.com>
6935
6936         * top.c (execute_command): Update.
6937         * cli/cli-script.h (print_command_lines): Now varargs.
6938         * cli/cli-script.c (print_command_lines): Now varargs.
6939         (execute_control_command_1) <case while_control, case if_control>:
6940         Update.
6941
6942 2018-05-04  Tom Tromey  <tom@tromey.com>
6943
6944         * tracepoint.c (all_tracepoint_actions): Rename from
6945         all_tracepoint_actions_and_cleanup.  Change return type.
6946         (actions_command, encode_actions_1, encode_actions)
6947         (trace_dump_actions, tdump_command): Update.
6948         * remote.c (remote_download_command_source): Update.
6949         * python/python.c (gdbpy_eval_from_control_command)
6950         (python_command, python_interactive_command): Update.
6951         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
6952         * guile/guile.c (guile_command)
6953         (gdbscm_eval_from_control_command, guile_command): Update.
6954         * compile/compile.c (compile_code_command)
6955         (compile_print_command, compile_to_object): Update.
6956         * cli/cli-script.h (struct command_lines_deleter): New.
6957         (counted_command_line): New typedef.
6958         (struct command_line): Add constructor, destructor.
6959         <body_list>: Remove.
6960         <body_list_0, body_list_1>: New members.
6961         (command_line_up): Remove typedef.
6962         (read_command_lines, read_command_lines_1, get_command_line):
6963         Update.
6964         (copy_command_lines): Don't declare.
6965         * cli/cli-script.c (build_command_line): Use "new".
6966         (get_command_line): Return counted_command_line.
6967         (print_command_lines, execute_user_command)
6968         (execute_control_command_1, while_command, if_command): Update.
6969         (realloc_body_list): Remove.
6970         (process_next_line, recurse_read_control_structure): Update.
6971         (read_command_lines, read_command_lines_1): Return counted_command_line.
6972         (free_command_lines): Use "delete".
6973         (copy_command_lines): Remove.
6974         (define_command, document_command, show_user_1): Update.
6975         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
6976         a counted_command_line.
6977         * breakpoint.h (counted_command_line): Remove typedef.
6978         (breakpoint_set_commands): Update.
6979         * breakpoint.c (check_no_tracepoint_commands)
6980         (validate_commands_for_breakpoint): Update.
6981         (breakpoint_set_commands): Change commands to be a
6982         counted_command_line.
6983         (commands_command_1, update_dprintf_command_list)
6984         (create_tracepoint_from_upload): Update.
6985
6986 2018-05-04  Tom Tromey  <tom@tromey.com>
6987
6988         * cli/cli-decode.h (cmd_list_element): New constructor.
6989         (~cmd_list_element): New destructor.
6990         (struct cmd_list_element): Add initializers.
6991         * cli/cli-decode.c (do_add_cmd): Use "new".
6992         (delete_cmd): Use "delete".
6993
6994 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
6995             Pedro Alves <palves@redhat.com>
6996
6997         PR breakpoints/19806 and support for PR external/20207.
6998         * NEWS: Mention Aarch64 watchpoint improvements.
6999         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
7000         watchpoints and PR external/20207 watchpoints.
7001         * nat/aarch64-linux-hw-point.c
7002         (kernel_supports_any_contiguous_range): New.
7003         (aarch64_watchpoint_offset): New.
7004         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
7005         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
7006         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
7007         (aarch64_align_watchpoint): New parameters aligned_offset_p and
7008         next_addr_orig_p.  Support PR external/20207 watchpoints.
7009         (aarch64_downgrade_regs): New.
7010         (aarch64_dr_state_insert_one_point): New parameters offset and
7011         addr_orig.
7012         (aarch64_dr_state_remove_one_point): Likewise.
7013         (aarch64_handle_breakpoint): Update caller.
7014         (aarch64_handle_aligned_watchpoint): Likewise.
7015         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
7016         aligned_offset.
7017         (aarch64_linux_set_debug_regs): Remove const from state.  Call
7018         aarch64_downgrade_regs.
7019         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
7020         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
7021         (DR_CONTROL_MASK): ... this.
7022         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
7023         (unsigned int aarch64_watchpoint_offset): New prototype.
7024         (aarch64_linux_set_debug_regs): Remove const from state.
7025         * utils.c (align_up, align_down): Move to ...
7026         * common/common-utils.c (align_up, align_down): ... here.
7027         * utils.h (align_up, align_down): Move to ...
7028         * common/common-utils.h (align_up, align_down): ... here.
7029
7030 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
7031
7032         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
7033         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
7034         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
7035         Re-implement to match the ABI as summarized in GCC's
7036         gcc/config/sparc/sparc.c.  All callers updated.
7037         (sparc32_store_arguments): Remove assertion.
7038
7039 2018-05-04  Tom Tromey  <tom@tromey.com>
7040
7041         * printcmd.c: Don't include tui.h.
7042         (decode_format): Use skip_spaces.
7043
7044 2018-05-04  Tom Tromey  <tom@tromey.com>
7045
7046         PR gdb/22619:
7047         * printcmd.c (last_count): New global.
7048         (x_command): Use saved count when repeating.
7049
7050 2018-05-04  Tom Tromey  <tom@tromey.com>
7051
7052         * nto-procfs.c (do_closedir_cleanup): Remove.
7053         (procfs_pidlist): Use gdb_dir_up.
7054         * procfs.c (do_closedir_cleanup): Remove.
7055         (proc_update_threads): Use gdb_dir_up.
7056         * common/filestuff.h (struct gdb_dir_deleter): New.
7057         (gdb_dir_up): New typedef.
7058
7059 2018-05-04  Tom Tromey  <tom@tromey.com>
7060
7061         * ada-lang.c (print_mention_exception): Use std::string.
7062
7063 2018-05-04  Tom Tromey  <tom@tromey.com>
7064
7065         * ada-lang.c (create_excep_cond_exprs): Update.
7066         (ada_exception_catchpoint_cond_string): Use std::string.
7067
7068 2018-05-04  Tom Tromey  <tom@tromey.com>
7069
7070         * ada-lang.c (xget_renaming_scope): Return std::string.
7071         (old_renaming_is_invisible): Update.
7072
7073 2018-05-04  Tom Tromey  <tom@tromey.com>
7074
7075         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
7076         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
7077
7078 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
7079
7080         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
7081
7082 2018-05-04  Tom Tromey  <tom@tromey.com>
7083
7084         * remote.c (remote_query_supported_append): Change type.
7085         (remote_check_symbols): Update.
7086
7087 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
7088
7089         PR gdb/11420
7090         * configure.ac: Prepend libpython.
7091         * python/python-config.py: Likewise.
7092         * configure: Regenerate.
7093
7094 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
7095
7096         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
7097
7098 2018-05-03  Pedro Alves  <palves@redhat.com>
7099
7100         * s390-linux-nat.c
7101         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
7102         override.  Write 'true' instead of '1'.
7103         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
7104         declaration.
7105
7106 2018-05-02  Pedro Alves  <palves@redhat.com>
7107
7108         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
7109         add_inf_child_target.
7110         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
7111         add_inf_child_target.
7112         * aix-thread.c (aix_thread_target_info): New.
7113         (aix_thread_target) <shortname, longname, doc>: Delete.
7114         <info>: New.
7115         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
7116         add_inf_child_target.
7117         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
7118         add_inf_child_target.
7119         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
7120         add_inf_child_target.
7121         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
7122         add_inf_child_target.
7123         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
7124         add_inf_child_target.
7125         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
7126         add_inf_child_target.
7127         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
7128         add_inf_child_target.
7129         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
7130         add_inf_child_target.
7131         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
7132         add_inf_child_target.
7133         * bfd-target.c (target_bfd_target_info): New.
7134         (target_bfd) <shortname, longname, doc>: Delete.
7135         <info>: New.
7136         * bsd-kvm.c (bsd_kvm_target_info): New.
7137         (bsd_kvm_target) <shortname, longname, doc>: Delete.
7138         <info>: New.
7139         (bsd_kvm_target::open): Rename to ...
7140         (bsd_kvm_target_open): ... this.  Adjust.
7141         * bsd-uthread.c (bsd_uthread_target_info): New.
7142         (bsd_uthread_target) <shortname, longname, doc>: Delete.
7143         <info>: New.
7144         * corefile.c (core_file_command): Adjust.
7145         * corelow.c (core_target_info): New.
7146         (core_target) <shortname, longname, doc>: Delete.
7147         <info>: New.
7148         (core_target::open): Rename to ...
7149         (core_target_open): ... this.  Adjust.
7150         * ctf.c (ctf_target_info): New.
7151         (ctf_target) <shortname, longname, doc>: Delete.
7152         <info>: New.
7153         (ctf_target::open): Rename to ...
7154         (ctf_target_open): ... this.
7155         (_initialize_ctf): Adjust.
7156         * exec.c (exec_target_info): New.
7157         (exec_target) <shortname, longname, doc>: Delete.
7158         <info>: New.
7159         (exec_target::open): Rename to ...
7160         (exec_target_open): ... this.
7161         * gdbcore.h (core_target_open): Declare.
7162         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
7163         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
7164         add_inf_child_target.
7165         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
7166         add_inf_child_target.
7167         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
7168         add_inf_child_target.
7169         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
7170         add_inf_child_target.
7171         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
7172         add_inf_child_target.
7173         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
7174         add_inf_child_target.
7175         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
7176         add_inf_child_target.
7177         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
7178         add_inf_child_target.
7179         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
7180         add_inf_child_target.
7181         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
7182         add_inf_child_target.
7183         * inf-child.c (inf_child_target_info): New.
7184         (inf_child_target::info): New.
7185         (inf_child_open_target): Remove 'target' parameter.  Use
7186         get_native_target instead.
7187         (inf_child_target::open): Delete.
7188         (add_inf_child_target): New.
7189         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
7190         Delete.
7191         <info>: New.
7192         (add_inf_child_target): Declare.
7193         (inf_child_open_target): Declare.
7194         * linux-thread-db.c (thread_db_target_info): New.
7195         (thread_db_target) <shortname, longname, doc>: Delete.
7196         <info>: New.
7197         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
7198         add_inf_child_target.
7199         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
7200         add_inf_child_target.
7201         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
7202         add_inf_child_target.
7203         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
7204         add_inf_child_target.
7205         * make-target-delegates (print_class): Adjust.
7206         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
7207         add_inf_child_target.
7208         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
7209         add_inf_child_target.
7210         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
7211         add_inf_child_target.
7212         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
7213         add_inf_child_target.
7214         * nto-procfs.c (nto_native_target_info): New.
7215         (nto_procfs_target_native) <shortname, longname, doc>:
7216         Delete.
7217         <info>: New.
7218         (nto_procfs_target_info): New.
7219         (nto_procfs_target_procfs) <shortname, longname, doc>:
7220         Delete.
7221         <info>: New.
7222         (init_procfs_targets): Adjust.
7223         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
7224         add_inf_child_target.
7225         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
7226         add_inf_child_target.
7227         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
7228         add_inf_child_target.
7229         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
7230         add_inf_child_target.
7231         * ravenscar-thread.c (ravenscar_target_info): New.
7232         (ravenscar_thread_target) <shortname, longname, doc>:
7233         Delete.
7234         <info>: New.
7235         * record-btrace.c (record_btrace_target_info):
7236         (record_btrace_target) <shortname, longname, doc>: Delete.
7237         <info>: New.
7238         (record_btrace_target::open): Rename to ...
7239         (record_btrace_target_open): ... this.  Adjust.
7240         * record-full.c (record_longname, record_doc): New.
7241         (record_full_base_target) <shortname, longname, doc>: Delete.
7242         <info>: New.
7243         (record_full_target_info): New.
7244         (record_full_target): <shortname>: Delete.
7245         <info>: New.
7246         (record_full_core_open_1, record_full_open_1): Update comments.
7247         (record_full_base_target::open): Rename to ...
7248         (record_full_open): ... this.
7249         (cmd_record_full_restore): Update.
7250         (_initialize_record_full): Update.
7251         * remote-sim.c (remote_sim_target_info): New.
7252         (gdbsim_target) <shortname, longname, doc>: Delete.
7253         <info>: New.
7254         (gdbsim_target::open): Rename to ...
7255         (gdbsim_target_open): ... this.
7256         (_initialize_remote_sim): Adjust.
7257         * remote.c (remote_doc): New.
7258         (remote_target_info): New.
7259         (remote_target) <shortname, longname, doc>: Delete.
7260         <info>: New.
7261         (extended_remote_target_info): New.
7262         (extended_remote_target) <shortname, longname, doc>: Delete.
7263         <info>: New.
7264         (remote_target::open_1): Make static.  Adjust.
7265         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
7266         * s390-linux-nat.c (_initialize_s390_nat): Use
7267         add_inf_child_target.
7268         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
7269         add_inf_child_target.
7270         * sol-thread.c (thread_db_target_info): New.
7271         (sol_thread_target) <shortname, longname, doc>: Delete.
7272         <info>: New.
7273         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
7274         add_inf_child_target.
7275         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
7276         add_inf_child_target.
7277         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
7278         add_inf_child_target.
7279         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
7280         add_inf_child_target.
7281         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
7282         add_inf_child_target.
7283         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
7284         add_inf_child_target.
7285         * spu-linux-nat.c (_initialize_spu_nat): Use
7286         add_inf_child_target.
7287         * spu-multiarch.c (spu_multiarch_target_info): New.
7288         (spu_multiarch_target) <shortname, longname, doc>: Delete.
7289         <info>: New.
7290         * target-delegates.c: Regenerate.
7291         * target.c: Include <unordered_map>.
7292         (target_ops_p): Delete.
7293         (DEF_VEC_P(target_ops_p)): Delete.
7294         (target_factories): New.
7295         (test_target_info): New.
7296         (test_target_ops::info): New.
7297         (open_target): Adjust to use target_factories.
7298         (add_target_with_completer): Rename to ...
7299         (add_target): ... this.  Change prototype.  Register target_info
7300         and open callback in target_factories.  Register target_info in
7301         command context instead of target_ops.
7302         (add_target): Delete old implementation.
7303         (add_deprecated_target_alias): Change prototype.  Adjust.
7304         (the_native_target): New.
7305         (set_native_target, get_native_target): New.
7306         (find_default_run_target): Use the_native_target.
7307         (find_attach_target, find_run_target): Simplify.
7308         (target_ops::open): Delete.
7309         (dummy_target_info): New.
7310         (dummy_target::shortname, dummy_target::longname)
7311         (dummy_target::doc): Delete.
7312         (dummy_target::info): New.
7313         (debug_target::shortname, debug_target::longname)
7314         (debug_target::doc): Delete.
7315         (debug_target::info): New.
7316         * target.h (struct target_info): New.
7317         (target_ops::~target_ops): Add comment.
7318         (target_ops::info): New.
7319         (target_ops::shortname, target_ops::longname, target_ops::doc): No
7320         longer virtual.  Implement in terms of target_info.
7321         (set_native_target, get_native_target): Declare.
7322         (target_open_ftype): New.
7323         (add_target, add_target_with_completer)
7324         (add_deprecated_target_alias): Change prototype.
7325         (test_target) <shortname, longname, doc>: Delete.
7326         <info>: New.
7327         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
7328         add_inf_child_target.
7329         * tracefile-tfile.c (tfile_target_info): New.
7330         (tfile_target) <shortname, longname, doc>: Delete.
7331         <info>: New.
7332         (tfile_target::open): Rename to ...
7333         (tfile_target_open): ... this.
7334         (_initialize_tracefile_tfile): Adjust.
7335         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
7336         add_inf_child_target.
7337         * windows-nat.c (_initialize_windows_nat): Use
7338         add_inf_child_target.
7339         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
7340         add_inf_child_target.
7341
7342 2018-05-02  Pedro Alves  <palves@redhat.com>
7343
7344         * linux-nat.h (linux_nat_target) <low_new_thread,
7345         low_delete_thread, low_new_fork, low_forget_process,
7346         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
7347         New virtual methods.
7348         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
7349         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
7350         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
7351         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
7352         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
7353         Delete.
7354         * linux-fork.c (delete_fork): Adjust to call low method.
7355         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
7356         (linux_nat_new_fork, linux_nat_forget_process_hook)
7357         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
7358         (linux_nat_status_is_event):
7359         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
7360         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
7361         to call low method.
7362         (sigtrap_is_event): Rename to ...
7363         (linux_nat_target::low_status_is_event): ... this.
7364         (linux_nat_set_status_is_event): Delete.
7365         (save_stop_reason, linux_nat_wait_1)
7366         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
7367         low methods.
7368         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
7369         (linux_nat_set_new_fork, linux_nat_set_forget_process)
7370         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
7371         (linux_nat_set_prepare_to_resume): Delete.
7372         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
7373         low virtual methods.
7374         * amd64-linux-nat.c: Likewise.
7375         * arm-linux-nat.c: Likewise.
7376         * i386-linux-nat.c: Likewise.
7377         * ia64-linux-nat.c: Likewise.
7378         * mips-linux-nat.c: Likewise.
7379         * ppc-linux-nat.c: Likewise.
7380         * s390-linux-nat.c: Likewise.
7381         * sparc64-linux-nat.c: Likewise.
7382         * x86-linux-nat.c: Likewise.
7383         * x86-linux-nat.h: Include "nat/x86-linux.h".
7384         (x86_linux_nat_target) <low_new_fork, low_forget_process,
7385         low_prepare_to_resume, low_new_thread, low_delete_thread>:
7386         Override methods.
7387
7388 2018-05-02  Pedro Alves  <palves@redhat.com>
7389
7390         * target.h (target_ops)
7391         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
7392         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
7393         stopped_by_watchpoint, have_continuable_watchpoint,
7394         stopped_data_address, watchpoint_addr_within_range,
7395         can_accel_watchpoint_condition, can_run, thread_alive,
7396         has_all_memory, has_memory, has_stack, has_registers,
7397         has_execution, can_async_p, is_async_p, supports_non_stop,
7398         always_non_stop_p, can_execute_reverse, supports_multi_process,
7399         supports_enable_disable_tracepoint,
7400         supports_disable_randomization, supports_string_tracing,
7401         supports_evaluation_of_breakpoint_conditions,
7402         can_run_breakpoint_commands, filesystem_is_local,
7403         can_download_tracepoint, get_trace_state_variable_value,
7404         set_trace_notes, get_tib_address, use_agent, can_use_agent,
7405         record_is_replaying, record_will_replay,
7406         augmented_libraries_svr4_read>: Adjust to return bool.
7407         * aarch64-linux-nat.c: All implementations adjusted.
7408         * aix-thread.c: All implementations adjusted.
7409         * arm-linux-nat.c: All implementations adjusted.
7410         * breakpoint.c: All implementations adjusted.
7411         * bsd-kvm.c: All implementations adjusted.
7412         * bsd-uthread.c: All implementations adjusted.
7413         * corelow.c: All implementations adjusted.
7414         * ctf.c: All implementations adjusted.
7415         * darwin-nat.c: All implementations adjusted.
7416         * darwin-nat.h: All implementations adjusted.
7417         * exec.c: All implementations adjusted.
7418         * fbsd-nat.c: All implementations adjusted.
7419         * fbsd-nat.h: All implementations adjusted.
7420         * gnu-nat.c: All implementations adjusted.
7421         * gnu-nat.h: All implementations adjusted.
7422         * go32-nat.c: All implementations adjusted.
7423         * ia64-linux-nat.c: All implementations adjusted.
7424         * inf-child.c: All implementations adjusted.
7425         * inf-child.h: All implementations adjusted.
7426         * inf-ptrace.c: All implementations adjusted.
7427         * inf-ptrace.h: All implementations adjusted.
7428         * linux-nat.c: All implementations adjusted.
7429         * linux-nat.h: All implementations adjusted.
7430         * mips-linux-nat.c: All implementations adjusted.
7431         * nto-procfs.c: All implementations adjusted.
7432         * ppc-linux-nat.c: All implementations adjusted.
7433         * procfs.c: All implementations adjusted.
7434         * ravenscar-thread.c: All implementations adjusted.
7435         * record-btrace.c: All implementations adjusted.
7436         * record-full.c: All implementations adjusted.
7437         * remote-sim.c: All implementations adjusted.
7438         * remote.c: All implementations adjusted.
7439         * s390-linux-nat.c: All implementations adjusted.
7440         * sol-thread.c: All implementations adjusted.
7441         * spu-multiarch.c: All implementations adjusted.
7442         * target-delegates.c: All implementations adjusted.
7443         * target.c: All implementations adjusted.
7444         * target.h: All implementations adjusted.
7445         * tracefile-tfile.c: All implementations adjusted.
7446         * tracefile.c: All implementations adjusted.
7447         * tracefile.h: All implementations adjusted.
7448         * windows-nat.c: All implementations adjusted.
7449         * x86-linux-nat.h: All implementations adjusted.
7450         * x86-nat.h: All implementations adjusted.
7451
7452 2018-05-02  Pedro Alves  <palves@redhat.com>
7453
7454         * make-target-delegates (scan_target_h): Don't trim lines here.
7455         Replace sequences of tabs and/or whitespace with a single
7456         whitespace.
7457         (top level, parsing methods): Trim each line before processing it
7458         here.
7459
7460 2018-05-02  Pedro Alves  <palves@redhat.com>
7461             John Baldwin  <jhb@freebsd.org>
7462
7463         * target.h (enum strata) <debug_stratum>: New.
7464         (struct target_ops) <all delegation methods>: Replace by C++
7465         virtual methods, and drop "to_" prefix.  All references updated
7466         throughout.
7467         <to_shortname, to_longname, to_doc, to_data,
7468         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
7469         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
7470         virtual methods.  All references updated throughout.
7471         <can_attach, supports_terminal_ours, can_create_inferior,
7472         get_thread_control_capabilities, attach_no_wait>: New
7473         virtual methods.
7474         <insert_breakpoint, remove_breakpoint>: Now
7475         TARGET_DEFAULT_NORETURN methods.
7476         <info_proc>: Now returns bool.
7477         <to_magic>: Delete.
7478         (OPS_MAGIC): Delete.
7479         (current_target): Delete.  All references replaced by references
7480         to ...
7481         (target_stack): ... this.  New.
7482         (target_shortname, target_longname): Adjust.
7483         (target_can_run): Now a function declaration.
7484         (default_child_has_all_memory, default_child_has_memory)
7485         (default_child_has_stack, default_child_has_registers)
7486         (default_child_has_execution): Remove target_ops parameter.
7487         (complete_target_initialization): Delete.
7488         (memory_breakpoint_target): New template class.
7489         (test_target_ops): Refactor as a C++ class with virtual methods.
7490         * make-target-delegates (NAME_PART): Tighten.
7491         (POINTER_PART, CP_SYMBOL): New.
7492         (SIMPLE_RETURN_PART): Reimplement.
7493         (VEC_RETURN_PART): Expect less.
7494         (RETURN_PART, VIRTUAL_PART): New.
7495         (METHOD): Adjust to C++ virtual methods.
7496         (scan_target_h): Remove reference to C99.
7497         (dname): Output "target_ops::" prefix.
7498         (write_function_header): Adjust to output a C++ class method.
7499         (write_declaration): New.
7500         (write_delegator): Adjust to output a C++ class method.
7501         (tdname): Output "dummy_target::" prefix.
7502         (write_tdefault, write_debugmethod): Adjust to output a C++ class
7503         method.
7504         (tdefault_names, debug_names): Delete.
7505         (return_types, tdefaults, styles, argtypes_array): New.
7506         (top level): All methods are delegators.
7507         (print_class): New.
7508         (top level): Print dummy_target and debug_target classes.
7509         * target-delegates.c: Regenerate.
7510         * target-debug.h (target_debug_print_enum_info_proc_what)
7511         (target_debug_print_thread_control_capabilities)
7512         (target_debug_print_thread_info_p): New.
7513         * target.c (dummy_target): Delete.
7514         (the_dummy_target, the_debug_target): New.
7515         (target_stack): Now extern.
7516         (set_targetdebug): Push/unpush debug target.
7517         (default_child_has_all_memory, default_child_has_memory)
7518         (default_child_has_stack, default_child_has_registers)
7519         (default_child_has_execution): Remove target_ops parameter.
7520         (complete_target_initialization): Delete.
7521         (add_target_with_completer): No longer call
7522         complete_target_initialization.
7523         (target_supports_terminal_ours): Use regular delegation.
7524         (update_current_target): Delete.
7525         (push_target): No longer check magic number.  Don't call
7526         update_current_target.
7527         (unpush_target): Don't call update_current_target.
7528         (target_is_pushed): No longer check magic number.
7529         (target_require_runnable): Skip for all stratums over
7530         process_stratum.
7531         (target_ops::info_proc): New.
7532         (target_info_proc): Use find_target_at and
7533         find_default_run_target.
7534         (target_supports_disable_randomization): Use regular delegation.
7535         (target_get_osdata): Use find_target_at.
7536         (target_ops::open, target_ops::close, target_ops::can_attach)
7537         (target_ops::attach, target_ops::can_create_inferior)
7538         (target_ops::create_inferior, target_ops::can_run)
7539         (target_can_run): New.
7540         (default_fileio_target): Use regular delegation.
7541         (target_ops::fileio_open, target_ops::fileio_pwrite)
7542         (target_ops::fileio_pread, target_ops::fileio_fstat)
7543         (target_ops::fileio_close, target_ops::fileio_unlink)
7544         (target_ops::fileio_readlink): New.
7545         (target_fileio_open_1, target_fileio_unlink)
7546         (target_fileio_readlink): Always call the target method.  Handle
7547         FILEIO_ENOSYS.
7548         (return_zero, return_zero_has_execution): Delete.
7549         (init_dummy_target): Delete.
7550         (dummy_target::dummy_target, dummy_target::shortname)
7551         (dummy_target::longname, dummy_target::doc)
7552         (debug_target::debug_target, debug_target::shortname)
7553         (debug_target::longname, debug_target::doc): New.
7554         (target_supports_delete_record): Use regular delegation.
7555         (setup_target_debug): Delete.
7556         (maintenance_print_target_stack): Skip debug_stratum.
7557         (initialize_targets): Instantiate the_dummy_target and
7558         the_debug_target.
7559         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
7560         use target_stack.
7561         (target_auxv_search, fprint_target_auxv): Adjust.
7562         (info_auxv_command): Adjust to use target_stack.
7563         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
7564         * exceptions.c (print_flush): Handle a NULL target_stack.
7565         * regcache.c (target_ops_no_register): Refactor as class with
7566         virtual methods.
7567
7568         * exec.c (exec_target): New class.
7569         (exec_ops): Now an exec_target.
7570         (exec_open, exec_close_1, exec_get_section_table)
7571         (exec_xfer_partial, exec_files_info, exec_has_memory)
7572         (exec_make_note_section): Refactor as exec_target methods.
7573         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
7574         Delete.
7575         (exec_target::find_memory_regions): New.
7576         (_initialize_exec): Don't call init_exec_ops.
7577         * gdbcore.h (exec_file_clear): Delete.
7578
7579         * corefile.c (core_target): Delete.
7580         (core_file_command): Adjust.
7581         * corelow.c (core_target): New class.
7582         (the_core_target): New.
7583         (core_close): Remove target_ops parameter.
7584         (core_close_cleanup): Adjust.
7585         (core_target::close): New.
7586         (core_open, core_detach, get_core_registers, core_files_info)
7587         (core_xfer_partial, core_thread_alive, core_read_description)
7588         (core_pid_to_str, core_thread_name, core_has_memory)
7589         (core_has_stack, core_has_registers, core_info_proc): Rework as
7590         core_target methods.
7591         (ignore, core_remove_breakpoint, init_core_ops): Delete.
7592         (_initialize_corelow): Initialize the_core_target.
7593         * gdbcore.h (core_target): Delete.
7594         (the_core_target): New.
7595
7596         * ctf.c: (ctf_target): New class.
7597         (ctf_ops): Now a ctf_target.
7598         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
7599         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
7600         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
7601         methods.
7602         (init_ctf_ops): Delete.
7603         (_initialize_ctf): Don't call it.
7604         * tracefile-tfile.c (tfile_target): New class.
7605         (tfile_ops): Now a tfile_target.
7606         (tfile_open, tfile_close, tfile_files_info)
7607         (tfile_get_tracepoint_status, tfile_trace_find)
7608         (tfile_fetch_registers, tfile_xfer_partial)
7609         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
7610         Refactor as tfile_target methods.
7611         (tfile_xfer_partial_features): Remove target_ops parameter.
7612         (init_tfile_ops): Delete.
7613         (_initialize_tracefile_tfile): Don't call it.
7614         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
7615         (tracefile_has_stack, tracefile_has_registers)
7616         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
7617         tracefile_target methods.
7618         (init_tracefile_ops): Delete.
7619         (tracefile_target::tracefile_target): New.
7620         * tracefile.h: Include "target.h".
7621         (tracefile_target): New class.
7622         (init_tracefile_ops): Delete.
7623
7624         * spu-multiarch.c (spu_multiarch_target): New class.
7625         (spu_ops): Now a spu_multiarch_target.
7626         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
7627         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
7628         (spu_search_memory, spu_mourn_inferior): Refactor as
7629         spu_multiarch_target methods.
7630         (init_spu_ops): Delete.
7631         (_initialize_spu_multiarch): Remove references to init_spu_ops,
7632         complete_target_initialization.
7633
7634         * ravenscar-thread.c (ravenscar_thread_target): New class.
7635         (ravenscar_ops): Now a ravenscar_thread_target.
7636         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
7637         (ravenscar_thread_alive, ravenscar_pid_to_str)
7638         (ravenscar_fetch_registers, ravenscar_store_registers)
7639         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
7640         (ravenscar_stopped_by_hw_breakpoint)
7641         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
7642         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
7643         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
7644         methods.
7645         (init_ravenscar_thread_ops): Delete.
7646         (_initialize_ravenscar): Remove references to
7647         init_ravenscar_thread_ops and complete_target_initialization.
7648
7649         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
7650         (bsd_uthread_target): New class.
7651         (bsd_uthread_ops): Now a bsd_uthread_target.
7652         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
7653         (bsd_uthread_close, bsd_uthread_mourn_inferior)
7654         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
7655         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
7656         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
7657         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
7658         (bsd_uthread_target): Delete function.
7659         (_initialize_bsd_uthread): Remove reference to
7660         complete_target_initialization.
7661
7662         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
7663         (target_bfd): ... this new class.
7664         (target_bfd_xfer_partial, target_bfd_get_section_table)
7665         (target_bfd_close): Refactor as target_bfd methods.
7666         (target_bfd::~target_bfd): New.
7667         (target_bfd_reopen): Adjust.
7668         (target_bfd::close): New.
7669
7670         * record-btrace.c (record_btrace_target): New class.
7671         (record_btrace_ops): Now a record_btrace_target.
7672         (record_btrace_open, record_btrace_stop_recording)
7673         (record_btrace_disconnect, record_btrace_close)
7674         (record_btrace_async, record_btrace_info)
7675         (record_btrace_insn_history, record_btrace_insn_history_range)
7676         (record_btrace_insn_history_from, record_btrace_call_history)
7677         (record_btrace_call_history_range)
7678         (record_btrace_call_history_from, record_btrace_record_method)
7679         (record_btrace_is_replaying, record_btrace_will_replay)
7680         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
7681         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
7682         (record_btrace_store_registers, record_btrace_prepare_to_store)
7683         (record_btrace_to_get_unwinder)
7684         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
7685         (record_btrace_commit_resume, record_btrace_wait)
7686         (record_btrace_stop, record_btrace_can_execute_reverse)
7687         (record_btrace_stopped_by_sw_breakpoint)
7688         (record_btrace_supports_stopped_by_sw_breakpoint)
7689         (record_btrace_stopped_by_hw_breakpoint)
7690         (record_btrace_supports_stopped_by_hw_breakpoint)
7691         (record_btrace_update_thread_list, record_btrace_thread_alive)
7692         (record_btrace_goto_begin, record_btrace_goto_end)
7693         (record_btrace_goto, record_btrace_stop_replaying_all)
7694         (record_btrace_execution_direction)
7695         (record_btrace_prepare_to_generate_core)
7696         (record_btrace_done_generating_core): Refactor as
7697         record_btrace_target methods.
7698         (init_record_btrace_ops): Delete.
7699         (_initialize_record_btrace): Remove reference to
7700         init_record_btrace_ops.
7701         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
7702         the execution_direction global.
7703         (record_full_base_target, record_full_target)
7704         (record_full_core_target): New classes.
7705         (record_full_ops): Now a record_full_target.
7706         (record_full_core_ops): Now a record_full_core_target.
7707         (record_full_target::detach, record_full_target::disconnect)
7708         (record_full_core_target::disconnect)
7709         (record_full_target::mourn_inferior, record_full_target::kill):
7710         New.
7711         (record_full_open, record_full_close, record_full_async): Refactor
7712         as methods of the record_full_base_target class.
7713         (record_full_resume, record_full_commit_resume): Refactor
7714         as methods of the record_full_target class.
7715         (record_full_wait, record_full_stopped_by_watchpoint)
7716         (record_full_stopped_data_address)
7717         (record_full_stopped_by_sw_breakpoint)
7718         (record_full_supports_stopped_by_sw_breakpoint)
7719         (record_full_stopped_by_hw_breakpoint)
7720         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
7721         methods of the record_full_base_target class.
7722         (record_full_store_registers, record_full_xfer_partial)
7723         (record_full_insert_breakpoint, record_full_remove_breakpoint):
7724         Refactor as methods of the record_full_target class.
7725         (record_full_can_execute_reverse, record_full_get_bookmark)
7726         (record_full_goto_bookmark, record_full_execution_direction)
7727         (record_full_record_method, record_full_info, record_full_delete)
7728         (record_full_is_replaying, record_full_will_replay)
7729         (record_full_goto_begin, record_full_goto_end, record_full_goto)
7730         (record_full_stop_replaying): Refactor as methods of the
7731         record_full_base_target class.
7732         (record_full_core_resume, record_full_core_kill)
7733         (record_full_core_fetch_registers)
7734         (record_full_core_prepare_to_store)
7735         (record_full_core_store_registers, record_full_core_xfer_partial)
7736         (record_full_core_insert_breakpoint)
7737         (record_full_core_remove_breakpoint)
7738         (record_full_core_has_execution): Refactor
7739         as methods of the record_full_core_target class.
7740         (record_full_base_target::supports_delete_record): New.
7741         (init_record_full_ops): Delete.
7742         (init_record_full_core_ops): Delete.
7743         (record_full_save): Refactor as method of the
7744         record_full_base_target class.
7745         (_initialize_record_full): Remove references to
7746         init_record_full_ops and init_record_full_core_ops.
7747
7748         * remote.c (remote_target, extended_remote_target): New classes.
7749         (remote_ops): Now a remote_target.
7750         (extended_remote_ops): Now an extended_remote_target.
7751         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
7752         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
7753         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
7754         (remote_pass_signals, remote_set_syscall_catchpoint)
7755         (remote_program_signals, )
7756         (remote_thread_always_alive): Remove target_ops parameter.
7757         (remote_thread_alive, remote_thread_name)
7758         (remote_update_thread_list, remote_threads_extra_info)
7759         (remote_static_tracepoint_marker_at)
7760         (remote_static_tracepoint_markers_by_strid)
7761         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
7762         (remote_open): Refactor as methods of remote_target.
7763         (extended_remote_open, extended_remote_detach)
7764         (extended_remote_attach, extended_remote_post_attach):
7765         (extended_remote_supports_disable_randomization)
7766         (extended_remote_create_inferior): : Refactor as method of
7767         extended_remote_target.
7768         (remote_set_permissions, remote_open_1, remote_detach)
7769         (remote_follow_fork, remote_follow_exec, remote_disconnect)
7770         (remote_resume, remote_commit_resume, remote_stop)
7771         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
7772         (remote_terminal_ours, remote_wait, remote_fetch_registers)
7773         (remote_prepare_to_store, remote_store_registers)
7774         (remote_flash_erase, remote_flash_done, remote_files_info)
7775         (remote_kill, remote_mourn, remote_insert_breakpoint)
7776         (remote_remove_breakpoint, remote_insert_watchpoint)
7777         (remote_watchpoint_addr_within_range)
7778         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
7779         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
7780         (remote_supports_stopped_by_sw_breakpoint)
7781         (remote_stopped_by_hw_breakpoint)
7782         (remote_supports_stopped_by_hw_breakpoint)
7783         (remote_stopped_by_watchpoint, remote_stopped_data_address)
7784         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
7785         (remote_verify_memory): Refactor as methods of remote_target.
7786         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
7787         parameter.
7788         (remote_xfer_partial, remote_get_memory_xfer_limit)
7789         (remote_search_memory, remote_rcmd, remote_memory_map)
7790         (remote_pid_to_str, remote_get_thread_local_address)
7791         (remote_get_tib_address, remote_read_description): Refactor as
7792         methods of remote_target.
7793         (remote_target::fileio_open, remote_target::fileio_pwrite)
7794         (remote_target::fileio_pread, remote_target::fileio_close): New.
7795         (remote_hostio_readlink, remote_hostio_fstat)
7796         (remote_filesystem_is_local, remote_can_execute_reverse)
7797         (remote_supports_non_stop, remote_supports_disable_randomization)
7798         (remote_supports_multi_process, remote_supports_cond_breakpoints)
7799         (remote_supports_enable_disable_tracepoint)
7800         (remote_supports_string_tracing)
7801         (remote_can_run_breakpoint_commands, remote_trace_init)
7802         (remote_download_tracepoint, remote_can_download_tracepoint)
7803         (remote_download_trace_state_variable, remote_enable_tracepoint)
7804         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
7805         (remote_trace_start, remote_get_trace_status)
7806         (remote_get_tracepoint_status, remote_trace_stop)
7807         (remote_trace_find, remote_get_trace_state_variable_value)
7808         (remote_save_trace_data, remote_get_raw_trace_data)
7809         (remote_set_disconnected_tracing, remote_core_of_thread)
7810         (remote_set_circular_trace_buffer, remote_traceframe_info)
7811         (remote_get_min_fast_tracepoint_insn_len)
7812         (remote_set_trace_buffer_size, remote_set_trace_notes)
7813         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
7814         (remote_disable_btrace, remote_teardown_btrace)
7815         (remote_read_btrace, remote_btrace_conf)
7816         (remote_augmented_libraries_svr4_read, remote_load)
7817         (remote_pid_to_exec_file, remote_can_do_single_step)
7818         (remote_execution_direction, remote_thread_handle_to_thread_info):
7819         Refactor as methods of remote_target.
7820         (init_remote_ops, init_extended_remote_ops): Delete.
7821         (remote_can_async_p, remote_is_async_p, remote_async)
7822         (remote_thread_events, remote_upload_tracepoints)
7823         (remote_upload_trace_state_variables): Refactor as methods of
7824         remote_target.
7825         (_initialize_remote): Remove references to init_remote_ops and
7826         init_extended_remote_ops.
7827
7828         * remote-sim.c (gdbsim_target): New class.
7829         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
7830         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
7831         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
7832         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
7833         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
7834         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
7835         Refactor as methods of gdbsim_target.
7836         (gdbsim_ops): Now a gdbsim_target.
7837         (init_gdbsim_ops): Delete.
7838         (gdbsim_cntrl_c): Adjust.
7839         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
7840
7841         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
7842         (the_amd64_linux_nat_target): New.
7843         (amd64_linux_fetch_inferior_registers)
7844         (amd64_linux_store_inferior_registers): Refactor as methods of
7845         amd64_linux_nat_target.
7846         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
7847         * i386-linux-nat.c: Don't include "linux-nat.h".
7848         (i386_linux_nat_target): New class.
7849         (the_i386_linux_nat_target): New.
7850         (i386_linux_fetch_inferior_registers)
7851         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
7852         as methods of i386_linux_nat_target.
7853         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
7854         * inf-child.c (inf_child_ops): Delete.
7855         (inf_child_fetch_inferior_registers)
7856         (inf_child_store_inferior_registers): Delete.
7857         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
7858         methods of inf_child_target.
7859         (inf_child_target::supports_terminal_ours)
7860         (inf_child_target::terminal_init)
7861         (inf_child_target::terminal_inferior)
7862         (inf_child_target::terminal_ours_for_output)
7863         (inf_child_target::terminal_ours, inf_child_target::interrupt)
7864         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
7865         New.
7866         (inf_child_open, inf_child_disconnect, inf_child_close)
7867         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
7868         (inf_child_post_startup_inferior, inf_child_can_run)
7869         (inf_child_pid_to_exec_file): Refactor as methods of
7870         inf_child_target.
7871         (inf_child_follow_fork): Delete.
7872         (inf_child_target::can_create_inferior)
7873         (inf_child_target::can_attach): New.
7874         (inf_child_target::has_all_memory, inf_child_target::has_memory)
7875         (inf_child_target::has_stack, inf_child_target::has_registers)
7876         (inf_child_target::has_execution): New.
7877         (inf_child_fileio_open, inf_child_fileio_pwrite)
7878         (inf_child_fileio_pread, inf_child_fileio_fstat)
7879         (inf_child_fileio_close, inf_child_fileio_unlink)
7880         (inf_child_fileio_readlink, inf_child_use_agent)
7881         (inf_child_can_use_agent): Refactor as methods of
7882         inf_child_target.
7883         (return_zero, inf_child_target): Delete.
7884         (inf_child_target::inf_child_target): New.
7885         * inf-child.h: Include "target.h".
7886         (inf_child_target): Delete function prototype.
7887         (inf_child_target): New class.
7888         (inf_child_open_target, inf_child_mourn_inferior)
7889         (inf_child_maybe_unpush_target): Delete.
7890         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
7891         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
7892         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
7893         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
7894         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
7895         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
7896         (inf_ptrace_wait, inf_ptrace_xfer_partial)
7897         (inf_ptrace_thread_alive, inf_ptrace_files_info)
7898         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
7899         methods of inf_ptrace_target.
7900         (inf_ptrace_target): Delete function.
7901         * inf-ptrace.h: Include "inf-child.h".
7902         (inf_ptrace_target): Delete function declaration.
7903         (inf_ptrace_target): New class.
7904         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
7905         * linux-nat.c (linux_target): New.
7906         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
7907         (linux_nat_target::~linux_nat_target): New.
7908         (linux_child_post_attach, linux_child_post_startup_inferior)
7909         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
7910         (linux_child_remove_fork_catchpoint)
7911         (linux_child_insert_vfork_catchpoint)
7912         (linux_child_remove_vfork_catchpoint)
7913         (linux_child_insert_exec_catchpoint)
7914         (linux_child_remove_exec_catchpoint)
7915         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
7916         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
7917         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
7918         (linux_nat_stopped_data_address)
7919         (linux_nat_stopped_by_sw_breakpoint)
7920         (linux_nat_supports_stopped_by_sw_breakpoint)
7921         (linux_nat_stopped_by_hw_breakpoint)
7922         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
7923         (linux_nat_kill, linux_nat_mourn_inferior)
7924         (linux_nat_xfer_partial, linux_nat_thread_alive)
7925         (linux_nat_update_thread_list, linux_nat_pid_to_str)
7926         (linux_nat_thread_name, linux_child_pid_to_exec_file)
7927         (linux_child_static_tracepoint_markers_by_strid)
7928         (linux_nat_is_async_p, linux_nat_can_async_p)
7929         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
7930         (linux_nat_supports_multi_process)
7931         (linux_nat_supports_disable_randomization, linux_nat_async)
7932         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
7933         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
7934         (linux_nat_fileio_open, linux_nat_fileio_readlink)
7935         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
7936         methods of linux_nat_target.
7937         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
7938         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
7939         parameter.
7940         (check_stopped_by_watchpoint): Adjust.
7941         (linux_xfer_partial): Delete.
7942         (linux_target_install_ops, linux_target, linux_nat_add_target):
7943         Delete.
7944         (linux_nat_target::linux_nat_target): New.
7945         * linux-nat.h: Include "inf-ptrace.h".
7946         (linux_nat_target): New.
7947         (linux_target, linux_target_install_ops, linux_nat_add_target):
7948         Delete function declarations.
7949         (linux_target): Declare global.
7950         * linux-thread-db.c (thread_db_target): New.
7951         (thread_db_target::thread_db_target): New.
7952         (thread_db_ops): Delete.
7953         (the_thread_db_target): New.
7954         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
7955         (thread_db_update_thread_list, thread_db_pid_to_str)
7956         (thread_db_extra_thread_info)
7957         (thread_db_thread_handle_to_thread_info)
7958         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
7959         (thread_db_resume): Refactor as methods of thread_db_target.
7960         (init_thread_db_ops): Delete.
7961         (_initialize_thread_db): Remove reference to init_thread_db_ops.
7962         * x86-linux-nat.c: Don't include "linux-nat.h".
7963         (super_post_startup_inferior): Delete.
7964         (x86_linux_nat_target::~x86_linux_nat_target): New.
7965         (x86_linux_child_post_startup_inferior)
7966         (x86_linux_read_description, x86_linux_enable_btrace)
7967         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
7968         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
7969         methods of x86_linux_nat_target.
7970         (x86_linux_create_target): Delete.  Bits folded ...
7971         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
7972         pointer.
7973         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
7974         (x86_linux_nat_target): New class.
7975         (x86_linux_create_target): Delete.
7976         (x86_linux_add_target): Now takes a linux_nat_target pointer.
7977         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
7978         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
7979         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
7980         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
7981         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
7982         make extern.
7983         (x86_use_watchpoints): Delete.
7984         * x86-nat.h: Include "breakpoint.h" and "target.h".
7985         (x86_use_watchpoints): Delete.
7986         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
7987         (x86_stopped_by_watchpoint, x86_stopped_data_address)
7988         (x86_insert_watchpoint, x86_remove_watchpoint)
7989         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
7990         (x86_stopped_by_hw_breakpoint): New declarations.
7991         (x86_nat_target): New template class.
7992
7993         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
7994         (the_ppc_linux_nat_target): New.
7995         (ppc_linux_fetch_inferior_registers)
7996         (ppc_linux_can_use_hw_breakpoint)
7997         (ppc_linux_region_ok_for_hw_watchpoint)
7998         (ppc_linux_ranged_break_num_registers)
7999         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
8000         (ppc_linux_insert_mask_watchpoint)
8001         (ppc_linux_remove_mask_watchpoint)
8002         (ppc_linux_can_accel_watchpoint_condition)
8003         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
8004         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
8005         (ppc_linux_watchpoint_addr_within_range)
8006         (ppc_linux_masked_watch_num_registers)
8007         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
8008         (ppc_linux_read_description): Refactor as methods of
8009         ppc_linux_nat_target.
8010         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
8011
8012         * procfs.c (procfs_xfer_partial): Delete forward declaration.
8013         (procfs_target): New class.
8014         (the_procfs_target): New.
8015         (procfs_target): Delete function.
8016         (procfs_auxv_parse, procfs_attach, procfs_detach)
8017         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
8018         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
8019         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
8020         (procfs_create_inferior, procfs_update_thread_list)
8021         (procfs_thread_alive, procfs_pid_to_str)
8022         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
8023         (procfs_stopped_data_address, procfs_insert_watchpoint)
8024         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
8025         (proc_find_memory_regions, procfs_info_proc)
8026         (procfs_make_note_section): Refactor as methods of procfs_target.
8027         (_initialize_procfs): Adjust.
8028         * sol-thread.c (sol_thread_target): New class.
8029         (sol_thread_ops): Now a sol_thread_target.
8030         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
8031         (sol_thread_fetch_registers, sol_thread_store_registers)
8032         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
8033         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
8034         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
8035         (init_sol_thread_ops): Delete.
8036         (_initialize_sol_thread): Adjust.  Remove references to
8037         init_sol_thread_ops and complete_target_initialization.
8038
8039         * windows-nat.c (windows_nat_target): New class.
8040         (windows_fetch_inferior_registers)
8041         (windows_store_inferior_registers, windows_resume, windows_wait)
8042         (windows_attach, windows_detach, windows_pid_to_exec_file)
8043         (windows_files_info, windows_create_inferior)
8044         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
8045         (windows_close, windows_pid_to_str, windows_xfer_partial)
8046         (windows_get_tib_address, windows_get_ada_task_ptid)
8047         (windows_thread_name, windows_thread_alive): Refactor as
8048         windows_nat_target methods.
8049         (do_initial_windows_stuff): Adjust.
8050         (windows_target): Delete function.
8051         (_initialize_windows_nat): Adjust.
8052
8053         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
8054         (darwin_mourn_inferior, darwin_kill_inferior)
8055         (darwin_create_inferior, darwin_attach, darwin_detach)
8056         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
8057         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
8058         (darwin_supports_multi_process): Refactor as darwin_nat_target
8059         methods.
8060         (darwin_resume_to, darwin_files_info): Delete.
8061         (_initialize_darwin_inferior): Rename to ...
8062         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
8063         * darwin-nat.h: Include "inf-child.h".
8064         (darwin_nat_target): New class.
8065         (darwin_complete_target): Delete.
8066         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
8067         (darwin_target): New.
8068         (i386_darwin_fetch_inferior_registers)
8069         (i386_darwin_store_inferior_registers): Refactor as methods of
8070         darwin_nat_target.
8071         (darwin_complete_target): Delete, with ...
8072         (_initialize_i386_darwin_nat): ... bits factored out here.
8073
8074         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
8075         (the_alpha_linux_nat_target): New.
8076         (alpha_linux_register_u_offset): Refactor as
8077         alpha_linux_nat_target method.
8078         (_initialize_alpha_linux_nat): Adjust.
8079         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
8080         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
8081         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
8082         methods of linux_nat_trad_target.
8083         (linux_trad_target): Delete.
8084         * linux-nat-trad.h (linux_trad_target): Delete function.
8085         (linux_nat_trad_target): New class.
8086         * mips-linux-nat.c (mips_linux_nat_target): New class.
8087         (super_fetch_registers, super_store_registers, super_close):
8088         Delete.
8089         (the_mips_linux_nat_target): New.
8090         (mips64_linux_regsets_fetch_registers)
8091         (mips64_linux_regsets_store_registers)
8092         (mips64_linux_fetch_registers, mips64_linux_store_registers)
8093         (mips_linux_register_u_offset, mips_linux_read_description)
8094         (mips_linux_can_use_hw_breakpoint)
8095         (mips_linux_stopped_by_watchpoint)
8096         (mips_linux_stopped_data_address)
8097         (mips_linux_region_ok_for_hw_watchpoint)
8098         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
8099         (mips_linux_close): Refactor as methods of mips_linux_nat.
8100         (_initialize_mips_linux_nat): Adjust to C++ification.
8101
8102         * aix-thread.c (aix_thread_target): New class.
8103         (aix_thread_ops): Now an aix_thread_target.
8104         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
8105         (aix_thread_fetch_registers, aix_thread_store_registers)
8106         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
8107         (aix_thread_thread_alive, aix_thread_pid_to_str)
8108         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
8109         Refactor as methods of aix_thread_target.
8110         (init_aix_thread_ops): Delete.
8111         (_initialize_aix_thread): Remove references to init_aix_thread_ops
8112         and complete_target_initialization.
8113         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
8114         (rs6000_nat_target): New class.
8115         (the_rs6000_nat_target): New.
8116         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
8117         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
8118         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
8119         (super_create_inferior): Delete.
8120         (_initialize_rs6000_nat): Adjust to C++ification.
8121
8122         * arm-linux-nat.c (arm_linux_nat_target): New class.
8123         (the_arm_linux_nat_target): New.
8124         (arm_linux_fetch_inferior_registers)
8125         (arm_linux_store_inferior_registers, arm_linux_read_description)
8126         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
8127         (arm_linux_remove_hw_breakpoint)
8128         (arm_linux_region_ok_for_hw_watchpoint)
8129         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
8130         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
8131         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
8132         arm_linux_nat_target.
8133         (_initialize_arm_linux_nat): Adjust to C++ification.
8134
8135         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
8136         (the_aarch64_linux_nat_target): New.
8137         (aarch64_linux_fetch_inferior_registers)
8138         (aarch64_linux_store_inferior_registers)
8139         (aarch64_linux_child_post_startup_inferior)
8140         (aarch64_linux_read_description)
8141         (aarch64_linux_can_use_hw_breakpoint)
8142         (aarch64_linux_insert_hw_breakpoint)
8143         (aarch64_linux_remove_hw_breakpoint)
8144         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
8145         (aarch64_linux_region_ok_for_hw_watchpoint)
8146         (aarch64_linux_stopped_data_address)
8147         (aarch64_linux_stopped_by_watchpoint)
8148         (aarch64_linux_watchpoint_addr_within_range)
8149         (aarch64_linux_can_do_single_step): Refactor as methods of
8150         aarch64_linux_nat_target.
8151         (super_post_startup_inferior): Delete.
8152         (_initialize_aarch64_linux_nat): Adjust to C++ification.
8153
8154         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
8155         (the_hppa_linux_nat_target): New.
8156         (hppa_linux_fetch_inferior_registers)
8157         (hppa_linux_store_inferior_registers): Refactor as methods of
8158         hppa_linux_nat_target.
8159         (_initialize_hppa_linux_nat): Adjust to C++ification.
8160
8161         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
8162         (the_ia64_linux_nat_target): New.
8163         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
8164         (ia64_linux_stopped_data_address)
8165         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
8166         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
8167         ia64_linux_nat_target methods.
8168         (super_xfer_partial): Delete.
8169         (_initialize_ia64_linux_nat): Adjust to C++ification.
8170
8171         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
8172         (the_m32r_linux_nat_target): New.
8173         (m32r_linux_fetch_inferior_registers)
8174         (m32r_linux_store_inferior_registers): Refactor as
8175         m32r_linux_nat_target methods.
8176         (_initialize_m32r_linux_nat): Adjust to C++ification.
8177
8178         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
8179         (the_m68k_linux_nat_target): New.
8180         (m68k_linux_fetch_inferior_registers)
8181         (m68k_linux_store_inferior_registers): Refactor as
8182         m68k_linux_nat_target methods.
8183         (_initialize_m68k_linux_nat): Adjust to C++ification.
8184
8185         * s390-linux-nat.c (s390_linux_nat_target): New class.
8186         (the_s390_linux_nat_target): New.
8187         (s390_linux_fetch_inferior_registers)
8188         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
8189         (s390_insert_watchpoint, s390_remove_watchpoint)
8190         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
8191         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
8192         (s390_auxv_parse, s390_read_description): Refactor as methods of
8193         s390_linux_nat_target.
8194         (_initialize_s390_nat): Adjust to C++ification.
8195
8196         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
8197         (the_sparc_linux_nat_target): New.
8198         (_initialize_sparc_linux_nat): Adjust to C++ification.
8199         * sparc-nat.c (sparc_fetch_inferior_registers)
8200         (sparc_store_inferior_registers): Remove target_ops parameter.
8201         * sparc-nat.h (sparc_fetch_inferior_registers)
8202         (sparc_store_inferior_registers): Remove target_ops parameter.
8203         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
8204         (the_sparc64_linux_nat_target): New.
8205         (_initialize_sparc64_linux_nat): Adjust to C++ification.
8206
8207         * spu-linux-nat.c (spu_linux_nat_target): New class.
8208         (the_spu_linux_nat_target): New.
8209         (spu_child_post_startup_inferior, spu_child_post_attach)
8210         (spu_child_wait, spu_fetch_inferior_registers)
8211         (spu_store_inferior_registers, spu_xfer_partial)
8212         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
8213         methods.
8214         (_initialize_spu_nat): Adjust to C++ification.
8215
8216         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
8217         (the_tilegx_linux_nat_target): New.
8218         (fetch_inferior_registers, store_inferior_registers):
8219         Refactor as methods.
8220         (_initialize_tile_linux_nat): Adjust to C++ification.
8221
8222         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
8223         (the_xtensa_linux_nat_target): New.
8224         (xtensa_linux_fetch_inferior_registers)
8225         (xtensa_linux_store_inferior_registers): Refactor as
8226         xtensa_linux_nat_target methods.
8227         (_initialize_xtensa_linux_nat): Adjust to C++ification.
8228
8229         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
8230         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
8231         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
8232         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
8233         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
8234         (fbsd_stopped_by_sw_breakpoint)
8235         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
8236         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
8237         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
8238         (fbsd_post_startup_inferior, fbsd_post_attach)
8239         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
8240         (fbsd_set_syscall_catchpoint)
8241         (super_xfer_partial, super_resume, super_wait)
8242         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
8243         (fbsd_handle_debug_trap): Remove target_ops parameter.
8244         (fbsd_nat_add_target): Delete.
8245         * fbsd-nat.h: Include "inf-ptrace.h".
8246         (fbsd_nat_add_target): Delete.
8247         (USE_SIGTRAP_SIGINFO): Define.
8248         (fbsd_nat_target): New class.
8249
8250         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
8251         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
8252         (amd64bsd_target): Delete.
8253         * amd64-bsd-nat.h: New file.
8254         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
8255         "x86-bsd-nat.h".
8256         (amd64_fbsd_nat_target): New class.
8257         (the_amd64_fbsd_nat_target): New.
8258         (amd64fbsd_read_description): Refactor as method of
8259         amd64_fbsd_nat_target.
8260         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
8261         (_initialize_amd64fbsd_nat): Adjust to C++ification.
8262         * amd64-nat.h (amd64bsd_target): Delete function declaration.
8263         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
8264         (i386bsd_store_inferior_registers): Remove target_ops parameter.
8265         (i386bsd_target): Delete.
8266         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
8267         (i386bsd_fetch_inferior_registers)
8268         (i386bsd_store_inferior_registers): Declare.
8269         (i386_bsd_nat_target): New class.
8270         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
8271         (the_i386_fbsd_nat_target): New.
8272         (i386fbsd_resume, i386fbsd_read_description): Refactor as
8273         i386_fbsd_nat_target methods.
8274         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
8275         (_initialize_i386fbsd_nat): Adjust to C++ification.
8276         * x86-bsd-nat.c (super_mourn_inferior): Delete.
8277         (x86bsd_mourn_inferior, x86bsd_target): Delete.
8278         (_initialize_x86_bsd_nat): Adjust to C++ification.
8279         * x86-bsd-nat.h: Include "x86-nat.h".
8280         (x86bsd_target): Delete declaration.
8281         (x86bsd_nat_target): New class.
8282
8283         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
8284         (the_aarch64_fbsd_nat_target): New.
8285         (aarch64_fbsd_fetch_inferior_registers)
8286         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
8287         aarch64_fbsd_nat_target.
8288         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
8289         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
8290         (the_alpha_bsd_nat_target): New.
8291         (alphabsd_fetch_inferior_registers)
8292         (alphabsd_store_inferior_registers): Refactor as
8293         alpha_bsd_nat_target methods.
8294         (_initialize_alphabsd_nat): Refactor as methods of
8295         alpha_bsd_nat_target.
8296         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
8297         (the_amd64_nbsd_nat_target): New.
8298         (_initialize_amd64nbsd_nat): Adjust to C++ification.
8299         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
8300         (the_amd64_obsd_nat_target): New.
8301         (_initialize_amd64obsd_nat): Adjust to C++ification.
8302         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
8303         (the_arm_fbsd_nat_target): New.
8304         (arm_fbsd_fetch_inferior_registers)
8305         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
8306         (_initialize_arm_fbsd_nat): Refactor as methods of
8307         arm_fbsd_nat_target.
8308         (_initialize_arm_fbsd_nat): Adjust to C++ification.
8309         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
8310         (the_arm_netbsd_nat_target): New.
8311         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
8312         arm_netbsd_nat_target.
8313         (_initialize_arm_netbsd_nat): Adjust to C++ification.
8314         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
8315         (the_hppa_nbsd_nat_target): New.
8316         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
8317         hppa_nbsd_nat_target methods.
8318         (_initialize_hppanbsd_nat): Adjust to C++ification.
8319         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
8320         (the_hppa_obsd_nat_target): New.
8321         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
8322         methods of hppa_obsd_nat_target.
8323         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
8324         add_target.
8325         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
8326         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
8327         add_target.
8328         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
8329         (_initialize_i386obsd_nat): Use add_target.
8330         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
8331         (the_m68k_bsd_nat_target): New.
8332         (m68kbsd_fetch_inferior_registers)
8333         (m68kbsd_store_inferior_registers): Refactor as methods of
8334         m68k_bsd_nat_target.
8335         (_initialize_m68kbsd_nat): Adjust to C++ification.
8336         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
8337         (the_mips_fbsd_nat_target): New.
8338         (mips_fbsd_fetch_inferior_registers)
8339         (mips_fbsd_store_inferior_registers): Refactor as methods of
8340         mips_fbsd_nat_target.
8341         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
8342         add_target.
8343         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
8344         (the_mips_nbsd_nat_target): New.
8345         (mipsnbsd_fetch_inferior_registers)
8346         (mipsnbsd_store_inferior_registers): Refactor as methods of
8347         mips_nbsd_nat_target.
8348         (_initialize_mipsnbsd_nat): Adjust to C++ification.
8349         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
8350         (the_mips64_obsd_nat_target): New.
8351         (mips64obsd_fetch_inferior_registers)
8352         (mips64obsd_store_inferior_registers): Refactor as methods of
8353         mips64_obsd_nat_target.
8354         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
8355         add_target.
8356         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
8357         nbsd_nat_target.
8358         * nbsd-nat.h: Include "inf-ptrace.h".
8359         (nbsd_nat_target): New class.
8360         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
8361         (obsd_wait): Refactor as methods of obsd_nat_target.
8362         (obsd_add_target): Delete.
8363         * obsd-nat.h: Include "inf-ptrace.h".
8364         (obsd_nat_target): New class.
8365         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
8366         (the_ppc_fbsd_nat_target): New.
8367         (ppcfbsd_fetch_inferior_registers)
8368         (ppcfbsd_store_inferior_registers): Refactor as methods of
8369         ppc_fbsd_nat_target.
8370         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
8371         add_target.
8372         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
8373         (the_ppc_nbsd_nat_target): New.
8374         (ppcnbsd_fetch_inferior_registers)
8375         (ppcnbsd_store_inferior_registers): Refactor as methods of
8376         ppc_nbsd_nat_target.
8377         (_initialize_ppcnbsd_nat): Adjust to C++ification.
8378         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
8379         (the_ppc_obsd_nat_target): New.
8380         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
8381         methods of ppc_obsd_nat_target.
8382         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
8383         add_target.
8384         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
8385         (the_sh_nbsd_nat_target): New.
8386         (shnbsd_fetch_inferior_registers)
8387         (shnbsd_store_inferior_registers): Refactor as methods of
8388         sh_nbsd_nat_target.
8389         (_initialize_shnbsd_nat): Adjust to C++ification.
8390         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
8391         (inf_ptrace_xfer_partial): Delete.
8392         (sparc_xfer_partial, sparc_target): Delete.
8393         * sparc-nat.h (sparc_fetch_inferior_registers)
8394         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
8395         (sparc_target): Delete function declaration.
8396         (sparc_target): New template class.
8397         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
8398         (_initialize_sparcnbsd_nat): Adjust to C++ification.
8399         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
8400         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
8401         add_target.
8402         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
8403         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
8404         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
8405         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
8406         add_target.
8407         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
8408         (the_vax_bsd_nat_target): New.
8409         (vaxbsd_fetch_inferior_registers)
8410         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
8411         methods.
8412         (_initialize_vaxbsd_nat): Adjust to C++ification.
8413
8414         * bsd-kvm.c (bsd_kvm_target): New class.
8415         (bsd_kvm_ops): Now a bsd_kvm_target.
8416         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
8417         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
8418         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
8419         bsd_kvm_target.
8420         (bsd_kvm_return_one): Delete.
8421         (bsd_kvm_add_target): Adjust to C++ification.
8422
8423         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
8424         (nto_procfs_target_procfs): New classes.
8425         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
8426         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
8427         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
8428         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
8429         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
8430         (procfs_remove_hw_breakpoint, procfs_resume)
8431         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
8432         (procfs_kill_inferior, procfs_store_registers)
8433         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
8434         as methods of nto_procfs_target.
8435         (nto_procfs_ops): Now an nto_procfs_target_procfs.
8436         (nto_native_ops): Delete.
8437         (procfs_open, procfs_native_open): Delete.
8438         (nto_native_ops): Now an nto_procfs_target_native.
8439         (init_procfs_targets): Adjust to C++ification.
8440         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
8441         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
8442         Refactor as methods of nto_procfs_target.
8443
8444         * go32-nat.c (go32_nat_target): New class.
8445         (the_go32_nat_target): New.
8446         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
8447         (go32_store_registers, go32_xfer_partial, go32_files_info)
8448         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
8449         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
8450         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
8451         (go32_pid_to_str): Refactor as methods of go32_nat_target.
8452         (go32_target): Delete.
8453         (_initialize_go32_nat): Adjust to C++ification.
8454
8455         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
8456         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
8457         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
8458         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
8459         gnu_nat_target.
8460         (gnu_target): Delete.
8461         * gnu-nat.h (gnu_target): Delete.
8462         (gnu_nat_target): New class.
8463         * i386-gnu-nat.c (gnu_base_target): New.
8464         (i386_gnu_nat_target): New class.
8465         (the_i386_gnu_nat_target): New.
8466         (_initialize_i386gnu_nat): Adjust to C++ification.
8467
8468 2018-05-02  Pedro Alves  <palves@redhat.com>
8469
8470         * bfd-target.c (target_bfd_xclose): Rename to ...
8471         (target_bfd_close): ... this.
8472         (target_bfd_reopen): Adjust.
8473         * target.c (target_close): Remove references to to_xclose.
8474         * target.h (target_ops::to_xclose): Delete.
8475         (target_ops::to_close): Update comments.
8476
8477 2018-05-02  Pedro Alves  <palves@redhat.com>
8478
8479         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
8480         "linux-nat.h".
8481         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
8482         * inf-ptrace.c (inf_ptrace_register_u_offset)
8483         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
8484         (inf_ptrace_store_register, inf_ptrace_store_registers)
8485         (inf_ptrace_trad_target): Move to ...
8486         * linux-nat-trad.c: ... this new file.
8487         * linux-nat-trad.h: New file.
8488         * linux-nat.c (linux_target_install_ops): Make extern.
8489         (linux_trad_target): Delete.
8490         * linux-nat.h (linux_trad_target): Delete declaration.
8491         (linux_target_install_ops): Declare.
8492         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
8493         "linux-nat.h".
8494
8495 2018-05-02  Pedro Alves  <palves@redhat.com>
8496
8497         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
8498         procfs_target/add_target here.
8499         * procfs.c (procfs_target): Make static.
8500         (_initialize_procfs): Call add_target here.
8501         * procfs.h (struct target_ops): Remove forward declaration.
8502         (procfs_target): Remove declaration.
8503         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
8504
8505 2018-05-02  Pedro Alves  <palves@redhat.com>
8506
8507         * procfs.c (procfs_stopped_by_watchpoint)
8508         (procfs_insert_watchpoint, procfs_remove_watchpoint)
8509         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
8510         Forward declare.
8511         (procfs_use_watchpoints): Delete, move contents...
8512         (procfs_target): ... here.
8513         * procfs.h (procfs_use_watchpoints): Delete declaration.
8514         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
8515         procfs_use_watchpoints.
8516         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
8517         procfs_use_watchpoints.
8518
8519 2018-05-02  Tom Tromey  <tom@tromey.com>
8520
8521         PR python/20084:
8522         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
8523         and var_zuinteger_unlimited.
8524         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
8525         and PARAM_ZUINTEGER_UNLIMITED.
8526         (set_parameter_value): Handle var_zuinteger and
8527         var_zuinteger_unlimited.
8528         (add_setshow_generic): Likewise.
8529         (parmpy_init): Likewise.
8530
8531 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
8532
8533         PR rust/23124
8534         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
8535         pointer is not null before dereferencing it.
8536
8537 2018-04-30  Tom Tromey  <tom@tromey.com>
8538
8539         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
8540         is_mi_like_p.
8541
8542 2018-04-30  Tom Tromey  <tom@tromey.com>
8543
8544         * breakpoint.c (mention): Remove use of is_mi_like_p.
8545         (print_mention_ranged_breakpoint): Likewise.
8546         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
8547         of is_mi_like_p.
8548
8549 2018-04-30  Tom Tromey  <tom@tromey.com>
8550
8551         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
8552
8553 2018-04-30  Tom Tromey  <tom@tromey.com>
8554
8555         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
8556         (info_spu_event_command): Remove some uses of is_mi_like_p.
8557
8558 2018-04-30  Tom Tromey  <tom@tromey.com>
8559
8560         * python/py-framefilter.c (py_print_single_arg)
8561         (enumerate_locals, py_print_args, py_print_frame): Remove some
8562         uses of is_mi_like_p.
8563
8564 2018-04-30  Tom Tromey  <tom@tromey.com>
8565
8566         * ui-out.c: Update.
8567         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
8568         * ui-out.h (ui_out::is_mi_like_p): Now const.
8569         (ui_out::do_is_mi_like_p): Now const.
8570         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
8571
8572 2018-04-30  Tom Tromey  <tom@tromey.com>
8573
8574         * varobj.c (varobj_set_visualizer): Use new_reference.
8575         * python/python.c (gdbpy_decode_line): Use new_reference.
8576         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
8577         new_reference.
8578
8579 2018-04-30  Tom Tromey  <tom@tromey.com>
8580
8581         * varobj.c (install_new_value): Use new_reference.
8582         * value.h (value_incref): Return void.  Swap intro comment with
8583         value_decref.
8584         * value.c (set_value_parent): Use new_reference.
8585         (value_incref): Return void.  Update intro comment.
8586         (release_value): Use new_reference.
8587         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
8588
8589 2018-04-30  Tom Tromey  <tom@tromey.com>
8590
8591         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
8592         * gdb_bfd.h (new_bfd_ref): Remove.
8593         (gdb_bfd_open): Update comment.
8594         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
8595         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
8596         (gdb_bfd_fdopenr): Use new_reference.
8597         * exec.c (exec_file_attach): Use new_reference.
8598
8599 2018-04-30  Tom Tromey  <tom@tromey.com>
8600
8601         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
8602         method.
8603
8604 2018-04-30  Tom Tromey  <tom@tromey.com>
8605
8606         * jit.c (jit_read_code_entry): Use type_align.
8607         * i386-tdep.c (i386_gdbarch_init): Don't call
8608         set_gdbarch_long_long_align_bit.
8609         * gdbarch.sh: Remove long_long_align_bit.
8610         * gdbarch.c, gdbarch.h: Rebuild.
8611         * arc-tdep.c (arc_type_align): New function.
8612         (arc_gdbarch_init): Use arc_type_align.  Don't call
8613         set_gdbarch_long_long_align_bit.
8614
8615 2018-04-30  Tom Tromey  <tom@tromey.com>
8616
8617         * rust-lang.c (rust_type_alignment): Remove.
8618         (rust_composite_type): Use type_align.
8619
8620 2018-04-30  Tom Tromey  <tom@tromey.com>
8621
8622         * NEWS: Mention Type.align.
8623         * python/py-type.c (typy_get_alignof): New function.
8624         (type_object_getset): Add "alignof".
8625
8626 2018-04-30  Tom Tromey  <tom@tromey.com>
8627
8628         PR exp/17095:
8629         * NEWS: Update.
8630         * std-operator.def (UNOP_ALIGNOF): New operator.
8631         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
8632         New.
8633         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
8634         * c-lang.c (c_op_print_tab): Add alignof.
8635         * c-exp.y (ALIGNOF): New token.
8636         (exp): Add "ALIGNOF" production.
8637         (ident_tokens): Add _Alignof and alignof.
8638
8639 2018-04-30  Tom Tromey  <tom@tromey.com>
8640
8641         * i386-tdep.c (i386_type_align): New function.
8642         (i386_gdbarch_init): Update.
8643         * gdbarch.sh (type_align): New method.
8644         * gdbarch.c, gdbarch.h: Rebuild.
8645         * arch-utils.h (default_type_align): Declare.
8646         * arch-utils.c (default_type_align): New function.
8647         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
8648         (struct type) <align_log2>: New field.
8649         <instance_flags>: Now a bitfield.
8650         (TYPE_RAW_ALIGN): New macro.
8651         (type_align, type_raw_align, set_type_align): Declare.
8652         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
8653         functions.
8654         * dwarf2read.c (quirk_rust_enum): Set type alignment.
8655         (get_alignment, maybe_set_alignment): New functions.
8656         (read_structure_type, read_enumeration_type, read_array_type)
8657         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
8658         (read_subrange_type, read_base_type): Set type alignment.
8659
8660 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
8661
8662         * dwarf2read.c (read_index_from_section): Use bool.
8663
8664 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
8665
8666         PR gdb/22950
8667         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
8668         with #ifdef.
8669
8670 2018-04-29  John Reiser  <jreiser@BitWagon.com>
8671
8672         PR build/22873
8673         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
8674         last step, and do it atomically.
8675
8676 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
8677
8678         * compile/compile-c-types.c (convert_int, convert_float):
8679         Update for C FE v1.
8680
8681 2018-04-27  Tom Tromey  <tom@tromey.com>
8682
8683         PR rust/22545:
8684         * rust-lang.c (rust_inclusive_range_type_p): New function.
8685         (rust_range): Handle inclusive ranges.
8686         (rust_compute_range): Likewise.
8687         * rust-exp.y (struct rust_op) <inclusive>: New field.
8688         (DOTDOTEQ): New constant.
8689         (range_expr): Add "..=" productions.
8690         (operator_tokens): Add "..=" token.
8691         (ast_range): Add "inclusive" parameter.
8692         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
8693         ranges.
8694         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
8695         bounds values.
8696         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
8697         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
8698         Update comments.
8699         * expprint.c (print_subexp_standard): Handle new bounds values.
8700         (dump_subexp_body_standard): Likewise.
8701
8702 2018-04-27  Tom Tromey  <tom@tromey.com>
8703
8704         * configure: Rebuild.
8705         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
8706         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
8707         "OVERRIDE".
8708         (class symbol_needs_eval_context): Likewise.
8709         * dwarf2read.c (mock_mapped_index::symbol_name_count)
8710         (mock_mapped_index::symbol_name_at): Use "override".  Remove
8711         "virtual".
8712         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
8713         "override".
8714         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
8715         * aarch64-tdep.c (instruction_reader::read): Use "override".
8716         (instruction_reader_test::read): Likewise.
8717         * arm-tdep.c (instruction_reader::read): Use "override".
8718         (instruction_reader_thumb::read): Likewise.
8719
8720 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
8721
8722         PR remote/9665
8723         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
8724         instead of remote_send.
8725         (remote_send): Remove.
8726
8727 2018-04-26  Pedro Alves  <palves@redhat.com>
8728
8729         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
8730         find_function_start_sal instead of find_pc_line.
8731
8732 2018-04-26  Pedro Alves  <palves@redhat.com>
8733
8734         * breakpoint.c (set_breakpoint_location_function): Handle
8735         mst_data_gnu_ifunc.
8736         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
8737         * elfread.c (elf_symtab_read): Give data symbols with
8738         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
8739         (elf_rel_plt_read): Update comment.
8740         * linespec.c (convert_linespec_to_sals): Handle
8741         mst_data_gnu_ifunc.
8742         (minsym_found): Handle mst_data_gnu_ifunc.
8743         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
8744         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
8745         * parse.c (find_minsym_type_and_address): Handle
8746         mst_data_gnu_ifunc.
8747         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
8748         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
8749         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
8750         comment.
8751         <mst_data_gnu_ifunc>: New enumerator.
8752
8753 2018-04-26  Pedro Alves  <palves@redhat.com>
8754
8755         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
8756         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
8757         'want_trampoline' parameter by a lookup_msym_prefer parameter.
8758         Handle it.
8759         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
8760         (lookup_minimal_symbol_by_pc): Adjust.
8761         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
8762         (lookup_solib_trampoline_symbol_by_pc): Adjust.
8763         * minsyms.h (lookup_msym_prefer): New enum.
8764         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8765         parameter by a lookup_msym_prefer parameter.
8766
8767 2018-04-26  Pedro Alves  <palves@redhat.com>
8768
8769         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
8770         ends in "@plt" instead of looking at the symbol's section.
8771
8772 2018-04-26  Pedro Alves  <palves@redhat.com>
8773
8774         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
8775         all references.
8776         (find_pc_partial_function_gnu_ifunc): Rename to ...
8777         (find_pc_partial_function): ... this, and remove references to
8778         'is_gnu_ifunc_p'.
8779         (find_pc_partial_function): Delete old implementation.
8780         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
8781
8782 2018-04-26  Pedro Alves  <palves@redhat.com>
8783
8784         * linespec.c (struct bound_minimal_symbol_search_key): New.
8785         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
8786         skip first line if we found a GNU ifunc minimal symbol by name.
8787         (compare_msymbols): Change parameters to work with a destructured
8788         lhs minsym.
8789         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
8790         functions.
8791
8792 2018-04-26  Pedro Alves  <palves@redhat.com>
8793
8794         * breakpoint.c (set_breakpoint_location_function): Don't resolve
8795         ifunc targets here.  Instead, if we have an ifunc minsym, use its
8796         address/name.
8797         (add_location_to_breakpoint): Store the minsym and the objfile in
8798         the breakpoint location.
8799         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
8800         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
8801         Record the minsym in the sal.
8802         * symtab.h (symtab_and_line) <msymbol>: New field.
8803
8804 2018-04-26  Pedro Alves  <palves@redhat.com>
8805
8806         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
8807         unless we actually resolved the ifunc.
8808
8809 2018-04-26  Pedro Alves  <palves@redhat.com>
8810
8811         * c-exp.y (variable production): Prefer ifunc minsyms over
8812         regular function symbols.
8813         * symtab.c (find_gnu_ifunc): New function.
8814         * minsyms.h (lookup_msym_prefer): New enum.
8815         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8816         parameter by a lookup_msym_prefer parameter.
8817         * symtab.h (find_gnu_ifunc): New declaration.
8818
8819 2018-04-26  Pedro Alves  <palves@redhat.com>
8820
8821         * blockframe.c (find_gnu_ifunc_target_type): New function.
8822         (find_function_type): New.
8823         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
8824         return a value with a memory address.
8825         (eval_call): For calls to GNU ifunc functions, try to find the
8826         type of the target function from the type that the resolver
8827         returns.
8828         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
8829         symbols.
8830         * infcall.c (find_function_return_type): Delete.
8831         (find_function_addr): Add 'function_type' parameter.  For calls to
8832         GNU ifunc functions, try to find the type of the target function
8833         from the type that the resolver returns, and return it via
8834         FUNCTION_TYPE.
8835         (call_function_by_hand_dummy): Adjust to use the function type
8836         returned by find_function_addr.
8837         (find_function_addr): Add 'function_type' parameter and move
8838         description here.
8839         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
8840         declarations.
8841
8842 2018-04-26  Pedro Alves  <palves@redhat.com>
8843
8844         * c-exp.y (variable production): Skip finding an alias for ifunc
8845         symbols.
8846
8847 2018-04-26  Pedro Alves  <palves@redhat.com>
8848
8849         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
8850
8851 2018-04-25  Pedro Alves  <palves@redhat.com>
8852
8853         * infcmd.c (kill_command): Print the pid as string, not the whole
8854         thread's ptid.  Add comment.  s/has been killed/killed/ in output
8855         message.
8856         * remote.c (remote_detach_1): Print the pid as string, not the
8857         whole thread's ptid.
8858
8859 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
8860             Sergio Durigan Junior  <sergiodj@redhat.com>
8861             Pedro Alves  <palves@redhat.com>
8862
8863         * infcmd.c (kill_command): Print message when inferior has
8864         been killed.
8865         * inferior.c (print_inferior_events): Remove 'static'.  Set as
8866         '1'.
8867         (add_inferior): Improve message printed when
8868         'print_inferior_events' is on.
8869         (exit_inferior): Remove message printed when
8870         'print_inferior_events' is on.
8871         (detach_inferior): Improve message printed when
8872         'print_inferior_events' is on.
8873         (initialize_inferiors): Use 'add_inferior_silent' to set
8874         'current_inferior_'.
8875         * inferior.h (print_inferior_events): Declare here as
8876         'extern'.
8877         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
8878         '[Detaching...]' messages when 'print_inferior_events' is on.
8879         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
8880         as prefix/suffix for messages.  Remove periods.  Fix erroneous
8881         'Detaching after fork from child...', replace it by '... from
8882         parent...'.
8883         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
8884         prefix/suffix when printing 'Detaching...' messages.  Print
8885         them when 'print_inferior_events' is on.
8886         * remote.c (remote_detach_1): Print message when detaching
8887         from inferior and '!is_fork_parent'.
8888
8889 2018-04-24  Tom Tromey  <tom@tromey.com>
8890
8891         * cli-out.h: Reindent.
8892
8893 2018-04-24  Tom Tromey  <tom@tromey.com>
8894
8895         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
8896         (cli_ui_out::do_field_string): Use fputs_filtered.
8897         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
8898
8899 2018-04-23  Tom Tromey  <tom@tromey.com>
8900
8901         * guile/scm-frame.c (gdbscm_frame_read_var): Use
8902         gdb::unique_xmalloc_ptr.
8903
8904 2018-04-23  Tom Tromey  <tom@tromey.com>
8905
8906         * configure: Rebuild.
8907
8908 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
8909
8910         PR gdb/23095
8911         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
8912         prepare_for_testing.  Set normal_bp to r_debug_state if target
8913         is bsd.
8914
8915 2018-04-21  Pedro Alves  <palves@redhat.com>
8916             Rajendra SY  <rajendra.sy@gmail.com>
8917
8918         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
8919         * remote.c (extended_remote_attach): In all-stop mode, mark the
8920         thread as executing.
8921
8922 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8923
8924         * thread.c (thread_apply_all_command): Fix comment.
8925         (thread_command): Fix comment.
8926
8927 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
8928
8929         * common/tdesc.h (tdesc_create_feature): Remove xml filename
8930         parameter.
8931         * features/aarch64-core.c (create_feature_aarch64_core):
8932         Regenerate.
8933         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
8934         Likewise.
8935         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
8936         Likewise.
8937         * features/i386/32bit-avx512.c
8938         (create_feature_i386_32bit_avx512): Likewise.
8939         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
8940         Likewise.
8941         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
8942         Likewise.
8943         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
8944         Likewise.
8945         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
8946         Likewise.
8947         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
8948         Likewise.
8949         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
8950         Likewise.
8951         * features/i386/64bit-avx512.c
8952         (create_feature_i386_64bit_avx512): Likewise.
8953         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
8954         Likewise.
8955         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
8956         Likewise.
8957         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
8958         Likewise.
8959         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
8960         Likewise.
8961         * features/i386/64bit-segments.c
8962         (create_feature_i386_64bit_segments): Likewise.
8963         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
8964         Likewise.
8965         * features/i386/x32-core.c
8966         (create_feature_i386_x32_core): Likewise.
8967         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
8968         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
8969         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
8970         * target-descriptions.c: In generated code, don't pass xml
8971         filename.
8972
8973 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8974
8975         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
8976         (print_xml_feature::visit_post): Likewise.
8977         (print_xml_feature::visit): Likewise.
8978         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
8979         (print_xml_feature): Add new class.
8980         * regformats/regdat.sh: Null xmltarget on feature targets.
8981         * target-descriptions.c (struct target_desc): Add xmltarget.
8982         (maintenance_check_tdesc_xml_convert): Add unittest function.
8983         (tdesc_get_features_xml): Add function to get xml.
8984         (maintenance_check_xml_descriptions): Test xml generation.
8985         * xml-tdesc.c (string_read_description_xml): Add function.
8986         * xml-tdesc.h (string_read_description_xml): Add declaration.
8987
8988 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8989
8990         * features/Makefile: Add feature marker to targets with new style
8991         target descriptions.
8992         * regformats/aarch64.dat: Regenerate.
8993         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
8994         * regformats/i386/amd64-avx-linux.dat: Likewise.
8995         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
8996         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
8997         * regformats/i386/amd64-linux.dat: Likewise.
8998         * regformats/i386/amd64-mpx-linux.dat: Likewise.
8999         * regformats/i386/amd64.dat: Likewise.
9000         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
9001         * regformats/i386/i386-avx-linux.dat: Likewise.
9002         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
9003         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
9004         * regformats/i386/i386-linux.dat: Likewise.
9005         * regformats/i386/i386-mmx-linux.dat: Likewise.
9006         * regformats/i386/i386-mpx-linux.dat: Likewise.
9007         * regformats/i386/i386.dat: Likewise.
9008         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
9009         * regformats/i386/x32-avx-linux.dat: Likewise.
9010         * regformats/i386/x32-linux.dat: Likewise.
9011         * regformats/tic6x-c62x-linux.dat: Likewise.
9012         * regformats/tic6x-c64x-linux.dat: Likewise.
9013         * regformats/tic6x-c64xp-linux.dat: Likewise.
9014         * regformats/regdat.sh: Parse feature marker.
9015
9016 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9017
9018         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
9019         (tdesc_osabi_name): Likewise.
9020         * target-descriptions.c (tdesc_architecture_name): Add new
9021         function.
9022         (tdesc_osabi_name): Likewise.
9023
9024 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9025
9026         * common/tdesc.c (tdesc_predefined_type): Move to here.
9027         (tdesc_named_type): Likewise.
9028         (tdesc_create_vector): Likewise.
9029         (tdesc_create_struct): Likewise.
9030         (tdesc_set_struct_size): Likewise.
9031         (tdesc_create_union): Likewise.
9032         (tdesc_create_flags): Likewise.
9033         (tdesc_create_enum): Likewise.
9034         (tdesc_add_field): Likewise.
9035         (tdesc_add_typed_bitfield): Likewise.
9036         (tdesc_add_bitfield): Likewise.
9037         (tdesc_add_flag): Likewise.
9038         (tdesc_add_enum_value): Likewise.
9039         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
9040         (struct tdesc_type_vector): Likewise.
9041         (struct tdesc_type_field): Likewise.
9042         (struct tdesc_type_with_fields): Likewise.
9043         (tdesc_create_enum): Add declaration.
9044         (tdesc_add_typed_bitfield): Likewise.
9045         (tdesc_add_enum_value): Likewise.
9046         * target-descriptions.c (tdesc_type_field): Move from here.
9047         (tdesc_type_builtin): Likewise.
9048         (tdesc_type_vector): Likewise.
9049         (tdesc_type_with_fields): Likewise.
9050         (tdesc_predefined_types): Likewise.
9051         (tdesc_named_type): Likewise.
9052         (tdesc_create_vector): Likewise.
9053         (tdesc_create_struct): Likewise.
9054         (tdesc_set_struct_size): Likewise.
9055         (tdesc_create_union): Likewise.
9056         (tdesc_create_flags): Likewise.
9057         (tdesc_create_enum): Likewise.
9058         (tdesc_add_field): Likewise.
9059         (tdesc_add_typed_bitfield): Likewise.
9060         (tdesc_add_bitfield): Likewise.
9061         (tdesc_add_flag): Likewise.
9062         (tdesc_add_enum_value): Likewise.
9063         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
9064         (tdesc_add_typed_bitfield): Likewise.
9065         (tdesc_add_enum_value): Likewise.
9066
9067 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9068
9069         * common/tdesc.c (tdesc_feature::accept): Move to here.
9070         (tdesc_feature::operator==): Likewise.
9071         (tdesc_create_reg): Likewise.
9072         * common/tdesc.h (tdesc_type_kind): Likewise.
9073         (struct tdesc_type): Likewise.
9074         (struct tdesc_feature): Likewise.
9075         * regformats/regdat.sh: Create a feature.
9076         * target-descriptions.c (tdesc_type_kind): Move from here.
9077         (tdesc_type): Likewise.
9078         (tdesc_type_up): Likewise.
9079         (tdesc_feature): Likewise.
9080         (tdesc_create_reg): Likewise.
9081
9082 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9083
9084         * Makefile.in: Add arch/tdesc.c
9085         * common/tdesc.c: New file.
9086         * common/tdesc.h (tdesc_element_visitor): Move to here.
9087         (tdesc_element): Likewise.
9088         (tdesc_reg): Likewise.
9089         (tdesc_reg_up): Likewise.
9090         * regformats/regdef.h (reg): Add offset to constructors.
9091         * target-descriptions.c (tdesc_element_visitor): Move from here.
9092         (tdesc_element): Likewise.
9093         (tdesc_reg): Likewise.
9094         (tdesc_reg_up): Likewise.
9095
9096 2018-04-17  Tom Tromey  <tom@tromey.com>
9097
9098         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
9099         discriminant field.
9100
9101 2018-04-17  Tom Tromey  <tom@tromey.com>
9102
9103         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
9104
9105 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9106
9107         * symtab.c (print_symbol_info): Skip printing filename and line
9108         number when `last' is NULL.
9109         (symtab_symbol_info): Use empty string instead of NULL for first
9110         invocation of print_symbol_info.
9111         (rbreak_command): Pass NULL to `last' parameter of
9112         print_symbol_info.
9113
9114 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
9115
9116         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
9117         instead of nullptr.
9118
9119 2018-04-16  Pedro Alves  <palves@redhat.com>
9120
9121         * MAINTAINERS (sh): Remove.
9122         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
9123         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
9124         (ALLDEPFILES): Remove sh64-tdep.c.
9125         * NEWS: Mentions that support for SH-5/SH64 is removed.
9126         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
9127         (sh*-*-openbsd*): Ditto.
9128         (sh64-*-elf*): Remove.
9129         (sh*): Remove.
9130         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
9131         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
9132         * sh-tdep.c: No longer include "sh64-tdep.h".
9133         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
9134         * sh64-tdep.c, sh64-tdep.h: Remove files.
9135
9136 2018-04-16  Pedro Alves  <palves@redhat.com>
9137
9138         * MAINTAINERS: Remove m88k.
9139         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
9140         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
9141         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
9142         * NEWS: Mention that support for m88k was removed.
9143         * configure.host (m88*-*-*): Remove support.
9144         * configure.nat (m88k-*-*): Remove support.
9145         * configure.tgt (m88*-*-openbsd*): Remove.
9146         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
9147
9148 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
9149
9150         * configure.tgt (x86_tobjs): New variable.
9151         (amd64_tobjs, i386_tobjs): Use it.
9152
9153 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9154
9155         * symtab.c (print_symbol_info): Precede the symbol definition by
9156         the line number when available.
9157         * NEWS: Advertise this enhancement.
9158
9159 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
9160
9161         * NEWS (New options): announce set/show record btrace cpu.
9162         * btrace.c: Include record-btrace.h.
9163         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
9164         the vendor is unknown.
9165         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
9166         Maybe overwrite the btrace configuration's cpu.
9167         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
9168         (btrace_fetch): Add cpu parameter.  Update callers.
9169         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
9170         Maybe overwrite the btrace configuration's cpu.  Skip enabling
9171         errata workarounds if the vendor is unknown.
9172         * python/py-record-btrace.c: Include record-btrace.h.
9173         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
9174         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
9175         * record-btrace.c (record_btrace_cpu_state_kind): New.
9176         (record_btrace_cpu): New.
9177         (set_record_btrace_cpu_cmdlist): New.
9178         (record_btrace_get_cpu): New.
9179         (require_btrace_thread, record_btrace_info)
9180         (record_btrace_resume_thread): Call record_btrace_get_cpu.
9181         (cmd_set_record_btrace_cpu_none): New.
9182         (cmd_set_record_btrace_cpu_auto): New.
9183         (cmd_set_record_btrace_cpu): New.
9184         (cmd_show_record_btrace_cpu): New.
9185         (_initialize_record_btrace): Initialize set/show record btrace cpu
9186         commands.
9187         * record-btrace.h (record_btrace_get_cpu): New.
9188
9189 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
9190
9191         * record.c (set_record_command): Fix typo in message.
9192
9193 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
9194
9195         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
9196
9197 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
9198
9199         * infrun.c (process_event_stop_test): Call
9200         gdbarch_in_indirect_branch_thunk.
9201         * gdbarch.sh (in_indirect_branch_thunk): New.
9202         * gdbarch.c: Regenerated.
9203         * gdbarch.h: Regenerated.
9204         * x86-tdep.h: New.
9205         * x86-tdep.c: New.
9206         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
9207         (HFILES_NO_SRCDIR): Add x86-tdep.h.
9208         (ALLDEPFILES): Add x86-tdep.c.
9209         * arch-utils.h (default_in_indirect_branch_thunk): New.
9210         * arch-utils.c (default_in_indirect_branch_thunk): New.
9211         * i386-tdep: Include x86-tdep.h.
9212         (i386_in_indirect_branch_thunk): New.
9213         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
9214         function.
9215         * amd64-tdep: Include x86-tdep.h.
9216         (amd64_in_indirect_branch_thunk): New.
9217         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
9218
9219 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
9220
9221         PR gdb/23053
9222         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
9223         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
9224         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
9225         regression.
9226
9227 2018-04-12  Tom Tromey  <tom@tromey.com>
9228
9229         * rust-lang.c (rust_print_struct_def): Remove univariant code.
9230         (rust_evaluate_subexp): Likewise.
9231
9232 2018-04-12  Pedro Alves  <palves@redhat.com>
9233
9234         * procfs.c (procfs_detach): Make forward declaration's prototype
9235         match definition's protototype.
9236         (proc_get_LDT_entry): Remove stale do_cleanups call.
9237
9238 2018-04-12  Pedro Alves  <palves@redhat.com>
9239
9240         * target.h (target_ops::to_has_exited): Delete.
9241         (target_has_exited): Delete.
9242         * target-delegates.c: Regenerate.
9243
9244 2018-04-11  Pedro Alves  <palves@redhat.com>
9245
9246         * target.c (fileio_fh_t::t): Add comment.
9247         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
9248         (target_fileio_close): Handle a NULL target.
9249         (invalidate_fileio_fh): New.
9250         (target_close): Call it.
9251         * remote.c (remote_hostio_send_command): No longer check whether
9252         remote_desc is open.
9253
9254 2018-04-11  Pedro Alves  <palves@redhat.com>
9255
9256         * target.c (fileio_fh_t): Make it a named struct instead of a
9257         typedef.
9258         (fileio_fh_t::is_closed): New method.
9259         (DEF_VEC_O (fileio_fh_t)): Remove.
9260         (fileio_fhandles): Now a std::vector.
9261         (is_closed_fileio_fh): Delete.
9262         (acquire_fileio_fd): Adjust.  Rename parameters.
9263         (release_fileio_fd): Adjust.
9264         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
9265         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
9266         (target_fileio_close): Adjust.
9267
9268 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
9269
9270         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
9271         index.
9272
9273 2018-04-10  Pedro Alves  <palves@redhat.com>
9274
9275         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
9276         (scoped_finish_thread_state): New class.
9277         * infcmd.c (run_command_1): Use it instead of finish_thread_state
9278         cleanup.
9279         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
9280         (fetch_inferior_event, normal_stop): Likewise.
9281         * thread.c (finish_thread_state_cleanup): Delete.
9282
9283 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9284             Pedro Alves  <palves@redhat.com>
9285
9286         * value.c: Include "selftest.h" and "common/array-view.h".
9287         (struct range) <operator ==>: New.
9288         (test_ranges_contain): New.
9289         (check_ranges_vector): New.
9290         (test_insert_into_bit_range_vector): New.
9291         (_initialize_values): Register selftests.
9292         * common/array-view.h (operator==, operator!=): New.
9293
9294 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9295
9296         * common/gdb_vecs.h (unordered_remove): Add overload that takes
9297         an iterator.
9298         * inline-frame.c: Include <algorithm>.
9299         (struct inline_state): Add constructor.
9300         (inline_state_s): Remove.
9301         (DEF_VEC_O(inline_state_s)): Remove.
9302         (inline_states): Change type to std::vector.
9303         (find_inline_frame_state): Adjust to std::vector.
9304         (allocate_inline_frame_state): Remove.
9305         (clear_inline_frame_state): Adjust to std::vector.
9306         (skip_inline_frames): Adjust to std::vector.
9307
9308 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9309
9310         * tracepoint.h (struct trace_state_variable): Add constructor.
9311         <name>: Change type to std::string.
9312         * tracepoint.c (tsv_s): Remove.
9313         (DEF_VEC_O(tsv_s)): Remove.
9314         (tvariables): Change to std::vector.
9315         (create_trace_state_variable): Adjust to std::vector.
9316         (find_trace_state_variable): Likewise.
9317         (find_trace_state_variable_by_number): Likewise.
9318         (delete_trace_state_variable): Likewise.
9319         (trace_variable_command): Adjust to std::string.
9320         (delete_trace_variable_command): Likewise.
9321         (tvariables_info_1): Adjust to std::vector.
9322         (save_trace_state_variables): Likewise.
9323         (start_tracing): Likewise.
9324         (merge_uploaded_trace_state_variables): Adjust to std::vector
9325         and std::string.
9326         * target.h (struct target_ops)
9327         <to_download_trace_state_variable>: Pass reference to
9328         trace_state_variable.
9329         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
9330         * target-delegates.c: Re-generate.
9331         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
9332         (mi_tsv_deleted): Likewise.
9333         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
9334         * remote.c (remote_download_trace_state_variable): Change
9335         pointer to reference and adjust.
9336         * make-target-delegates (parse_argtypes): Handle references.
9337         (write_function_header): Likewise.
9338         (munge_type): Likewise.
9339
9340 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9341
9342         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9343         string_view-selftests.c.
9344         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
9345         testsuite.
9346         * unittests/basic_string_view/cons/char/1.cc: Likewise.
9347         * unittests/basic_string_view/cons/char/2.cc: Likewise.
9348         * unittests/basic_string_view/cons/char/3.cc: Likewise.
9349         * unittests/basic_string_view/element_access/char/1.cc:
9350         Likewise.
9351         * unittests/basic_string_view/element_access/char/empty.cc:
9352         Likewise.
9353         * unittests/basic_string_view/element_access/char/front_back.cc:
9354         Likewise.
9355         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
9356         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
9357         Likewise.
9358         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
9359         Likewise.
9360         * unittests/basic_string_view/modifiers/swap/char/1.cc:
9361         Likewise.
9362         * unittests/basic_string_view/operations/compare/char/1.cc:
9363         Likewise.
9364         * unittests/basic_string_view/operations/compare/char/13650.cc:
9365         Likewise.
9366         * unittests/basic_string_view/operations/copy/char/1.cc:
9367         Likewise.
9368         * unittests/basic_string_view/operations/data/char/1.cc:
9369         Likewise.
9370         * unittests/basic_string_view/operations/find/char/1.cc:
9371         Likewise.
9372         * unittests/basic_string_view/operations/find/char/2.cc:
9373         Likewise.
9374         * unittests/basic_string_view/operations/find/char/3.cc:
9375         Likewise.
9376         * unittests/basic_string_view/operations/find/char/4.cc:
9377         Likewise.
9378         * unittests/basic_string_view/operations/rfind/char/1.cc:
9379         Likewise.
9380         * unittests/basic_string_view/operations/rfind/char/2.cc:
9381         Likewise.
9382         * unittests/basic_string_view/operations/rfind/char/3.cc:
9383         Likewise.
9384         * unittests/basic_string_view/operations/substr/char/1.cc:
9385         Likewise.
9386         * unittests/basic_string_view/operators/char/2.cc: Likewise.
9387         * unittests/string_view-selftests.c: New file.
9388
9389 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9390
9391         * unittests/basic_string_view/capacity/1.cc: New file.
9392         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
9393         * unittests/basic_string_view/cons/char/1.cc: New file.
9394         * unittests/basic_string_view/cons/char/2.cc: New file.
9395         * unittests/basic_string_view/cons/char/3.cc: New file.
9396         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
9397         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
9398         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
9399         * unittests/basic_string_view/element_access/char/1.cc: New file.
9400         * unittests/basic_string_view/element_access/char/2.cc: New file.
9401         * unittests/basic_string_view/element_access/char/empty.cc: New file.
9402         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
9403         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
9404         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
9405         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
9406         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
9407         * unittests/basic_string_view/include.cc: New file.
9408         * unittests/basic_string_view/inserters/char/1.cc: New file.
9409         * unittests/basic_string_view/inserters/char/2.cc: New file.
9410         * unittests/basic_string_view/inserters/char/3.cc: New file.
9411         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
9412         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
9413         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
9414         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
9415         * unittests/basic_string_view/literals/types.cc: New file.
9416         * unittests/basic_string_view/literals/values.cc: New file.
9417         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
9418         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
9419         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
9420         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
9421         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
9422         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
9423         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
9424         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
9425         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
9426         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
9427         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
9428         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
9429         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
9430         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
9431         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
9432         * unittests/basic_string_view/operations/data/char/1.cc: New file.
9433         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
9434         * unittests/basic_string_view/operations/find/char/1.cc: New file.
9435         * unittests/basic_string_view/operations/find/char/2.cc: New file.
9436         * unittests/basic_string_view/operations/find/char/3.cc: New file.
9437         * unittests/basic_string_view/operations/find/char/4.cc: New file.
9438         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
9439         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
9440         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
9441         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
9442         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
9443         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
9444         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
9445         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
9446         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
9447         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
9448         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
9449         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
9450         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
9451         * unittests/basic_string_view/operators/char/2.cc: New file.
9452         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
9453         * unittests/basic_string_view/range_access/char/1.cc: New file.
9454         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
9455         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
9456         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
9457         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
9458         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
9459         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
9460         * unittests/basic_string_view/requirements/typedefs.cc: New file.
9461         * unittests/basic_string_view/typedefs.cc: New file.
9462         * unittests/basic_string_view/types/1.cc: New file.
9463
9464 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9465
9466         * common/gdb_string_view.h: Remove libstdc++ implementation
9467         details, adjust to gdb reality.
9468         * common/gdb_string_view.tcc: Likewise.
9469         * cli/cli-script.c (struct string_view): Remove.
9470         (user_args) <m_args>: Change element type to gdb::string_view.
9471         (user_args::insert_args): Adjust.
9472
9473 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9474
9475         * common/gdb_string_view.h: New file.
9476         * common/gdb_string_view.tcc: New file.
9477
9478 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9479
9480         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
9481         * configure: Re-generate.
9482
9483 2018-04-09  Pedro Alves  <palves@redhat.com>
9484
9485         * gdbarch.sh: Include "observable.h" instead of "observer.h".
9486         (set_target_gdbarch): Call
9487         gdb::observers::architecture_changed.notify instead of
9488         observer_notify_architecture_changed.
9489
9490 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9491
9492         * tracepoint.c (struct current_traceframe_cleanup): Remove.
9493         (do_restore_current_traceframe_cleanup): Remove.
9494         (restore_current_traceframe_cleanup_dtor): Remove.
9495         (make_cleanup_restore_current_traceframe): Remove.
9496         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
9497         New.
9498         * tracepoint.h (struct scoped_restore_current_traceframe): New.
9499         * infrun.c (fetch_inferior_event): Use
9500         scoped_restore_current_traceframe.
9501
9502 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9503
9504         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
9505         Remove.
9506         <n_allocated_type_units>: Remove.
9507         <all_type_units>: Change to std::vector.
9508         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
9509         to std::vector change.
9510         (dwarf2_per_objfile::get_cutu): Likewise.
9511         (dwarf2_per_objfile::get_tu): Likewise.
9512         (create_signatured_type_table_from_index): Likewise.
9513         (create_signatured_type_table_from_debug_names): Likewise.
9514         (dw2_symtab_iter_next): Likewise.
9515         (dw2_print_stats): Likewise.
9516         (dw2_expand_all_symtabs): Likewise.
9517         (dw2_expand_marked_cus): Likewise.
9518         (dw2_debug_names_iterator::next): Likewise.
9519         (dwarf2_initialize_objfile): Likewise.
9520         (add_signatured_type_cu_to_table): Likewise.
9521         (create_all_type_units): Likewise.
9522         (add_type_unit): Likewise.
9523         (struct tu_abbrev_offset): Add constructor.
9524         (build_type_psymtabs_1): Adjust to std::vector change.
9525         (print_tu_stats): Likewise.
9526         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9527         (write_debug_names): Likewise.
9528
9529 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9530
9531         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
9532         Make an std::vector.
9533         <n_comp_units>: Remove.
9534         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
9535         to std::vector change.
9536         (dwarf2_per_objfile::get_cutu): Likewise.
9537         (dwarf2_per_objfile::get_cu): Likewise.
9538         (create_cus_from_index): Likewise.
9539         (create_addrmap_from_index): Likewise.
9540         (create_addrmap_from_aranges): Likewise.
9541         (dwarf2_read_index): Likewise.
9542         (dw2_find_last_source_symtab): Likewise.
9543         (dw2_map_symtabs_matching_filename): Likewise.
9544         (dw2_symtab_iter_next): Likewise.
9545         (dw2_print_stats): Likewise.
9546         (dw2_expand_all_symtabs): Likewise.
9547         (dw2_expand_symtabs_with_fullname): Likewise.
9548         (dw2_expand_marked_cus): Likewise.
9549         (dw2_map_symbol_filenames): Likewise.
9550         (create_cus_from_debug_names): Likewise.
9551         (dwarf2_read_debug_names): Likewise.
9552         (dw2_debug_names_iterator::next): Likewise.
9553         (dwarf2_initialize_objfile): Likewise.
9554         (set_partial_user): Likewise.
9555         (dwarf2_build_psymtabs_hard): Likewise.
9556         (read_comp_units_from_section): Remove arguments, adjust to
9557         std::vector change.
9558         (create_all_comp_units): Adjust to std::vector and
9559         read_comp_units_from_section changes.
9560         (dwarf2_find_containing_comp_unit): Adjust to std::vector
9561         change.
9562         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9563         (psyms_seen_size): Likewise.
9564         (write_gdbindex): Likewise.
9565         (write_debug_names): Likewise.
9566
9567 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9568
9569         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
9570         with dwarf2_per_objfile.
9571         (create_cus_from_index): Likewise.
9572         (create_signatured_type_table_from_index): Likewise.
9573         (dwarf2_read_index): Likewise.
9574         (dwarf2_initialize_objfile): Likewise.
9575         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
9576         per_cu rather than get_dwarf2_per_objfile.
9577
9578 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9579
9580         * dwarf2read.h (struct signatured_type): Forward declare.
9581         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
9582         New methods.
9583         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
9584         (dw2_get_cutu): ...this.
9585         (dwarf2_per_objfile::get_cu): Rename from...
9586         (dw2_get_cu): ...this.
9587         (dwarf2_per_objfile::get_tu): New.
9588         (create_addrmap_from_index): Adjust.
9589         (create_addrmap_from_aranges): Adjust.
9590         (dw2_find_last_source_symtab): Adjust.
9591         (dw2_map_symtabs_matching_filename): Adjust.
9592         (dw2_symtab_iter_next): Adjust.
9593         (dw2_print_stats): Adjust.
9594         (dw2_expand_all_symtabs): Adjust.
9595         (dw2_expand_symtabs_with_fullname): Adjust.
9596         (dw2_expand_marked_cus): Adjust.
9597         (dw_expand_symtabs_matching_file_matcher): Adjust.
9598         (dw2_map_symbol_filenames): Adjust.
9599         (dw2_debug_names_iterator::next): Adjust.
9600         (dwarf2_initialize_objfile): Adjust.
9601         (set_partial_user): Adjust.
9602         (dwarf2_build_psymtabs_hard): Adjust.
9603
9604 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9605
9606         * dwarf2read.c (create_signatured_type_table_from_debug_names):
9607         Remove unused variables.
9608         (dw2_map_symtabs_matching_filename): Likewise.
9609         (dwarf2_record_block_ranges): Likewise.
9610         (dwarf2_read_addr_index): Likewise.
9611         (follow_die_offset): Likewise.
9612
9613 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9614
9615         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
9616         to symbol_file_add_main.
9617
9618 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9619
9620         PR mi/22299
9621         * mi/mi-console.c (do_fputc_async_safe): New.
9622         (mi_console_file::write_async_safe): New.
9623         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
9624         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
9625         New.
9626         * ui-file.c (ui_file::putstrn): Adjust call to
9627         fputstrn_unfiltered.
9628         * utils.c (printchar): Replace do_fputs and do_fprintf
9629         parameters by do_fputc.
9630         (fputstr_filtered): Adjust call to printchar.
9631         (fputstr_unfiltered): Likewise.
9632         (fputstrn_filtered): Likewise.
9633         (fputstrn_unfiltered): Add do_fputc parameter, pass to
9634         printchar.
9635         * utils.h (do_fputc_ftype): New typedef.
9636         (fputstrn_unfiltered): Add do_fputc parameter.
9637
9638 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9639
9640         * regformats/i386/i386-avx.dat: Remove.
9641
9642 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
9643
9644         PR gdb/22979
9645         * amd64-tdep.c (amd64_none_init_abi): New function.
9646         (amd64_x32_none_init_abi): New function.
9647         (_initialize_amd64_tdep): Register handlers for x86-64 and
9648         x64_32 with GDB_OSABI_NONE.
9649         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
9650         GDB_OSABI_NONE osabi.
9651
9652 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
9653
9654         PR gdb/22980
9655         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
9656         GDB_OSABI_NONE.
9657         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
9658         * osabi.c (gdb_osabi_names): Add "unknown" entry.
9659
9660 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
9661
9662         * common/byte-vector.h (char_vector): New type.
9663         * target.h (target_read_alloc): Return
9664         gdb::optional<byte_vector>.
9665         (target_read_stralloc): Return gdb::optional<char_vector>.
9666         (target_get_osdata): Return gdb::optional<char_vector>.
9667         * target.c (target_read_alloc_1): Templatize.  Replacement
9668         manual memory management with vector.
9669         (target_read_alloc): Change return type, adjust.
9670         (target_read_stralloc): Change return type, adjust.
9671         (target_get_osdata): Change return type, adjust.
9672         * auxv.c (struct auxv_info) <length>: Remove.
9673         <data>: Change type to gdb::optional<byte_vector>.
9674         (auxv_inferior_data_cleanup): Free auxv_info with delete.
9675         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
9676         (target_auxv_search): Adjust.
9677         (fprint_target_auxv): Adjust.
9678         * avr-tdep.c (avr_io_reg_read_command): Adjust.
9679         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
9680         (linux_make_corefile_notes): Adjust.
9681         * osdata.c (get_osdata): Adjust.
9682         * remote.c (remote_get_threads_with_qxfer): Adjust.
9683         (remote_memory_map): Adjust.
9684         (remote_traceframe_info): Adjust.
9685         (btrace_read_config): Adjust.
9686         (remote_read_btrace): Adjust.
9687         (remote_pid_to_exec_file): Adjust.
9688         * solib-aix.c (solib_aix_get_library_list): Adjust.
9689         * solib-dsbt.c (decode_loadmap): Don't free buf.
9690         (dsbt_get_initial_loadmaps): Adjust.
9691         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
9692         * solib-target.c (solib_target_current_sos): Adjust.
9693         * tracepoint.c (sdata_make_value): Adjust.
9694         * xml-support.c (xinclude_start_include): Adjust.
9695         (xml_fetch_content_from_file): Adjust.
9696         * xml-support.h (xml_fetch_another): Change return type.
9697         (xml_fetch_content_from_file): Change return type.
9698         * xml-syscall.c (xml_init_syscalls_info): Adjust.
9699         * xml-tdesc.c (file_read_description_xml): Adjust.
9700         (fetch_available_features_from_target): Change return type.
9701         (target_fetch_description_xml): Adjust.
9702         (target_read_description_xml): Adjust.
9703
9704 2018-04-06  Tom Tromey  <tom@tromey.com>
9705
9706         * value.c (~value): Update.
9707         (struct value) <contents>: Now unique_xmalloc_ptr.
9708         (value_contents_bits_eq, allocate_value_contents)
9709         (value_contents_raw, value_contents_all_raw)
9710         (value_contents_for_printing, value_contents_for_printing_const)
9711         (set_value_enclosing_type): Update.
9712
9713 2018-04-06  Tom Tromey  <tom@tromey.com>
9714
9715         * value.c (range_s): Remove typedef, VEC.
9716         (struct range): Add operator<.
9717         (range_lessthan): Remove.
9718         (ranges_contain): Change type.
9719         (~value): Update.
9720         (struct value) <unavailable, optimized_out>: Now std::vector.
9721         (value_entirely_available)
9722         (value_entirely_covered_by_range_vector)
9723         (value_entirely_unavailable, value_entirely_optimized_out):
9724         Update.
9725         (insert_into_bit_range_vector): Change argument type.
9726         (find_first_range_overlap): Likewise.
9727         (struct ranges_and_idx, value_contents_bits_eq)
9728         (require_not_optimized_out, require_available): Update.
9729         (ranges_copy_adjusted): Change argument types.
9730         (value_optimized_out, value_copy, value_fetch_lazy): Update.
9731
9732 2018-04-06  Tom Tromey  <tom@tromey.com>
9733
9734         * value.c (~value): Update.
9735         (struct value) <parent>: Now a value_ref_ptr.
9736         (value_parent, set_value_parent, value_address, value_copy):
9737         Update.
9738
9739 2018-04-06  Tom Tromey  <tom@tromey.com>
9740
9741         * value.c (struct value): Add constructor, destructor, and member
9742         initializers.
9743         (allocate_value_lazy, value_decref): Update.
9744
9745 2018-04-06  Tom Tromey  <tom@tromey.com>
9746
9747         * value.c (struct value) <released, next>: Remove.
9748         (all_values): Now a std::vector.
9749         (allocate_value_lazy): Update.
9750         (value_next): Remove.
9751         (value_mark, value_free_to_mark, release_value)
9752         (value_release_to_mark): Update.
9753
9754 2018-04-06  Tom Tromey  <tom@tromey.com>
9755
9756         * value.h (fetch_subexp_value, value_release_to_mark): Update.
9757         (free_value_chain): Remove.
9758         * value.c (free_value_chain): Remove.
9759         (value_release_to_mark): Return a std::vector.
9760         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
9761         std::vector.
9762         (check_condition): Update.
9763         * eval.c (fetch_subexp_value): Change "val_chain" to a
9764         std::vector.
9765         * breakpoint.c (update_watchpoint): Update.
9766         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
9767
9768 2018-04-06  Tom Tromey  <tom@tromey.com>
9769
9770         * value.h (free_all_values): Remove.
9771         * value.c (free_all_values): Remove.
9772
9773 2018-04-06  Tom Tromey  <tom@tromey.com>
9774
9775         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
9776         (value_history_chain, value_history_count): Remove.
9777         (value_history): New global.
9778         (record_latest_value, access_value_history, show_values)
9779         (preserve_values): Update.
9780
9781 2018-04-06  Tom Tromey  <tom@tromey.com>
9782
9783         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
9784         * varobj.c (varobj_set_display_format, varobj_set_value)
9785         (install_default_visualizer, construct_visualizer)
9786         (install_new_value, ~varobj, varobj_get_value_type)
9787         (my_value_of_variable, varobj_editable_p): Update.
9788         * c-varobj.c (c_describe_child, c_value_of_variable)
9789         (cplus_number_of_children, cplus_describe_child): Update.
9790         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
9791         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
9792         (ada_value_of_variable, ada_value_is_changeable_p): Update.
9793
9794 2018-04-06  Tom Tromey  <tom@tromey.com>
9795
9796         * printcmd.c (last_examine_address): Change type to
9797         value_ref_ptr.
9798         (do_examine, x_command): Update.
9799
9800 2018-04-06  Tom Tromey  <tom@tromey.com>
9801
9802         * value.c (release_value): Update.
9803         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
9804         (struct bpstats) <val>: Now a value_ref_ptr.
9805         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9806         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9807         (~watchpoint, print_it_watchpoint, watch_command_1)
9808         (invalidate_bp_value_on_memory_change): Update.
9809
9810 2018-04-06  Tom Tromey  <tom@tromey.com>
9811
9812         * varobj.c (varobj_clear_saved_item)
9813         (update_dynamic_varobj_children, install_new_value, ~varobj):
9814         Update.
9815         * value.h (value_incref): Move declaration earlier.
9816         (value_decref): Rename from value_free.
9817         (struct value_ref_policy): New.
9818         (value_ref_ptr): New typedef.
9819         (struct value_deleter): Remove.
9820         (gdb_value_up): Remove typedef.
9821         (release_value): Change return type.
9822         (release_value_or_incref): Remove.
9823         * value.c (set_value_parent): Update.
9824         (value_incref): Change return type.
9825         (value_decref): Rename from value_free.
9826         (value_free_to_mark, free_all_values, free_value_chain): Update.
9827         (release_value): Return value_ref_ptr.
9828         (release_value_or_incref): Remove.
9829         (record_latest_value, set_internalvar, clear_internalvar):
9830         Update.
9831         * stack.c (info_frame_command): Don't call value_free.
9832         * python/py-value.c (valpy_dealloc, valpy_new)
9833         (value_to_value_object): Update.
9834         * printcmd.c (do_examine): Update.
9835         * opencl-lang.c (lval_func_free_closure): Update.
9836         * mi/mi-main.c (register_changed_p): Don't call value_free.
9837         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
9838         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
9839         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
9840         value_free.
9841         * guile/scm-value.c (vlscm_free_value_smob)
9842         (vlscm_scm_from_value): Update.
9843         * frame.c (frame_register_unwind, frame_unwind_register_signed)
9844         (frame_unwind_register_unsigned, get_frame_register_bytes)
9845         (put_frame_register_bytes): Don't call value_free.
9846         * findvar.c (address_from_register): Don't call value_free.
9847         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
9848         * dwarf2loc.c (entry_data_value_free_closure)
9849         (value_of_dwarf_reg_entry, free_pieced_value_closure)
9850         (dwarf2_evaluate_loc_desc_full): Update.
9851         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9852         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9853         (~watchpoint, watch_command_1)
9854         (invalidate_bp_value_on_memory_change): Update.
9855         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
9856
9857 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
9858
9859         PR gdb/23022
9860         * warning.m4: Add -Wno-error=deprecated-register.
9861         * configure: Re-generate.
9862
9863 2018-04-05  Tom Tromey  <tom@tromey.com>
9864
9865         * linespec.h: Remove include of "vec.h".
9866
9867 2018-04-05  Tom Tromey  <tom@tromey.com>
9868
9869         * linespec.c (typep): Remove typedef.
9870         (find_methods, find_superclass_methods): Take a std::vector.
9871         (find_method): Use std::vector.
9872
9873 2018-04-05  Tom Tromey  <tom@tromey.com>
9874
9875         * utils.c (compare_strings): Remove.
9876         * utils.h (compare_strings): Remove.
9877         * objc-lang.h (find_imps): Update.
9878         * objc-lang.c (find_methods): Take a std::vector.
9879         (uniquify_strings, find_imps): Likewise.
9880         * linespec.c (find_methods): Take a std::vector.
9881         (decode_objc): Use std::vector.
9882         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
9883         a std::vector.
9884         (find_method, find_function_symbols): Use std::vector.
9885
9886 2018-04-05  Tom Tromey  <tom@tromey.com>
9887
9888         * completer.c (completion_tracker::completion_tracker): Remove
9889         cast.
9890         (completion_tracker::discard_completions): Likewise.
9891         * breakpoint.c (ambiguous_names_p): Remove cast.
9892         * ada-lang.c (_initialize_ada_language): Remove cast.
9893         * utils.h (streq): Update.
9894         (streq_hash): Add new declaration.
9895         * utils.c (streq): Return bool.
9896         (streq_hash): New function.
9897
9898 2018-04-05  Tom Tromey  <tom@tromey.com>
9899
9900         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
9901         Remove a string copy.
9902
9903 2018-04-05  Tom Tromey  <tom@tromey.com>
9904
9905         * linespec.c (filter_results): Use std::vector.
9906         (decode_line_2, decode_line_full): Update.
9907
9908 2018-04-05  Tom Tromey  <tom@tromey.com>
9909
9910         * linespec.c (canonical_to_fullform): Return std::string.
9911         (filter_results): Update.
9912         (struct decode_line_2_item): Add constructor.
9913         <fullform, displayform>: Now std::string.
9914         (decode_line_2_compare_items): Now a std::sort comparator.
9915         (decode_line_2): Update.
9916
9917 2018-04-05  Tom Tromey  <tom@tromey.com>
9918
9919         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
9920         (unexpected_linespec_error): Update.
9921         (linespec_parse_basic, parse_linespec): Update.
9922
9923 2018-04-05  Tom Tromey  <tom@tromey.com>
9924
9925         * linespec.c (linespec_parse_basic): Reindent.
9926
9927 2018-04-05  Tom Tromey  <tom@tromey.com>
9928
9929         * minsyms.h (iterate_over_minimal_symbols): Update.
9930         * minsyms.c (iterate_over_minimal_symbols): Take a
9931         gdb::function_view.
9932         * linespec.c (struct collect_minsyms): Remove.
9933         (compare_msyms): Now a std::sort comparator.
9934         (add_minsym): Add parameters.
9935         (search_minsyms_for_name): Update.  Use std::vector.
9936
9937 2018-04-03  Tom Tromey  <tom@tromey.com>
9938
9939         * mipsread.c (read_alphacoff_dynamic_symtab): Use
9940         gdb::byte_vector.
9941
9942 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
9943
9944         * MAINTAINERS (Write After Approval): Add Weimin Pan.
9945
9946 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
9947
9948         PR gdb/16959
9949         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
9950         printing static type.
9951
9952 2018-04-01  Tom Tromey  <tom@tromey.com>
9953
9954         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
9955         (rs6000_xfer_shared_libraries): Update.
9956
9957 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
9958
9959         * common/gdb_vecs.h (char_ptr): Remove.
9960         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
9961
9962 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
9963
9964         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
9965         with std::vector.
9966         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
9967
9968 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
9969
9970         * tracepoint.h (struct uploaded_tp): Initialize fields.
9971         <actions, step_actions, cmd_strings>: Change type to
9972         std::vector<char *>.
9973         * tracepoint.c (get_uploaded_tp): Allocate with new.
9974         (free_uploaded_tps): Free with delete.
9975         (parse_tracepoint_definition): Adjust to std::vector change.
9976         * breakpoint.c (read_uploaded_action): Likewise.
9977         (create_tracepoint_from_upload): Likewise.
9978         * ctf.c (ctf_write_uploaded_tp): Likewise.
9979         (SET_ARRAY_FIELD): Likewise.
9980         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
9981
9982 2018-03-30  Tom Tromey  <tom@tromey.com>
9983
9984         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
9985         std::unique_ptr.
9986         (svr4_keep_data_in_core): Update.
9987         (svr4_read_so_list): Update.
9988
9989 2018-03-30  Tom Tromey  <tom@tromey.com>
9990
9991         * windows-nat.c (handle_output_debug_string, handle_exception):
9992         Update.
9993         * target.h (target_read_string): Update.
9994         * target.c (target_read_string): Change "string" to
9995         unique_xmalloc_ptr.
9996         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
9997         Update.
9998         * solib-frv.c (frv_current_sos): Update.
9999         * solib-dsbt.c (dsbt_current_sos): Update.
10000         * solib-darwin.c (darwin_current_sos): Update.
10001         * linux-thread-db.c (inferior_has_bug): Update.
10002         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
10003         Update.  Remove alloca.
10004         * ada-lang.c (ada_main_name): Update.
10005
10006 2018-03-30  Tom Tromey  <tom@tromey.com>
10007
10008         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
10009         (struct dwo_file_deleter): New.
10010         (dwo_file_up): New typedef.
10011         (open_and_init_dwo_file): Use dwo_file_up.
10012         (free_dwo_file_cleanup): Remove.
10013
10014 2018-03-30  Tom Tromey  <tom@tromey.com>
10015
10016         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
10017         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
10018
10019 2018-03-30  Tom Tromey  <tom@tromey.com>
10020
10021         * dwarf2read.c (class free_cached_comp_units): New class.
10022         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
10023         (free_cached_comp_units): Remove function.
10024
10025 2018-03-30  Tom Tromey  <tom@tromey.com>
10026
10027         * utils.h (make_cleanup_unpush_target): Remove.
10028         * inf-ptrace.c (struct target_unpusher): New.
10029         (target_unpush_up) New typedef.
10030         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
10031         target_unpush_up.
10032         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
10033
10034 2018-03-27  Tom Tromey  <tom@tromey.com>
10035
10036         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
10037
10038 2018-03-27  Pedro Alves  <palves@redhat.com>
10039             Tom Tromey  <tom@tromey.com>
10040
10041         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
10042         destructor.  Now a class.
10043         (gdb_readline_wrapper_cleanup): Remove function.
10044         (gdb_readline_wrapper): Remove cleanups.
10045
10046 2018-03-27  Tom Tromey  <tom@tromey.com>
10047
10048         * typeprint.h (struct type_print_options) <local_typedefs,
10049         global_typedefs>: Remove "struct" keyword.
10050         (class typedef_hash_table): New class.
10051         (recursively_update_typedef_hash, add_template_parameters)
10052         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
10053         (find_typedef_in_hash): Don't declare.
10054         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
10055         (typedef_hash_table::recursively_update): Rename from
10056         recursively_update_typedef_hash.  Now a member.
10057         (typedef_hash_table::add_template_parameters): Rename from
10058         add_template_parameters.  Now a member.
10059         (typedef_hash_table::typedef_hash_table): Now a constructor;
10060         rename from create_typedef_hash.
10061         (typedef_hash_table::~typedef_hash_table): Now a destructor;
10062         rename from free_typedef_hash.
10063         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
10064         (do_free_global_table): Remove.
10065         (typedef_hash_table::typedef_hash_table): New constructor; renamed
10066         from copy_type_recursive.
10067         (create_global_typedef_table): Remove.
10068         (typedef_hash_table::find_global_typedef): Now a member of
10069         typedef_hash_table.
10070         (typedef_hash_table::find_typedef): Rename from
10071         find_typedef_in_hash; now a member.
10072         (whatis_exp): Update.
10073         * extension.h (struct ext_lang_type_printers): Add constructor and
10074         destructor.
10075         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
10076         declare.
10077         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
10078         Now a constructor; rename from start_ext_lang_type_printers.
10079         (ext_lang_type_printers): Now a destructor; rename from
10080         free_ext_lang_type_printers.
10081         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
10082         Update.
10083         (c_type_print_base_struct_union): Update.  Remove cleanups.
10084
10085 2018-03-27  Tom Tromey  <tom@tromey.com>
10086
10087         * dwarf-index-write.c: Include <cmath>.
10088
10089 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
10090
10091         * NEWS: Add entry describing new "set|show varsize-limit" command.
10092         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
10093         command.
10094         * printcmd.c (_initialize_printcmd): Add "set var" alias of
10095         "set variable".
10096
10097 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
10098
10099         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
10100         dwarf-index-write.c
10101         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
10102         * dwarf-index-common.c: New file.
10103         * dwarf-index-common.h: New file.
10104         * dwarf-index-write.c: New file.
10105         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
10106         (struct dwarf2_section_info): Move from here.
10107         (dwarf2_section_info_def): Likewise.
10108         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
10109         (offset_type): Likewise.
10110         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
10111         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
10112         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
10113         (byte_swap): Likewise.
10114         (MAYBE_SWAP): Likewise.
10115         (dwarf2_per_cu_ptr): Likewise.
10116         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
10117         (struct tu_stats): Likewise.
10118         (struct dwarf2_per_objfile): Likewise.
10119         (struct dwarf2_per_cu_data): Likewise.
10120         (struct signatured_type): Likewise.
10121         (sig_type_ptr): Likewise.
10122         (DEF_VEC_P (sig_type_ptr)): Likewise.
10123         (INDEX4_SUFFIX): Likewise.
10124         (INDEX5_SUFFIX): Likewise.
10125         (DEBUG_STR_SUFFIX): Likewise.
10126         (dwarf2_read_section): Make non-static.
10127         (mapped_index_string_hash): Move from here.
10128         (dwarf5_djb_hash): Likewise.
10129         (file_write): Likewise.
10130         (class data_buf): Likewise.
10131         (struct symtab_index_entry): Likewise.
10132         (struct mapped_symtab): Likewise.
10133         (find_slot): Likewise.
10134         (hash_expand): Likewise.
10135         (add_index_entry): Likewise.
10136         (uniquify_cu_indices): Likewise.
10137         (class c_str_view): Likewise.
10138         (class c_str_view_hasher): Likewise.
10139         (class vector_hasher): Likewise.
10140         (write_hash_table): Likewise.
10141         (psym_index_map): Likewise.
10142         (struct addrmap_index_data): Likewise.
10143         (add_address_entry): Likewise.
10144         (add_address_entry_worker): Likewise.
10145         (write_address_map): Likewise.
10146         (symbol_kind): Likewise.
10147         (write_psymbols): Likewise.
10148         (struct signatured_type_index_data): Likewise.
10149         (write_one_signatured_type): Likewise.
10150         (recursively_count_psymbols): Likewise.
10151         (recursively_write_psymbols): Likewise.
10152         (class debug_names): Likewise.
10153         (check_dwarf64_offsets): Likewise.
10154         (psyms_seen_size): Likewise.
10155         (write_gdbindex): Likewise.
10156         (write_debug_names): Likewise.
10157         (assert_file_size): Likewise.
10158         (write_psymtabs_to_index): Likewise.
10159         (save_gdb_index_command): Likewise.
10160         (_initialize_dwarf2_read): Don't register the "save gdb-index"
10161         command.
10162         * dwarf2read.h: New file.
10163
10164 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
10165
10166         PR gdb/22670
10167         * dwarf2read.c (dwarf2_physname): Do not return the demangled
10168         symbol name if the CU's language stores symbol names in linkage
10169         format.
10170         * language.h (struct language_defn)
10171         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
10172         all instances of this struct.
10173
10174 2018-03-26  Tom Tromey  <tom@tromey.com>
10175
10176         * stack.c (backtrace_command_1): Remove verbose code.
10177
10178 2018-03-26  Tom Tromey  <tom@tromey.com>
10179
10180         * python/py-framefilter.c (py_print_type): Don't catch
10181         exceptions.  Return void.
10182         (py_print_value): Likewise.
10183         (py_print_single_arg): Likewise.
10184         (enumerate_args): Don't catch exceptions.
10185         (py_print_args): Likewise.
10186         (py_print_frame): Likewise.
10187         (gdbpy_apply_frame_filter): Catch exceptions here.
10188
10189 2018-03-26  Tom Tromey  <tom@tromey.com>
10190
10191         * stack.c (_initialize_stack): Remove trailing newlines from help
10192         text.  Add "Usage" line to "backtrace" help.
10193
10194 2018-03-26  Tom Tromey  <tom@tromey.com>
10195
10196         PR python/16486:
10197         * python/py-framefilter.c (py_print_args): Call wrap_hint.
10198
10199 2018-03-26  Tom Tromey  <tom@tromey.com>
10200
10201         * python/py-framefilter.c (py_print_single_arg): Return
10202         EXT_LANG_BT_ERROR from catch.
10203
10204 2018-03-26  Tom Tromey  <tom@tromey.com>
10205
10206         PR backtrace/15584:
10207         * stack.c (backtrace_command_1): Move some code into no-filters
10208         "if".
10209
10210 2018-03-26  Tom Tromey  <tom@tromey.com>
10211
10212         * python/py-framefilter.c (throw_quit_or_print_exception): New
10213         function.
10214         (gdbpy_apply_frame_filter): Use it.
10215
10216 2018-03-26  Tom Tromey  <tom@tromey.com>
10217
10218         PR cli/17716:
10219         * python/py-framefilter.c (py_print_type, py_print_value)
10220         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
10221         RETURN_MASK_ERROR.
10222
10223 2018-03-26  Tom Tromey  <tom@tromey.com>
10224
10225         * python/py-framefilter.c (enumerate_args): Use
10226         gdb::unique_xmalloc_ptr.
10227
10228 2018-03-26  Tom Tromey  <tom@tromey.com>
10229
10230         * python/py-framefilter.c (py_print_frame): Return
10231         EXT_LANG_BT_OK.
10232         (gdbpy_apply_frame_filter): Update comment.
10233         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
10234         Remove.
10235         <EXT_LANG_BT_NO_FILTERS>: Change value.
10236
10237 2018-03-26  Tom Tromey  <tom@tromey.com>
10238
10239         PR backtrace/15582:
10240         * stack.c (backtrace_command): Parse "hide" argument.
10241         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
10242         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
10243         constant.
10244
10245 2018-03-26  Tom Tromey  <tom@tromey.com>
10246
10247         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
10248         add "flags".
10249         (backtrace_command): Remove "fulltrace", add "flags".
10250
10251 2018-03-26  Tom Tromey  <tom@tromey.com>
10252
10253         * stack.c (backtrace_command): Rewrite command line parsing.
10254
10255 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
10256
10257         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
10258
10259 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
10260
10261         * filename-seen-cache.h: Add include guard.
10262
10263 2018-03-26  Keith Seitz  <keiths@redhat.com>
10264
10265         * symfile.c (place_section): Remove "struct" from section_addr_info
10266         in comment.
10267         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
10268         "struct" keyword from section_addr_info.
10269
10270 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
10271
10272         * regformats/regdef.h (reg): Add constructors.
10273
10274 2018-03-25  Pedro Alves  <palves@redhat.com>
10275
10276         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
10277         if then/else bodies in var_func_name extraction.
10278
10279 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
10280
10281         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
10282         lookup_minimal_symbol() to find symbol entry.
10283         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
10284
10285 2018-03-23  Keith Seitz  <keiths@redhat.com>
10286
10287         PR c++/22968
10288         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
10289         nested type definitions for C++, too.
10290
10291 2018-03-23  Tom Tromey  <tom@tromey.com>
10292
10293         * machoread.c (struct oso_el): Add a constructor.  Don't define as
10294         a typedef.
10295         (macho_register_oso): Remove.
10296         (macho_symtab_read): Take a std::vector.
10297         (oso_el_compare_name): Now a std::sort comparator.
10298         (macho_symfile_read_all_oso): Take a std::vector.
10299         (macho_symfile_read): Use std::vector.  Remove cleanups.
10300
10301 2018-03-22  Tom Tromey  <tom@tromey.com>
10302
10303         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
10304         (record_full_goto_bookmark): Use std::string.
10305
10306 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
10307
10308         PR tdep/18295
10309         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
10310         a single mask.
10311
10312 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
10313
10314         * rs6000-tdep.c (store_insn_p): New function.
10315         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
10316         and cr_reg to their unshifted values. Use store_insn_p to
10317         match LR saves using either R1 or fdata->alloca_reg. Use
10318         store_insn_p to match CR saves. Set alloca_reg_offset
10319         when alloca_reg and framep are set. Remove lr_reg shift
10320         when assigning to fdata->lr_register.
10321
10322 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10323
10324         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
10325         command line args instead of emitting a warning.
10326
10327 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
10328
10329         * tracepoint.h (struct static_tracepoint_marker): Initialize
10330         fields, define default constructor, move constructor and move
10331         assignment, disable the rest.
10332         <str_id, extra>: Make std::string.
10333         (release_static_tracepoint_marker): Remove.
10334         (free_current_marker): Remove.
10335         * tracepoint.c (free_current_marker): Remove.
10336         (parse_static_tracepoint_marker_definition): Adjust to
10337         std::string, use new hex2str overload.
10338         (release_static_tracepoint_marker): Remove.
10339         (print_one_static_tracepoint_marker): Get marker by reference
10340         and adjust to std::string.
10341         (info_static_tracepoint_markers_command): Adjust to std::vector
10342         changes
10343         * target.h (static_tracepoint_marker_p): Remove typedef.
10344         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
10345         (struct target_ops) <to_static_tracepoint_marker_at>: Return
10346         bool.
10347         <to_static_tracepoint_markers_by_strid>: Return std::vector.
10348         * target-debug.h
10349         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
10350         (target_debug_print_std_vector_static_tracepoint_marker): New.
10351         (target_debug_print_struct_static_tracepoint_marker_p): Rename
10352         to...
10353         (target_debug_print_static_tracepoint_marker_p): ... this.
10354         * target-delegates.c: Re-generate.
10355         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
10356         Make std::string.
10357         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
10358         (decode_static_tracepoint_spec): Adjust to std::vector.
10359         (tracepoint_print_one_detail): Adjust to std::string.
10360         (strace_marker_decode_location): Adjust to std::string.
10361         (update_static_tracepoint): Adjust to std::string, remove call
10362         to release_static_tracepoint_marker.
10363         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
10364         Adjust to std::vector.
10365         * remote.c (remote_static_tracepoint_marker_at): Return bool.
10366         (remote_static_tracepoint_markers_by_strid): Adjust to
10367         std::vector.
10368         * common/rsp-low.h (hex2str): New overload with explicit count
10369         of bytes.
10370         * common/rsp-low.c (hex2str): New overload with explicit count
10371         of bytes.
10372         * unittests/rsp-low-selftests.c (test_hex2str): New function.
10373         (_initialize_rsp_low_selftests): Add test_hex2str test.
10374         * unittests/tracepoint-selftests.c
10375         (test_parse_static_tracepoint_marker_definition): Adjust to
10376         std::string.
10377
10378 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
10379
10380         * tracepoint.c (parse_static_tracepoint_marker_definition):
10381         Consider case where the definition is followed by more
10382         definitions.
10383         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10384         tracepoint-selftests.c.
10385         * unittests/tracepoint-selftests.c: New.
10386
10387 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
10388
10389         * MAINTAINERS (Write After Approval): Add Pedro Franco de
10390         Carvalho.
10391
10392 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
10393
10394         * symtab.c (find_pc_sect_line): fixed indentation.
10395
10396 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
10397
10398         * symtab.c (find_pc_sect_line): now uses binary search.
10399
10400 2018-03-19  Tom Tromey  <tom@tromey.com>
10401
10402         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
10403         "IDENT" production.
10404
10405 2018-03-19  Pedro Alves  <palves@redhat.com>
10406             Tom Tromey  <tom@tromey.com>
10407
10408         * unittests/observable-selftests.c: New file.
10409         * common/observable.h: New file.
10410         * observable.h: New file.
10411         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
10412         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
10413         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
10414         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
10415         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
10416         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
10417         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
10418         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
10419         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
10420         python/py-breakpoint.c, python/py-finishbreakpoint.c,
10421         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
10422         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
10423         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
10424         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
10425         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
10426         tui/tui-interp.c, valops.c: Update all users.
10427         * tui/tui-hooks.c (tui_bp_created_observer)
10428         (tui_bp_deleted_observer, tui_bp_modified_observer)
10429         (tui_inferior_exit_observer, tui_before_prompt_observer)
10430         (tui_normal_stop_observer, tui_register_changed_observer):
10431         Remove.
10432         (tui_observers_token): New global.
10433         (attach_or_detach, tui_attach_detach_observers): New functions.
10434         (tui_install_hooks, tui_remove_hooks): Use
10435         tui_attach_detach_observers.
10436         * record-btrace.c (record_btrace_thread_observer): Remove.
10437         (record_btrace_thread_observer_token): New global.
10438         * observer.sh: Remove.
10439         * observer.c: Rename to observable.c.
10440         * observable.c (namespace gdb_observers): Define new objects.
10441         (observer_debug): Move into gdb_observers namespace.
10442         (struct observer, struct observer_list, xalloc_observer_list_node)
10443         (xfree_observer_list_node, generic_observer_attach)
10444         (generic_observer_detach, generic_observer_notify): Remove.
10445         (_initialize_observer): Update.
10446         Don't include observer.inc.
10447         * Makefile.in (generated_files): Remove observer.h, observer.inc.
10448         (clean mostlyclean): Likewise.
10449         (observer.h, observer.inc): Remove targets.
10450         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
10451         (COMMON_SFILES): Use observable.c, not observer.c.
10452         * .gitignore: Remove observer.h.
10453
10454 2018-03-18  Tom Tromey  <tom@tromey.com>
10455
10456         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
10457         gdb::def_vector.
10458         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
10459
10460 2018-03-17  Tom Tromey  <tom@tromey.com>
10461
10462         * auto-load.c (auto_load_objfile_script_1): Use std::string.
10463
10464 2018-03-17  Tom Tromey  <tom@tromey.com>
10465
10466         * target.c (class scoped_target_fd): New.
10467         (target_fileio_close_cleanup): Remove.
10468         (target_fileio_read_alloc_1): Use scoped_target_fd.
10469
10470 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
10471
10472         * silent-rules.mk: New.
10473         * Makefile.in: Include silent-rules.mk
10474         (srcdir, VPATH, top_srcdir): Move up.
10475         (COMPILE): Add ECHO_CXX.
10476         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
10477         (init.c): Add ECHO_INIT_C.
10478         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
10479         (version.c): Add ECHO_GEN.
10480         (printcmd.o): Add ECHO_CXX.
10481         (target-float.o): Add ECHO_CXX.
10482         (ada-exp.o): Add ECHO_CXX.
10483         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
10484         (insight$(EXEEXT)): Add ECHO_CXXLD.
10485         * gnulib/configure.ac: Add AM_SILENT_RULES.
10486         * gnulib/aclocal.m4: Re-generate.
10487         * gnulib/configure: Re-generate.
10488         * gnulib/import/Makefile.in: Re-generate.
10489
10490 2018-03-16  Tom Tromey  <tom@tromey.com>
10491
10492         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
10493         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
10494         * utils.c (do_free_section_addr_info)
10495         (make_cleanup_free_section_addr_info): Remove.
10496         * symfile.h (struct other_sections): Add constructor.
10497         (struct section_addr_info): Remove.
10498         (section_addr_info): New typedef.
10499         (struct sym_fns) <sym_offsets>: Change type of parameter.
10500         (build_section_addr_info_from_objfile)
10501         (relative_addr_info_to_section_offsets, addr_info_make_relative)
10502         (default_symfile_offsets, symbol_file_add)
10503         (symbol_file_add_from_bfd)
10504         (build_section_addr_info_from_section_table): Update.
10505         (alloc_section_addr_info, free_section_addr_info): Don't declare.
10506         * symfile.c (alloc_section_addr_info): Remove.
10507         (build_section_addr_info_from_section_table): Change return type.
10508         Update.
10509         (build_section_addr_info_from_bfd)
10510         (build_section_addr_info_from_objfile): Likewise.
10511         (free_section_addr_info): Remove.
10512         (relative_addr_info_to_section_offsets): Change type of "addrs".
10513         (addrs_section_compar): Now a std::sort comparator.
10514         (addrs_section_sort): Change return type.
10515         (addr_info_make_relative): Change type of "addrs".  Update.
10516         (default_symfile_offsets, syms_from_objfile_1)
10517         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
10518         (symbol_file_add_separate): Update.
10519         (symbol_file_add): Change type of "addrs".  Update.
10520         (add_symbol_file_command): Update.  Remove cleanups.
10521         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
10522         cleanups.
10523         * symfile-debug.c (debug_sym_offsets): Change type of "info".
10524         * solib.c (solib_read_symbols): Update.
10525         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
10526         * machoread.c (macho_symfile_offsets): Update.
10527         * jit.c (jit_bfd_try_read_symtab): Update.
10528
10529 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
10530
10531         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10532         unittests/utils-selftests.c.
10533         * unittests/utils-selftests.c: New file.
10534
10535 2018-03-14  Tom Tromey  <tom@tromey.com>
10536
10537         PR cli/14977:
10538         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
10539         for NULL.
10540
10541 2018-03-14  Tom Tromey  <tom@tromey.com>
10542
10543         PR cli/19918:
10544         * printcmd.c (printf_pointer): Allow "-" in format.
10545
10546 2018-03-14  Tom Tromey  <tom@tromey.com>
10547
10548         * printcmd.c (_initialize_printcmd): Add usage to printf.
10549
10550 2018-03-14  Yao Qi  <qiyao@sourceware.org>
10551
10552         * MAINTAINERS: Update my email address.
10553
10554 2018-03-13  Tom Tromey  <tom@tromey.com>
10555
10556         * machoread.c (macho_check_dsym): Change filenamep to a
10557         std::string*.
10558         (macho_symfile_read): Update.
10559         * symfile.c (load_command): Use std::string.
10560
10561 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
10562
10563         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
10564         to error message string.
10565         (riscv_register_name): Use xsnprintf instead of sprintf.
10566         (riscv_insn::fetch_instruction): Use gdb_assert instead of
10567         internal_error.
10568         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
10569         error.
10570         (riscv_push_dummy_call): Likewise.
10571
10572 2018-03-12  Tom Tromey  <tom@tromey.com>
10573
10574         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
10575         Use gdb::byte_vector.
10576         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
10577
10578 2018-03-12  Yao Qi  <yao.qi@linaro.org>
10579
10580         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
10581         parameter type to readable_regcache.
10582         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
10583         the declaration.
10584
10585 2018-03-11  Tom Tromey  <tom@tromey.com>
10586
10587         * dwarf2read.c (struct nextfield): Add initializers.
10588         (struct nextfnfield): Remove.
10589         (struct fnfieldlist): Add initializers.  Remove "length" and
10590         "head", use std::vector.
10591         (struct decl_field_list): Remove.
10592         (struct field_info): Add initializers.
10593         <fields, baseclasses>: Now std::vector.
10594         <nbaseclasses, nfnfields, typedef_field_list_count,
10595         nested_types_list_count>: Remove.
10596         (dwarf2_add_field, dwarf2_add_type_defn)
10597         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
10598         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
10599         (process_structure_scope): Update.
10600
10601 2018-03-11  Tom Tromey  <tom@tromey.com>
10602
10603         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
10604         for use by std::sort.
10605         (build_type_psymtabs_1): Use std::vector.
10606
10607 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
10608
10609         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
10610         and LIBMPFR in the printed configuration.
10611
10612 2018-03-08  Tom Tromey  <tom@tromey.com>
10613
10614         * source.c (get_filename_and_charpos): Use scoped_fd.
10615         * nto-procfs.c (procfs_open_1): Use scoped_fd.
10616         (procfs_pidlist): Likewise.
10617         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
10618         (iterate_over_mappings): Likewise.
10619
10620 2018-03-08  Tom Tromey  <tom@tromey.com>
10621
10622         * infcall.c (struct call_return_meta_info)
10623         <stack_temporaries_enabled>: Remove.
10624         (get_call_return_value, call_function_by_hand_dummy): Update.
10625         * thread.c (disable_thread_stack_temporaries): Remove.
10626         (enable_thread_stack_temporaries): Remove.
10627         (thread_stack_temporaries_enabled_p): Return bool.
10628         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
10629         (get_last_thread_stack_temporary): Update.
10630         * eval.c (evaluate_subexp): Update.
10631         * gdbthread.h (class enable_thread_stack_temporaries): Now a
10632         class, not a function.
10633         (value_ptr, value_vec): Remove typedefs.
10634         (class thread_info) <stack_temporaries_enabled>: Now bool.
10635         <stack_temporaries>: Now a std::vector.
10636         (thread_stack_temporaries_enabled_p)
10637         (value_in_thread_stack_temporaries): Return bool.
10638
10639 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
10640
10641         * remote.c (putpkt_binary): Fix omitted bytes reporting.
10642         (getpkt_or_notif_sane_1): Likewise.
10643
10644 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
10645
10646         * build-id.c (build_id_to_debug_bfd): Use std::string.
10647
10648 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
10649
10650         * build-id.c (find_separate_debug_file_by_buildid): Return
10651         std::string.
10652         * build-id.h (find_separate_debug_file_by_buildid): Return
10653         std::string.
10654         * coffread.c (coff_symfile_read): Adjust to std::string.
10655         * elfread.c (elf_symfile_read): Adjust to std::string.
10656         * symfile.c (separate_debug_file_exists): Change parameter to
10657         std::string.
10658         (find_separate_debug_file): Return std::string.
10659         (find_separate_debug_file_by_debuglink): Return std::string.
10660         * symfile.h (find_separate_debug_file_by_debuglink): Return
10661         std::string.
10662
10663 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
10664
10665         * common/xml-utils.c (xml_escape_text): Move code to...
10666         (xml_escape_text_append): ... this new function.
10667         * common/xml-utils.h (xml_escape_text_append): New declaration.
10668         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
10669         New function.
10670         (_initialize_xml_utils): register test_xml_escape_text_append as
10671         a selftest.
10672
10673 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
10674
10675         * defs.h: Remove MAX_REGISTER_SIZE.
10676         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
10677         asserts.
10678         * python/py-unwind.c (pyuw_sniffer): Likewise.
10679
10680 2018-03-07  Tom Tromey  <tom@tromey.com>
10681
10682         * linux-tdep.c (linux_info_proc): Update.
10683         * target.h (struct target_ops) <to_fileio_readlink>: Return
10684         optional<string>.
10685         (target_fileio_readlink): Return optional<string>.
10686         * remote.c (remote_hostio_readlink): Return optional<string>.
10687         * inf-child.c (inf_child_fileio_readlink): Return
10688         optional<string>.
10689         * target.c (target_fileio_readlink): Return optional<string>.
10690
10691 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
10692
10693         * regcache.c (cooked_read_test): Add riscv to the list of
10694         architectures that have a save_reggroup.
10695
10696 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10697
10698         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
10699         value is not a dynamic class object.
10700
10701 2018-03-06  Tom Tromey  <tom@tromey.com>
10702
10703         * rust-exp.y: Formatting fixes.
10704
10705 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10706
10707         * riscv-tdep.c (riscv_register_name): Remove target description
10708         support.
10709         (riscv_gdbarch_init): Remove target description check.
10710
10711 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10712
10713         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
10714         comment.
10715         * riscv-tdep.h: Likewise.
10716
10717 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10718
10719         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
10720         (riscv_pseudo_register_write): Delete.
10721         (riscv_gdbarch_init): Remove all use of pseudo registers.
10722
10723 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
10724
10725         * record-btrace.c (btrace_print_lines): Replace cleanup
10726         parameter with RAII equivalents.
10727         (btrace_insn_history): Replace cleanup with RAII equivalents.
10728         * ui-out.h (make_cleanup_ui_out_list_begin_end,
10729         make_cleanup_ui_out_tuple_begin_end): Remove.
10730         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
10731         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
10732         make_cleanup_ui_out_list_begin_end): Remove.
10733
10734 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
10735
10736         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
10737         parameter types to std::vector.  Use bool.
10738         (record_btrace_wait): Replace VEC(tp_t) with
10739         std::vector<thread_info *>.
10740         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
10741
10742 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
10743
10744         * record-btrace.c (record_btrace_disable_callback): Remove.
10745         (struct scoped_btrace_disable): New.
10746         (record_btrace_open): Use scoped_btrace_disable.
10747
10748 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10749
10750         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
10751         reading values from registers.
10752
10753 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10754
10755         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
10756         where appropriate.
10757
10758 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10759
10760         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
10761         change parameter type.  Use GDB's print functions, and use
10762         core_addr_to_string where appropriate.
10763         (riscv_push_dummy_call): Use core_addr_to_string where
10764         appropriate, update call to riscv_print_arg_location, and reindent
10765         a few lines.
10766         (riscv_return_value): Update call to riscv_print_arg_location.
10767
10768 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10769             Tim Newsome <tim@sifive.com>
10770             Albert Ou <a0u@eecs.berkeley.edu>
10771             Darius Rad <darius@bluespec.com>
10772
10773         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
10774         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
10775         (ALLDEPFILES): Add riscv-tdep.c
10776         * configure.tgt: Add riscv support.
10777         * riscv-tdep.c: New file.
10778         * riscv-tdep.h: New file.
10779         * NEWS: Mention new target.
10780         * MAINTAINERS: Add entry for riscv.
10781
10782 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10783
10784         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
10785         fields within aggregates.
10786
10787 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
10788
10789         * record-btrace.c (btrace_print_lines): Change type of flags to
10790         gdb_disassembly_flags.
10791
10792 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
10793
10794         * fbsd-nat.c: Include "inf-ptrace.h".
10795         (USE_SIGTRAP_SIGINFO): Conditionally define.
10796         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
10797         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
10798         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
10799         function.
10800         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
10801         Likewise.
10802         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
10803         Likewise.
10804         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
10805         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
10806         "supports_stopped_by_hw_breakpoint" target methods.
10807
10808 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
10809
10810         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
10811         * fbsd-nat.c (debug_fbsd_nat): New variable.
10812         (show_fbsd_nat_debug): New function.
10813         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
10814         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
10815
10816 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
10817
10818         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
10819         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
10820         prototype.
10821         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
10822         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
10823         method.
10824
10825 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10826
10827         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
10828         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
10829
10830 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10831
10832         * charset.c (struct charset_vector): New.
10833         (charsets): Change type to charset_vector.
10834         (find_charset_names): Adjust.
10835         (add_one): Adjust.
10836         (_initialize_charset): Adjust.
10837
10838 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10839
10840         * progspace.h (struct program_space) <deleted_solibs>: Change
10841         type to std::vector<std::string>.
10842         * progspace.c (clear_program_space_solib_cache): Adjust.
10843         * breakpoint.c (print_solib_event): Adjust.
10844         (check_status_catch_solib): Adjust.
10845         * solib.c (update_solib_list): Adjust.
10846         * ui-out.h (class ui_out) <field_string>: New overload.
10847         * ui-out.c (ui_out::field_string): New overload.
10848
10849 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10850
10851         * progspace.h (struct program_space): Add constructor and
10852         destructor, initialize fields.
10853         (add_program_space): Remove.
10854         * progspace.c (add_program_space): Rename to...
10855         (program_space::program_space): ... this.
10856         (release_program_space): Rename to...
10857         (program_space::~program_space): ... this.
10858         (delete_program_space): Use delete to delete program_space.
10859         (initialize_progspace): Use new to allocate program_space.
10860         * inferior.c (add_inferior_with_spaces): Likewise.
10861         (clone_inferior_command): Likewise.
10862         * infrun.c (follow_fork_inferior): Likewise.
10863         (handle_vfork_child_exec_or_exit): Likewise.
10864
10865 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10866
10867         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
10868         (delim_string_to_char_ptr_vec): Return std::vector of
10869         gdb::unique_xmalloc_ptr.
10870         (dirnames_to_char_ptr_vec_append): Take std::vector of
10871         gdb::unique_xmalloc_ptr.
10872         (dirnames_to_char_ptr_vec): Return std::vector of
10873         gdb::unique_xmalloc_ptr.
10874         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
10875         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
10876         (delim_string_to_char_ptr_vec): Return an std::vector of
10877         gdb::unique_xmalloc_ptr, adjust the code.
10878         (dirnames_to_char_ptr_vec_append): Take an std::vector of
10879         gdb::unique_xmalloc_ptr, adjust the code.
10880         (dirnames_to_char_ptr_vec): Return an std::vector of
10881         gdb::unique_xmalloc_ptr, adjust the code.
10882         * auto-load.c (auto_load_safe_path_vec): Change type to
10883         std::vector of gdb::unique_xmalloc_ptr.
10884         (auto_load_expand_dir_vars): Return an std::vector of
10885         gdb::unique_xmalloc_ptr, adjust the code.
10886         (auto_load_safe_path_vec_update): Adjust.
10887         (filename_is_in_auto_load_safe_path_vec): Adjust.
10888         (auto_load_objfile_script_1): Adjust.
10889         * build-id.c (build_id_to_debug_bfd): Adjust.
10890         * linux-thread-db.c (thread_db_load_search): Adjust.
10891         * source.c (add_path): Adjust.
10892         (openp): Adjust.
10893         * symfile.c (find_separate_debug_file): Adjust.
10894         * utils.c (do_free_char_ptr_vec): Remove.
10895         (make_cleanup_free_char_ptr_vec): Remove.
10896
10897 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
10898
10899         PR gdb/22907
10900         * common/pathstuff.c: Conditionally include "<windows.h>".
10901
10902 2018-03-01  Georg Sauthoff  <mail@georg.so>
10903
10904         PR gdb/22888
10905         * gcore.in: Quote variables and switch interpreter to bash.
10906
10907 2018-03-01  Tom Tromey  <tom@tromey.com>
10908
10909         * dwarf2read.c (alloc_discriminant_info): Fix default_index
10910         assertion.  Add assertion for discriminant_index.
10911         (quirk_rust_enum): Use correct base type name in univariant case.
10912
10913 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
10914
10915         * record.c (get_call_history_modifiers): Return a
10916         record_print_flags.
10917         (cmd_record_call_history): Adjust.
10918         * record-btrace.c (record_btrace_call_history): Adjust.
10919         (record_btrace_call_history_range): Adjust.
10920         (record_btrace_call_history_from): Adjust.
10921         * target-debug.h (target_debug_print_record_print_flags): New.
10922         * target-delegates.c: Re-generate.
10923         * target.c (target_call_history): Change flags type.
10924         (target_call_history_from): Likewise.
10925         (target_call_history_range): Likewise.
10926         * target.h (struct target_ops) <target_call_history>: Likewise.
10927         (target_call_history_from): Likewise.
10928         (target_call_history_range): Likewise.
10929
10930 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
10931             Simon Marchi  <simon.marchi@polymtl.ca>
10932
10933         * common/common-utils.c: Include "sys/stat.h".
10934         (is_regular_file): Move here from "source.c"; change return
10935         type to "bool".
10936         * common/common-utils.h (is_regular_file): New prototype.
10937         * common/pathstuff.c (contains_dir_separator): New function.
10938         * common/pathstuff.h (contains_dir_separator): New prototype.
10939         * source.c: Don't include "sys/stat.h".
10940         (is_regular_file): Move to "common/common-utils.c".
10941
10942 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
10943
10944         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
10945         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
10946         * auto-load.c: Include "common/pathstuff.h".
10947         * common/common-def.h (current_directory): Move here.
10948         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
10949         function.
10950         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
10951         prototype.
10952         * common/pathstuff.c: New file.
10953         * common/pathstuff.h: New file.
10954         * compile/compile.c: Include "common/pathstuff.h".
10955         * defs.h (current_directory): Move to "common/common-defs.h".
10956         * dwarf2read.c: Include "common/pathstuff.h".
10957         * exec.c: Likewise.
10958         * guile/scm-safe-call.c: Likewise.
10959         * linux-thread-db.c: Likewise.
10960         * main.c: Likewise.
10961         * nto-tdep.c: Likewise.
10962         * objfiles.c: Likewise.
10963         * source.c: Likewise.
10964         * symtab.c: Likewise.
10965         * utils.c: Include "common/pathstuff.h".
10966         (gdb_realpath): Move to "common/pathstuff.c".
10967         (gdb_realpath_keepfile): Likewise.
10968         (gdb_abspath): Likewise.
10969         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
10970         (gdb_realpath_keepfile): Likewise.
10971         (gdb_abspath): Likewise.
10972
10973 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
10974
10975         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
10976         wildcard process pid for super_resume for kernels with a
10977         specific bug.
10978
10979 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
10980
10981         * compile/compile.c (get_args): Add additional comments
10982         explaining function.
10983
10984 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
10985             Tom Tromey  <tom@tromey.com>
10986
10987         * target.h (memory_write_request_s): Remove typedef.  Don't define
10988         VEC.
10989         (target_write_memory_blocks): Change argument to std::vector.
10990         (struct memory_write_request): Add constructor.
10991         * target-memory.c (compare_block_starting_address): Return bool.
10992         Change argument types.
10993         (claim_memory): Change arguments to use std::vector.
10994         (split_regular_and_flash_blocks, blocks_to_erase)
10995         (compute_garbled_blocks): Likewise.
10996         (cleanup_request_data, cleanup_write_requests_vector): Remove.
10997         (target_write_memory_blocks): Change argument to std::vector.
10998         * symfile.c (struct load_section_data): Add constructor and
10999         destructor.  Use std::vector for "requests".
11000         (struct load_progress_data): Add initializers.
11001         (load_section_callback): Update.  Use "new".
11002         (clear_memory_write_data): Remove.
11003         (generic_load): Update.
11004
11005 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
11006
11007         * arch/aarch64.h: Use common/tdesc.h.
11008
11009 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
11010
11011         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
11012         architecture with a 64-bit ABI.
11013
11014 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
11015
11016         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
11017         ahead of target description loading.
11018
11019 2018-02-26  Tom Tromey  <tom@tromey.com>
11020
11021         * stack.c (backtrace_command_1): Update.
11022         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
11023         of "flags".
11024         * python/py-framefilter.c (py_print_frame)
11025         (gdbpy_apply_frame_filter): Change type of "flags".
11026         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
11027         of "flags".
11028         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
11029         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
11030         * extension.h (enum frame_filter_flag): Rename from
11031         frame_filter_flags.
11032         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
11033         (apply_ext_lang_frame_filter): Change type of "flags".
11034         * extension.c (apply_ext_lang_frame_filter): Change type of
11035         "flags".
11036         * extension-priv.h (struct extension_language_ops)
11037         <apply_frame_filter>: Change type of "flags".
11038
11039 2018-02-26  Tom Tromey  <tom@tromey.com>
11040
11041         PR python/16497:
11042         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
11043         off-by-one in py_end computation.
11044         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
11045         PRINT_MORE_FRAMES.
11046         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
11047         constant.
11048
11049 2018-02-26  Tom Tromey  <tom@tromey.com>
11050
11051         * dwarf2read.c (struct variant_field): New.
11052         (struct nextfield) <variant>: New field.
11053         (dwarf2_add_field): Handle DW_TAG_variant_part.
11054         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
11055         discriminated union.
11056         (read_structure_type): Handle DW_TAG_variant_part.
11057         (handle_struct_member_die): New function, extracted from
11058         process_structure_scope.  Handle DW_TAG_variant.
11059         (process_structure_scope): Handle discriminated unions.  Call
11060         handle_struct_member_die.
11061
11062 2018-02-26  Tom Tromey  <tom@tromey.com>
11063
11064         * rust-lang.h (rust_last_path_segment): Declare.
11065         * rust-lang.c (rust_last_path_segment): Now public.  Change
11066         contract.
11067         (struct disr_info): Remove.
11068         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
11069         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
11070         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
11071         (rust_enum_p, rust_enum_variant): New function.
11072         (rust_underscore_fields): Remove "offset" parameter.
11073         (rust_print_enum): New function.
11074         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
11075         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
11076         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
11077         enums.
11078         (rust_internal_print_type): New function, from rust_print_type.
11079         Remove enum code.
11080         (rust_print_type): Call rust_internal_print_type.
11081         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
11082         Update enum handling.
11083         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
11084         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
11085         (rust_union_quirks): New functions.
11086         (process_full_comp_unit, process_full_type_unit): Call
11087         rust_union_quirks.
11088         (process_structure_scope): Update rust_unions if necessary.
11089
11090 2018-02-26  Tom Tromey  <tom@tromey.com>
11091
11092         * value.h (value_union_variant): Declare.
11093         * valops.c (value_union_variant): New function.
11094         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
11095         (struct discriminant_info): New.
11096         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
11097         enumerator.
11098         (struct main_type) <flag_discriminated_union>: New field.
11099
11100 2018-02-26  Tom Tromey  <tom@tromey.com>
11101
11102         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11103         unittests/unpack-selftests.c.
11104         * unittests/unpack-selftests.c: New file.
11105         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
11106
11107 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11108
11109         * dwarf2read.c (struct partial_die_info) <read>: New method.
11110         (read_partial_die): Remove the declaration.
11111         (load_partial_dies): Update.
11112         (partial_die_info::partial_die_info):
11113         (read_partial_die): Change it to partial_die_info::read.
11114
11115 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11116
11117         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
11118         (fixup_partial_die): Remove declaration.
11119         (scan_partial_symbols): Update.
11120         (partial_die_parent_scope): Likewise.
11121         (partial_die_full_name): Likewise.
11122         (fixup_partial_die): Change it to partial_die_info::fixup.
11123
11124 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11125
11126         * dwarf2read.c (read_partial_die): Update the declaration.
11127         (load_partial_dies): Caller update.
11128         (read_partial_die): Remove one argument abbrev_len.
11129
11130 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11131
11132         * dwarf2read.c (struct partial_die_info): Add ctor, delete
11133         assignment operator.
11134         (load_partial_dies): Use ctor and copy ctor.
11135         (read_partial_die): Update.
11136         (dwarf2_cu::find_partial_die): Use ctor.
11137
11138 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11139
11140         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
11141         (find_partial_die_in_comp_unit): Change it to
11142         dwarf2_cu::find_partial_die.
11143         (find_partial_die): Update.
11144
11145 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11146
11147         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
11148         is NULL.
11149
11150 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11151
11152         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
11153
11154 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
11155
11156         * arch/amd64.h: Use common/tdesc.h.
11157         * arch/i386.c: Likewise.
11158         * arch/i386.h: Likewise.
11159         * arch/tic6x.c: Likewise.
11160         * arch/tdesc.h: Move file from here...
11161         * common/tdesc.h: ...to here.
11162         * features/aarch64-core.c: Regenerate.
11163         * features/aarch64-fpu.c: Regenerate.
11164         * features/i386/32bit-avx.c: Regenerate.
11165         * features/i386/32bit-avx512.c: Regenerate.
11166         * features/i386/32bit-core.c: Regenerate.
11167         * features/i386/32bit-linux.c: Regenerate.
11168         * features/i386/32bit-mpx.c: Regenerate.
11169         * features/i386/32bit-pkeys.c: Regenerate.
11170         * features/i386/32bit-sse.c: Regenerate.
11171         * features/i386/64bit-avx.c: Regenerate.
11172         * features/i386/64bit-avx512.c: Regenerate.
11173         * features/i386/64bit-core.c: Regenerate.
11174         * features/i386/64bit-linux.c: Regenerate.
11175         * features/i386/64bit-mpx.c: Regenerate.
11176         * features/i386/64bit-pkeys.c: Regenerate.
11177         * features/i386/64bit-segments.c: Regenerate.
11178         * features/i386/64bit-sse.c: Regenerate.
11179         * features/i386/x32-core.c: Regenerate.
11180         * features/tic6x-c6xp.c: Regenerate.
11181         * features/tic6x-core.c: Regenerate.
11182         * features/tic6x-gp.c: Regenerate.
11183         * target-descriptions.c: Use common/tdesc.h.
11184         * target-descriptions.h: Likewise.
11185
11186 2018-02-24  Tom Tromey  <tom@tromey.com>
11187
11188         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
11189         (try_thread_db_load_from_dir, thread_db_load_search): Use
11190         std::string.
11191         (info_auto_load_libthread_db_compare): Return bool.  Change
11192         argument types.
11193         (info_auto_load_libthread_db): Use std::vector, std::string.
11194         Remove cleanups.
11195
11196 2018-02-24  Tom Tromey  <tom@tromey.com>
11197
11198         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
11199         std::string.
11200         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
11201         std::string*.
11202         * gdbarch.c: Rebuild.
11203         * gdbarch.h: Rebuild.
11204         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
11205         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
11206         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
11207         std::string*.
11208
11209 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
11210
11211         * gdbtypes.h (sect_offset): Change type to uint64_t.
11212         (sect_offset_str): New function.
11213         * dwarf2read.c (create_addrmap_from_aranges): Use
11214         sect_offset_str.
11215         (error_check_comp_unit_head): Likewise.
11216         (create_debug_type_hash_table): Likewise.
11217         (read_cutu_die_from_dwo): Likewise.
11218         (init_cutu_and_read_dies): Likewise.
11219         (init_cutu_and_read_dies_no_follow): Likewise.
11220         (process_psymtab_comp_unit_reader): Likewise.
11221         (partial_die_parent_scope): Likewise.
11222         (peek_die_abbrev): Likewise.
11223         (process_queue): Likewise.
11224         (dwarf2_physname): Likewise.
11225         (read_namespace_alias): Likewise.
11226         (read_import_statement): Likewise.
11227         (create_dwo_cu_reader): Likewise.
11228         (create_cus_hash_table): Likewise.
11229         (lookup_dwo_cutu): Likewise.
11230         (inherit_abstract_dies): Likewise.
11231         (read_func_scope): Likewise.
11232         (read_call_site_scope): Likewise.
11233         (dwarf2_add_member_fn): Likewise.
11234         (read_common_block): Likewise.
11235         (read_module_type): Likewise.
11236         (read_typedef): Likewise.
11237         (read_subrange_type): Likewise.
11238         (load_partial_dies): Likewise.
11239         (read_partial_die): Likewise.
11240         (find_partial_die): Likewise.
11241         (read_str_index): Likewise.
11242         (dwarf2_string_attr): Likewise.
11243         (build_error_marker_type): Likewise.
11244         (lookup_die_type): Likewise.
11245         (dump_die_shallow): Likewise.
11246         (follow_die_ref): Likewise.
11247         (dwarf2_fetch_die_loc_sect_off): Likewise.
11248         (dwarf2_fetch_constant_bytes): Likewise.
11249         (follow_die_sig): Likewise.
11250         (get_signatured_type): Likewise.
11251         (get_DW_AT_signature_type): Likewise.
11252         (dwarf2_find_containing_comp_unit): Likewise.
11253         (set_die_type): Likewise.
11254
11255 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
11256
11257         * arch/aarch64.c: Include "common-defs.h".
11258         * arch/amd64.c: Likewise.
11259         * arch/i386.c: Likewise.
11260
11261 2018-02-21  Tom Tromey  <tom@tromey.com>
11262
11263         * value.h: (extract_field_op): Update.
11264         * eval.c (extract_field_op): Return a const char *.
11265         * expression.h (parse_expression_for_completion): Update.
11266         * completer.c (complete_expression): Update.
11267         (add_struct_fields): Make fieldname const.
11268         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
11269         (mark_completion_tag, parse_exp_in_context_1): Update.
11270         (parse_expression_for_completion): Change "name" to
11271         unique_xmalloc_ptr*.
11272
11273 2018-02-21  Tom Tromey  <tom@tromey.com>
11274
11275         * infcall.c (call_function_by_hand_dummy): Use std::vector.
11276
11277 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11278
11279         * avr-tdep.c (avr_read_pc): Change parameter type to
11280         readable_regcache.
11281         * gdbarch.sh (read_pc): Likewise.
11282         * gdbarch.c: Re-generated.
11283         * gdbarch.h: Re-generated.
11284         * hppa-tdep.c (hppa_read_pc): Change parameter type to
11285         readable_regcache.
11286         * ia64-tdep.c (ia64_read_pc): Likewise.
11287         * mips-tdep.c (mips_read_pc): Likewise.
11288         * spu-tdep.c (spu_read_pc): Likewise.
11289
11290 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11291
11292         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
11293         * regcache-dump.c: New file.
11294         * regcache.c: Move register_dump to regcache-dump.c.
11295         (maintenance_print_registers): Likewise.
11296         (maintenance_print_raw_registers): Likewise.
11297         (maintenance_print_cooked_registers): Likewise.
11298         (maintenance_print_register_groups): Likewise.
11299         (maintenance_print_remote_registers): Likewise.
11300         (_initialize_regcache): Likewise.
11301         * regcache.h (register_dump): Moved from regcache.c.
11302
11303 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11304
11305         * regcache.c (regcache::regcache): Update.
11306         (regcache::invalidate): Move it to detached_regcache::invalidate.
11307         (get_thread_arch_aspace_regcache): Update.
11308         (regcache::raw_update): Update.
11309         (regcache::cooked_read): Remove some code.
11310         (regcache::cooked_read_value): Likewise.
11311         (regcache::raw_write): Remove assert on m_readonly_p.
11312         (regcache::raw_supply_integer): Move it to
11313         detached_regcache::raw_supply_integer.
11314         (regcache::raw_supply_zeroed): Likewise.
11315         * regcache.h (detached_regcache) <raw_supply_integer>: New
11316         declaration.
11317         <raw_supply_zeroed, invalidate>: Likewise.
11318         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
11319         <invalidate>: Likewise.
11320         <m_readonly_p>: Removed.
11321
11322 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11323
11324         * infcmd.c (get_return_value): Let stop_regs point to
11325         get_current_regcache.
11326         * regcache.c (regcache::regcache): Remove.
11327         (register_dump_reg_buffer): New class.
11328         (regcache_print): Adjust.
11329         * regcache.h (regcache): Remove constructors.
11330
11331 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11332
11333         * regcache.c (class register_dump): New class.
11334         (register_dump_regcache, register_dump_none): New class.
11335         (register_dump_remote, register_dump_groups): New class.
11336         (regcache_print): Update.
11337         * regcache.h (regcache_dump_what): Move it to regcache.c.
11338         (regcache) <dump>: Remove.
11339
11340 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11341
11342         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
11343          reg_buffer_rw *.
11344         (jit_unwind_reg_set_impl): Call raw_supply.
11345         (jit_frame_sniffer): Use reg_buffer_rw.
11346         * record-full.c (record_full_core_regbuf): Change its type.
11347         (record_full_core_open_1): Use reg_buffer_rw.
11348         (record_full_close): Likewise.
11349         (record_full_core_fetch_registers): Use regcache->raw_supply.
11350         (record_full_core_store_registers): Likewise.
11351         * regcache.c (regcache::get_register_status): Move it to
11352         reg_buffer.
11353         (regcache_raw_set_cached_value): Remove.
11354         (regcache::raw_set_cached_value): Remove.
11355         (regcache::raw_write): Call raw_supply.
11356         (regcache::raw_supply): Move it to reg_buffer_rw.
11357         * regcache.h (regcache_raw_set_cached_value): Remove.
11358         (reg_buffer_rw): New class.
11359
11360 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11361
11362         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
11363         readonly_detached_regcache.
11364         (dummy_frame_prev_register): Use regcache->cooked_read.
11365         * frame.c (frame_save_as_regcache): Change return type.
11366         (frame_pop): Update.
11367         * frame.h (frame_save_as_regcache): Update declaration.
11368         * inferior.h (get_infcall_suspend_state_regcache): Update
11369         declaration.
11370         * infrun.c (infcall_suspend_state) <registers>: use
11371         readonly_detached_regcache.
11372         (save_infcall_suspend_state): Don't use regcache_dup.
11373         (get_infcall_suspend_state_regcache): Change return type.
11374         * linux-fork.c (struct fork_info) <savedregs>: Change to
11375         readonly_detached_regcache.
11376         <pc>: New field.
11377         (fork_save_infrun_state): Don't use regcache_dup.
11378         (info_checkpoints_command): Adjust.
11379         * mi/mi-main.c (register_changed_p): Update declaration.
11380         (mi_cmd_data_list_changed_registers): Use
11381         readonly_detached_regcache.
11382         (register_changed_p): Change parameter type to
11383         readonly_detached_regcache.
11384         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
11385         readonly_detached_regcache.
11386         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
11387         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
11388         New.
11389         (regcache::save): Move it to reg_buffer.
11390         (regcache::restore): Change parameter type.
11391         (regcache_dup): Remove.
11392         * regcache.h (reg_buffer) <save>: New method.
11393         (readonly_detached_regcache): New class.
11394         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
11395         readonly_detached_regcache.
11396         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
11397
11398 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11399
11400         * frame.c (frame_save_as_regcache): Use regcache method save.
11401         (frame_pop): Use regcache method restore.
11402         * infrun.c (restore_infcall_suspend_state): Likewise.
11403         * linux-fork.c (fork_load_infrun_state): Likewise.
11404         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
11405         save.
11406         * regcache.c (regcache_save): Remove.
11407         (regcache::restore): More asserts.
11408         (regcache_cpy): Remove.
11409         * regcache.h (regcache_save): Remove the declaration.
11410         (regcache::restore): Move from private to public.
11411         Remove the friend declaration of regcache_cpy.
11412         (regcache_cpy): Remove declaration.
11413
11414 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11415
11416         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
11417         parameter type to 'readable_regcache *'.
11418         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
11419         * arm-tdep.c (arm_neon_quad_read): Likewise.
11420         (arm_pseudo_read): Likewise.
11421         * avr-tdep.c (avr_pseudo_register_read): Likewise.
11422         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
11423         * frv-tdep.c (frv_pseudo_register_read): Likewise.
11424         * gdbarch.c: Re-generated.
11425         * gdbarch.h: Re-generated.
11426         * gdbarch.sh (pseudo_register_read): Change parameter type to
11427         'readable_regcache *'.
11428         (pseudo_register_read_value): Likewise.
11429         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
11430         (h8300_pseudo_register_read): Likewise.
11431         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
11432         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
11433         (i386_pseudo_register_read_into_value): Likewise.
11434         (i386_pseudo_register_read_value): Likewise.
11435         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
11436         declaration.
11437         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
11438         * m32c-tdep.c (m32c_raw_read): Likewise.
11439         (m32c_read_flg): Likewise.
11440         (m32c_banked_register): Likewise.
11441         (m32c_banked_read): Likewise.
11442         (m32c_sb_read): Likewise.
11443         (m32c_part_read): Likewise.
11444         (m32c_cat_read): Likewise.
11445         (m32c_r3r2r1r0_read): Likewise.
11446         (m32c_pseudo_register_read): Likewise.
11447         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
11448         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
11449         (mep_pseudo_cr64_read): Likewise.
11450         (mep_pseudo_register_read): Likewise.
11451         * mips-tdep.c (mips_pseudo_register_read): Likewise.
11452         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
11453         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
11454         * regcache.c (regcache::raw_read): Move it to readable_regcache.
11455         (regcache::cooked_read): Likewise.
11456         (regcache::cooked_read_value): Likewise.
11457         (regcache_cooked_read_signed):
11458         (regcache::cooked_read): Likewise.
11459         * regcache.h (readable_regcache): New class.
11460         (regcache): Inherit readable_regcache.  Move some methods to
11461         readable_regcache.
11462         * rl78-tdep.c (rl78_pseudo_register_read): Change
11463         parameter type to 'readable_regcache *'.
11464         * rs6000-tdep.c (do_regcache_raw_read): Remove.
11465         (e500_pseudo_register_read): Change parameter type to
11466         'readable_regcache *'.
11467         (dfp_pseudo_register_read): Likewise.
11468         (vsx_pseudo_register_read): Likewise.
11469         (efpr_pseudo_register_read): Likewise.
11470         * s390-tdep.c (s390_pseudo_register_read): Likewise.
11471         * sh-tdep.c (sh_pseudo_register_read): Likewise.
11472         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
11473         (sh64_pseudo_register_read): Likewise.
11474         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
11475         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
11476         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
11477         (spu_pseudo_register_read): Likewise.
11478         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
11479         (xtensa_pseudo_register_read): Likewise.
11480
11481 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11482
11483         * regcache.c (regcache::regcache): Call reg_buffer ctor.
11484         (regcache::arch): Move it to reg_buffer::arch.
11485         (regcache::register_buffer): Likewise.
11486         (regcache::assert_regnum): Likewise.
11487         (regcache::num_raw_registers): Likewise.
11488         * regcache.h (reg_buffer): New class.
11489         (regcache): Inherit reg_buffer.
11490
11491 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
11492
11493         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
11494         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
11495
11496 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
11497
11498         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
11499
11500 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
11501
11502         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
11503         (SFILES): Remove common/*.c files.
11504         (COMMON_OBS): Remove some *.o files built from common/*.c files.
11505         * common/common.host: Add common reference.
11506         * configure.ac: Likewise.
11507         * configure: Regenerate.
11508
11509 2018-02-16  Yao Qi  <yao.qi@linaro.org>
11510
11511         * block.c (block_namespace_info): Inherit allocate_on_obstack.
11512         (block_initialize_namespace): Use new.
11513         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
11514         (dwarf2_free_objfile): Use delete.
11515         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
11516         (copy_type_recursive): Use new.
11517         * gdb_obstack.h (allocate_on_obstack): New.
11518
11519 2018-02-15  Yao Qi  <yao.qi@linaro.org>
11520
11521         PR gdb/22849
11522         * inferior.c (exit_inferior_1): Reset inf->control.
11523
11524 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
11525
11526         * ada-lang.c (ada_to_fixed_value_create): Delete advance
11527         declaration.
11528
11529 2018-02-14  Pedro Alves  <palves@redhat.com>
11530
11531         * frame-unwind.c (frame_unwind_try_unwinder): Always call
11532         frame_cleanup_after_sniffer on exception.
11533
11534 2018-02-14  Tom Tromey  <tom@tromey.com>
11535
11536         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
11537         const.
11538         (solib_bfd_open): Make pathname const.
11539         * solib.c (solib_bfd_open): Make pathname const.
11540         * solib-spu.c (spu_bfd_fopen): Make name const.
11541         (spu_bfd_open): Make pathname const.
11542         * solib-darwin.c (darwin_bfd_open): Make pathname const.
11543         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
11544
11545 2018-02-14  Tom Tromey  <tom@tromey.com>
11546
11547         * symfile.c (symfile_bfd_open): Update.
11548         * source.h (openp, source_full_path_of, find_and_open_source):
11549         Change argument type to unique_xmalloc_ptr.
11550         * source.c (openp): Take a unique_xmalloc_ptr.
11551         (source_full_path_of, find_and_open_source): Likewise.
11552         (open_source_file, symtab_to_fullname): Update.
11553         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
11554         unique_xmalloc_ptr.
11555         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
11556         (exec_file_find): Update.
11557         * psymtab.c (psymtab_to_fullname): Update.
11558         * nto-tdep.h (nto_find_and_open_solib): Update.
11559         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
11560         unique_xmalloc_ptr.
11561         * exec.c (exec_file_attach): Update.
11562         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
11563         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
11564
11565 2018-02-14  Tom Tromey  <tom@tromey.com>
11566
11567         * solib.c: Include source.h.
11568         * nto-tdep.c: Include source.h.
11569         * mi/mi-cmd-env.c: Include source.h.
11570         * infcmd.c: Include source.h.
11571         * exec.c: Include source.h.
11572         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
11573         (add_path, directory_switch, source_path, init_source_path): Move
11574         declarations...
11575         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
11576         (add_path, directory_switch, source_path, init_source_path):
11577         ...here.
11578
11579 2018-02-14  Tom Tromey  <tom@tromey.com>
11580
11581         * solist.h (exec_file_find, solib_find): Return
11582         unique_xmalloc_ptr.
11583         (solib_bfd_fopen): Take a const char *.
11584         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
11585         (exec_file_find, solib_find): Likewise.
11586         (solib_bfd_fopen): Do not take ownership of "pathname".
11587         (solib_bfd_open): Use unique_xmalloc_ptr.
11588         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
11589         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
11590         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
11591         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
11592
11593 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
11594
11595         * ada-lang.c (name_match_type_from_name): Remove reference to
11596         ada_name_for_lookup in function's documentation.
11597         * ada-lang.h (ada_name_for_lookup): Delete declaration.
11598
11599 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
11600
11601         * defs.h (enum openp_flags): New enum.
11602         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
11603         Move to enum openp_flags.
11604         (openp_flags): New enum flags.
11605         (openp): Change parameter type to openp_flags.
11606         * source.c (openp): Change parameter type to openp_flags.
11607         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
11608         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
11609
11610 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
11611
11612         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
11613         per-command.
11614
11615 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
11616
11617         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
11618         into...
11619         (class dwarf2_queue_guard): ...the destructor of this new class.
11620         (dw2_do_instantiate_symtab): Create instance of the new class
11621         dwarf2_queue_guard, remove cleanup.
11622
11623 2018-02-09  Tom Tromey  <tom@tromey.com>
11624
11625         * source.c (find_source_lines): Don't reference past the end of
11626         the vector.
11627
11628 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11629
11630         * remote.c (remote_btrace_maybe_reopen): Change error message.
11631         * btrace.c (btrace_enable): Likewise.
11632         (parse_xml_btrace): Likewise.
11633         (parse_xml_btrace_conf): Likewise.
11634
11635 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11636
11637         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
11638         (linux_enable_pt, linux_enable_bts): Call
11639         diagnose_perf_event_open_fail.
11640
11641 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11642
11643         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
11644         Remove parameter and change return type.  Update callers.  Move it.
11645         (linux_enable_bts, linux_enable_pt): Improve error message.
11646         (linux_enable_pt): Remove zero buffer size check.
11647         (linux_enable_btrace): Improve error messages.  Remove NULL return
11648         check.
11649
11650 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11651
11652         * btrace.c (btrace_enable): Remove target_supports_btrace call.
11653         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
11654         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
11655         (linux_supports_pt, linux_supports_btrace): Remove.
11656         (linux_enable_bts): Call cpu_supports_bts.
11657         * nat/linux-btrace.h (linux_supports_btrace): Remove.
11658         * remote.c (remote_supports_btrace): Remove.
11659         (init_remote_ops): Remove remote_supports_btrace.
11660         * target-delegates.c: Regenerated.
11661         * target.c (target_supports_btrace): Remove.
11662         * target.h (target_ops) <to_supports_btrace>: Remove
11663         (target_supports_btrace): Remove.
11664         * x86-linux-nat.c (x86_linux_create_target): Remove
11665         linux_supports_btrace.
11666
11667 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11668
11669         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
11670         btrace failed.
11671         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
11672         exception and use message in own exception.
11673
11674 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11675
11676         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
11677         (perf_event_pt_event_type): Use gdb_file_up.
11678         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
11679         scoped_fd, and scoped_mmap.
11680
11681 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11682
11683         * common/scoped_mmap.h: New.
11684         * unittests/scoped_mmap-selftest.c: New.
11685         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11686         unittests/scoped_mmap-selftest.c.
11687
11688 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11689
11690         * common/scoped_fd.h: New.
11691         * unittests/scoped_fd-selftest.c: New.
11692         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11693         unittests/scoped_fd-selftest.c.
11694
11695 2018-02-09  Tom Tromey  <tom@tromey.com>
11696
11697         * auto-load.c (auto_load_section_scripts): Use
11698         gdb::unique_xmalloc_ptr.
11699
11700 2018-02-09  Tom Tromey  <tom@tromey.com>
11701
11702         * auto-load.c (execute_script_contents): Use std::string.
11703
11704 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
11705
11706         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
11707         Python function, rather than a new command.
11708
11709 2018-02-08  Tom Tromey  <tom@tromey.com>
11710
11711         * solib.c (solib_find_1): Use std::string.
11712         (solib_bfd_fopen): Use unique_xmalloc_ptr.
11713
11714 2018-02-08  Tom Tromey  <tom@tromey.com>
11715
11716         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
11717
11718 2018-02-08  Tom Tromey  <tom@tromey.com>
11719
11720         * source.c (find_source_lines): Use gdb::def_vector.
11721
11722 2018-02-08  Tom Tromey  <tom@tromey.com>
11723
11724         * macrocmd.c (struct temporary_macro_definition): New.
11725         (macro_define_command): Use temporary_macro_definition.  Remove
11726         cleanups.
11727         (free_macro_definition_ptr): Remove.
11728
11729 2018-02-08  Tom Tromey  <tom@tromey.com>
11730
11731         * macroexp.c (maybe_expand): Use std::string.
11732
11733 2018-02-08  Tom Tromey  <tom@tromey.com>
11734
11735         * macroexp.c (struct macro_buffer): Add initializers for some
11736         members.
11737         (init_buffer, init_shared_buffer, free_buffer)
11738         (free_buffer_return_text): Remove.
11739         (macro_buffer): New constructors.
11740         (~macro_buffer): New destructor.
11741         (macro_buffer::set_shared): New method.
11742         (macro_buffer::resize_buffer, macro_buffer::appendc)
11743         (macro_buffer::appendmem): Now methods, not free functions.
11744         (set_token, append_tokens_without_splicing, stringify)
11745         (macro_stringify): Update.
11746         (gather_arguments): Change return type.  Remove argc_p argument,
11747         add args_ptr argument.  Use std::vector.
11748         (substitute_args): Remove argc argument.  Accept std::vector.
11749         (expand): Update.  Use std::vector.
11750         (scan, macro_expand, macro_expand_next): Update.
11751
11752 2018-02-08  Tom Tromey  <tom@tromey.com>
11753
11754         * symtab.c (default_collect_symbol_completion_matches_break_on):
11755         Use unique_xmalloc_ptr.
11756         * macroscope.h: (sal_macro_scope, user_macro_scope)
11757         (default_macro_scope): Return unique_xmalloc_ptr.
11758         * macroscope.c (sal_macro_scope, user_macro_scope)
11759         (default_macro_scope): Return unique_xmalloc_ptr.
11760         * macroexp.h (macro_expand, macro_expand_once): Return
11761         unique_xmalloc_ptr.
11762         * macroexp.c (macro_expand, macro_expand_once): Return
11763         unique_xmalloc_ptr.
11764         * macrocmd.c (macro_expand_command, macro_expand_once_command)
11765         (info_macro_command, info_macros_command): Use
11766         unique_xmalloc_ptr.
11767         * compile/compile-c-support.c (write_macro_definitions): Use
11768         unique_xmalloc_ptr.
11769         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
11770
11771 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
11772
11773         * value.c (value_static_field): Assign field type instead of
11774         containing type when returning an optimized out value.
11775
11776 2018-02-06  Yao Qi  <yao.qi@linaro.org>
11777
11778         * ft32-tdep.c (ft32_read_pc): Remove.
11779         (ft32_write_pc): Remove.
11780         (ft32_gdbarch_init): Update.
11781         * m32r-tdep.c (m32r_read_pc): Remove.
11782         (m32r_gdbarch_init): Update.
11783         * mep-tdep.c (mep_read_pc): Remove.
11784         (mep_gdbarch_init): Update.
11785         * microblaze-tdep.c (microblaze_write_pc): Remove.
11786         (microblaze_gdbarch_init): Update.
11787         * mn10300-tdep.c (mn10300_read_pc): Remove.
11788         (mn10300_write_pc): Remove.
11789         (mn10300_gdbarch_init): Update.
11790         * moxie-tdep.c (moxie_read_pc): Remove.
11791         (moxie_write_pc): Remove.
11792         (moxie_gdbarch_init): Update.
11793
11794 2018-02-06  Yao Qi  <yao.qi@linaro.org>
11795
11796         * expprint.c (print_subexp_standard): Handle
11797         OP_F77_UNDETERMINED_ARGLIST.
11798         (dump_subexp_body_standard): Likewise.
11799
11800 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
11801
11802         * target-descriptions.c (tdesc_element_visitor) Add empty
11803         implementations.
11804         (tdesc_type): Move make_gdb_type from here.
11805         (tdesc_type_builtin): Likewise.
11806         (tdesc_type_vector): Likewise.
11807         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
11808         (make_gdb_type_struct): Move from tdesc_type_with_fields.
11809         (make_gdb_type_union): Likewise.
11810         (make_gdb_type_flags): Likewise.
11811         (make_gdb_type_enum): Likewise.
11812         (make_gdb_type): New function.
11813         (tdesc_register_type): Use static make_gdb_type.
11814
11815 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
11816
11817         * infcmd.c (default_print_one_register_info): Align natural-format
11818         column values consistently one under another.
11819         (pad_to_column): New function.
11820
11821 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
11822
11823         * dwarf2read.c (dwarf2_physname): Move commment.
11824
11825 2018-02-01  Leszek Swirski  <leszeks@google.com>
11826
11827         * varobj.c (varobj_formatted_print_options): Allow recursive
11828         pretty printing if pretty printing is enabled.
11829
11830 2018-02-01  Leszek Swirski  <leszeks@google.com>
11831
11832         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
11833         names after a structop as a filename.
11834
11835 2018-02-01  Yao Qi  <yao.qi@linaro.org>
11836
11837         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
11838         (arm_record_coproc_data_proc): Likewise.
11839
11840 2018-02-01  Yao Qi  <yao.qi@linaro.org>
11841
11842         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
11843
11844 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
11845
11846         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
11847         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
11848
11849 2018-01-31  Pedro Alves  <palves@redhat.com>
11850
11851         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
11852         * inflow.c (child_terminal_save_inferior): Wrap reference to
11853         tcgetpgrp in HAVE_TERMIOS_H.
11854         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
11855         _WIN32.
11856         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
11857         always iterate over all inferiors.
11858         (gdbsim_cntrl_c): Adjust.
11859         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
11860
11861 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
11862
11863         * gdbtypes.c (lookup_array_range_type): Make sure the array's
11864         index type is objfile-owned if the element type is as well.
11865
11866 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
11867
11868         GDB 8.1 released.
11869
11870 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11871
11872         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
11873         "features/s390x-linux64.c".
11874         (_initialize_s390_linux_tdep): Remove initialization of tdescs
11875         s390_linux32 and s390x_linux64.
11876         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
11877         default tdesc.
11878         * s390-tdep.c: Include "features/s390-linux32.c" and
11879         "features/s390x-linux64.c".
11880         (s390_tdesc_valid): Add check for tdesc_has_registers.
11881         (s390_gdbarch_init): Make sure there is always a valid tdesc.
11882         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
11883         tdesc_s390x_linux64.
11884         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
11885         tdesc_s390x_linux64 to...
11886         * s390-tdep.h: ...here.
11887
11888 2018-01-30  Pedro Alves  <palves@redhat.com>
11889
11890         PR gdb/13211
11891         * config.in, configure: Regenerate.
11892         * configure.ac: Check for getpgid.
11893         * go32-nat.c (go32_pass_ctrlc): New.
11894         (go32_target): Install it.
11895         * inf-child.c (inf_child_target): Install
11896         child_terminal_save_inferior, child_pass_ctrlc and
11897         child_interrupt.
11898         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
11899         (inf_ptrace_target): No longer install it.
11900         * infcmd.c (interrupt_target_1): Adjust.
11901         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
11902         (child_interrupt): Declare.
11903         (inferior::terminal_state): New.
11904         * inflow.c (struct terminal_info): Update comments.
11905         (inferior_process_group): Delete.
11906         (terminal_is_ours): Delete.
11907         (gdb_tty_state): New.
11908         (child_terminal_init): Adjust.
11909         (is_gdb_terminal, sharing_input_terminal_1)
11910         (sharing_input_terminal): New functions.
11911         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
11912         Set the process's actual process group in the foreground if
11913         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
11914         mark terminal as the inferior's if not sharing GDB's terminal.
11915         Don't check attach_flag.
11916         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
11917         pass down a target_terminal_state.
11918         (child_terminal_save_inferior): New, factored out from ...
11919         (child_terminal_ours_1): ... this.  Handle
11920         target_terminal_state::is_ours_for_output.
11921         (child_interrupt, child_pass_ctrlc): New.
11922         (inflow_inferior_exit): Clear the inferior's terminal_state.
11923         (copy_terminal_info): Copy the inferior's terminal state.
11924         (_initialize_inflow): Remove reference to terminal_is_ours.
11925         * inflow.h (inferior_process_group): Delete.
11926         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
11927         * procfs.c (procfs_target): Don't install procfs_interrupt.
11928         (procfs_interrupt): Delete.
11929         * remote.c (remote_serial_quit_handler): Adjust.
11930         (remote_interrupt): Remove ptid parameter.  Adjust.
11931         * target-delegates.c: Regenerate.
11932         * target.c: Include "terminal.h".
11933         (target_terminal::terminal_state): Rename to ...
11934         (target_terminal::m_terminal_state): ... this.
11935         (target_terminal::init): Adjust.
11936         (target_terminal::inferior): Adjust to per-inferior
11937         terminal_state.
11938         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
11939         (target_terminal::ours, target_terminal::ours_for_output): Use
11940         target_terminal_is_ours_kind.
11941         (target_interrupt): Remove ptid parameter.  Adjust.
11942         (default_target_pass_ctrlc): Adjust.
11943         * target.h (target_ops::to_terminal_save_inferior): New field.
11944         (target_ops::to_interrupt): Remove ptid_t parameter.
11945         (target_interrupt): Remove ptid_t parameter.  Update comment.
11946         (target_pass_ctrlc): Update comment.
11947         * target/target.h (target_terminal_state): New scoped enum,
11948         factored out of ...
11949         (target_terminal::terminal_state): ... here.
11950         (target_terminal::inferior): Update comments.
11951         (target_terminal::restore_inferior): New.
11952         (target_terminal::is_inferior, target_terminal::is_ours)
11953         (target_terminal::is_ours_for_output): Adjust.
11954         (target_terminal::scoped_restore_terminal_state): Adjust to
11955         rename, and call restore_inferior() instead of inferior().
11956         (target_terminal::scoped_restore_terminal_state::m_state): Change
11957         type.
11958         (target_terminal::terminal_state): Rename to ...
11959         (target_terminal::m_terminal_state): ... this and change type.
11960
11961 2018-01-30  Pedro Alves  <palves@redhat.com>
11962
11963         * linux-nat.c (wait_for_signal): New function.
11964         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
11965         directly.
11966         (async_terminal_is_ours)
11967         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
11968         (linux_nat_add_target): Don't override
11969         to_terminal_inferior/to_terminal_ours.
11970
11971 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
11972
11973         * remote.c (remote_follow_fork): Don't call "detach_inferior".
11974
11975 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
11976
11977         * dwarf2read.c (free_dwo_files): Add forward-declaration.
11978         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
11979         dwarf2_per_objfile_free here.
11980         (dwarf2_per_objfile_free): Remove.
11981         (_initialize_dwarf2_read): Don't register
11982         dwarf2_per_objfile_free as a registry cleanup.
11983
11984 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
11985
11986         Avoid compilation errors in MinGW native builds
11987
11988         The error is triggered by including python-internal.h, and the
11989         error message is:
11990
11991              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
11992                       from build-gnulib/import/math.h:27,
11993                       from d:/usr/Python26/include/pyport.h:235,
11994                       from d:/usr/Python26/include/Python.h:58,
11995                       from python/python-internal.h:94,
11996                       from python/py-arch.c:24:
11997              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
11998         using ::hypot;
11999                 ^~~~~
12000
12001         This happens because Python headers define 'hypot' to expand t
12002         '_hypot' in the Windows builds.
12003         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
12004         'hypoth'.  This avoids a compilation error.
12005
12006 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
12007
12008         * MAINTAINERS (Write After Approval): Fix ordering.
12009
12010 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
12011
12012         * MAINTAINERS (Write After Approval): Add Alan Hayward.
12013
12014 2018-01-26  Alan Modra  <amodra@gmail.com>
12015
12016         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
12017         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
12018         Remove nop.  Make const.  Comment.
12019         (powerpc32_plt_stub_so_2): New.
12020         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
12021         Correct count.  Update uses.
12022         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
12023         Move common code reading PLT entry word.  Correct
12024         powerpc32_plt_stub PLT address calculation.
12025         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
12026         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
12027         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
12028         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
12029         (ppc64_standard_linkage8): Likewise.
12030         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
12031         Correct insns description.
12032         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
12033
12034 2018-01-24  Pedro Alves  <palves@redhat.com>
12035
12036         GCC PR libstdc++/83906
12037         * gdbtypes.c (operator==(const dynamic_prop &,
12038         const dynamic_prop &)): New.
12039         (operator==(const range_bounds &, const range_bounds &)): New.
12040         (check_types_equal): Use them instead of memcmp.
12041         * gdbtypes.h (operator==(const dynamic_prop &,
12042         const dynamic_prop &)): Declare.
12043         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
12044         (operator==(const range_bounds &, const range_bounds &)): Declare.
12045         (operator!=(const range_bounds &, const range_bounds &)): Declare.
12046
12047 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12048
12049         * s390-linux-tdep.c (s390_record_address_mask)
12050         (s390_record_calc_disp_common, s390_record_calc_disp)
12051         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12052         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12053         (s390_process_record): Move to s390-tdep.c.
12054         (s390_linux_init_abi_any): Adjust.
12055         * s390-tdep.c (s390_record_address_mask)
12056         (s390_record_calc_disp_common, s390_record_calc_disp)
12057         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12058         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12059         (s390_process_record): Moved from s390-linux-tdep.c
12060         (s390_gdbarch_init): Adjust.
12061
12062 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12063
12064         * s390-linux-nat.c (s390-tdep.h): New include.
12065         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
12066         (HFILES_NO_SRCDIR): Add s390-tdep.h.
12067         (ALLDEPFILES): Add s390-tdep.c.
12068         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
12069         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
12070         * s390-tdep.h: ...this.  New file.
12071         * s390-linux-tdep.c (s390-tdep.h): New include.
12072         (_initialize_s390_tdep): Rename to...
12073         (_initialize_s390_linux_tdep): ...this and adjust.
12074         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
12075         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
12076         s390-tdep.h.
12077         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
12078         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
12079         (s390_is_partial_instruction, s390_software_single_step)
12080         (is_non_branch_ril, s390_displaced_step_copy_insn)
12081         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
12082         (s390_prologue_data, s390_addr, s390_store, s390_load)
12083         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
12084         (s390_register_call_saved, s390_guess_tracepoint_registers)
12085         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
12086         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
12087         (s390_pseudo_register_name, s390_pseudo_register_type)
12088         (s390_pseudo_register_read, s390_pseudo_register_write)
12089         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
12090         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
12091         (s390_addr_bits_remove, s390_address_class_type_flags)
12092         (s390_address_class_type_flags_to_name)
12093         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
12094         (s390_function_arg_float, s390_function_arg_vector)
12095         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
12096         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
12097         (s390_frame_align, s390_register_return_value, s390_return_value)
12098         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
12099         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
12100         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
12101         (s390_trad_frame_prev_register, s390_unwind_cache)
12102         (s390_prologue_frame_unwind_cache)
12103         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
12104         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
12105         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
12106         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
12107         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
12108         (s390_frame_base_address, s390_local_base_address)
12109         (s390_frame_base, s390_gcc_target_options)
12110         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
12111         (s390_validate_reg_range, s390_tdesc_valid)
12112         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
12113         * s390-tdep.c: ...this.  New file.
12114
12115 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12116
12117         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
12118         (s390_process_record, s390_gdbarch_tdep_alloc)
12119         (s390_linux_init_abi_any): Use/set new hook.
12120
12121 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12122
12123         * s390-linux-tdep.c (osabi.h): New include.
12124         (s390_linux_init_abi_31, s390_linux_init_abi_64)
12125         (s390_linux_init_abi_any): New functions.
12126         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
12127
12128 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12129
12130         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
12131         tdesc_has_registers check
12132
12133 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12134
12135         * s390-linux-tdep.c (s390_tdesc_valid): New function.
12136         (s390_validate_reg_range): New macro.
12137         (s390_gdbarch_init): Adjust.
12138
12139 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12140
12141         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
12142         (s390_gdbarch_tdep_alloc): Adjust.
12143         (s390_gdbarch_init): Adjust.
12144
12145 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12146
12147         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
12148         <have_tdb>: Change type to bool.
12149         (s390_gdbarch_tdep_alloc): Adjust.
12150         (s390_gdbarch_init): Adjust.
12151
12152 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12153
12154         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
12155         (gdbarch_tdep) <have_upper, have_vx>: New fields.
12156         (s390_gdbarch_tdep_alloc): New function.
12157         (s390_gdbarch_init): Allocate tdep at start and use its fields
12158         instead of separate variables.
12159
12160 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12161
12162         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
12163         when looking for cached gdbarch and add comment for remaining.
12164
12165 2018-01-22  Pedro Alves  <palves@redhat.com>
12166             Sergio Durigan Junior  <sergiodj@redhat.com>
12167
12168         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
12169         case.
12170
12171 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
12172
12173         * MAINTAINERS: Update my company e-mail address.
12174
12175 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12176
12177         * regcache.c (cooked_write_test): New function.
12178         (_initialize_regcache): Register the test.
12179
12180 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12181
12182         * ia64-tdep.c (ia64_pseudo_register_read): Call
12183         regcache->cooked_read instead of regcache_cooked_read_unsigned.
12184         * m32c-tdep.c (m32c_cat_read): Likewise.
12185         (m32c_r3r2r1r0_read): Likewise.
12186         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
12187         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
12188
12189 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12190
12191         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
12192         method raw_read instead of regcache_raw_read.
12193         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
12194         * arm-tdep.c (arm_neon_quad_read): Likewise.
12195         * avr-tdep.c (avr_pseudo_register_read): Likewise.
12196         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
12197         * frv-tdep.c (frv_pseudo_register_read): Likewise.
12198         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
12199         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
12200         (i386_pseudo_register_read_into_value): Likewise.
12201         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
12202         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
12203         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
12204         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
12205         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
12206         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
12207         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
12208         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
12209         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
12210
12211 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12212
12213         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
12214         * configure.tgt: Remove target mt.
12215         * mt-tdep.c: Remove.
12216         * regcache.c (cooked_read_test): Remove the check for mt.
12217
12218 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12219
12220         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
12221         instead of gdbarch_pseudo_register_read_value.
12222
12223 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
12224
12225         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
12226         language is Ada.
12227
12228 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
12229
12230         * linespec.c (create_sals_line_offset): Remove code that preserved
12231         the symtab_and_line's line number.
12232
12233 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12234
12235         * varobj.c (varobj_create): Don't set valid_block when creating a
12236         floating varobj.
12237
12238 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12239
12240         * varobj.c (varobj_create): Remove out of date comment.
12241
12242 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12243
12244         PR mi/20395
12245         * ada-exp.y (write_var_from_sym): Pass extra parameter when
12246         updating innermost block.
12247         * parse.c (innermost_block_tracker::update): Take extra type
12248         parameter, and check types match before updating innermost block.
12249         (write_dollar_variable): Update innermost block for registers.
12250         * parser-defs.h (enum innermost_block_tracker_type): New enum.
12251         (innermost_block_tracker::innermost_block_tracker): Initialise
12252         m_types member.
12253         (innermost_block_tracker::reset): Take type parameter.
12254         (innermost_block_tracker::update): Take type parameter, and pass
12255         type through as needed.
12256         (innermost_block_tracker::m_types): New member.
12257         * varobj.c (varobj_create): Pass type when reseting innermost
12258         block.
12259
12260 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12261
12262         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
12263         * ada-lang.c (resolve_subexp): Likewise.
12264         * breakpoint.c (set_breakpoint_condition) Likewise.
12265         (watch_command_1) Likewise.
12266         * c-exp.y (variable): Likewise.
12267         * d-exp.y (PrimaryExpression): Likewise.
12268         * f-exp.y (variable): Likewise.
12269         * go-exp.y (variable): Likewise.
12270         * m2-exp.y (variable): Likewise.
12271         * objfiles.c (objfile::~objfile): Likewise.
12272         * p-exp.y (variable): Likewise.
12273         * parse.c (innermost_block): Change type.
12274         * parser-defs.h (class innermost_block_tracker): New.
12275         (innermost_block): Change to innermost_block_tracker.
12276         * printcmd.c (display_command): Switch to innermost_block API.
12277         (do_one_display): Likewise.
12278         * rust-exp.y (do_one_display): Likewise.
12279         * symfile.c (clear_symtab_users): Likewise.
12280         * varobj.c (varobj_create): Switch to innermost_block API, replace
12281         use of innermost_block with block stored on varobj object.
12282
12283 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12284
12285         * expression.h (innermost_block): Remove declaration.
12286         * varobj.c: Add 'parser-defs.h' include.
12287
12288 2018-01-19  Tom Tromey  <tom@tromey.com>
12289
12290         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
12291         symbols in the static and global blocks.
12292
12293 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
12294
12295         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
12296         gdb_ptrace.h, and move including gdb_wait.h ...
12297         * nat/linux-ptrace.h: ... to here.
12298
12299 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
12300
12301         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
12302         inf_ptrace_detach_success.
12303         (inf_ptrace_detach_success): Add inferior parameter, use it
12304         instead of inferior_ptid, pass it to detach_inferior.
12305         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
12306         parameter.
12307         * inferior.c (detach_inferior): Add overload that takes an
12308         inferior object.
12309         * inferior.h (detach_inferior): Likewise.
12310         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
12311         use inferior_ptid, adjust call to inf_ptrace_detach_success.
12312         * linux-thread-db.c (thread_db_detach): Use inf parameter.
12313
12314 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
12315
12316         * target.h (struct target_ops) <to_detach>: Add inferior
12317         parameter.
12318         (target_detach): Likewise.
12319         * target.c (dispose_inferior): Pass inferior down.
12320         (target_detach): Pass inferior down.  Assert that it is equal to
12321         the current inferior.
12322         * aix-thread.c (aix_thread_detach): Pass inferior down.
12323         * corefile.c (core_file_command): Pass current_inferior() down.
12324         * corelow.c (core_detach): Add inferior parameter.
12325         * darwin-nat.c (darwin_detach): Likewise.
12326         * gnu-nat.c (gnu_detach): Likewise.
12327         * inf-ptrace.c (inf_ptrace_detach): Likewise.
12328         * infcmd.c (detach_command): Pass current_inferior() down to
12329         target_detach.
12330         * infrun.c (follow_fork_inferior): Pass parent_inf to
12331         target_detach.
12332         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
12333         target_detach.
12334         * linux-nat.c (linux_nat_detach): Add inferior parameter.
12335         * linux-thread-db.c (thread_db_detach): Likewise.
12336         * nto-procfs.c (procfs_detach): Likewise.
12337         * procfs.c (procfs_detach): Likewise.
12338         * record.c (record_detach): Likewise.
12339         * record.h (struct inferior): Forward-declare.
12340         (record_detach): Add inferior parameter.
12341         * remote-sim.c (gdbsim_detach): Likewise.
12342         * remote.c (remote_detach_1): Likewise.
12343         (remote_detach): Likewise.
12344         (extended_remote_detach): Likewise.
12345         * sol-thread.c (sol_thread_detach): Likewise.
12346         * target-debug.h (target_debug_print_inferior_p): New macro.
12347         * target-delegates.c: Re-generate.
12348         * top.c (kill_or_detach): Pass inferior down to target_detach.
12349         * windows-nat.c (windows_detach): Add inferior parameter.
12350
12351 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
12352
12353         * target.h (struct target_ops) <to_detach>: Remove args
12354         parameter.
12355         (target_detach): Likewise.
12356         * target.c (dispose_inferior): Adjust.
12357         (target_detach): Remove args parameter, adjust.
12358         * aix-thread.c (aix_thread_detach): Adjust.
12359         * corefile.c (core_file_command): Adjust.
12360         * corelow.c (core_detach): Adjust.
12361         * darwin-nat.c (darwin_detach): Adjust.
12362         * gnu-nat.c (gnu_detach): Adjust.
12363         * inf-ptrace.c (inf_ptrace_detach): Adjust.
12364         * infcmd.c (detach_command): Adjust
12365         * infrun.c (follow_fork_inferior): Adjust.
12366         (handle_vfork_child_exec_or_exit): Adjust.
12367         * linux-fork.c (linux_fork_detach): Remove args parameter.
12368         * linux-fork.h (linux_fork_detach): Likewise.
12369         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
12370         * linux-thread-db.c (thread_db_detach): Likewise.
12371         * nto-procfs.c (procfs_detach): Likewise.
12372         * procfs.c (procfs_detach): Likewise.
12373         (do_detach): Remove signo parameter.
12374         * record.c (record_detach): Remove args parameter.
12375         * record.h (record_detach): Likewise.
12376         * remote-sim.c (gdbsim_detach): Likewise.
12377         * remote.c (remote_detach_1): Likewise.
12378         (remote_detach): Likewise.
12379         (extended_remote_detach): Likewise.
12380         * sol-thread.c (sol_thread_detach): Likewise.
12381         * target-delegates.c: Re-generate.
12382         * top.c (struct qt_args) <args>: Remove field.
12383         (kill_or_detach): Don't pass args.
12384         (quit_force): Don't set args.
12385         * windows-nat.c (windows_detach): Remove args parameter.
12386
12387 2018-01-19  Yao Qi  <yao.qi@linaro.org>
12388
12389         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
12390         (arm_linux_init_abi): Install it.
12391
12392 2018-01-19  Yao Qi  <yao.qi@linaro.org>
12393
12394         * osabi.c (gdb_osabi_names): Extend the regexp for
12395         arm-linux-gnueabihf.
12396
12397 2018-01-18  Yao Qi  <yao.qi@linaro.org>
12398
12399         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
12400         m_abbrevs.
12401         (abbrev_table::add_abbrev): Update.
12402         (abbrev_table::lookup_abbrev): Update.
12403
12404 2018-01-18  Yao Qi  <yao.qi@linaro.org>
12405
12406         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
12407
12408 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
12409
12410         * compile/compile.c (compile_to_object): Convert "triplet_rx"
12411         to "std::string".
12412
12413 2018-01-17  Tom Tromey  <tom@tromey.com>
12414
12415         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
12416
12417 2018-01-17  Tom Tromey  <tom@tromey.com>
12418
12419         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
12420         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
12421         (create_array_type_with_stride): Update.
12422         * dwarf2read.c (set_die_type): Update.
12423
12424 2018-01-17  Tom Tromey  <tom@tromey.com>
12425
12426         * dwarf2read.c (delayed_method_info): Remove typedef.
12427         (dwarf2_cu::method_info): Now a std::vector.
12428         (add_to_method_list): Update.
12429         (free_delayed_list): Remove.
12430         (compute_delayed_physnames): Update.
12431         (process_full_comp_unit, process_full_type_unit): Clear the method
12432         list.  Remove cleanups.
12433         (psymtab_include_file_name): Add name_holder parameter.  Use
12434         unique_xmalloc_ptr.
12435         (dwarf_decode_lines): Update.
12436
12437 2018-01-17  Tom Tromey  <tom@tromey.com>
12438             Simon Marchi  <simon.marchi@ericsson.com>
12439
12440         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
12441         (dwarf2_per_objfile::free_cached_comp_units)
12442         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
12443         (init_cutu_and_read_dies_no_follow): Update.
12444         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
12445         (dwarf2_cu::~dwarf2_cu): New.
12446         (free_heap_comp_unit, free_stack_comp_unit): Remove.
12447         (age_cached_comp_units, free_one_cached_comp_unit): Update.
12448
12449 2018-01-17  Tom Tromey  <tom@tromey.com>
12450             Simon Marchi  <simon.marchi@ericsson.com>
12451
12452         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
12453         (struct die_reader_specs) <abbrev_table>: New member.
12454         (struct abbrev_table): Add constructor.
12455         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
12456         <abbrev_obstack>: Now an auto_obstack.
12457         (abbrev_table_up): New typedef.
12458         (init_cu_die_reader): Add abbrev_table parameter.
12459         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
12460         Add result_dwo_abbrev_table.
12461         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
12462         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
12463         Update.
12464         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
12465         parameter.
12466         (skip_children): Update.
12467         (abbrev_table::alloc_abbrev): Rename from
12468         abbrev_table_alloc_abbrev.
12469         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
12470         (abbrev_table::lookup_abbrev): Rename from
12471         abbrev_table_lookup_abbrev.
12472         (abbrev_table_read_table): Return abbrev_table_up.
12473         (abbrev_table_free, abbrev_table_free_cleanup)
12474         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
12475         (load_partial_dies): Update.
12476
12477 2018-01-17  Tom Tromey  <tom@tromey.com>
12478
12479         * dwarf2read.c (dwarf2_compute_name): Update comment.
12480         (read_func_scope, read_variable): Update.
12481         (new_symbol): Remove.
12482         (new_symbol_full): Rename to new_symbol.
12483
12484 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
12485
12486         PR gdb/16577
12487         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
12488         a warning instead of throwing an error, set section size to 0 and return
12489         NULL.
12490         * gdb_bfd.h (gdb_bfd_map_section): Update description.
12491
12492 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
12493
12494         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
12495         std::string.
12496         (linux_ptrace_attach_fail_reason_string): Likewise.
12497         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
12498         Likewise.
12499         (linux_ptrace_attach_fail_reason_string): Likewise.
12500         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
12501
12502 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
12503
12504         * linux-nat.c (linux_nat_attach): Remove xstrdup.
12505
12506 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
12507
12508         PR gdb/21559
12509         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
12510         checking for fs_base/gs_base fields in struct user_regs_struct.
12511         * configure: Regenerate.
12512
12513 2018-01-17  Yao Qi  <yao.qi@linaro.org>
12514
12515         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
12516         function.
12517         (aarch64_linux_init_abi): Install it to gdbarch hook
12518         gcc_target_options.
12519
12520 2018-01-15  Pedro Alves  <palves@redhat.com>
12521
12522         * common/signals-state-save-restore.c
12523         (save_original_signals_state): Fix typos.
12524
12525 2017-01-12  Tom Tromey  <tom@tromey.com>
12526             Sergio Durigan Junior  <sergiodj@redhat.com>
12527
12528         * Makefile.in (install-only): Install gdb-add-index.
12529
12530 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
12531
12532         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
12533
12534 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12535
12536         * infrun.c (keep_going_pass_signal): Clear step-over info when
12537         insert_breakpoints fails.
12538
12539 2018-01-11  Pedro Alves  <palves@redhat.com>
12540
12541         PR gdb/22583
12542         * infrun.c (resume): Rename to ...
12543         (resume_1): ... this.
12544         (resume): Reimplement as wrapper around resume_1.
12545
12546 2018-01-11  Pedro Alves  <palves@redhat.com>
12547
12548         PR remote/22597
12549         * remote.c (remote_parse_stop_reply): Default to the last-set
12550         general thread instead of to 'magic_null_ptid'.
12551
12552 2018-01-10  Pedro Alves  <palves@redhat.com>
12553
12554         * language.h (language_get_symbol_name_matcher): Rename ...
12555         (get_symbol_name_matcher): ... this.
12556         * language.c (language_get_symbol_name_matcher): Ditto.
12557         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
12558         callers adjusted.
12559
12560 2018-01-10  Pedro Alves  <palves@redhat.com>
12561
12562         PR gdb/22670
12563         * dwarf2read.c
12564         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
12565         Adjust to use language_get_symbol_name_matcher instead of
12566         language_defn::la_get_symbol_name_matcher.
12567         * language.c (language_get_symbol_name_matcher): If in Ada mode
12568         and the lookup name is a verbatim match, return Ada's matcher.
12569         * language.h (language_get_symbol_name_matcher): Adjust comment.
12570         (ada_lookup_name_info::verbatim_p):: New method.
12571
12572 2018-01-10  Pedro Alves  <palves@redhat.com>
12573
12574         PR gdb/22670
12575         * ada-lang.c (ada_collect_symbol_completion_matches): If the
12576         minsym's language is language_auto or language_cplus, pass down
12577         language_ada instead.
12578         * symtab.c (compare_symbol_name): Don't frob symbol language here.
12579
12580 2018-01-10  Pedro Alves  <palves@redhat.com>
12581
12582         PR gdb/22670
12583         * minsyms.c (linkage_name_str): New function.
12584         (iterate_over_minimal_symbols): Use it.
12585
12586 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12587
12588         * NEWS: Document that 'info proc' now works on FreeBSD.
12589
12590 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12591
12592         * configure.ac: Check for kinfo_getfile in libutil.
12593         * configure: Regenerate.
12594         * config.in: Regenerate.
12595         * fbsd-nat.c: Include "fbsd-tdep.h".
12596         (fbsd_fetch_cmdline): New.
12597         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
12598         rather than calling error.
12599         (fbsd_info_proc): New.
12600         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
12601         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
12602         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
12603
12604 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12605
12606         * fbsd-nat.c (struct free_deleter): Remove.
12607         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
12608
12609 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12610
12611         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
12612         NULL for an empty pathname.
12613
12614 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12615
12616         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
12617         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
12618         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
12619         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
12620         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
12621         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
12622         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
12623         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
12624         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
12625         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
12626         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
12627         (fbsd_core_fetch_timeval, fbsd_print_sigset)
12628         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
12629         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
12630         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
12631
12632 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
12633
12634         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
12635         (gnu_xfer_auxv): New function.
12636         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
12637         TARGET_OBJECT_AUXV.
12638
12639 2018-01-08  Yao Qi  <yao.qi@linaro.org>
12640             Simon Marchi  <simon.marchi@ericsson.com>
12641
12642         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
12643         common/selftest.c.
12644         (COMMON_OBS): Remove selftest.o.
12645         * configure.ac: Append selftest-arch.c and common/selftest.c to
12646         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
12647         * configure: Re-generated.
12648         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
12649         GDB_SELF_TEST.
12650         (maintenance_info_selftests): Likewise.
12651
12652 2018-01-08  Xavier Roirand  <roirand@adacore.com>
12653
12654         * ada-valprint.c (val_print_packed_array_elements): Use
12655         proper number of elements when printing an array indexed
12656         by an enumeration type.
12657
12658 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12659
12660         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
12661         (dw2_get_file_names_reader): Adjust.
12662         (lookup_dwo_signatured_type): Adjust.
12663         (lookup_dwp_signatured_type): Adjust.
12664         (lookup_signatured_type): Adjust.
12665         (create_type_unit_group): Adjust.
12666         (get_type_unit_group): Adjust.
12667         (process_psymtab_comp_unit_reader): Adjust.
12668         (build_type_psymtabs_reader): Adjust.
12669         (scan_partial_symbols): Adjust.
12670         (add_partial_symbol): Adjust.
12671         (add_partial_subprogram): Adjust.
12672         (peek_die_abbrev): Adjust.
12673         (fixup_go_packaging): Adjust.
12674         (process_imported_unit_die): Adjust.
12675         (dwarf2_compute_name): Adjust.
12676         (dwarf2_physname): Adjust.
12677         (read_import_statement): Adjust.
12678         (handle_DW_AT_stmt_list): Adjust.
12679         (read_file_scope): Adjust.
12680         (read_func_scope): Adjust.
12681         (read_lexical_block_scope): Adjust.
12682         (read_call_site_scope): Adjust.
12683         (read_variable): Adjust.
12684         (dwarf2_rnglists_process): Adjust.
12685         (dwarf2_ranges_process): Adjust.
12686         (dwarf2_ranges_read): Adjust.
12687         (dwarf2_get_pc_bounds): Adjust.
12688         (dwarf2_record_block_ranges): Adjust.
12689         (dwarf2_add_field): Adjust.
12690         (dwarf2_add_member_fn): Adjust.
12691         (read_structure_type): Adjust.
12692         (process_structure_scope): Adjust.
12693         (read_enumeration_type): Adjust.
12694         (read_array_type): Adjust.
12695         (mark_common_block_symbol_computed): Adjust.
12696         (read_common_block): Adjust.
12697         (read_namespace_type): Adjust.
12698         (read_namespace): Adjust.
12699         (read_module_type): Adjust.
12700         (read_tag_pointer_type): Adjust.
12701         (read_tag_ptr_to_member_type): Adjust.
12702         (read_tag_string_type): Adjust.
12703         (read_subroutine_type): Adjust.
12704         (read_typedef): Adjust.
12705         (read_base_type): Adjust.
12706         (attr_to_dynamic_prop): Adjust.
12707         (read_subrange_type): Adjust.
12708         (read_unspecified_type): Adjust.
12709         (dwarf2_read_abbrevs): Adjust.
12710         (load_partial_dies): Adjust.
12711         (read_partial_die): Adjust.
12712         (find_partial_die): Adjust.
12713         (guess_partial_die_structure_name): Adjust.
12714         (fixup_partial_die): Adjust.
12715         (read_attribute_value): Adjust.
12716         (read_addr_index): Adjust.
12717         (read_addr_index_from_leb128): Adjust.
12718         (read_str_index): Adjust.
12719         (dwarf2_string_attr): Adjust.
12720         (get_debug_line_section): Adjust.
12721         (dwarf_decode_line_header): Adjust.
12722         (lnp_state_machine::check_line_address): Adjust.
12723         (dwarf_decode_lines_1): Adjust.
12724         (dwarf_decode_lines): Adjust.
12725         (dwarf2_start_symtab): Adjust.
12726         (var_decode_location): Adjust.
12727         (new_symbol_full): Adjust.
12728         (dwarf2_const_value_data): Adjust.
12729         (dwarf2_const_value_attr): Adjust.
12730         (dwarf2_const_value): Adjust.
12731         (die_type): Adjust.
12732         (die_containing_type): Adjust.
12733         (build_error_marker_type): Adjust.
12734         (lookup_die_type): Adjust.
12735         (guess_full_die_structure_name): Adjust.
12736         (anonymous_struct_prefix): Adjust.
12737         (determine_prefix): Adjust.
12738         (dwarf2_name): Adjust.
12739         (follow_die_ref_or_sig): Adjust.
12740         (follow_die_offset): Adjust.
12741         (follow_die_ref): Adjust.
12742         (follow_die_sig_1): Adjust.
12743         (follow_die_sig): Adjust.
12744         (get_signatured_type): Adjust.
12745         (get_DW_AT_signature_type): Adjust.
12746         (decode_locdesc): Adjust.
12747         (dwarf_decode_macros): Adjust.
12748         (cu_debug_loc_section): Adjust.
12749         (fill_in_loclist_baton): Adjust.
12750         (dwarf2_symbol_mark_computed): Adjust.
12751         (init_one_comp_unit): Don't assign
12752         dwarf2_cu::dwarf2_per_objfile.
12753         (set_die_type): Adjust.
12754
12755 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
12756
12757         * dwarf2read.c (struct mapped_debug_names): Add constructor.
12758         <dwarf2_per_objfile>: New field.
12759         (dwarf2_per_objfile): Remove global.
12760         (get_dwarf2_per_objfile): New function.
12761         (set_dwarf2_per_objfile): New function.
12762         (dwarf2_build_psymtabs_hard): Change objfile parameter to
12763         dwarf2_per_objfile.
12764         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12765         (read_abbrev_offset): Likewise.
12766         (read_indirect_string): Likewise.
12767         (read_indirect_line_string): Likewise.
12768         (read_indirect_string_at_offset): Likewise.
12769         (read_indirect_string_from_dwz): Likewise.
12770         (dwarf2_find_containing_comp_unit): Change objfile parameter to
12771         dwarf2_per_objfile.
12772         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12773         (create_all_comp_units): Change objfile parameter to
12774         dwarf2_per_objfile.
12775         (create_all_type_units): Likewise.
12776         (process_queue): Add dwarf2_per_objfile parameter.
12777         (read_and_check_comp_unit_head): Likewise.
12778         (lookup_dwo_unit_in_dwp): Likewise.
12779         (get_dwp_file): Likewise.
12780         (process_cu_includes): Likewise.
12781         (struct free_dwo_file_cleanup_data): New struct.
12782         (dwarf2_has_info): Use get_dwarf2_per_objfile and
12783         set_dwarf2_per_objfile.
12784         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
12785         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
12786         context, adjust calls.
12787         (dw2_instantiate_symtab): Likewise.
12788         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
12789         (dw2_get_cu): Likewise.
12790         (create_cu_from_index_list): Change objfile parameter to
12791         dwarf2_per_objfile.
12792         (create_cus_from_index_list): Get dwarf2_per_objfile from
12793         context, adjust calls.
12794         (create_cus_from_index): Likewise.
12795         (create_signatured_type_table_from_index): Change objfile
12796         parameter to dwarf2_per_objfile.
12797         (create_signatured_type_table_from_debug_names): Change objfile
12798         parameter to dwarf2_per_objfile.
12799         (create_addrmap_from_index): Likewise.
12800         (create_addrmap_from_aranges): Likewise.
12801         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
12802         (dw2_setup): Remove.
12803         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
12804         context.
12805         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
12806         get_dwarf2_per_objfile.
12807         (dw2_forget_cached_source_info): Likewise.
12808         (dw2_map_symtabs_matching_filename): Likewise.
12809         (struct dw2_symtab_iterator) <index>: Remove.
12810         <dwarf2_per_objfile>: New field.
12811         (dw2_symtab_iter_init): Replace index parameter with
12812         dwarf2_per_objfile.
12813         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
12814         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
12815         (dw2_print_stats): Likewise.
12816         (dw2_dump): Likewise.
12817         (dw2_expand_symtabs_for_function): Likewise.
12818         (dw2_expand_all_symtabs): Likewise.
12819         (dw2_expand_symtabs_with_fullname): Likewise.
12820         (dw2_expand_marked_cus): Replace index and objfile parameters
12821         with dwarf2_per_objfile.
12822         (dw_expand_symtabs_matching_file_matcher): Add
12823         dwarf2_per_objfile parameter and adjust calls.
12824         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
12825         adjust calls.
12826         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
12827         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
12828         adjust calls.
12829         (create_cus_from_debug_names_list): Replace objfile parameter
12830         with dwarf2_per_objfile and adjust calls.
12831         (create_cus_from_debug_names): Likewise.
12832         (dwarf2_read_debug_names): Likewise.
12833         (mapped_debug_names::namei_to_name): Adjust call.
12834         (dw2_debug_names_iterator::next): Likewise.
12835         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
12836         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
12837         (dw2_debug_names_dump): Likewise.
12838         (dw2_debug_names_expand_symtabs_for_function): Likewise.
12839         (dw2_debug_names_expand_symtabs_matching): Likewise.
12840         (dwarf2_initialize_objfile): Likewise.
12841         (dwarf2_build_psymtabs): Likewise.
12842         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
12843         this_cu.
12844         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
12845         (read_and_check_comp_unit_head): Likewise.
12846         (read_abbrev_offset): Likewise.
12847         (create_debug_type_hash_table): Likewise.
12848         (create_debug_types_hash_table): Likewise.
12849         (create_all_type_units): Replace objfile parameter with
12850         dwarf2_per_objfile.
12851         (add_type_unit): Add dwarf2_per_objfile parameter.
12852         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
12853         with dwarf2_per_objfile.
12854         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
12855         (lookup_dwp_signatured_type): Likewise.
12856         (lookup_signatured_type): Likewise.
12857         (read_cutu_die_from_dwo): Likewise.
12858         (init_tu_and_read_dwo_dies): Likewise.
12859         (init_cutu_and_read_dies): Likewise.
12860         (init_cutu_and_read_dies_no_follow): Likewise.
12861         (allocate_type_unit_groups_table): Add objfile parameter.
12862         (create_type_unit_group): Use dwarf2_per_objfile from cu.
12863         (get_type_unit_group): Likewise.
12864         (process_psymtab_comp_unit): Update call.
12865         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
12866         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
12867         (print_tu_stats): Likewise.
12868         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
12869         in void* parameter.
12870         (build_type_psymtabs): Change objfile parameter to
12871         dwarf2_per_objfile.
12872         (process_skeletonless_type_unit): Use dwarf2_per_objfile
12873         passed in void* parameter.
12874         (process_skeletonless_type_units): Change objfile parameter to
12875         dwarf2_per_objfile.
12876         (set_partial_user): Likewise.
12877         (dwarf2_build_psymtabs_hard): Likewise.
12878         (read_comp_units_from_section): Likewise.
12879         (create_all_comp_units): Likewise.
12880         (scan_partial_symbols): Update calls.
12881         (add_partial_symbol): Likewise.
12882         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
12883         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
12884         (process_queue): Add dwarf2_per_objfile parameter.
12885         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
12886         (compute_compunit_symtab_includes): Likewise.
12887         (process_cu_includes): Add dwarf2_per_objfile parameter.
12888         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
12889         (process_full_type_unit): Likewise.
12890         (process_imported_unit_die): Update call.
12891         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
12892         (read_file_scope): Likewise.
12893         (allocate_dwo_file_hash_table): Add objfile parameter.
12894         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
12895         (create_cus_hash_table): Likewise.
12896         (create_dwp_hash_table): Likewise.
12897         (create_dwo_unit_in_dwp_v1): Likewise.
12898         (create_dwp_v2_section): Likewise.
12899         (create_dwo_unit_in_dwp_v2): Likewise.
12900         (lookup_dwo_unit_in_dwp): Likewise.
12901         (try_open_dwop_file): Likewise.
12902         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
12903         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
12904         cleanup to include a reference to dwarf2_per_objfile.
12905         (open_dwp_file): Add dwarf2_per_objfile parameter.
12906         (open_and_init_dwp_file): Likewise.
12907         (get_dwp_file): Likewise.
12908         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
12909         (queue_and_load_all_dwo_tus): Update call.
12910         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
12911         data.
12912         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
12913         (dwarf2_ranges_process): Likewise.
12914         (dwarf2_get_pc_bounds): Likewise.
12915         (mark_common_block_symbol_computed): Likewise.
12916         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12917         (dwarf2_read_abbrevs): Update call.
12918         (read_partial_die): Use dwarf2_per_objfile from cu.
12919         (find_partial_die): Likewise.
12920         (fixup_partial_die): Likewise.
12921         (read_attribute_value): Likewise.
12922         (read_indirect_string_at_offset_from): Add objfile parameter.
12923         (read_indirect_string_at_offset): Add dwarf2_per_objfile
12924         parameter.
12925         (read_indirect_string_from_dwz): Add objfile parameter.
12926         (read_indirect_string): Add objfile parameter.
12927         (read_addr_index_1): Add dwarf2_per_objfile parameter.
12928         (read_addr_index): Use dwarf2_per_objfile from cu.
12929         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
12930         call dw2_setup.
12931         (read_str_index): Use dwarf2_per_objfile from cu.
12932         (get_debug_line_section): Likewise.
12933         (read_formatted_entries): Add dwarf2_per_objfile parameter.
12934         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
12935         (new_symbol_full): Use dwarf2_per_objfile from cu.
12936         (build_error_marker_type): Likewise.
12937         (lookup_die_type): Likewise.
12938         (determine_prefix): Likewise.
12939         (follow_die_offset): Likewise.
12940         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
12941         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
12942         (dwarf2_fetch_die_type_sect_off): Likewise.
12943         (dwarf2_get_die_type): Likewise.
12944         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
12945         (get_signatured_type): Likewise.
12946         (get_DW_AT_signature_type): Likewise.
12947         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
12948         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
12949         (cu_debug_loc_section): Likewise.
12950         (fill_in_loclist_baton): Likewise.
12951         (dwarf2_symbol_mark_computed): Likewise.
12952         (dwarf2_find_containing_comp_unit): Change objfile parameter to
12953         dwarf2_per_objfile.
12954         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
12955         parameter.
12956         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12957         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
12958         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
12959         (set_die_type): Use dwarf2_free_objfile from cu.
12960         (get_die_type_at_offset): Likewise.
12961         (dwarf2_per_objfile_free): Don't assign global variable.
12962         (debug_names) <constructor>: Add dwarf2_per_objfile
12963         parameter, update m_debugstrlookup construction.
12964         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
12965         parameter.
12966         <m_dwarf2_per_objfile>: New field.
12967         <lookup>: Use m_dwarf2_per_objfile.
12968         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
12969         (psyms_seen_size): Likewise.
12970         (write_gdbindex): Replace objfile parameter with
12971         dwarf2_per_objfile.
12972         (write_debug_names): Likewise.
12973         (write_psymtabs_to_index): Likewise.
12974         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
12975         calls.
12976
12977 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
12978
12979         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
12980         <dwarf2_per_objfile>: New field.
12981         (struct dwarf2_per_cu_data) <objfile>: Remove.
12982         <dwarf2_per_objfile>: New field.
12983         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
12984         of objfile.
12985         (create_signatured_type_table_from_index): Likewise.
12986         (create_debug_type_hash_table): Likewise.
12987         (fill_in_sig_entry_from_dwo_entry): Likewise.
12988         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
12989         (create_type_unit_group): Assign dwarf2_per_objfile instead of
12990         objfile.
12991         (create_partial_symtab): Access objfile through
12992         dwarf2_per_objfile.
12993         (process_psymtab_comp_unit_reader): Likewise.
12994         (read_comp_units_from_section): Likewise.
12995         (scan_partial_symbols): Likewise.
12996         (add_partial_symbol): Likewise.
12997         (add_partial_subprogram): Likewise.
12998         (peek_die_abbrev): Likewise.
12999         (fixup_go_packaging): Likewise.
13000         (process_full_comp_unit): Likewise.
13001         (process_full_type_unit): Likewise.
13002         (process_imported_unit_die): Likewise.
13003         (dwarf2_compute_name): Likewise.
13004         (dwarf2_physname): Likewise.
13005         (read_import_statement): Likewise.
13006         (create_cus_hash_table): Assign dwarf2_physname instead of
13007         objfile.
13008         (read_func_scope): Access objfile through dwarf2_per_objfile.
13009         (read_lexical_block_scope): Likewise.
13010         (read_call_site_scope): Likewise.
13011         (read_variable): Likewise.
13012         (dwarf2_rnglists_process): Likewise.
13013         (dwarf2_ranges_process): Likewise.
13014         (dwarf2_ranges_read): Likewise.
13015         (dwarf2_record_block_ranges): Likewise.
13016         (dwarf2_add_field): Likewise.
13017         (dwarf2_add_member_fn): Likewise.
13018         (read_structure_type): Likewise.
13019         (process_structure_scope): Likewise.
13020         (read_enumeration_type): Likewise.
13021         (read_array_type): Likewise.
13022         (read_common_block): Likewise.
13023         (read_namespace_type): Likewise.
13024         (read_namespace): Likewise.
13025         (read_module_type): Likewise.
13026         (read_tag_pointer_type): Likewise.
13027         (read_tag_ptr_to_member_type): Likewise.
13028         (read_tag_string_type): Likewise.
13029         (read_subroutine_type): Likewise.
13030         (read_typedef): Likewise.
13031         (read_base_type): Likewise.
13032         (attr_to_dynamic_prop): Likewise.
13033         (read_subrange_type): Likewise.
13034         (read_unspecified_type): Likewise.
13035         (load_partial_dies): Likewise.
13036         (read_partial_die): Likewise.
13037         (find_partial_die): Likewise.
13038         (guess_partial_die_structure_name): Likewise.
13039         (fixup_partial_die): Likewise.
13040         (read_attribute_value): Likewise.
13041         (read_addr_index_from_leb128): Likewise.
13042         (dwarf2_read_addr_index): Likewise.
13043         (dwarf2_string_attr): Likewise.
13044         (lnp_state_machine::check_line_address): Likewise.
13045         (dwarf_decode_lines_1): Likewise.
13046         (dwarf_decode_lines): Likewise.
13047         (dwarf2_start_symtab): Likewise.
13048         (var_decode_location): Likewise.
13049         (new_symbol_full): Likewise.
13050         (dwarf2_const_value_data): Likewise.
13051         (dwarf2_const_value_attr): Likewise.
13052         (dwarf2_const_value): Likewise.
13053         (die_type): Likewise.
13054         (die_containing_type): Likewise.
13055         (lookup_die_type): Likewise.
13056         (guess_full_die_structure_name): Likewise.
13057         (anonymous_struct_prefix): Likewise.
13058         (dwarf2_name): Likewise.
13059         (follow_die_ref_or_sig): Likewise.
13060         (follow_die_offset): Likewise.
13061         (follow_die_ref): Likewise.
13062         (dwarf2_fetch_die_loc_sect_off): Likewise.
13063         (dwarf2_fetch_constant_bytes): Likewise.
13064         (dwarf2_fetch_die_type_sect_off): Likewise.
13065         (dwarf2_get_die_type): Likewise.
13066         (follow_die_sig): Likewise.
13067         (decode_locdesc): Likewise.
13068         (dwarf2_per_cu_objfile): Likewise.
13069         (dwarf2_per_cu_text_offset): Likewise.
13070         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
13071         objfile.
13072         (set_die_type): Access objfile through
13073         dwarf2_per_objfile.
13074
13075 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
13076
13077         * valprint.c (converted_character_d): Remove typedef.
13078         (DEF_VEC_O (converted_character_d)): Remove.
13079         (count_next_character): Use std::vector.
13080         (print_converted_chars_to_obstack): Likewise.
13081         (generic_printstr): Likewise.
13082
13083 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
13084
13085         * xml-support.h (struct gdb_xml_value): Add constructor.
13086         <value>: Change type to unique_xmalloc_ptr.
13087         (gdb_xml_value_s): Remove typedef.
13088         (DEF_VEC_O (gdb_xml_value_s)): Remove.
13089         (gdb_xml_element_start_handler): Change parameter type to
13090         std::vector.
13091         (xml_find_attribute): Likewise.
13092         * xml-support.c (xml_find_attribute): Change parameter type to
13093         std::vector and adjust.
13094         (gdb_xml_values_cleanup): Remove.
13095         (gdb_xml_parser::start_element): Adjust to std::vector.
13096         (xinclude_start_include): Change paraeter type to std::vector
13097         and adjust.
13098         * btrace.c (check_xml_btrace_version): Likewise.
13099         (parse_xml_btrace_block): Likewise.
13100         (parse_xml_btrace_pt_config_cpu): Likewise.
13101         (parse_xml_btrace_pt): Likewise.
13102         (parse_xml_btrace_conf_bts): Likewise.
13103         (parse_xml_btrace_conf_pt): Likewise.
13104         * memory-map.c (memory_map_start_memory): Likewise.
13105         (memory_map_start_property): Likewise.
13106         * osdata.c (osdata_start_osdata): Likewise.
13107         (osdata_start_item): Likewise.
13108         (osdata_start_column): Likewise.
13109         * remote.c (start_thread): Likewise.
13110         * solib-aix.c (library_list_start_library): Likewise.
13111         (library_list_start_list): Likewise.
13112         * solib-svr4.c (library_list_start_library): Likewise.
13113         (svr4_library_list_start_list): Likewise.
13114         * solib-target.c (library_list_start_segment): Likewise.
13115         (library_list_start_section): Likewise.
13116         (library_list_start_library): Likewise.
13117         (library_list_start_list): Likewise.
13118         * tracepoint.c (traceframe_info_start_memory): Likewise.
13119         (traceframe_info_start_tvar): Likewise.
13120         * xml-syscall.c (syscall_start_syscall): Likewise.
13121         * xml-tdesc.c (tdesc_start_target): Likewise.
13122         (tdesc_start_feature): Likewise.
13123         (tdesc_start_reg): Likewise.
13124         (tdesc_start_union): Likewise.
13125         (tdesc_start_struct): Likewise.
13126         (tdesc_start_flags): Likewise.
13127         (tdesc_start_enum): Likewise.
13128         (tdesc_start_field): Likewise.
13129         (tdesc_start_enum_value): Likewise.
13130         (tdesc_start_vector): Likewise.
13131
13132 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
13133
13134         * extension.h (struct xmethod_worker) <clone>: Remove.
13135         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
13136         Remove.
13137         (python_xmethod_worker::clone): Remove.
13138         * valops.c (find_overload_match): Use std::move instead of
13139         clone.
13140
13141 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
13142
13143         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
13144         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
13145         <free_xmethod_worker_data>: Remove.
13146         <get_matching_xmethod_workers>: Chance VEC to std::vector.
13147         <get_xmethod_arg_types>: Remove.
13148         <get_xmethod_result_type>: Remove.
13149         <invoke_xmethod>: Remove.
13150         * extension.c (new_xmethod_worker): Remove.
13151         (clone_xmethod_worker): Remove.
13152         (get_matching_xmethod_workers): Return void, pass std::vector by
13153         pointer.
13154         (get_xmethod_arg_types): Rename to...
13155         (xmethod_worker::get_arg_types): ... this, and adjust.
13156         (get_xmethod_result_type): Rename to...
13157         (xmethod_worker::get_result_type): ... this, and adjust.
13158         (invoke_xmethod): Remove.
13159         (free_xmethod_worker): Remove.
13160         (free_xmethod_worker_vec): Remove.
13161         * extension.h (enum ext_lang_rc): Move here from
13162         extension-priv.h.
13163         (struct xmethod_worker): Add constructor and destructor.
13164         <data>: Remove.
13165         <value>: Remove.
13166         <invoke, clone, do_get_result_type, do_get_arg_types>: New
13167         virtual pure methods.
13168         <get_arg_types, get_result_type>: New methods.
13169         (xmethod_worker_ptr): Remove typedef.
13170         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
13171         (xmethod_worker_vec): Remove typedef.
13172         (xmethod_worker_up): New typedef.
13173         (invoke_xmethod): Remove.
13174         (clone_xmethod_worker): Remove.
13175         (free_xmethod_worker): Remove.
13176         (free_xmethod_worker_vec): Remove.
13177         (get_xmethod_arg_types): Remove.
13178         (get_xmethod_result_type): Remove.
13179         * valops.c (find_method_list): Use std::vector, don't use
13180         intermediate vector.
13181         (value_find_oload_method_list): Use std::vector.
13182         (find_overload_match): Use std::vector.
13183         (find_oload_champ): Use std::vector.
13184         * value.c (value_free): Use operator delete.
13185         (value_of_xmethod): Rename to...
13186         (value_from_xmethod): ... this.  Don't assign
13187         xmethod_worker::value, take rvalue-reference.
13188         (result_type_of_xmethod): Adjust.
13189         (call_xmethod): Adjust.
13190         * value.h: Include extension.h.
13191         (struct xmethod_worker): Don't forward-declare.
13192         (value_of_xmethod): Rename to...
13193         (value_from_xmethod): ... this, take rvalue-reference.
13194         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
13195         (struct python_xmethod_worker): ... this, add constructor and
13196         destructor.
13197         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
13198         (gdbpy_free_xmethod_worker_data): Rename to...
13199         (python_xmethod_worker::~python_xmethod_worker): ... this and
13200         adjust.
13201         (gdbpy_clone_xmethod_worker_data): Rename to...
13202         (python_xmethod_worker::clone): ... this and adjust.
13203         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
13204         temporary vector.
13205         (gdbpy_get_xmethod_arg_types): Rename to...
13206         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
13207         (gdbpy_get_xmethod_result_type): Rename to...
13208         (python_xmethod_worker::do_get_result_type): ... this and
13209         adjust.
13210         (gdbpy_invoke_xmethod): Rename to...
13211         (python_xmethod_worker::invoke): ... this and adjust.
13212         (new_python_xmethod_worker): Rename to...
13213         (python_xmethod_worker::python_xmethod_worker): ... this and
13214         adjust.
13215         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
13216         Remove.
13217         (gdbpy_free_xmethod_worker_data): Remove.
13218         (gdbpy_get_matching_xmethod_workers): Use std::vector.
13219         (gdbpy_get_xmethod_arg_types): Remove.
13220         (gdbpy_get_xmethod_result_type): Remove.
13221         (gdbpy_invoke_xmethod): Remove.
13222         * python/python.c (python_extension_ops): Remove obsolete
13223         callbacks.
13224
13225 2018-01-05  Pedro Alves  <palves@redhat.com>
13226
13227         PR gdb/18653
13228         * common/signals-state-save-restore.c
13229         (save_original_signals_state): New parameter 'quiet'.  Warn if we
13230         find a custom handler preinstalled, instead of internal erroring.
13231         But only warn if !quiet.
13232         * common/signals-state-save-restore.h
13233         (save_original_signals_state): New parameter 'quiet'.
13234         * main.c (captured_main_1): Move save_original_signals_state call
13235         after option handling, and pass QUIET.
13236
13237 2018-01-05  Pedro Alves  <palves@redhat.com>
13238
13239         * spu-tdep.c (spu_catch_start): Pass
13240         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
13241
13242 2018-01-05  Pedro Alves  <palves@redhat.com>
13243
13244         PR gdb/22670
13245         * ada-lang.c (literal_symbol_name_matcher): New function.
13246         (ada_get_symbol_name_matcher): Use it for
13247         symbol_name_match_type::SEARCH_NAME.
13248         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
13249         it down instead of assuming symbol_name_match_type::FULL.
13250         * block.h (block_lookup_symbol): New parameter 'match_type'.
13251         * c-valprint.c (print_unpacked_pointer): Use
13252         lookup_symbol_search_name instead of lookup_symbol.
13253         * compile/compile-object-load.c (get_out_value_type): Pass down
13254         symbol_name_match_type::SEARCH_NAME.
13255         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
13256         symbol_name_match_type::FULL.
13257         * cp-support.c (cp_get_symbol_name_matcher): Handle
13258         symbol_name_match_type::SEARCH_NAME.
13259         * infrun.c (insert_exception_resume_breakpoint): Use
13260         lookup_symbol_search_name.
13261         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
13262         * psymtab.c (maintenance_check_psymtabs): Use
13263         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
13264         * stack.c (print_frame_args): Use lookup_symbol_search_name and
13265         SYMBOL_SEARCH_NAME.
13266         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
13267         if symbol_name_match_type::SEARCH_NAME.
13268         (lookup_symbol_in_language): Pass down
13269         symbol_name_match_type::FULL.
13270         (lookup_symbol_search_name): New.
13271         (lookup_language_this): Pass down
13272         symbol_name_match_type::SEARCH_NAME.
13273         (lookup_symbol_aux, lookup_local_symbol): New parameter
13274         'match_type'.  Pass it down.
13275         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
13276         (lookup_symbol_search_name): New declaration.
13277         (lookup_symbol_in_block): New 'match_type' parameter.
13278
13279 2018-01-05  Pedro Alves  <palves@redhat.com>
13280
13281         PR gdb/22670
13282         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
13283         ada_lookup_symbol.
13284         (ada_lookup_symbol): Reimplement in terms of
13285         ada_lookup_symbol_list, bits factored out from
13286         ada_lookup_encoded_symbol.
13287
13288 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
13289
13290         * ada-exp.y (write_object_renaming): When subscripting an array
13291         using a symbol as the index, pass the block in call to
13292         ada_lookup_encoded_symbol when looking that symbol up.
13293
13294 2018-01-05  Jerome Guitton  <guitton@adacore.com>
13295
13296         * ada-lang.c (ada_array_length): Use ada_index_type instead of
13297         TYPE_INDEX_TYPE.
13298
13299 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
13300
13301         * ada-lang.c (ada_to_fixed_value_create): Add handling of
13302         the case where VALUE_LVAL (val0) is not lval_memory.
13303
13304 2018-01-05  Xavier Roirand  <roirand@adacore.com>
13305
13306         * ada-valprint.c (print_optional_low_bound): Handle
13307         character-indexed array printing like boolean-indexed array
13308         printing.
13309
13310 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
13311
13312         * NEWS: Create a new section for the next release branch.
13313         Rename the section of the current branch, now that it has
13314         been cut.
13315
13316 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
13317
13318         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
13319         * version.in: Bump version to 8.1.50.DATE-git.
13320
13321 2018-01-03  Xavier Roirand  <roirand@adacore.com>
13322
13323         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
13324         Add field.
13325         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
13326         Add field.
13327         (default_exception_support_info) <catch_handlers_sym>: Add field.
13328         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
13329         (ada_exception_name_addr_1): Add "catch handlers" handling.
13330         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
13331         Update all callers.
13332         (create_excep_cond_exprs) <ex>: Add parameter.
13333         (re_set_exception): Update create_excep_cond_exprs call.
13334         (print_it_exception, print_one_exception, print_mention_exception)
13335         (print_recreate_exception): Add "catch handler" handling.
13336         (allocate_location_catch_handlers, re_set_catch_handlers)
13337         (check_status_catch_handlers, print_it_catch_handlers)
13338         (print_one_catch_handlers, print_mention_catch_handlers)
13339         (print_recreate_catch_handlers): New function.
13340         (catch_handlers_breakpoint_ops): New variable.
13341         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
13342         Add parameter.  Add "catch handler" handling.
13343         (ada_exception_sym_name, ada_exception_breakpoint_ops):
13344         Add "catch handler" handling.
13345         (ada_exception_catchpoint_cond_string): Add "catch handler"
13346         handling.
13347         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
13348         call.
13349         (catch_ada_handlers_command): New function.
13350         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
13351         operations structure.
13352         (_initialize_ada_language): Add "catch handlers" command entry.
13353         * NEWS: Document "catch handlers" feature.
13354
13355 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
13356
13357         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
13358         account when creating the array type of the slice.
13359         (ada_value_slice): Likewise.
13360
13361 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
13362
13363         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
13364         New enum value.
13365         (create_array_type_with_stride): Add byte_stride_prop parameter.
13366         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
13367         New parameter.  Update all callers in this file.
13368         (array_type_has_dynamic_stride): New function.
13369         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
13370         of arrays with dynamic byte strides.
13371         * dwarf2read.c (read_array_type): Add support for dynamic
13372         DW_AT_byte_stride attributes.
13373
13374 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
13375
13376         * dwarf2read.c (read_unspecified_type): Treat
13377         DW_TAG_enumeration_type DIEs from Ada units as stubs.
13378
13379 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
13380
13381         Update copyright year range in all GDB files.
13382
13383 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
13384
13385         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
13386         and gdb/testsuite/gdb.base/step-line.c.
13387
13388 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
13389
13390         * copyright.py (main): Dump the contents of
13391         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
13392         even if BY_HAND is empty.
13393
13394 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
13395
13396         * top.c (print_gdb_version): Update Copyright year in version
13397         message.
13398
13399 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
13400
13401         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
13402
13403 For older changes see ChangeLog-2017.
13404 \f
13405 Local Variables:
13406 mode: change-log
13407 left-margin: 8
13408 fill-column: 74
13409 version-control: never
13410 coding: utf-8
13411 End: