Make variable in get_startup_shell non-static
[external/binutils.git] / gdb / ChangeLog
1 2018-09-14  Tom Tromey  <tom@tromey.com>
2
3         * nat/fork-inferior.c (get_startup_shell): Remove "static".
4
5 2018-09-13  Tom Tromey  <tom@tromey.com>
6
7         * python/py-inferior.c (infpy_thread_from_thread_handle): Now
8         static.
9
10 2018-09-13  Tom Tromey  <tom@tromey.com>
11
12         * exec.c (try_open_exec_file): Use std::string.
13
14 2018-09-13  Tom Tromey  <tom@tromey.com>
15
16         * utils.h (gdb_bfd_errmsg): Return std::string.
17         * exec.c (exec_file_attach): Update.
18         * compile/compile-object-load.c (compile_object_load): Update.
19         * utils.c (gdb_bfd_errmsg): Return std::string.
20
21 2018-09-13  Tom Tromey  <tom@tromey.com>
22
23         * procfs.c (struct procinfo_deleter): New.
24         (procinfo_up): New typedef.
25         (do_destroy_procinfo_cleanup): Remove.
26         (procfs_target::info_proc): Use procinfo_up.  Remove cleanups.
27
28 2018-09-13  Tom Tromey  <tom@tromey.com>
29
30         * source.c (add_path): Use gdb::unique_xmalloc_ptr.
31
32 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
33 2018-09-13  Tom Tromey  <tom@tromey.com>
34
35         * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
36         (pspy_get_objfiles): New function.
37         (progspace_object_methods): New.
38         (pspace_object_type): Add tp_methods callback.
39         * python/python-internal.h (build_objfiles_list): New
40         declaration.
41         * python/python.c (build_objfiles_list): New function.
42         (gdbpy_objfiles): Implement using build_objfiles_list.
43         * NEWS: Mention the Progspace.objfiles method.
44
45 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
46
47         * python/py-inferior.c (infpy_get_progspace): New function.
48         (inferior_object_getset): Add progspace property.
49         * NEWS: Mention the new property.
50
51 2018-09-13  Tom Tromey  <tom@tromey.com>
52
53         PR rust/23650:
54         * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
55
56 2018-09-13  Tom Tromey  <tom@tromey.com>
57
58         PR rust/23626:
59         * rust-lang.c (rust_enum_variant): Now static.
60         (rust_empty_enum_p): New function.
61         (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
62         Handle empty enum.
63
64 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
65
66         * python/py-inferior.c (infpy_repr): New.
67         (inferior_object_type): Register infpy_repr.
68         * python/py-objfile.c (objfpy_repr): New.
69         (objfile_object_type): Register objfpy_repr.
70
71 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
72
73         * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
74
75 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
76
77         * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
78         typo.
79
80 2018-09-12  Sergio Durigan Junior  <sergiodj@redhat.com>
81
82         * common/common-utils.c: Don't include '<sys/stat.h>'.
83         (is_regular_file): Move to...
84         * common/filestuff.c (is_regular_file): ... here.
85         * common/common-utils.h (is_regular_file): Move to...
86         * common/filestuff.h (is_regular_file): ... here.
87
88 2018-09-12  Simon Marchi  <simon.marchi@ericsson.com>
89
90         * skip.c (debug_skip): New variable.
91         (skiplist_entry::do_skip_file_p): Add debug output.
92         (skiplist_entry::do_skip_gfile_p): Likewise.
93         (skiplist_entry::skip_function_p): Likewise.
94         (_initialize_step_skip): Create debug command.
95         * NEWS: Mention set/show debug skip.
96
97 2018-09-11  Xavier Roirand  <roirand@adacore.com>
98
99         * darwin-nat.c (should_disable_startup_with_shell):
100         New function.
101         (darwin_nat_target::create_inferior): Add call.
102
103 2018-09-11  Xavier Roirand  <roirand@adacore.com>
104
105         * darwin-nat.h (struct darwin_thread_info) <gdb_port,
106         inf_port, msg_state>: Initialize.
107         (struct darwin_thread_info) <signaled, single_step>: Change
108         type and initialize.
109         (struct darwin_thread_info) <event>: Initialize.
110
111 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
112
113         PR gdb/23555
114         PR gdb/23558
115         * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
116         guesses.
117
118 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
119
120         Revert:
121         2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
122
123         PR gdb/23555
124         PR gdb/23558
125         * gnulib/aclocal.m4: Regenerate.
126         * gnulib/config.in: Regenerate.
127         * gnulib/configure: Regenerate.
128         * gnulib/import/Makefile.am: Update.
129         * gnulib/import/Makefile.in: Update.
130         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
131         * gnulib/import/_Noreturn.h: ... this.
132         * gnulib/import/alloca.in.h: Update.
133         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
134         * gnulib/import/arg-nonnull.h: ... this.
135         * gnulib/import/assure.h: Update.
136         * gnulib/import/at-func.c: Update.
137         * gnulib/import/basename-lgpl.c: Update.
138         * gnulib/import/extra/snippet/c++defs.h: Rename to...
139         * gnulib/import/c++defs.h: ... this.
140         * gnulib/import/canonicalize-lgpl.c: Update.
141         * gnulib/import/cdefs.h: Update.
142         * gnulib/import/chdir-long.c: Update.
143         * gnulib/import/chdir-long.h: Update.
144         * gnulib/import/cloexec.c: Update.
145         * gnulib/import/cloexec.h: Update.
146         * gnulib/import/close.c: Update.
147         * gnulib/import/closedir.c: Update.
148         * gnulib/import/config.charset: Update.
149         * gnulib/import/dirent-private.h: Update.
150         * gnulib/import/dirent.in.h: Update.
151         * gnulib/import/dirfd.c: Update.
152         * gnulib/import/dirname-lgpl.c: Update.
153         * gnulib/import/dirname.h: Update.
154         * gnulib/import/dosname.h: Update.
155         * gnulib/import/dup-safer-flag.c: Update.
156         * gnulib/import/dup-safer.c: Update.
157         * gnulib/import/dup.c: Update.
158         * gnulib/import/dup2.c: Update.
159         * gnulib/import/errno.in.h: Update.
160         * gnulib/import/error.c: Update.
161         * gnulib/import/error.h: Update.
162         * gnulib/import/exitfail.c: Update.
163         * gnulib/import/exitfail.h: Update.
164         * gnulib/import/extra/update-copyright: Update.
165         * gnulib/import/fchdir.c: Update.
166         * gnulib/import/fcntl.c: Update.
167         * gnulib/import/fcntl.in.h: Update.
168         * gnulib/import/fd-hook.c: Update.
169         * gnulib/import/fd-hook.h: Update.
170         * gnulib/import/fd-safer-flag.c: Update.
171         * gnulib/import/fd-safer.c: Update.
172         * gnulib/import/fdopendir.c: Update.
173         * gnulib/import/filename.h: Update.
174         * gnulib/import/filenamecat-lgpl.c: Update.
175         * gnulib/import/filenamecat.h: Update.
176         * gnulib/import/flexmember.h: Update.
177         * gnulib/import/float+.h: Update.
178         * gnulib/import/float.c: Update.
179         * gnulib/import/float.in.h: Update.
180         * gnulib/import/fnmatch.c: Update.
181         * gnulib/import/fnmatch.in.h: Update.
182         * gnulib/import/fnmatch_loop.c: Update.
183         * gnulib/import/fpucw.h: Update.
184         * gnulib/import/frexp.c: Update.
185         * gnulib/import/frexpl.c: Update.
186         * gnulib/import/fstat.c: Update.
187         * gnulib/import/fstatat.c: Update.
188         * gnulib/import/getcwd-lgpl.c: Update.
189         * gnulib/import/getcwd.c: Update.
190         * gnulib/import/getdtablesize.c: Update.
191         * gnulib/import/getlogin_r.c: Update.
192         * gnulib/import/getprogname.c: Update.
193         * gnulib/import/getprogname.h: Update.
194         * gnulib/import/gettext.h: Update.
195         * gnulib/import/gettimeofday.c: Update.
196         * gnulib/import/glob-libc.h: Update.
197         * gnulib/import/glob.c: Update.
198         * gnulib/import/glob.in.h: Update.
199         * gnulib/import/glob_internal.h: Update.
200         * gnulib/import/glob_pattern_p.c: Update.
201         * gnulib/import/globfree.c: Update.
202         * gnulib/import/hard-locale.c: Update.
203         * gnulib/import/hard-locale.h: Update.
204         * gnulib/import/intprops.h: Update.
205         * gnulib/import/inttypes.in.h: Update.
206         * gnulib/import/isnan.c: Update.
207         * gnulib/import/isnand-nolibm.h: Update.
208         * gnulib/import/isnand.c: Update.
209         * gnulib/import/isnanl-nolibm.h: Update.
210         * gnulib/import/isnanl.c: Update.
211         * gnulib/import/itold.c: Update.
212         * gnulib/import/libc-config.h: Update.
213         * gnulib/import/limits.in.h: Update.
214         * gnulib/import/localcharset.c: Update.
215         * gnulib/import/localcharset.h: Update.
216         * gnulib/import/localtime-buffer.c: Update.
217         * gnulib/import/localtime-buffer.h: Update.
218         * gnulib/import/lstat.c: Update.
219         * gnulib/import/m4/00gnulib.m4: Update.
220         * gnulib/import/m4/__inline.m4: Update.
221         * gnulib/import/m4/absolute-header.m4: Update.
222         * gnulib/import/m4/alloca.m4: Update.
223         * gnulib/import/m4/builtin-expect.m4: Update.
224         * gnulib/import/m4/canonicalize.m4: Update.
225         * gnulib/import/m4/chdir-long.m4: Update.
226         * gnulib/import/m4/close.m4: Update.
227         * gnulib/import/m4/closedir.m4: Update.
228         * gnulib/import/m4/configmake.m4: Update.
229         * gnulib/import/m4/d-ino.m4: Update.
230         * gnulib/import/m4/d-type.m4: Update.
231         * gnulib/import/m4/dirent_h.m4: Update.
232         * gnulib/import/m4/dirfd.m4: Update.
233         * gnulib/import/m4/dirname.m4: Update.
234         * gnulib/import/m4/double-slash-root.m4: Update.
235         * gnulib/import/m4/dup.m4: Update.
236         * gnulib/import/m4/dup2.m4: Update.
237         * gnulib/import/m4/eealloc.m4: Update.
238         * gnulib/import/m4/environ.m4: Update.
239         * gnulib/import/m4/errno_h.m4: Update.
240         * gnulib/import/m4/error.m4: Update.
241         * gnulib/import/m4/exponentd.m4: Update.
242         * gnulib/import/m4/exponentl.m4: Update.
243         * gnulib/import/m4/extensions.m4: Update.
244         * gnulib/import/m4/extern-inline.m4: Update.
245         * gnulib/import/m4/fchdir.m4: Update.
246         * gnulib/import/m4/fcntl-o.m4: Update.
247         * gnulib/import/m4/fcntl.m4: Update.
248         * gnulib/import/m4/fcntl_h.m4: Update.
249         * gnulib/import/m4/fdopendir.m4: Update.
250         * gnulib/import/m4/filenamecat.m4: Update.
251         * gnulib/import/m4/flexmember.m4: Update.
252         * gnulib/import/m4/float_h.m4: Update.
253         * gnulib/import/m4/fnmatch.m4: Update.
254         * gnulib/import/m4/fnmatch_h.m4: Update.
255         * gnulib/import/m4/fpieee.m4: Update.
256         * gnulib/import/m4/frexp.m4: Update.
257         * gnulib/import/m4/frexpl.m4: Update.
258         * gnulib/import/m4/fstat.m4: Update.
259         * gnulib/import/m4/fstatat.m4: Update.
260         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
261         * gnulib/import/m4/getcwd-path-max.m4: Update.
262         * gnulib/import/m4/getcwd.m4: Update.
263         * gnulib/import/m4/getdtablesize.m4: Update.
264         * gnulib/import/m4/getlogin.m4: Update.
265         * gnulib/import/m4/getlogin_r.m4: Update.
266         * gnulib/import/m4/getpagesize.m4: Update.
267         * gnulib/import/m4/getprogname.m4: Update.
268         * gnulib/import/m4/gettimeofday.m4: Update.
269         * gnulib/import/m4/glibc21.m4: Update.
270         * gnulib/import/m4/glob.m4: Update.
271         * gnulib/import/m4/glob_h.m4: Update.
272         * gnulib/import/m4/gnulib-cache.m4: Update.
273         * gnulib/import/m4/gnulib-common.m4: Update.
274         * gnulib/import/m4/gnulib-comp.m4: Update.
275         * gnulib/import/m4/gnulib-tool.m4: Update.
276         * gnulib/import/m4/hard-locale.m4: Update.
277         * gnulib/import/m4/include_next.m4: Update.
278         * gnulib/import/m4/inttypes-pri.m4: Update.
279         * gnulib/import/m4/inttypes.m4: Update.
280         * gnulib/import/m4/isnand.m4: Update.
281         * gnulib/import/m4/isnanl.m4: Update.
282         * gnulib/import/m4/largefile.m4: Update.
283         * gnulib/import/m4/limits-h.m4: Update.
284         * gnulib/import/m4/localcharset.m4: Update.
285         * gnulib/import/m4/locale-fr.m4: Update.
286         * gnulib/import/m4/locale-ja.m4: Update.
287         * gnulib/import/m4/locale-zh.m4: Update.
288         * gnulib/import/m4/localtime-buffer.m4: Update.
289         * gnulib/import/m4/longlong.m4: Update.
290         * gnulib/import/m4/lstat.m4: Update.
291         * gnulib/import/m4/malloc.m4: Update.
292         * gnulib/import/m4/malloca.m4: Update.
293         * gnulib/import/m4/math_h.m4: Update.
294         * gnulib/import/m4/mbrtowc.m4: Update.
295         * gnulib/import/m4/mbsinit.m4: Update.
296         * gnulib/import/m4/mbsrtowcs.m4: Update.
297         * gnulib/import/m4/mbstate_t.m4: Update.
298         * gnulib/import/m4/memchr.m4: Update.
299         * gnulib/import/m4/memmem.m4: Update.
300         * gnulib/import/m4/mempcpy.m4: Update.
301         * gnulib/import/m4/memrchr.m4: Update.
302         * gnulib/import/m4/mkdir.m4: Update.
303         * gnulib/import/m4/mkstemp.m4: Update.
304         * gnulib/import/m4/mmap-anon.m4: Update.
305         * gnulib/import/m4/mode_t.m4: Update.
306         * gnulib/import/m4/msvc-inval.m4: Update.
307         * gnulib/import/m4/msvc-nothrow.m4: Update.
308         * gnulib/import/m4/multiarch.m4: Update.
309         * gnulib/import/m4/nocrash.m4: Update.
310         * gnulib/import/m4/off_t.m4: Update.
311         * gnulib/import/m4/onceonly.m4: Update.
312         * gnulib/import/m4/open-cloexec.m4: Update.
313         * gnulib/import/m4/open.m4: Update.
314         * gnulib/import/m4/openat.m4: Update.
315         * gnulib/import/m4/opendir.m4: Update.
316         * gnulib/import/m4/pathmax.m4: Update.
317         * gnulib/import/m4/rawmemchr.m4: Update.
318         * gnulib/import/m4/readdir.m4: Update.
319         * gnulib/import/m4/readlink.m4: Update.
320         * gnulib/import/m4/realloc.m4: Update.
321         * gnulib/import/m4/rename.m4: Update.
322         * gnulib/import/m4/rewinddir.m4: Update.
323         * gnulib/import/m4/rmdir.m4: Update.
324         * gnulib/import/m4/save-cwd.m4: Update.
325         * gnulib/import/m4/secure_getenv.m4: Update.
326         * gnulib/import/m4/setenv.m4: Update.
327         * gnulib/import/m4/signal_h.m4: Update.
328         * gnulib/import/m4/ssize_t.m4: Update.
329         * gnulib/import/m4/stat-time.m4: Update.
330         * gnulib/import/m4/stat.m4: Update.
331         * gnulib/import/m4/std-gnu11.m4: Update.
332         * gnulib/import/m4/stdbool.m4: Update.
333         * gnulib/import/m4/stddef_h.m4: Update.
334         * gnulib/import/m4/stdint.m4: Update.
335         * gnulib/import/m4/stdio_h.m4: Update.
336         * gnulib/import/m4/stdlib_h.m4: Update.
337         * gnulib/import/m4/strchrnul.m4: Update.
338         * gnulib/import/m4/strdup.m4: Update.
339         * gnulib/import/m4/strerror.m4: Update.
340         * gnulib/import/m4/string_h.m4: Update.
341         * gnulib/import/m4/strstr.m4: Update.
342         * gnulib/import/m4/strtok_r.m4: Update.
343         * gnulib/import/m4/sys_socket_h.m4: Update.
344         * gnulib/import/m4/sys_stat_h.m4: Update.
345         * gnulib/import/m4/sys_time_h.m4: Update.
346         * gnulib/import/m4/sys_types_h.m4: Update.
347         * gnulib/import/m4/tempname.m4: Update.
348         * gnulib/import/m4/time_h.m4: Update.
349         * gnulib/import/m4/unistd-safer.m4: Update.
350         * gnulib/import/m4/unistd_h.m4: Update.
351         * gnulib/import/m4/warn-on-use.m4: Update.
352         * gnulib/import/m4/wchar_h.m4: Update.
353         * gnulib/import/m4/wchar_t.m4: Update.
354         * gnulib/import/m4/wctype_h.m4: Update.
355         * gnulib/import/m4/wint_t.m4: Update.
356         * gnulib/import/malloc.c: Update.
357         * gnulib/import/malloc/scratch_buffer.h: Update.
358         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
359         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
360         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
361         * gnulib/import/malloca.c: Update.
362         * gnulib/import/malloca.h: Update.
363         * gnulib/import/malloca.valgrind: Update.
364         * gnulib/import/math.in.h: Update.
365         * gnulib/import/mbrtowc.c: Update.
366         * gnulib/import/mbsinit.c: Update.
367         * gnulib/import/mbsrtowcs-impl.h: Update.
368         * gnulib/import/mbsrtowcs-state.c: Update.
369         * gnulib/import/mbsrtowcs.c: Update.
370         * gnulib/import/memchr.c: Update.
371         * gnulib/import/memmem.c: Update.
372         * gnulib/import/mempcpy.c: Update.
373         * gnulib/import/memrchr.c: Update.
374         * gnulib/import/mkdir.c: Update.
375         * gnulib/import/mkstemp.c: Update.
376         * gnulib/import/msvc-inval.c: Update.
377         * gnulib/import/msvc-inval.h: Update.
378         * gnulib/import/msvc-nothrow.c: Update.
379         * gnulib/import/msvc-nothrow.h: Update.
380         * gnulib/import/open.c: Update.
381         * gnulib/import/openat-die.c: Update.
382         * gnulib/import/openat-priv.h: Update.
383         * gnulib/import/openat-proc.c: Update.
384         * gnulib/import/openat.c: Update.
385         * gnulib/import/openat.h: Update.
386         * gnulib/import/opendir.c: Update.
387         * gnulib/import/pathmax.h: Update.
388         * gnulib/import/pipe-safer.c: Update.
389         * gnulib/import/rawmemchr.c: Update.
390         * gnulib/import/readdir.c: Update.
391         * gnulib/import/readlink.c: Update.
392         * gnulib/import/realloc.c: Update.
393         * gnulib/import/ref-add.sin: Update.
394         * gnulib/import/ref-del.sin: Update.
395         * gnulib/import/rename.c: Update.
396         * gnulib/import/rewinddir.c: Update.
397         * gnulib/import/rmdir.c: Update.
398         * gnulib/import/same-inode.h: Update.
399         * gnulib/import/save-cwd.c: Update.
400         * gnulib/import/save-cwd.h: Update.
401         * gnulib/import/scratch_buffer.h: Update.
402         * gnulib/import/secure_getenv.c: Update.
403         * gnulib/import/setenv.c: Update.
404         * gnulib/import/signal.in.h: Update.
405         * gnulib/import/stat-time.c: Update.
406         * gnulib/import/stat-time.h: Update.
407         * gnulib/import/stat-w32.c: Update.
408         * gnulib/import/stat-w32.h: Update.
409         * gnulib/import/stat.c: Update.
410         * gnulib/import/stdbool.in.h: Update.
411         * gnulib/import/stddef.in.h: Update.
412         * gnulib/import/stdint.in.h: Update.
413         * gnulib/import/stdio.in.h: Update.
414         * gnulib/import/stdlib.in.h: Update.
415         * gnulib/import/str-two-way.h: Update.
416         * gnulib/import/strchrnul.c: Update.
417         * gnulib/import/strdup.c: Update.
418         * gnulib/import/streq.h: Update.
419         * gnulib/import/strerror-override.c: Update.
420         * gnulib/import/strerror-override.h: Update.
421         * gnulib/import/strerror.c: Update.
422         * gnulib/import/string.in.h: Update.
423         * gnulib/import/stripslash.c: Update.
424         * gnulib/import/strnlen1.c: Update.
425         * gnulib/import/strnlen1.h: Update.
426         * gnulib/import/strstr.c: Update.
427         * gnulib/import/strtok_r.c: Update.
428         * gnulib/import/sys_stat.in.h: Update.
429         * gnulib/import/sys_time.in.h: Update.
430         * gnulib/import/sys_types.in.h: Update.
431         * gnulib/import/tempname.c: Update.
432         * gnulib/import/tempname.h: Update.
433         * gnulib/import/time.in.h: Update.
434         * gnulib/import/unistd--.h: Update.
435         * gnulib/import/unistd-safer.h: Update.
436         * gnulib/import/unistd.in.h: Update.
437         * gnulib/import/unsetenv.c: Update.
438         * gnulib/import/verify.h: Update.
439         * gnulib/import/extra/snippet/warn-on-use.h: Update.
440         * gnulib/import/wchar.in.h: Update.
441         * gnulib/import/wctype.in.h: Update.
442         * gnulib/import/xalloc-oversized.h: Update.
443         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
444         "53e2c179f26a890fa6685af4b6c1397ee370433b".
445
446 2018-09-10  Simon Marchi  <simon.marchi@ericsson.com>
447
448         * record-btrace.c (get_thread_current_frame): Remove
449         old_inferior_ptid.
450
451 2018-09-10  Jerome Guitton  <guitton@adacore.com>
452
453         * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
454         with check_tag to 1 if and only if the type is tagged and the
455         component being searched cannot been found in the current
456         view. Otherwise, always call ada_to_fixed_type with
457         check_tag to 0.
458
459 2018-09-10  Xavier Roirand  <roirand@adacore.com>
460
461         * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
462         declaration.
463         * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
464         * ada-varobj.c (ada_varobj_get_number_of_children,
465         ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
466
467 2018-09-10  Xavier Roirand  <roirand@adacore.com>
468
469         * ada-valprint.c (ada_value_print): Use type instead of
470         enclosing type.
471
472 2018-09-10  Xavier Roirand  <roirand@adacore.com>
473
474         * ada-lang.c (ada_value_subscript): Handle case when parameter is
475         an array of access to unconstrained array.
476
477 2018-09-10  Xavier Roirand  <roirand@adacore.com>
478
479         * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
480         (ada_check_typedef): Use it.
481
482 2018-09-10  Xavier Roirand  <roirand@adacore.com>
483
484         * ada-varobj.c (ada_varobj_describe_struct_child)
485         (ada_varobj_describe_child): Handle union case like struct one.
486
487 2018-09-10  Tom Tromey  <tom@tromey.com>
488
489         PR python/18380:
490         * python/python.c (_initialize_python): Make example in "python"
491         help work in Python 3.
492
493 2018-09-10  Eli Zaretskii  <eliz@gnu.org>
494
495         * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
496         INSTALL_PROGRAM to install gdb-add-index.sh.  Don't append
497         $(EXEEXT) to the script, as it is not a program.
498
499 2018-09-09  Simon Marchi  <simon.marchi@ericsson.com>
500
501         * python/py-prettyprint.c (pretty_print_one_value): Return
502         gdbpy_ref<>.
503         (print_string_repr): Adjust.
504         (apply_varobj_pretty_printer): Return gdbpy_ref<>.
505         * python/python-internal.h (apply_varobj_pretty_printer): Return
506         gdbpy_ref<>.
507         * varobj.c (varobj_value_get_print_value): Adjust.
508
509 2018-09-08  Tom Tromey  <tom@tromey.com>
510
511         PR python/16047:
512         * python/py-prettyprint.c (pretty_print_one_value): Check for
513         to_string method.
514
515 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
516
517         * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
518         replace_operator_with_call.
519
520 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
521
522         * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
523
524 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
525
526         * ada-typeprint.c (print_range): Print the bounds using TYPE
527         rather than its TYPE_TARGET_TYPE.
528
529 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
530
531         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
532         call to ada_to_fixed_value_create.
533
534 2018-09-08  Jerome Guitton  <guitton@adacore.com>
535
536         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
537
538 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
539
540         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
541         by calls to error.
542
543 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
544
545         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
546         Move update of loop variable "fi".
547
548 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
549
550         * ada-lang.c (value_assign_to_component): In the case of
551         big-endian targets, extract the bits of the given VAL
552         using an src_offset of zero if container is not a scalar.
553
554 2018-09-06  Simon Ser  <contact@emersion.fr>
555
556         PR gdb/23105
557         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
558         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
559         * fbsd-tdep.c (fbsd_make_note_desc): New.
560         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
561         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
562         * target.h (enum target_object) Add FreeBSD-specific
563         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
564
565 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
566
567         * compile/compile-c.h (generate_c_for_variable_locations):
568         Change reference to pointer.
569         * compile/compile-c-support.c (compile_program) <compute>:
570         Likewise.
571         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
572         (generate_c_for_for_one_variable): Likewise
573         (generate_c_for_variable_locations): Likewise
574         * compile/compile-c-types.c (compile_c_instance::convert_type):
575         Likewise
576         * compile/compile-cplus-symbols.c (convert_one_symbol):
577         std::move the scope passed to enter_scope.
578         * compile/compile-cplus-types.c
579         (compile_cplus_instance::enter_scope): Make parameter
580         rvalue-reference.
581         (compile_cplus_instance::new_scope): Change reference to
582         pointer.
583         (compile_cplus_instance::convert_type): Likewise
584         (compile_cplus_convert_typedef): std::move the scope passed to
585         enter_scope.
586         (compile_cplus_convert_struct_or_union): Likewise.
587         (compile_cplus_convert_enum): Likewise.
588         (compile_cplus_convert_namespace): Likewise.
589         * compile/compile-cplus.h (compile_cplus_instance)
590         <enter_scope>: Make parameter rvalue-reference.
591         * compile/compile-internal.h (compile_instance)
592         <get_cached_type>: Likewise
593         * compile/compile-loc2c.c (push): Likewise
594         (pushf): Likewise
595         (unary): Likewise
596         (binary): Likewise
597         (print_label): Likewise
598         (pushf_register_address): Likewise
599         (pushf_register): Likewise
600         (do_compile_dwarf_expr_to_c): Likewise
601         (compile_dwarf_expr_to_c): Likewise
602         (compile_dwarf_bounds_to_c): Likewise
603         * compile/compile.c (compile_instance::get_cached_type):
604         Likewise
605         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
606         (compile_dwarf_bounds_to_c): Likewise
607         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
608         (dwarf2_compile_property_to_c): Likewise
609         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
610         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
611         Likewise
612
613 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
614
615         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
616         * tui/tui-data.c (init_content_element): Don't initialize it.
617
618 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
619
620         * tui/tui-data.h (struct tui_win_info)
621         <detail::opaque>: Remove.
622         * tui/tui-data.c (init_win_info): Remove assignment.
623
624 2018-09-05  Tom Tromey  <tom@tromey.com>
625
626         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
627         -Wformat-nonliteral.
628         * target-float.c (host_float_ops<T>::to_string)
629         (host_float_ops<T>::from_string): Use
630         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
631         * configure: Rebuild.
632
633 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
634
635         * printcmd.c (printf_c_string): Use
636         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
637         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
638
639 2018-09-05  Tom Tromey  <tom@tromey.com>
640
641         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
642
643 2018-09-05  Tom de Vries  <tdevries@suse.de>
644
645         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
646         with resolve_abstract_p == true.
647         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
648         defaulting to false. Propagate resolve_abstract_p to
649         dwarf2_fetch_die_loc_sect_off.
650         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
651         parameter, defaulting to false.
652         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
653         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
654         parameter.
655         * dwarf2read.h (struct die_info): Forward-declare.
656         (die_info_ptr): New typedef.
657         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
658
659 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
660
661         GDB 8.2 released.
662
663 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
664             Pedro Alves  <palves@redhat.com>
665
666         * gnulib/Makefile.in (aclocal_m4_deps): Move to
667         "aclocal-m4-deps.mk".  Include file here.
668         $(srcdir)/aclocal.m4: Add "configure.ac".
669         * gnulib/aclocal-m4-deps.mk: New file.
670         * gnulib/update-gnulib.sh: Automatically update
671         "aclocal-m4-deps.mk".
672
673 2018-09-04  Tom Tromey  <tom@tromey.com>
674
675         * configure: Rebuild.
676         * configure.ac: Remove multi-ice code.
677
678 2018-09-04  Tom Tromey  <tom@tromey.com>
679
680         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
681         (ada-exp.o): Update.
682
683 2018-09-04  Tom Tromey  <tom@tromey.com>
684
685         * Makefile.in (printcmd.o, target-float.o): Remove.
686         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
687
688 2018-09-04  Tom Tromey  <tom@tromey.com>
689
690         * gnulib/Makefile.in: Remove obsolete comment.
691         * Makefile.in: Remove obsolete comment.
692
693 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
694
695         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
696         line with '+'.
697
698 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
699
700         * riscv-tdep.c: Add 'prologue-value.h' include.
701         (struct riscv_unwind_cache): New struct.
702         (riscv_debug_unwinder): New global.
703         (riscv_scan_prologue): Update arguments, capture register details
704         from prologue scan.
705         (riscv_skip_prologue): Reformat arguments line, move end of
706         prologue calculation into riscv_scan_prologue.
707         (riscv_frame_cache): Update return type, create
708         riscv_unwind_cache, scan the prologue, and fill in remaining cache
709         details.
710         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
711         (riscv_frame_prev_register): Use the trad_frame within the
712         riscv_unwind_cache.
713         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
714         flag.
715
716 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
717
718         * trad-frame.h (trad_frame_set_realreg): Declare.
719         (trad_frame_set_addr): Declare.
720         * trad-frame.c (trad_frame_set_realreg): Define new function.
721         (trad_frame_set_addr): Define new function.
722         (trad_frame_set_reg_realreg): Use new function.
723         (trad_frame_set_reg_addr): Use new function.
724
725 2018-09-01  Keith Seitz  <keiths@redhat.com>
726
727         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
728         pulongest instead of "%lld".
729         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
730         ATTRIBUTE_UNUSED.
731
732 2018-08-31  Tom Tromey  <tom@tromey.com>
733
734         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
735         variant part type.
736
737 2018-08-31  Pedro Alves  <palves@redhat.com>
738
739         * gdbarch.h: Regenerate.
740
741 2018-08-31  Pedro Alves  <palves@redhat.com>
742
743         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
744         * target.h (Hardware watchpoint interfaces): Describe
745         continuable/steppable/non-steppable watchpoints.
746         * gdbarch.h, gdbarch.c: Regenerate.
747
748 2018-08-31  Pedro Alves  <palves@redhat.com>
749
750         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
751         Delete.
752         * s390-linux-nat.c
753         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
754         * target.h (target_ops::have_continuable_watchpoint): Delete.
755         (target_have_continuable_watchpoint): Delete.
756         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
757         * target-delegates.c: Regenerate.
758
759 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
760
761         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
762         the files present in "gnulib/import/m4/".
763
764 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
765
766         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
767         c.sw, c.swsp, and c.sdsp.
768
769 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
770
771         * riscv-tdep.c (struct riscv_inferior_data): Delete.
772         (riscv_read_misa_reg): Don't cache value read into inferior data.
773         (riscv_new_inferior_data): Delete.
774         (riscv_inferior_data_cleanup): Delete.
775         (riscv_inferior_data): Delete.
776         (riscv_invalidate_inferior_data): Delete.
777         (_initialize_riscv_tdep): Remove initialisation of inferior data.
778
779 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
780
781         * compile/compile-cplus-types.c
782         (compile_cplus_instance::leave_scope): Take the address of scope
783         object.
784         (compile_cplus_instance::convert_qualified_base): Compare quals
785         to 0.
786
787 2018-08-30  Keith Seitz  <keiths@redhat.com>
788
789         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
790         Use "%s" and host_address_to_string instead of "%p" in printf.
791
792 2018-08-29  Keith Seitz  <keiths@redhat.com>
793
794         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
795         and compile-cplus-types.c.
796         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
797         * c-lang.c (cplus_language_defn): Set C++ compile functions.
798         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
799         Declare.
800         * compile/compile-c-support.c: Include compile-cplus.h.
801         (load_libcompile): Templatize.
802         (get_compile_context): "New" function.
803         (c_get_compile_context): Use get_compile_context.
804         (cplus_get_compile_context): New function.
805         (cplus_push_user_expression, cplus_pop_user_expression)
806         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
807         (cplus_compute_program): Define new structs/functions.
808         * compile/compile-cplus-symmbols.c: New file.
809         * compile/compile-cplus-types.c: New file.
810         * compile/compile-cplus.h: New file.
811         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
812         Declare.
813         * compile/compile-object-load.c (get_out_value_type): Use
814         strncmp_iw when comparing symbol names.
815         (compile_object_load): Add mst_bss and mst_data.
816         * compile/compile.c (_initialize_compile): Remove
817         -Wno-implicit-function-declaration from `compile_args'.
818         * compile/gcc-cp-plugin.h: New file.
819         * NEWS: Mention C++ compile support and new debug options.
820
821 2018-08-29  Keith Seitz  <keiths@redhat.com>
822
823         * linespec.c (collect_info::add_symbol): Make virtual.
824         (struct symbol_searcher_collect_info): New struct.
825         (symbol_searcher::find_all_symbols): New method.
826         * symtab.h (class symbol_searcher): New class.
827
828 2018-08-29  Keith Seitz  <keiths@redhat.com>
829
830         * linespec.c (struct linespec) <function_symbols, label_symbols>:
831         Change to vector of block_symbol.  Update all users.
832         (struct collect_info) <symbols>: Likewise.
833         (collect_info::add_symbol): Take block_symbol as argument.
834         Update all callers.
835         (decode_compound_collector) <m_symbols>: Change type to vector
836         of block_symbol.  Update all users.
837         (decode_compound_collector::operator ()): Change parameter type
838         to block_symbol.
839         (find_method, find_function_symbols, find_linespec_symbols)
840         (find_label_symbols_in_block, find_label_symbols): Change symbol
841         vectors to block_symbol vectors.
842         * symtab.h (symbol_found_callback_ftype): Change parameter type to
843         block_symbol.
844
845 2018-08-29  Keith Seitz  <keiths@redhat.com>
846
847         * linespec.c (symbolp): Remove typedef and VEC definitions.
848         (bound_minimal_symbol_d): Likewise.
849
850 2018-08-29  Keith Seitz  <keiths@redhat.com>
851
852         * linespec.c (decode_compound_collector::decode_compound_collector):
853         Remove initialization for `m_symtabs'.
854         (decode_compound_collector::release_symbols): Change return type
855         to std::vector.  Update all callers.
856         (class decode_compound_collector) <m_symbols>: Change type to
857         std::vector.
858         (lookup_prefix_sym): Change return type to std::vector.  Update all
859         callers.
860         (compare_symbols): Remove.
861         (std_compare_symbols): Rename to `compare_symbols'.
862         (find_method): Change `sym_classes' parameter to std::vector.
863         Update all callers.  Use std::sort to sort sym_classes.
864         (find_linespec_symbols): Remove cleanup.
865
866 2018-08-29  Keith Seitz  <keiths@redhat.com>
867
868         * linespec.c (struct linespec) <minimal_symbols>: Change type to
869         std::vector.  Update all users.
870         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
871         (struct collect_info) <minimal_symbols>: Likewise.
872         (compare_msymbols): Return bool.  Change parameters to const
873         bound_minimal_symbol references.
874         (find_method, find_function_symbols, find_linespec_symbols): Change
875         `minsyms' parameter to std::vector.  Update all callers.
876
877 2018-08-29  Keith Seitz  <keiths@redhat.com>
878
879         * linespec.c (struct linespec) <label_symbols>: Change type to
880         std::vector.  Update all users.
881         (find_label_symbols_in_block): Change `result' parameter to
882         std::vector.  Update all callers.
883         (find_label_symbols): Return std::vector.  Update all callers.
884
885 2018-08-29  Keith Seitz  <keiths@redhat.com>
886
887         * linespec.c (struct linespec) <function_symbols>: Change type to
888         std::vector.  Update all users.
889         (struct collect_info) <function_symbols>: Likewise.
890         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
891         (std_compare_symbols): New function.
892         (find_method, find_function_symbols, find_linespec_symbols)
893         (find_label_symbols_in_block): Change `symbols' parameter to
894         std::vector.  Update all callers.
895         (find_label_symbols): Likewise for `function_symbols' and
896         `label_funcs_ret'.
897
898 2018-08-29  Keith Seitz  <keiths@redhat.com>
899
900         * linespec.c (symtab_vector_up): Define.
901         (struct linespec) <file_symtabs>: Change type to std::vector *.
902         Update all uses.
903         (struct collect_info) <file_symtabs>: Likewise.
904         (collect_symtabs_from_filename): Return symtab_vector_up.
905         Update all callers.
906         (decode_objc): Remove cleanup.
907         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
908         (symtab_collector::release_symtabs): Return symtab_vector_up.
909         Update all callers.
910         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
911         Update all users.
912         (collect_symtabs_from_filename, symtabs_from_filename): Return
913         symtab_vector_up.  Update all callers.
914
915 2018-08-29  Tom Tromey  <tom@tromey.com>
916
917         * csky-tdep.c (csky_analyze_prologue): Use
918         core_addr_to_string_nz.
919
920 2018-08-29  Tom Tromey  <tom@tromey.com>
921
922         * windows-nat.c (struct xlate_exception) <them>: Change type to
923         DWORD.
924         (xlate): Fix formatting.  Remove last entry.
925         (struct xlate_exception, xlate): Comment out.
926         (windows_nat_target::resume): Use ranged for.
927
928 2018-08-29  Jim Wilson  <jimw@sifive.com>
929
930         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
931         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
932         of NT_PRFPREG.
933         (riscv_linux_nat_target::store_registers): Likewise.
934
935 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
936
937         PR gdb/23555
938         PR gdb/23558
939         * gnulib/aclocal.m4: Regenerate.
940         * gnulib/config.in: Regenerate.
941         * gnulib/configure: Regenerate.
942         * gnulib/import/Makefile.am: Update.
943         * gnulib/import/Makefile.in: Update.
944         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
945         * gnulib/import/_Noreturn.h: ... this.
946         * gnulib/import/alloca.in.h: Update.
947         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
948         * gnulib/import/arg-nonnull.h: ... this.
949         * gnulib/import/assure.h: Update.
950         * gnulib/import/at-func.c: Update.
951         * gnulib/import/basename-lgpl.c: Update.
952         * gnulib/import/extra/snippet/c++defs.h: Rename to...
953         * gnulib/import/c++defs.h: ... this.
954         * gnulib/import/canonicalize-lgpl.c: Update.
955         * gnulib/import/cdefs.h: Update.
956         * gnulib/import/chdir-long.c: Update.
957         * gnulib/import/chdir-long.h: Update.
958         * gnulib/import/cloexec.c: Update.
959         * gnulib/import/cloexec.h: Update.
960         * gnulib/import/close.c: Update.
961         * gnulib/import/closedir.c: Update.
962         * gnulib/import/config.charset: Update.
963         * gnulib/import/dirent-private.h: Update.
964         * gnulib/import/dirent.in.h: Update.
965         * gnulib/import/dirfd.c: Update.
966         * gnulib/import/dirname-lgpl.c: Update.
967         * gnulib/import/dirname.h: Update.
968         * gnulib/import/dosname.h: Update.
969         * gnulib/import/dup-safer-flag.c: Update.
970         * gnulib/import/dup-safer.c: Update.
971         * gnulib/import/dup.c: Update.
972         * gnulib/import/dup2.c: Update.
973         * gnulib/import/errno.in.h: Update.
974         * gnulib/import/error.c: Update.
975         * gnulib/import/error.h: Update.
976         * gnulib/import/exitfail.c: Update.
977         * gnulib/import/exitfail.h: Update.
978         * gnulib/import/extra/update-copyright: Update.
979         * gnulib/import/fchdir.c: Update.
980         * gnulib/import/fcntl.c: Update.
981         * gnulib/import/fcntl.in.h: Update.
982         * gnulib/import/fd-hook.c: Update.
983         * gnulib/import/fd-hook.h: Update.
984         * gnulib/import/fd-safer-flag.c: Update.
985         * gnulib/import/fd-safer.c: Update.
986         * gnulib/import/fdopendir.c: Update.
987         * gnulib/import/filename.h: Update.
988         * gnulib/import/filenamecat-lgpl.c: Update.
989         * gnulib/import/filenamecat.h: Update.
990         * gnulib/import/flexmember.h: Update.
991         * gnulib/import/float+.h: Update.
992         * gnulib/import/float.c: Update.
993         * gnulib/import/float.in.h: Update.
994         * gnulib/import/fnmatch.c: Update.
995         * gnulib/import/fnmatch.in.h: Update.
996         * gnulib/import/fnmatch_loop.c: Update.
997         * gnulib/import/fpucw.h: Update.
998         * gnulib/import/frexp.c: Update.
999         * gnulib/import/frexpl.c: Update.
1000         * gnulib/import/fstat.c: Update.
1001         * gnulib/import/fstatat.c: Update.
1002         * gnulib/import/getcwd-lgpl.c: Update.
1003         * gnulib/import/getcwd.c: Update.
1004         * gnulib/import/getdtablesize.c: Update.
1005         * gnulib/import/getlogin_r.c: Update.
1006         * gnulib/import/getprogname.c: Update.
1007         * gnulib/import/getprogname.h: Update.
1008         * gnulib/import/gettext.h: Update.
1009         * gnulib/import/gettimeofday.c: Update.
1010         * gnulib/import/glob-libc.h: Update.
1011         * gnulib/import/glob.c: Update.
1012         * gnulib/import/glob.in.h: Update.
1013         * gnulib/import/glob_internal.h: Update.
1014         * gnulib/import/glob_pattern_p.c: Update.
1015         * gnulib/import/globfree.c: Update.
1016         * gnulib/import/hard-locale.c: Update.
1017         * gnulib/import/hard-locale.h: Update.
1018         * gnulib/import/intprops.h: Update.
1019         * gnulib/import/inttypes.in.h: Update.
1020         * gnulib/import/isnan.c: Update.
1021         * gnulib/import/isnand-nolibm.h: Update.
1022         * gnulib/import/isnand.c: Update.
1023         * gnulib/import/isnanl-nolibm.h: Update.
1024         * gnulib/import/isnanl.c: Update.
1025         * gnulib/import/itold.c: Update.
1026         * gnulib/import/libc-config.h: Update.
1027         * gnulib/import/limits.in.h: Update.
1028         * gnulib/import/localcharset.c: Update.
1029         * gnulib/import/localcharset.h: Update.
1030         * gnulib/import/localtime-buffer.c: Update.
1031         * gnulib/import/localtime-buffer.h: Update.
1032         * gnulib/import/lstat.c: Update.
1033         * gnulib/import/m4/00gnulib.m4: Update.
1034         * gnulib/import/m4/__inline.m4: Update.
1035         * gnulib/import/m4/absolute-header.m4: Update.
1036         * gnulib/import/m4/alloca.m4: Update.
1037         * gnulib/import/m4/builtin-expect.m4: Update.
1038         * gnulib/import/m4/canonicalize.m4: Update.
1039         * gnulib/import/m4/chdir-long.m4: Update.
1040         * gnulib/import/m4/close.m4: Update.
1041         * gnulib/import/m4/closedir.m4: Update.
1042         * gnulib/import/m4/configmake.m4: Update.
1043         * gnulib/import/m4/d-ino.m4: Update.
1044         * gnulib/import/m4/d-type.m4: Update.
1045         * gnulib/import/m4/dirent_h.m4: Update.
1046         * gnulib/import/m4/dirfd.m4: Update.
1047         * gnulib/import/m4/dirname.m4: Update.
1048         * gnulib/import/m4/double-slash-root.m4: Update.
1049         * gnulib/import/m4/dup.m4: Update.
1050         * gnulib/import/m4/dup2.m4: Update.
1051         * gnulib/import/m4/eealloc.m4: Update.
1052         * gnulib/import/m4/environ.m4: Update.
1053         * gnulib/import/m4/errno_h.m4: Update.
1054         * gnulib/import/m4/error.m4: Update.
1055         * gnulib/import/m4/exponentd.m4: Update.
1056         * gnulib/import/m4/exponentl.m4: Update.
1057         * gnulib/import/m4/extensions.m4: Update.
1058         * gnulib/import/m4/extern-inline.m4: Update.
1059         * gnulib/import/m4/fchdir.m4: Update.
1060         * gnulib/import/m4/fcntl-o.m4: Update.
1061         * gnulib/import/m4/fcntl.m4: Update.
1062         * gnulib/import/m4/fcntl_h.m4: Update.
1063         * gnulib/import/m4/fdopendir.m4: Update.
1064         * gnulib/import/m4/filenamecat.m4: Update.
1065         * gnulib/import/m4/flexmember.m4: Update.
1066         * gnulib/import/m4/float_h.m4: Update.
1067         * gnulib/import/m4/fnmatch.m4: Update.
1068         * gnulib/import/m4/fnmatch_h.m4: Update.
1069         * gnulib/import/m4/fpieee.m4: Update.
1070         * gnulib/import/m4/frexp.m4: Update.
1071         * gnulib/import/m4/frexpl.m4: Update.
1072         * gnulib/import/m4/fstat.m4: Update.
1073         * gnulib/import/m4/fstatat.m4: Update.
1074         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
1075         * gnulib/import/m4/getcwd-path-max.m4: Update.
1076         * gnulib/import/m4/getcwd.m4: Update.
1077         * gnulib/import/m4/getdtablesize.m4: Update.
1078         * gnulib/import/m4/getlogin.m4: Update.
1079         * gnulib/import/m4/getlogin_r.m4: Update.
1080         * gnulib/import/m4/getpagesize.m4: Update.
1081         * gnulib/import/m4/getprogname.m4: Update.
1082         * gnulib/import/m4/gettimeofday.m4: Update.
1083         * gnulib/import/m4/glibc21.m4: Update.
1084         * gnulib/import/m4/glob.m4: Update.
1085         * gnulib/import/m4/glob_h.m4: Update.
1086         * gnulib/import/m4/gnulib-cache.m4: Update.
1087         * gnulib/import/m4/gnulib-common.m4: Update.
1088         * gnulib/import/m4/gnulib-comp.m4: Update.
1089         * gnulib/import/m4/gnulib-tool.m4: Update.
1090         * gnulib/import/m4/hard-locale.m4: Update.
1091         * gnulib/import/m4/include_next.m4: Update.
1092         * gnulib/import/m4/inttypes-pri.m4: Update.
1093         * gnulib/import/m4/inttypes.m4: Update.
1094         * gnulib/import/m4/isnand.m4: Update.
1095         * gnulib/import/m4/isnanl.m4: Update.
1096         * gnulib/import/m4/largefile.m4: Update.
1097         * gnulib/import/m4/limits-h.m4: Update.
1098         * gnulib/import/m4/localcharset.m4: Update.
1099         * gnulib/import/m4/locale-fr.m4: Update.
1100         * gnulib/import/m4/locale-ja.m4: Update.
1101         * gnulib/import/m4/locale-zh.m4: Update.
1102         * gnulib/import/m4/localtime-buffer.m4: Update.
1103         * gnulib/import/m4/longlong.m4: Update.
1104         * gnulib/import/m4/lstat.m4: Update.
1105         * gnulib/import/m4/malloc.m4: Update.
1106         * gnulib/import/m4/malloca.m4: Update.
1107         * gnulib/import/m4/math_h.m4: Update.
1108         * gnulib/import/m4/mbrtowc.m4: Update.
1109         * gnulib/import/m4/mbsinit.m4: Update.
1110         * gnulib/import/m4/mbsrtowcs.m4: Update.
1111         * gnulib/import/m4/mbstate_t.m4: Update.
1112         * gnulib/import/m4/memchr.m4: Update.
1113         * gnulib/import/m4/memmem.m4: Update.
1114         * gnulib/import/m4/mempcpy.m4: Update.
1115         * gnulib/import/m4/memrchr.m4: Update.
1116         * gnulib/import/m4/mkdir.m4: Update.
1117         * gnulib/import/m4/mkstemp.m4: Update.
1118         * gnulib/import/m4/mmap-anon.m4: Update.
1119         * gnulib/import/m4/mode_t.m4: Update.
1120         * gnulib/import/m4/msvc-inval.m4: Update.
1121         * gnulib/import/m4/msvc-nothrow.m4: Update.
1122         * gnulib/import/m4/multiarch.m4: Update.
1123         * gnulib/import/m4/nocrash.m4: Update.
1124         * gnulib/import/m4/off_t.m4: Update.
1125         * gnulib/import/m4/onceonly.m4: Update.
1126         * gnulib/import/m4/open-cloexec.m4: Update.
1127         * gnulib/import/m4/open.m4: Update.
1128         * gnulib/import/m4/openat.m4: Update.
1129         * gnulib/import/m4/opendir.m4: Update.
1130         * gnulib/import/m4/pathmax.m4: Update.
1131         * gnulib/import/m4/rawmemchr.m4: Update.
1132         * gnulib/import/m4/readdir.m4: Update.
1133         * gnulib/import/m4/readlink.m4: Update.
1134         * gnulib/import/m4/realloc.m4: Update.
1135         * gnulib/import/m4/rename.m4: Update.
1136         * gnulib/import/m4/rewinddir.m4: Update.
1137         * gnulib/import/m4/rmdir.m4: Update.
1138         * gnulib/import/m4/save-cwd.m4: Update.
1139         * gnulib/import/m4/secure_getenv.m4: Update.
1140         * gnulib/import/m4/setenv.m4: Update.
1141         * gnulib/import/m4/signal_h.m4: Update.
1142         * gnulib/import/m4/ssize_t.m4: Update.
1143         * gnulib/import/m4/stat-time.m4: Update.
1144         * gnulib/import/m4/stat.m4: Update.
1145         * gnulib/import/m4/std-gnu11.m4: Update.
1146         * gnulib/import/m4/stdbool.m4: Update.
1147         * gnulib/import/m4/stddef_h.m4: Update.
1148         * gnulib/import/m4/stdint.m4: Update.
1149         * gnulib/import/m4/stdio_h.m4: Update.
1150         * gnulib/import/m4/stdlib_h.m4: Update.
1151         * gnulib/import/m4/strchrnul.m4: Update.
1152         * gnulib/import/m4/strdup.m4: Update.
1153         * gnulib/import/m4/strerror.m4: Update.
1154         * gnulib/import/m4/string_h.m4: Update.
1155         * gnulib/import/m4/strstr.m4: Update.
1156         * gnulib/import/m4/strtok_r.m4: Update.
1157         * gnulib/import/m4/sys_socket_h.m4: Update.
1158         * gnulib/import/m4/sys_stat_h.m4: Update.
1159         * gnulib/import/m4/sys_time_h.m4: Update.
1160         * gnulib/import/m4/sys_types_h.m4: Update.
1161         * gnulib/import/m4/tempname.m4: Update.
1162         * gnulib/import/m4/time_h.m4: Update.
1163         * gnulib/import/m4/unistd-safer.m4: Update.
1164         * gnulib/import/m4/unistd_h.m4: Update.
1165         * gnulib/import/m4/warn-on-use.m4: Update.
1166         * gnulib/import/m4/wchar_h.m4: Update.
1167         * gnulib/import/m4/wchar_t.m4: Update.
1168         * gnulib/import/m4/wctype_h.m4: Update.
1169         * gnulib/import/m4/wint_t.m4: Update.
1170         * gnulib/import/malloc.c: Update.
1171         * gnulib/import/malloc/scratch_buffer.h: Update.
1172         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
1173         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
1174         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
1175         * gnulib/import/malloca.c: Update.
1176         * gnulib/import/malloca.h: Update.
1177         * gnulib/import/malloca.valgrind: Update.
1178         * gnulib/import/math.in.h: Update.
1179         * gnulib/import/mbrtowc.c: Update.
1180         * gnulib/import/mbsinit.c: Update.
1181         * gnulib/import/mbsrtowcs-impl.h: Update.
1182         * gnulib/import/mbsrtowcs-state.c: Update.
1183         * gnulib/import/mbsrtowcs.c: Update.
1184         * gnulib/import/memchr.c: Update.
1185         * gnulib/import/memmem.c: Update.
1186         * gnulib/import/mempcpy.c: Update.
1187         * gnulib/import/memrchr.c: Update.
1188         * gnulib/import/mkdir.c: Update.
1189         * gnulib/import/mkstemp.c: Update.
1190         * gnulib/import/msvc-inval.c: Update.
1191         * gnulib/import/msvc-inval.h: Update.
1192         * gnulib/import/msvc-nothrow.c: Update.
1193         * gnulib/import/msvc-nothrow.h: Update.
1194         * gnulib/import/open.c: Update.
1195         * gnulib/import/openat-die.c: Update.
1196         * gnulib/import/openat-priv.h: Update.
1197         * gnulib/import/openat-proc.c: Update.
1198         * gnulib/import/openat.c: Update.
1199         * gnulib/import/openat.h: Update.
1200         * gnulib/import/opendir.c: Update.
1201         * gnulib/import/pathmax.h: Update.
1202         * gnulib/import/pipe-safer.c: Update.
1203         * gnulib/import/rawmemchr.c: Update.
1204         * gnulib/import/readdir.c: Update.
1205         * gnulib/import/readlink.c: Update.
1206         * gnulib/import/realloc.c: Update.
1207         * gnulib/import/ref-add.sin: Update.
1208         * gnulib/import/ref-del.sin: Update.
1209         * gnulib/import/rename.c: Update.
1210         * gnulib/import/rewinddir.c: Update.
1211         * gnulib/import/rmdir.c: Update.
1212         * gnulib/import/same-inode.h: Update.
1213         * gnulib/import/save-cwd.c: Update.
1214         * gnulib/import/save-cwd.h: Update.
1215         * gnulib/import/scratch_buffer.h: Update.
1216         * gnulib/import/secure_getenv.c: Update.
1217         * gnulib/import/setenv.c: Update.
1218         * gnulib/import/signal.in.h: Update.
1219         * gnulib/import/stat-time.c: Update.
1220         * gnulib/import/stat-time.h: Update.
1221         * gnulib/import/stat-w32.c: Update.
1222         * gnulib/import/stat-w32.h: Update.
1223         * gnulib/import/stat.c: Update.
1224         * gnulib/import/stdbool.in.h: Update.
1225         * gnulib/import/stddef.in.h: Update.
1226         * gnulib/import/stdint.in.h: Update.
1227         * gnulib/import/stdio.in.h: Update.
1228         * gnulib/import/stdlib.in.h: Update.
1229         * gnulib/import/str-two-way.h: Update.
1230         * gnulib/import/strchrnul.c: Update.
1231         * gnulib/import/strdup.c: Update.
1232         * gnulib/import/streq.h: Update.
1233         * gnulib/import/strerror-override.c: Update.
1234         * gnulib/import/strerror-override.h: Update.
1235         * gnulib/import/strerror.c: Update.
1236         * gnulib/import/string.in.h: Update.
1237         * gnulib/import/stripslash.c: Update.
1238         * gnulib/import/strnlen1.c: Update.
1239         * gnulib/import/strnlen1.h: Update.
1240         * gnulib/import/strstr.c: Update.
1241         * gnulib/import/strtok_r.c: Update.
1242         * gnulib/import/sys_stat.in.h: Update.
1243         * gnulib/import/sys_time.in.h: Update.
1244         * gnulib/import/sys_types.in.h: Update.
1245         * gnulib/import/tempname.c: Update.
1246         * gnulib/import/tempname.h: Update.
1247         * gnulib/import/time.in.h: Update.
1248         * gnulib/import/unistd--.h: Update.
1249         * gnulib/import/unistd-safer.h: Update.
1250         * gnulib/import/unistd.in.h: Update.
1251         * gnulib/import/unsetenv.c: Update.
1252         * gnulib/import/verify.h: Update.
1253         * gnulib/import/extra/snippet/warn-on-use.h: Update.
1254         * gnulib/import/wchar.in.h: Update.
1255         * gnulib/import/wctype.in.h: Update.
1256         * gnulib/import/xalloc-oversized.h: Update.
1257         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
1258         "53e2c179f26a890fa6685af4b6c1397ee370433b".
1259
1260 2018-08-16  Gary Benson <gbenson@redhat.com>
1261
1262         PR gdb/13000:
1263         * gdb/main.c (captured_main_1): Exit with nonzero status
1264         in batch mode if the last command to be executed failed.
1265         * NEWS: Mention the above.
1266
1267 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
1268
1269         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
1270         end of warning message.
1271
1272 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
1273
1274         PR gdb/22943:
1275         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
1276         (aarch64_extract_return_value): Use
1277         aapcs_is_vfp_call_or_return_candidate.
1278         (aarch64_return_in_memory): Likewise.
1279         (aarch64_store_return_value): Likewise.
1280
1281 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
1282
1283         * aarch64-tdep.c
1284         (aapcs_is_vfp_call_or_return_candidate): Make static
1285         (pass_in_v_or_stack): Remove function.
1286         (pass_in_v_vfp_candidate): New function.
1287         (aarch64_push_dummy_call): Check for float register candidates.
1288
1289 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
1290
1291         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
1292         (aapcs_is_vfp_call_or_return_candidate_1): New function.
1293         (aapcs_is_vfp_call_or_return_candidate): Likewise.
1294
1295 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
1296
1297         PR build/23399
1298         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
1299         (struct ipa_sym_addresses): Rename to...
1300         (struct ipa_sym_addresses_common): ... this.
1301         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
1302
1303 2018-08-28  Tom Tromey  <tom@tromey.com>
1304
1305         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1306         (token_fifo): Now a std::vector.
1307         (yylex, c_parse): Update.
1308         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1309         (token_fifo): Now a std::vector.
1310         (yylex, d_parse): Update.
1311         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1312         (token_fifo): Now a std::vector.
1313         (yylex, go_parse): Update.
1314
1315 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
1316
1317         * parser-defs.h (struct type_stack) <elements>: Change type to
1318         std::vector<union type_stack_elt>.
1319         <depth, size>: Remove.
1320         * parse.c (parse_exp_in_context_1): Adjust.
1321         (type_stack_reserve): Remove.
1322         (check_type_stack_depth): Remove.
1323         (insert_into_type_stack): Adjust to std::vector.
1324         (insert_type): Likewise.
1325         (push_type): Likewise.
1326         (push_type_int): Likewise.
1327         (insert_type_address_space): Likewise.
1328         (pop_type): Likewise.
1329         (pop_type_int): Likewise.
1330         (pop_typelist): Likewise.
1331         (pop_type_stack): Likewise.
1332         (append_type_stack): Likewise.
1333         (push_type_stack): Likewise.
1334         (get_type_stack): Likewise.
1335         (type_stack_cleanup): Likewise.
1336         (push_typelist): Likewise.
1337         (follow_types): Likewise.
1338         (_initialize_parse): Likewise.
1339
1340 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
1341
1342         * NEWS: Mention csky target.
1343
1344 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
1345             Hafiz Abid Qadeer  <abidh@codesourcery.com>
1346             Don Breazeal  <donb@codesourcery.com>
1347
1348         * csky-linux-tdep.c: New file.
1349         * csky-tdep.c: Likewise.
1350         * csky-tdep.h: Likewise.
1351         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
1352         csky-tdep.o.
1353         (HFILES_NO_SRCDIR): Add csky-tdep.h.
1354         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
1355         * configure.tgt: Add csky support.
1356
1357 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
1358
1359         * python/py-framefilter.c (py_print_frame): Print frame architecture
1360         when printing on an MI output.
1361
1362 2018-08-27  Tom Tromey  <tom@tromey.com>
1363
1364         PR build/23087:
1365         * configure: Rebuild.
1366         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
1367
1368 2018-08-27  Tom Tromey  <tom@tromey.com>
1369
1370         * aarch64-linux-tdep.c
1371         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
1372         casts to int.
1373
1374 2018-08-27  Tom Tromey  <tom@tromey.com>
1375
1376         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
1377         unsigned.
1378         (ppc64_standard_linkage1, ppc64_standard_linkage2)
1379         (ppc64_standard_linkage3, ppc64_standard_linkage4)
1380         (ppc64_standard_linkage5, ppc64_standard_linkage6)
1381         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
1382         unsigned.
1383
1384 2018-08-27  Tom Tromey  <tom@tromey.com>
1385
1386         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
1387         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
1388
1389 2018-08-27  Tom Tromey  <tom@tromey.com>
1390
1391         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
1392         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
1393         ULONGEST_MAX.
1394         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
1395         ULONGEST_MAX.
1396         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
1397         ULONGEST_MAX.
1398         * sparc-linux-tdep.c (sparc32_linux_sigframe)
1399         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
1400         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
1401         ULONGEST_MAX.
1402         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
1403         (ppc64_linux_sigaction_tramp_frame)
1404         (ppc32_linux_sighandler_tramp_frame)
1405         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
1406         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
1407         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
1408         * mn10300-linux-tdep.c (am33_linux_sigframe)
1409         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
1410         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
1411         * mips-linux-tdep.c (mips_linux_o32_sigframe)
1412         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
1413         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
1414         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
1415         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
1416         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
1417         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
1418         * microblaze-linux-tdep.c
1419         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
1420         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
1421         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
1422         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
1423         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
1424         * common/common-types.h (ULONGEST_MAX): New define.
1425         (CORE_ADDR_MAX): Fix formatting.
1426         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
1427         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
1428         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
1429         (arm_linux_rt_sigreturn_tramp_frame)
1430         (arm_eabi_linux_sigreturn_tramp_frame)
1431         (arm_eabi_linux_rt_sigreturn_tramp_frame)
1432         (thumb2_eabi_linux_sigreturn_tramp_frame)
1433         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
1434         (arm_linux_restart_syscall_tramp_frame)
1435         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
1436         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
1437         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
1438         ULONGEST_MAX.
1439         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
1440
1441 2018-08-27  Tom Tromey  <tom@tromey.com>
1442
1443         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
1444         CORE_ADDR_MAX.
1445         * mips-tdep.c (mips_deal_with_atomic_sequence)
1446         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
1447         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
1448         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
1449         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
1450         CORE_ADDR_MAX.
1451         * aarch64-tdep.c (aarch64_software_single_step): Use
1452         CORE_ADDR_MAX.
1453
1454 2018-08-27  Tom Tromey  <tom@tromey.com>
1455
1456         * linespec.c (complete_linespec_component): Add cast to "char".
1457         * completer.c (completion_tracker::build_completion_result): Add
1458         cast to "char".
1459
1460 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
1461
1462         * solist.h (struct solist, struct target_so_ops): Fix
1463         indentation.
1464
1465 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
1466
1467         * ada-tasks.c (ada_task_info_s): Remove typedef.
1468         (DEF_VEC_O(ada_task_info_s)): Remove.
1469         (struct ada_tasks_inferior_data): Initialize fields.
1470         <task_list>: Make an std::vector.
1471         (get_ada_tasks_inferior_data): Allocate with new.
1472         (ada_get_task_number): Adjust.
1473         (get_task_number_from_id): Likewise.
1474         (valid_task_id): Likewise.
1475         (ada_get_task_info_from_ptid): Likewise.
1476         (iterate_over_live_ada_tasks): Likewise.
1477         (add_ada_task): Likewise.
1478         (read_known_tasks): Likewise.
1479         (ada_build_task_list): Likewise.
1480         (print_ada_task_info): Likewise.
1481         (info_task): Likewise.
1482         (task_command_1): Likewise.
1483
1484 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
1485
1486         * ada-lang.c (add_angle_brackets): Return std::string.
1487
1488 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
1489
1490         * python/py-threadevent.c (py_get_event_thread): Initialize
1491         pythread.
1492
1493 2018-08-24  Pedro Alves  <palves@redhat.com>
1494
1495         * python/py-bpevent.c (create_breakpoint_event_object): Use
1496         copy-initialization.
1497         * python/py-continueevent.c (emit_continue_event): Use
1498         copy-initialization.
1499         * python/py-exitedevent.c (create_exited_event_object): Return a
1500         gdbpy_ref<>.
1501         (emit_exited_event): Use copy-initialization.
1502         * python/py-inferior.c (python_new_inferior)
1503         (python_inferior_deleted, add_thread_object): Use
1504         copy-initialization.
1505         * python/py-infevents.c (create_inferior_call_event_object)
1506         (create_register_changed_event_object)
1507         (create_memory_changed_event_object): Return a gdbpy_ref<>.
1508         (emit_inferior_call_event, emit_memory_changed_event)
1509         (emit_register_changed_event): Use copy-initialization.
1510         * python/py-newobjfileevent.c (create_new_objfile_event_object):
1511         Return a gdbpy_ref<>.
1512         (emit_new_objfile_event): Use copy-initialization.
1513         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
1514         (emit_clear_objfiles_event): Use copy-initialization.
1515         * python/py-signalevent.c (create_signal_event_object): Use
1516         copy-initialization.
1517         * python/py-threadevent.c (create_thread_event_object): Use
1518         copy-initialization.
1519
1520 2018-08-24  Pedro Alves  <palves@redhat.com>
1521             Simon Marchi  <simon.marchi@ericsson.com>
1522
1523         PR gdb/23379
1524         * python/py-continueevent.c: Include "gdbthread.h".
1525         (create_continue_event_object): Add intro comment.  Add 'ptid'
1526         parameter.  Use it to find thread to pass to
1527         create_thread_event_object.
1528         (emit_continue_event): Pass PTID down to
1529         create_continue_event_object.
1530         * python/py-event.h (py_get_event_thread): Declare.
1531         (create_thread_event_object): Remove default from 'thread'
1532         parameter.
1533         * python/py-stopevent.c (create_stop_event_object): Use
1534         py_get_event_thread.
1535         * python/py-threadevent.c (get_event_thread): Rename to ...
1536         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
1537         and use it to find the thread.
1538         (create_thread_event_object): Assert that THREAD isn't null.
1539         Don't find the event thread here.
1540
1541 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
1542
1543         * block.h (blockrange, blockranges): New struct declarations.
1544         (struct block): Add new field named `ranges'.
1545         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
1546         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
1547         macros for accessing ranges in struct block.
1548         (make_blockranges): New declaration.
1549         block.c (make_blockranges): New function.
1550         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
1551         for block.
1552         * symtab.h (find_pc_partial_function): Add new parameter `block'.
1553         * blockframe.c (cache_pc_function_block): New static global.
1554         (clear_pc_function_cache): Clear cache_pc_function_block.
1555         (find_pc_partial_function): Move comment to symtab.h.  Add
1556         support for non-contiguous blocks.
1557         * cli/cli-cmds.c (block.h): Include.
1558         (print_disassembly): Handle printing of non-contiguous blocks.
1559         (disassemble_current_function): Likewise.
1560         (disassemble_command): Likewise.
1561
1562         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
1563         BLOCK_START.
1564         * blockframe.c (get_pc_function_start): Likewise.
1565         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
1566         (gcc_symbol_address): Likewise.
1567         * compile/compile-object-run.c (compile_object_run): Likewise.
1568         * compile/compile.c (get_expr_block_and_pc): Likewise.
1569         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
1570         (func_addr_to_tail_call_list): Likewise.
1571         * findvar.c (default_read_var_value): Likewise.
1572         * inline-frame.c (inline_frame_this_id): Likewise.
1573         (skip-inline_frames): Likewise.
1574         * infcmd.c (until_next_command): Likewise.
1575         * linespec.c (convert_linespec_to_sals): Likewise.
1576         * parse.c (parse_exp_in_context_1): Likewise.
1577         * printcmd.c (build_address_symbolic): likewise.
1578         (info_address_command): Likewise.
1579         symtab.c (find_function_start_sal): Likewise.
1580         (skip_prologue_sal): Likewise.
1581         (find_function_alias_target): Likewise.
1582         (find_gnu_ifunc): Likewise.
1583         * stack.c (find_frame_funname): Likewise.
1584         * symtab.c (fixup_symbol_section): Likewise.
1585         (find_function_start_sal): Likewise.
1586         (skip_prologue_sal): Likewsie.
1587         (find_function_alias_target): Likewise.
1588         (find_gnu_ifunc): Likewise.
1589         * tracepoint.c (info_scope_command): Likewise.
1590         * value.c (value_fn_field): Likewise.
1591
1592         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
1593         in place of find_pc_partial_function.
1594         * blockframe.c (find_function_entry_range_from_pc): New function.
1595         * symtab.h (find_function_entry_range_from_pc): Declare and document.
1596         * objfiles.c (objfile_relocate1): Relocate start and end addresses
1597         for each range in a block.
1598
1599
1600 2018-08-23  Xavier Roirand  <roirand@adacore.com>
1601
1602         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
1603         incrementation.
1604
1605 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
1606
1607         * solib-svr4.c (read_program_headers_from_bfd): Return
1608         gdb::optional<gdb::byte_vector>.
1609         (svr4_exec_displacement): Adjust.
1610
1611 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
1612
1613         * solib-svr4.c (read_program_header): Return
1614         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
1615         (find_program_interpreter): Return
1616         gdb::optional<gdb::byte_vector>.
1617         (scan_dyntag_auxv): Adjust.
1618         (enable_break): Adjust.
1619         (svr4_exec_displacement): Adjust.
1620
1621 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
1622
1623         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
1624         * inf-child.c (inf_child_target::terminal_save_inferior): New.
1625
1626 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
1627
1628         * guile/scm-string.c (gdbscm_scm_from_printf): Use
1629         string_vprintf.
1630         * guile/scm-utils.c (gdbscm_printf): Likewise.
1631         * serial.c (serial_printf): Likewise.
1632         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
1633
1634 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
1635
1636         * stack.c (print_frame): Print frame architecture when printing on
1637         an MI output.
1638         * NEWS: Mention new "arch" attribute in frame output.
1639
1640 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
1641
1642         * arch/aarch64.h (aarch64_regnum): Update comment.
1643
1644 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
1645
1646         * NEWS: Add SVE to 8.2 section.
1647
1648 2018-08-21  Pedro Alves  <palves@redhat.com>
1649
1650         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
1651         out from gdbscm_parse_function_args.
1652         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
1653         gdbscm_parse_function_args_1.
1654
1655 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
1656
1657         PR gdb/17816
1658         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
1659         operator.
1660
1661 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
1662
1663         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
1664
1665 2018-08-19  Michael Spang  <spang@google.com>
1666
1667         PR gdb/11786
1668         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
1669         for PT_TLS segments.
1670
1671 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
1672
1673         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
1674         dwarf_variable_value.
1675         * dwarf2-frame.c (class dwarf_expr_executor):
1676         Add override for dwarf_variable_value.
1677         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
1678         (class symbol_needs_eval_context): Likewise.
1679         (indirect_synthetic_pointer): Add forward declaration.
1680         (sect_variable_value): New function.
1681         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
1682         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
1683         for DW_OP_GNU_variable_value.
1684
1685 2018-08-16  Tom Tromey  <tom@tromey.com>
1686
1687         * top.c (read_command_file): Update.
1688         (command_line_input): Remove "repeat" argument.
1689         * ada-lang.c (get_selections): Update.
1690         * linespec.c (decode_line_2): Update.
1691         * defs.h (command_line_input): Remove argument.
1692         * cli/cli-script.c (read_next_line): Update.
1693         * python/py-gdb-readline.c: Update.
1694
1695 2018-08-17  Tom Tromey  <tom@tromey.com>
1696
1697         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
1698         command_line_input.
1699
1700 2018-08-15  Tom Tromey  <tom@tromey.com>
1701
1702         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
1703
1704 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
1705
1706         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
1707         If used, use find_pc_partial_function to find address range
1708         to disassemble.
1709         * mi/mi-main.c (mi_cmd_list_features): Report
1710         "data-disassemble-a-option" feature.
1711         * NEWS: Mention new -data-disassemble option -a.
1712
1713 2018-08-13  Tom Tromey  <tom@tromey.com>
1714
1715         * common/common-defs.h (_FORTIFY_SOURCE): Define.
1716
1717 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
1718
1719         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
1720         (aarch64_linux_collect_sve_regset): Likewise.
1721         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
1722         * regcache.h (regcache_map_entry_size): New function.
1723
1724 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
1725
1726         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
1727         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
1728         (SVE_HEADER_VL_LENGTH): Likewise.
1729         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
1730         (SVE_HEADER_FLAGS_LENGTH): Likewise.
1731         (SVE_HEADER_RESERVED_LENGTH): Likewise.
1732         (SVE_HEADER_SIZE_OFFSET): Likewise.
1733         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
1734         (SVE_HEADER_VL_OFFSET): Likewise.
1735         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
1736         (SVE_HEADER_FLAGS_OFFSET): Likewise.
1737         (SVE_HEADER_RESERVED_OFFSET): Likewise.
1738         (SVE_HEADER_SIZE): Likewise.
1739         (aarch64_linux_core_read_vq): Add function.
1740         (aarch64_linux_core_read_description): Check for SVE section.
1741
1742 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
1743
1744         * aarch64-fbsd-tdep.c
1745         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
1746         collect_size.
1747         * aarch64-linux-tdep.c
1748         (aarch64_linux_iterate_over_regset_sections): Likewise.
1749         * alpha-linux-tdep.c
1750         (alpha_linux_iterate_over_regset_sections):
1751         * alpha-nbsd-tdep.c
1752         (alphanbsd_iterate_over_regset_sections): Likewise.
1753         * amd64-fbsd-tdep.c
1754         (amd64fbsd_iterate_over_regset_sections): Likewise.
1755         * amd64-linux-tdep.c
1756         (amd64_linux_iterate_over_regset_sections): Likewise.
1757         * arm-bsd-tdep.c
1758         (armbsd_iterate_over_regset_sections): Likewise.
1759         * arm-fbsd-tdep.c
1760         (arm_fbsd_iterate_over_regset_sections): Likewise.
1761         * arm-linux-tdep.c
1762         (arm_linux_iterate_over_regset_sections): Likewise.
1763         * corelow.c (get_core_registers_cb): Likewise.
1764         (core_target::fetch_registers): Likewise.
1765         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
1766         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
1767         * gdbarch.h (void): Regenerate.
1768         * gdbarch.sh: Add supply_size and collect_size.
1769         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
1770         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
1771         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
1772         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
1773         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
1774         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
1775         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
1776         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
1777         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
1778         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
1779         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
1780         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
1781         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
1782         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
1783         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
1784         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
1785         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
1786         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
1787         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
1788         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
1789         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
1790         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
1791         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
1792         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
1793         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
1794         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
1795         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
1796         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
1797         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
1798         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
1799
1800 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
1801
1802         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
1803         with string_printf.
1804
1805 2018-08-10  Keith Seitz  <keiths@redhat.com>
1806
1807         * compile/compile-c-support.c (add_code_header, add_code_footer):
1808         Move into policy class.
1809         (c_push_user_expression, pop_user_expression_nop)
1810         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
1811         (compile_program): New host class.
1812         (c_compile_program): New typedef.
1813         (c_compute_porgram): Use c_compile_program.
1814
1815 2018-08-10  Keith Seitz  <keiths@redhat.com>
1816
1817         * compile/compile-internal.h (compile_instance::~compile_instance):
1818         Remove calls to htab_delete.
1819         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
1820         * compile.c (compile_instance::compile_instance): Initialize
1821         htab unique pointers.
1822         (compile_instance::get_cached_type, compile_instance::insert_type)
1823         (compile_instance::error_symbol_once): Update for unique_ptr.
1824
1825 2018-08-10  Keith Seitz  <keiths@redhat.com>
1826
1827         * compile/compile-c-symbols.c (struct symbol_error)
1828         (hash_symbol_error, eq_symbol_error, del_symbol_error)
1829         (compile_instance::insert_symbol_error)
1830         (compile_instance::error_symbol_once): Move to ...
1831         * compile/compile.c: ... here.
1832
1833 2018-08-10  Keith Seitz  <keiths@redhat.com>
1834
1835         * compile/compile-c-support.c (c_get_compile_context): Use `new'
1836         instead of `new_compile_instance'.
1837         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
1838         Update description.
1839         If the symbol error map is not initialized, create it.
1840         (generate_c_for_for_one_symbol): Do not check/initialize
1841         the symbol error map.
1842         * compile/compile-c-types.c (compile_c_instance): Make a class.
1843         Update all callers.
1844         (compile_instance::compile_instance): Initialize the type cache.
1845         (get_cached_type): New function.
1846         (insert_type): Update description.
1847         (compile_c_instance::m_default_cflags): Define.
1848         (convert_type): Update description.  Use get_cached_type.
1849         (delete_instance): Moved to destructor.
1850         (new_compile_instance): Moved to constructor.
1851         * compile/compile-c.h (compile_c_instance): Make class inheriting
1852         from compile_instance.
1853         <base>: Remove field.
1854         <type_map, symbol_err_map>: Move to base class.
1855         <c_plugin>: Rename to `m_plugin' and remove pointer type.
1856         * compile/compile-internal.h (compile_instance): Make class.
1857         <type_map_t, symbol_err_map_t>: Define.
1858         <fe>: Rename to `m_gcc_fe'.
1859         <scope, block, gcc_target_options>: Add `m_' prefix.
1860         <m_type_map, m_symbol_err_map>: New fields, moved from
1861         compile_c_instance.
1862         <destroy>: Remove.
1863         (convert_type, new_compile_instance): Remove.
1864         * compile/compile.c (cleanup_compile_instance): Remove.
1865         (compile_to_object): Use unique_ptr to eliminate cleanups.
1866         (compile_instance::set_print_callback, compile_instance::version)
1867         (compile_instance::set_verbose)
1868         (compile_instance::set_driver_filename)
1869         (compile_instance::set_triplet_regexp)
1870         (compile_instance::set_arguments)
1871         (compile_instance::set_source_file)
1872         (compile_instance::compile): Define.
1873
1874 2018-08-10  Keith Seitz  <keiths@redhat.com>
1875
1876         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
1877         * compile/compile-c-types.c: Define GCC_METHODN macros and include
1878         gcc-c-fe.def to define C plugin.
1879         (delete_instance): Delete `c_plugin'.
1880         (new_compile_instance): Initialize `c_plugin'.
1881         * compile/compile-c.h: Include gcc_c_plugin.h.
1882         (struct compile_c_instance) <c_plugin>: New member.
1883         * gcc-c-plugin.h: New file.
1884         Update all callers with API change.
1885
1886 2018-08-10  Keith Seitz  <keiths@redhat.com>
1887
1888         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
1889         (HFILES_NO_SRCDIR): ... to here.
1890         Add compile-internal.h and compile-c.h.
1891         * compile/compile-c-support.c: Include compile-c.h.
1892         * compile/compile-c-symbols.c: Include compile-c.h.
1893         (generate_c_for_variable_locations): Update comment.
1894         * compile/compile-c-types.c: Include compile-c.h.
1895         * compile/compile-c.h: New file -- moved C language declarations
1896         from other files here.
1897         * compile/compile-internal.h: Do not include hashtab.h or
1898         common/enum-flags.h.
1899         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
1900         (gcc_convert_symbol, gcc_symbol_address)
1901         (generate_c_for_variable_locations, c_get_mode_for_size)
1902         (c_get_range_decl_name): Definitions moved to compile-c.h.
1903         * compile/compile-loc2c.c: Include compile-c.h.
1904
1905 2018-08-10  Keith Seitz  <keiths@redhat.com>
1906
1907         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
1908         (c_symbol_substitution_name): ... this.
1909         Update all callers.
1910
1911 2018-08-10  Keith Seitz  <keiths@redhat.com>
1912
1913         * compile/compile-c-support.c (c_compute_program): Use
1914         unique_xmalloc_ptr to eliminate cleanup.
1915         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
1916         Return a unique_xmalloc_ptr and eliminate cleanup.
1917         * compile/compile-internal.h (generate_c_for_variable_locations):
1918         Return unique_xmalloc_ptr and update description.
1919
1920 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
1921
1922         * corelow.c (core_target::get_core_register_section): Rename
1923         min_size to section_min_size.
1924
1925 2018-08-09  Jim Wilson  <jimw@sifive.com>
1926
1927         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
1928         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
1929         * NEWS: Mention new GNU/Linux RISC-V target.
1930         * configure.host: Add riscv*-*-linux*.
1931         * configure.nat: Add riscv*.
1932         * configure.tgt: Add riscv*-*-linux*.
1933         * riscv-linux-nat.c: New file.
1934         * riscv-linux-tdep.c: New file.
1935
1936 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
1937
1938         * infrun.c (resume): Make static, add forward declaration.
1939         (proceed): Update header comment.
1940         * infrun.h (resume): Delete declaration.
1941
1942 2018-08-09  Tom Tromey  <tom@tromey.com>
1943
1944         * riscv-tdep.h: Minor formatting fixes.
1945
1946 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
1947
1948         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
1949         * dwarf-index-cache.c (create_dir_and_check): Likewise.
1950         (test_mkdir_recursive): Likewise.
1951         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
1952
1953 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
1954
1955         * valarith.c (value_subscripted_rvalue): If an array is not in
1956         memory, and we don't know the upper bound, then we can't know that
1957         the requested element exists or not.
1958
1959 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
1960
1961         * target.c (str_comma_list_concat_elem): Fix typo in comment.
1962         (target_options_to_string): Add comment.
1963
1964 2018-08-08  Tom Tromey  <tom@tromey.com>
1965
1966         * unittests/scoped_mmap-selftests.c: Check result of "write".
1967
1968 2018-08-08  Jim Wilson  <jimw@sifive.com>
1969
1970         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
1971         (decode_register_index_short): New.
1972         (decode_j_type_insn, decode_cj_type_insn): New.
1973         (decode_b_type_insn, decode_cb_type_insn): New.
1974         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
1975         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
1976         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
1977         is_c_sw_insn instead of is_sw_insn.
1978         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
1979         (riscv_software_single_step): New.
1980         * riscv-tdep.h (riscv_software_single_step): Declare.
1981
1982         * riscv-tdep.c (riscv_isa_xlen): Drop static.
1983         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
1984
1985 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
1986
1987         PR gdb/18050:
1988         * target.c (dispose_inferior): Don't dispose of inferiors that are
1989         already killed.
1990
1991 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
1992
1993         * remote.c (remote_target::download_tracepoint): Change char* to
1994         const char*.
1995
1996 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
1997
1998         * target.h (target_options_to_string): Return an std::string.
1999         * target.c (str_comma_list_concat_elem): Return void, use
2000         std::string.
2001         (do_option): Likewise.
2002         (target_options_to_string): Return an std::string.
2003         * linux-nat.c (linux_nat_target::wait): Adjust.
2004         * target-debug.h (target_debug_print_options): Adjust.
2005
2006 2018-08-07  Tom Tromey  <tom@tromey.com>
2007
2008         * Makefile.in (CPPFLAGS): New variable.
2009         (INTERNAL_CPPFLAGS): Use it.
2010
2011 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2012
2013         * NEWS: Mention the index cache.
2014
2015 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2016
2017         * common/pathstuff.h (get_standard_cache_dir): New.
2018         * common/pathstuff.c (get_standard_cache_dir): New.
2019         * build-id.h (build_id_to_string): New.
2020         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
2021         DEBUG_STR_SUFFIX): Move to here.
2022         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
2023         DEBUG_STR_SUFFIX): Move from there.
2024         (write_psymtabs_to_index): Make non-static, add basename
2025         parameter.  Write to temporary files, rename when done.
2026         (save_gdb_index_command): Adjust call to
2027         write_psymtabs_to_index.
2028         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
2029         field.
2030         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
2031         (get_gdb_index_contents_from_cache): New.
2032         (get_gdb_index_contents_from_cache_dwz): New.
2033         (dwarf2_initialize_objfile): Read index from cache.
2034         (dwarf2_build_psymtabs): Save to index.
2035         * dwarf-index-cache.h: New file.
2036         * dwarf-index-cache.c: New file.
2037         * dwarf-index-write.h: New file.
2038
2039 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2040
2041         * gnulib/aclocal.m4: Re-generate.
2042         * gnulib/config.in: Re-generate.
2043         * gnulib/configure: Re-generate.
2044         * gnulib/import/Makefile.am: Re-generate.
2045         * gnulib/import/Makefile.in: Re-generate.
2046         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
2047         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2048         * gnulib/import/m4/mkdir.m4: New file.
2049         * gnulib/import/mkdir.c: New file.
2050         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
2051         module.
2052
2053 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2054
2055         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
2056         * common/scoped_mmap.c: New file.
2057         * common/scoped_mmap.h (destroy): New method.
2058         (~scoped_mmap, reset): Use destroy.
2059         (scoped_mmap): New move constructor.
2060         (mmap_file): New declaration.
2061         * unittests/scoped_mmap-selftests.c (test_normal,
2062         test_invalid_filename, run_tests): New functions.
2063         (_initialize_scoped_mmap_selftests): Register selftest.
2064
2065 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2066
2067         * dwarf2read.c (read_gdb_index_from_section): Rename to...
2068         (read_gdb_index_from_buffer): ... this.  Remove section
2069         parameter, add buffer parameter.
2070         (get_gdb_index_contents_ftype,
2071         get_gdb_index_contents_dwz_ftype): New typedefs.
2072         (dwarf2_read_gdb_index): Add callback parameters to get the
2073         index contents.
2074         (get_gdb_index_contents_from_section): New.
2075         (dwarf2_initialize_objfile): Update call to
2076         dwarf2_read_gdb_index.
2077
2078 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2079
2080         * common/filestuff.h (gdb_fopen_cloexec): New overload.
2081         (gdb_open_cloexec): Likewise.
2082         * nat/linux-osdata.c (command_from_pid): Use string_printf.
2083         (commandline_from_pid): Likewise.
2084         (linux_xfer_osdata_threads): Likewise.
2085         (linux_xfer_osdata_fds): Likewise.
2086         * ada-lang.c (is_package_name): Likewise.
2087         * auxv.c (procfs_xfer_auxv): Likewise.
2088         * breakpoint.c (print_one_breakpoint_location): Use
2089         uiout::field_fmt.
2090         (print_one_catch_solib): Use string_printf.
2091         * coff-pe-read.c (add_pe_exported_sym): Likewise.
2092         (add_pe_forwarded_sym): Likewise.
2093         * dwarf2read.c (create_type_unit_group): Likewise.
2094         (build_error_marker_type): Likewise.
2095         * infcall.c (get_function_name): Likewise.
2096         * valprint.c (print_converted_chars_to_obstack): Likewise.
2097         * xtensa-tdep.c (xtensa_register_type): Likewise.
2098
2099 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
2100
2101         * remote.c (remote_target::download_tracepoint): Fix format
2102         string errors.
2103
2104 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2105
2106         * tracefile.c: Include common/byte-vector.h.
2107         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
2108         with trace_regblock_size if needed.  Update uses of buf.
2109
2110 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2111
2112         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
2113         std::vector<unsigned char>.
2114         * tracepoint.c (collection_list::collection_list): Remove
2115         m_regs_mask initializer from initializer list.  Resize
2116         m_regs_mask using the largest remote register number.
2117         (collection_list::add_remote_register): Remove size check on
2118         m_regs_mask.  Use at to access element.
2119         (collection_list::stringify): Change type of temp_buf to
2120         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
2121         stringify the register mask.  Use pack_hex_byte for the register
2122         mask.
2123
2124 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2125
2126         * tracepoint.h (class collection_list) <add_register>: Remove.
2127         <add_remote_register, add_ax_registers, add_local_register>:
2128         Declare.
2129         <add_memrange>: Add scope parameter.
2130         * tracepoint.c (encode_actions_1): Likewise.
2131         (collection_list::add_register): Rename to ...
2132         (collection_list::add_remote_register): ... this.  Update
2133         comment.
2134         (collection_list::add_ax_registers, add_local_register): New
2135         methods.
2136         (collection_list::add_memrange): Add scope parameter.  Call
2137         add_local_register instead of add_register.
2138         (finalize_tracepoint_aexpr): New function.
2139         (collection_list::collect_symbol): Update calls to add_memrange.
2140         Call add_local_register instead of add_register.  Call
2141         add_ax_registers.  Call finalize_tracepoint_aexpr.
2142         (encode_actions_1): Get remote regnos for $reg action.  Call
2143         add_remote_register, add_ax_registers, and add_local_register.
2144         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
2145         (validate_actionline): Call finalize_tracepoint_aexpr.
2146
2147 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2148
2149         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
2150         Replace array buf with gdb::char_vector buf, of size
2151         get_remote_packet_size ().  Replace references to buf and
2152         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
2153         and xsnprintf with snprintf.  Raise errors if the buffer is too
2154         small.
2155
2156 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2157
2158         * remote.c (remote_target::download_tracepoint): Fix the has_more
2159         predicate in the QTDP action list iteration.
2160
2161 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2162
2163         * remote.c (remote_target::download_tracepoint): Fix indentation
2164         in for block.
2165
2166 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2167
2168         * proc-api.c (_initialize_proc_api): Remove c, unused.
2169         * procfs.c (procfs_init_inferior): Remove signals, unused.
2170         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
2171         unused.
2172
2173 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
2174             Andrew Burgess  <andrew.burgess@embecosm.com>
2175
2176         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
2177         'W_STOPCODE (0)' as this could be ambiguous.
2178
2179 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
2180
2181         * ser-tcp.c (net_open): Fix thinko when deciding whether to
2182         disable TCP's Nagle algorithm (use "ai_protocol" instead of
2183         "ai_socktype").
2184
2185 2018-08-02  Tom Tromey  <tom@tromey.com>
2186
2187         PR symtab/16842.
2188         * dwarf2read.c (read_func_scope): Set symtab on template parameter
2189         symbols.
2190         (process_structure_scope): Likewise.
2191
2192 2018-08-02  Xavier Roirand  <roirand@adacore.com>
2193
2194         PR gdb/22629:
2195         * darwin-nat.c (darwin_kill_inferior): Fix handling of
2196         kill inferior.
2197
2198 2018-08-02  Tom Tromey  <tom@tromey.com>
2199
2200         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
2201         (darwin_suspend_inferior, darwin_resume_inferior)
2202         (darwin_decode_notify_message, darwin_resume_inferior_threads)
2203         (darwin_check_new_threads): Check result of get_darwin_inferior.
2204
2205 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
2206
2207         GDB 8.1.1 released.
2208
2209 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
2210
2211         * varobj.c (varobj_get_path_expr_parent): Report an error if
2212         parent is a dynamic varobj.
2213
2214 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
2215
2216         * gnulib/aclocal.m4: Re-generate.
2217         * gnulib/config.in: Re-generate.
2218         * gnulib/configure: Re-generate.
2219         * gnulib/import/Makefile.in: Re-generate.
2220         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2221         * gnulib/import/m4/onceonly.m4: Re-generate.
2222
2223 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
2224
2225         * target-descriptions.c (struct xml_test_tdesc): New.
2226         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
2227         (record_xml_tdesc): Update.
2228         (maintenance_check_xml_descriptions): Update.
2229         * target-descriptions.h (record_xml_tdesc): Update comment.
2230
2231 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
2232
2233         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
2234         checking array bounds are defined.
2235
2236 2018-07-30  Tom Tromey  <tom@tromey.com>
2237
2238         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
2239         irreflexivity violation.
2240
2241 2018-07-30  Tom Tromey  <tom@tromey.com>
2242
2243         * cli/cli-decode.c (lookup_cmd): Remove lint code.
2244         * value.c (unpack_long): Remove lint code.
2245         * valops.c (value_ind): Remove lint code.
2246         * valarith.c (value_x_binop, value_x_unop, value_equal)
2247         (value_pos): Remove lint code.
2248
2249 2018-07-28  Tom de Vries  <tdevries@suse.de>
2250
2251         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
2252         with undefined upper bound as <optimized out>.
2253
2254 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
2255
2256         * gcore.in: Rename variable "name" to "prefix".  Expand
2257         "usage" text.
2258
2259 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
2260
2261         * windows-nat.c (windows_nat_target::create_inferior): Update to
2262         call close() in global namespace.
2263
2264 2018-07-26  Tom Tromey  <tom@tromey.com>
2265
2266         * dwarf-index-write.c (add_address_entry): Don't add objfile
2267         offsets.
2268         * dbxread.c (find_stab_function): Rename from
2269         find_stab_function_addr.  Return a bound_minimal_symbol.
2270         (read_dbx_symtab): Use raw_text_low, raw_text_high.
2271         Don't add objfile offsets.
2272         (end_psymtab): Use raw_text_low, raw_text_high,
2273         MSYMBOL_VALUE_RAW_ADDRESS.
2274         (read_ofile_symtab): Update.
2275         (process_one_symbol): Update.
2276         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
2277         offsets.
2278         (dw2_relocate): Remove.
2279         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
2280         searching addrmap.
2281         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
2282         Update.
2283         (process_psymtab_comp_unit_reader, add_partial_symbol)
2284         (add_partial_subprogram, dwarf2_ranges_read): Update.
2285         (load_partial_dies): Update.
2286         (add_address_entry): Don't add objfile offsets.
2287         (dwarf2_build_include_psymtabs): Update.
2288         (create_addrmap_from_aranges): Don't add objfile offsets.
2289         (dw2_find_pc_sect_compunit_symtab): Update.
2290         * mdebugread.c (parse_symbol): Don't add objfile offsets.
2291         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
2292         Update.
2293         (parse_partial_symbols): Don't add objfile offsets.  Use
2294         raw_text_low, raw_text_high.  Update.
2295         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
2296         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
2297         or call 'relocate' quick function.  Clear psymbol_map.
2298         * psympriv.h (struct partial_symbol) <address>: Add section
2299         offset.
2300         <set_unrelocated_address>: Rename from set_address.
2301         <raw_text_low, raw_text_high>: New methods.
2302         <text_low, text_high>: Add objfile parameter.
2303         (add_psymbol_to_bcache): Add 'section' parameter.  Call
2304         set_unrelocated_address.
2305         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2306         (find_pc_psymbol): Update.
2307         (fixup_psymbol_section, relocate_psymtabs): Remove.
2308         (dump_psymtab, psym_functions): Update.
2309         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
2310         parameter.
2311         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
2312         (start_psymtab_common): Update.
2313         * symfile-debug.c (debug_qf_relocate): Remove.
2314         (debug_sym_quick_functions): Update.
2315         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
2316         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
2317         Update.
2318
2319 2018-07-26  Tom Tromey  <tromey@redhat.com>
2320
2321         * dbxread.c (end_psymtab): Use text_high_valid and
2322         text_low_valid.
2323         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
2324         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
2325         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
2326         Update comment.
2327         <text_low_valid, text_high_valid>: New fields.
2328         <set_text_low, set_text_high>: Update.
2329         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
2330
2331 2018-07-26  Tom Tromey  <tom@tromey.com>
2332
2333         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
2334         Update.
2335         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
2336         textlow and texthigh fields.
2337         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
2338         Update.
2339         * mdebugread.c (parse_lines, parse_partial_symbols)
2340         (psymtab_to_symtab_1): Update.
2341         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
2342         Rename fields.  Update comment.  Now private.
2343         <text_low, text_high, set_text_low, set_text_high>: New methods.
2344         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2345         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
2346         (start_psymtab_common, maintenance_info_psymtabs)
2347         (maintenance_check_psymtabs): Update.
2348         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
2349         texthigh fields.
2350         (scan_xcoff_symtab): Update.
2351
2352 2018-07-26  Tom Tromey  <tromey@redhat.com>
2353
2354         * psympriv.h (struct partial_symbol) <unrelocated_address,
2355         address, set_address>: New methods.
2356         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
2357         (fixup_psymbol_section, relocate_psymtabs): Update.
2358         (print_partial_symbols): Add 'objfile' parameter.  Update.
2359         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
2360         Update.
2361
2362 2018-07-26  Tom Tromey  <tom@tromey.com>
2363
2364         * dwarf-index-write.c (write_psymbols, debug_names::insert)
2365         (debug_names::write_psymbols): Update.
2366         * psympriv.h (struct partial_symbol): Derive from
2367         general_symbol_info.
2368         <obj_section>: New method.
2369         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
2370         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2371         (find_pc_sect_psymbol, fixup_psymbol_section)
2372         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
2373         (print_partial_symbols, recursively_search_psymtabs)
2374         (compare_psymbols, psymbol_hash, psymbol_compare)
2375         (add_psymbol_to_bcache, maintenance_check_psymtabs)
2376         (psymbol_name_matches, psym_fill_psymbol_map): Update.
2377
2378 2018-07-26  Tom Tromey  <tromey@redhat.com>
2379
2380         * dbxread.c (end_psymtab): Remove dead code.
2381
2382 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
2383
2384         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
2385         DWARF unwinders are disabled.
2386         * dwarf2-frame.c: Add dwarf2read.h include.
2387         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
2388         disabled.
2389         (dwarf2_frame_unwinders_enabled_p): Define.
2390         (show_dwarf_unwinders_enabled_p): New function.
2391         (_initialize_dwarf2_frame): Register switch to control DWARF
2392         unwinder use.
2393         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
2394         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
2395         (show_dwarf_cmdlist): Remove static keyword.
2396         * dwarf2read.h (set_dwarf_cmdlist): Declare.
2397         (show_dwarf_cmdlist): Declare.
2398         * NEWS: Document new feature.
2399
2400 2018-07-26  Tom de Vries  <tdevries@suse.de>
2401
2402         PR breakpoints/23366
2403         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
2404
2405 2018-07-26  Tom de Vries  <tdevries@suse.de>
2406
2407         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
2408         DW_AT_count can't be translated to a dynamic prop.
2409
2410 2018-07-25  Tom de Vries  <tdevries@suse.de>
2411
2412         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
2413         try/catch.
2414
2415 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
2416
2417         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
2418
2419 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
2420
2421         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
2422
2423 2018-07-24  Keith Seitz  <keiths@redhat.comt
2424
2425         PR symtab/23010
2426         * dwarf2read.c (dw2_add_symbol_to_list): New function.
2427         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
2428         instead of add_symbol_to_list.
2429         (read_file_scope): Call prepare_one_comp_unit before reading
2430         any other DIEs.
2431
2432 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
2433
2434         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
2435
2436 2018-07-24  Tom Tromey  <tom@tromey.com>
2437
2438         * utils.c (malloc, realloc, free): Don't declare.
2439         * configure, config.in: Rebuild.
2440         * configure.ac: Don't check for declarations of free, malloc, or
2441         realloc.
2442
2443 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
2444
2445         * aarch64-linux-nat.c
2446         (aarch64_linux_nat_target::stopped_data_address): Remove unused
2447         variable.
2448         * arm-linux-nat.c (fetch_regs): Likewise.
2449         (store_regs): Likewise.
2450         (fetch_vfp_regs): Likewise.
2451         (store_vfp_regs): Likewise.
2452         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
2453         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
2454         (arm_linux_nat_target::insert_watchpoint): Likewise.
2455         (arm_linux_nat_target::remove_watchpoint): Likewise.
2456         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
2457         Likewise.
2458         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
2459         Likewise.
2460         * ppc-linux-nat.c (fetch_register): Likewise.
2461         (fetch_all_gp_regs): Likewise.
2462         (fetch_ppc_registers): Likewise.
2463         (store_all_gp_regs): Likewise.
2464         (store_ppc_registers): Likewise.
2465         (hwdebug_insert_point): Likewise.
2466         (can_use_watchpoint_cond_accel): Likewise.
2467         * remote-sim.c (gdb_os_write_stdout): Likewise.
2468
2469 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
2470             Tom Tromey  <tom@tromey.com>
2471
2472         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
2473         test for it.
2474         * configure: Rebuild.
2475
2476 2018-07-22  Tom Tromey  <tom@tromey.com>
2477
2478         * regformats/regdat.sh: Define xmltarget_${name} inside
2479         #ifndef IN_PROCESS_AGENT.
2480
2481 2018-07-22  Tom Tromey  <tom@tromey.com>
2482
2483         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
2484
2485 2018-07-22  Tom Tromey  <tom@tromey.com>
2486
2487         * symfile.c (reread_symbols): Notify iter, not objfile.
2488
2489 2018-07-22  Tom Tromey  <tom@tromey.com>
2490
2491         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
2492         Use arch_ops.
2493         (ravenscar_thread_target::prepare_to_store): Likewise.
2494
2495 2018-07-22  Tom Tromey  <tom@tromey.com>
2496
2497         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
2498         unused variable.  Call value_fetch_lazy when needed.
2499         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
2500         Remove unused variable.  Call value_fetch_lazy when needed.
2501
2502 2018-07-22  Tom Tromey  <tom@tromey.com>
2503
2504         * m32c-tdep.c (mark_dma): Return void.
2505         (make_regs): Remove unused declarations.
2506
2507 2018-07-22  Tom Tromey  <tom@tromey.com>
2508
2509         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
2510         cmdscm_get_valid_command_smob_arg_unsafe for effect.
2511         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
2512         bkscm_get_valid_block_smob_arg_unsafe for effect.
2513
2514 2018-07-22  Tom Tromey  <tom@tromey.com>
2515
2516         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
2517         value_type.
2518
2519 2018-07-22  Tom Tromey  <tom@tromey.com>
2520
2521         * windows-nat.c (saved_context): Conditionally define.
2522         * remote.c (remote_target::remote_btrace_maybe_reopen):
2523         Conditionally declare "warned".
2524         * inflow.c (sigquit_ours): Conditionally define.
2525         (new_tty): Move "tty" declaration inside #if.
2526         * guile/guile.c (guile_datadir): Conditionally define.
2527         * charset.c (set_be_le_names): Move some declarations inside #if.
2528         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
2529         #if.
2530         (parse_xml_btrace_conf): Likewise.
2531
2532 2018-07-22  Tom Tromey  <tom@tromey.com>
2533
2534         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
2535
2536 2018-07-22  Tom Tromey  <tom@tromey.com>
2537
2538         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
2539         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
2540         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
2541         * buildsym-legacy.c (get_macro_table): Remove unused variable.
2542         * stack.c (frame_apply_level_command): Remove unused variable.
2543         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
2544         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
2545         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
2546         unused variable.
2547         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
2548         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
2549         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
2550         variable.
2551         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
2552         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
2553         variable.
2554         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
2555         Remove unused variable.
2556         * cli/cli-script.c (recurse_read_control_structure): Remove unused
2557         variable.
2558         * common/tdesc.c (print_xml_feature::visit): Remove unused
2559         variable.
2560         * compile/compile-object-load.c (store_regs): Remove unused
2561         variables.
2562         * complaints.c (clear_complaints): Remove unused variable.
2563         * corelow.c (core_target_open): Remove unused variable.
2564         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
2565         variable.
2566         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
2567         variable.
2568         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
2569         variable.
2570         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
2571         variable.
2572         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
2573         variable.
2574         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
2575         variable.
2576         * ia64-tdep.c (examine_prologue): Remove unused variable.
2577         * infcall.c (run_inferior_call): Remove unused variable.
2578         * inferior.c (exit_inferior): Remove unused variable.
2579         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
2580         * linespec.c (decode_line_2): Remove unused variable.
2581         * linux-nat.c (super_close): Remove.
2582         * linux-tdep.c (linux_info_proc): Remove unused variable.
2583         * mi/mi-main.c (mi_execute_command): Remove unused variable.
2584         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
2585         Remove unused variable.
2586         * parse.c (find_minsym_type_and_address): Remove unused variable.
2587         * printcmd.c (info_symbol_command, printf_floating): Remove unused
2588         variable.
2589         * python/py-breakpoint.c (bppy_set_commands): Remove unused
2590         variable.
2591         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
2592         variables.
2593         * record-btrace.c (record_btrace_target::store_registers): Remove
2594         unused variable.
2595         (cmd_show_record_btrace_cpu): Remove unused variable.
2596         * riscv-tdep.c (riscv_register_reggroup_p)
2597         (riscv_push_dummy_call, riscv_return_value): Remove unused
2598         variable.
2599         * rust-exp.y (literal): Remove unused variable.
2600         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
2601         unused variable.
2602         <STRUCTOP_ANONYMOUS>: Likewise.
2603         * s390-linux-tdep.c (s390_linux_init_abi_31)
2604         (s390_linux_init_abi_64): Remove unused variable.
2605         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
2606         (file_select_thread, net_windows_open, _initialize_ser_windows):
2607         Remove unused variables.
2608         * symtab.c (find_pc_sect_line): Remove unused variable.
2609         * target-memory.c (compute_garbled_blocks): Remove unused
2610         variable.
2611         (target_write_memory_blocks): Remove unused variable.
2612         * target.c (target_stack::unpush): Remove unused variables.
2613         * tracepoint.c (start_tracing, all_tracepoint_actions)
2614         (merge_uploaded_trace_state_variables)
2615         (print_one_static_tracepoint_marker): Remove unused variable.
2616         * unittests/basic_string_view/element_access/char/1.cc (test01):
2617         Remove unused variable.
2618         * windows-nat.c (windows_continue, windows_add_all_dlls)
2619         (do_initial_windows_stuff, windows_nat_target::create_inferior):
2620         Remove unused variables.
2621
2622 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
2623
2624         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
2625         attr_profile in HAVE_ELF.
2626         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
2627         HAVE_ELF.
2628
2629 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
2630
2631         * frame.c (frame_register_unwind): Change parameter name.
2632         (frame_unwind_register): Likewise.
2633         (frame_unwind_register_value): Likewise.
2634         (frame_unwind_register_signed): Likewise.
2635         (frame_unwind_register_unsigned): Likewise.
2636         * frame.h (frame_register_unwind): Likewise.
2637         (frame_unwind_register): Likewise.
2638         (frame_unwind_register_value): Likewise.
2639         (frame_unwind_register_signed): Likewise.
2640         (frame_unwind_register_unsigned): Likewise.
2641         (frame_unwind_arch): Likewise.
2642
2643 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
2644
2645         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
2646         ISA maintenance.
2647
2648 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
2649
2650         * mips-linux-nat.c (mips_linux_nat_target::read_description):
2651         Call `get_ptrace_pid' rather than extracting the ptrace PID by
2652         hand.
2653
2654 2018-07-20  Keith Seitz  <keiths@redhat.com>
2655
2656         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
2657         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
2658         m_compunit_symtab, m_language>: Add "m_" prefix.
2659         Update all uses.
2660         * buildsym.c: Update all uses.
2661
2662 2018-07-20  Tom Tromey  <tom@tromey.com>
2663
2664         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
2665         * buildsym.h (record_line_ftype): Remove typedef.
2666
2667 2018-07-20  Tom Tromey  <tom@tromey.com>
2668
2669         * buildsym-legacy.h (augment_type_symtab): Don't declare.
2670         (end_expandable_symtab): Likewise.
2671         (end_symtab_get_static_block): Likewise.
2672         (end_symtab_from_static_block): Likewise.
2673         * buildsym-legacy.c (augment_type_symtab): Remove.
2674         (end_expandable_symtab): Remove.
2675         (end_symtab_get_static_block): Remove.
2676         (end_symtab_from_static_block): Remove.
2677
2678 2018-07-20  Tom Tromey  <tom@tromey.com>
2679
2680         * dwarf2read.c: Include buildsym.h.
2681         (struct dwarf2_cu) <builder>: New method.
2682         (fixup_go_packaging): Update.
2683         (process_full_comp_unit, process_full_type_unit): Update.  Don't
2684         use scoped_free_pendings.
2685         (using_directives): Add "cu" parameter, remove "language".
2686         (read_import_statement, setup_type_unit_groups, )
2687         (read_func_scope, read_lexical_block_scope)
2688         (dwarf2_record_block_ranges, read_namespace): Update.
2689         (lnp_state_machine::lnp_state_machine): Add cu parameter.
2690         (lnp_state_machine::handle_end_sequence): Update.
2691         (class lnp_state_machine) <m_cu>: New member.
2692         <m_record_line_callback>: Remove.
2693         <m_currently_recording_lines>: New member.
2694         (lnp_state_machine::handle_set_file): Update.
2695         (noop_record_line): Remove.
2696         (dwarf_record_line_p): Add cu parameter.
2697         (dwarf_record_line_1, dwarf_finish_line): Likewise.
2698         (lnp_state_machine::record_line)
2699         (lnp_state_machine::lnp_state_machine)
2700         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
2701         (dwarf_decode_lines): Update.
2702         (dwarf2_start_subfile): Add cu parameter.
2703         (dwarf2_start_symtab, new_symbol): Update.
2704         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
2705         Remove dwarf2_per_objfile parameter.
2706         (dwarf_decode_macros): Update.
2707
2708 2018-07-20  Tom Tromey  <tom@tromey.com>
2709
2710         * stabsread.c (define_symbol): Update.
2711         * buildsym-legacy.h (get_buildsym_compunit): Declare.
2712         * dwarf2read.c (new_symbol): Update.
2713         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
2714         * cp-namespace.c: Include buildsym.h.
2715         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
2716         * buildsym-legacy.c (get_buildsym_compunit): New function.
2717
2718 2018-07-20  Tom Tromey  <tom@tromey.com>
2719
2720         * xcoffread.c: Include buildsym-legacy.h.
2721         * windows-nat.c: Include buildsym-legacy.h.
2722         * stabsread.c: Include buildsym-legacy.h.
2723         * mdebugread.c: Include buildsym-legacy.h.
2724         * buildsym-legacy.h: New file.
2725         * buildsym-legacy.c: New file, from buildsym.c.
2726         * go32-nat.c: Include buildsym-legacy.h.
2727         * dwarf2read.c: Include buildsym-legacy.h.
2728         * dbxread.c: Include buildsym-legacy.h.
2729         * cp-namespace.c: Include buildsym-legacy.h.
2730         * coffread.c: Include buildsym-legacy.h.
2731         * buildsym.h: Move some contents to buildsym-legacy.h.
2732         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
2733         buildsym-legacy.c.
2734         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
2735
2736 2018-07-20  Tom Tromey  <tom@tromey.com>
2737
2738         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
2739         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
2740         (buildsym_compunit::buildsym_compunit)
2741         (buildsym_compunit::~buildsym_compunit)
2742         (buildsym_compunit::get_macro_table): Define.
2743
2744 2018-07-20  Tom Tromey  <tom@tromey.com>
2745
2746         * buildsym.c (reset_symtab_globals): Remove.
2747         (buildsym_compunit::end_symtab_from_static_block): Update.
2748         (buildsym_compunit::augment_type_symtab): Update.
2749         (end_symtab_from_static_block): Call free_buildsym_compunit.
2750         (augment_type_symtab, end_symtab, end_expandable_symtab):
2751         Likewise.
2752
2753 2018-07-20  Tom Tromey  <tom@tromey.com>
2754
2755         * arch-utils.c: Do not include buildsym.h.
2756         * mipsread.c: Do not include buildsym.h.
2757         * machoread.c: Do not include buildsym.h.
2758         * elfread.c: Do not include buildsym.h.
2759
2760 2018-07-20  Tom Tromey  <tom@tromey.com>
2761
2762         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
2763         initialization.
2764         (buildsym_compunit): Add new constructor.
2765         (struct buildsym_compunit) <get_last_source_file, finish_block,
2766         record_block_range, start_subfile, patch_subfile_names,
2767         push_subfile, pop_subfile, record_line, get_compunit_symtab,
2768         set_last_source_start_addr, get_last_source_start_addr,
2769         get_local_using_directives, set_local_using_directives,
2770         get_global_using_directives, outermost_context_p,
2771         get_current_context_stack, get_context_stack_depth,
2772         get_current_subfile, get_local_symbols, get_file_symbols,
2773         get_global_symbols, record_debugformat, record_producer,
2774         push_context, pop_context, end_symtab_get_static_block,
2775         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
2776         New public methods.
2777         <record_pending_block, finish_block_internal, make_blockvector,
2778         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
2779         private methods.
2780         Update all users.
2781
2782 2018-05-22  Tom Tromey  <tom@tromey.com>
2783
2784         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
2785         parameter.
2786         (finish_block_internal): Update.
2787
2788 2018-07-20  Tom Tromey  <tom@tromey.com>
2789
2790         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
2791         parameter.
2792         (finish_block_internal): Update.
2793
2794 2018-07-20  Tom Tromey  <tom@tromey.com>
2795
2796         * buildsym.h (EXTERN): Don't define or undef.
2797         * buildsym.c (EXTERN): Don't define.
2798
2799 2018-07-20  Tom Tromey  <tom@tromey.com>
2800
2801         * buildsym.c: Remove TODO comment.
2802
2803 2018-07-20  Tom Tromey  <tom@tromey.com>
2804
2805         * coffread.c (coff_symtab_read): Update.
2806         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
2807         (xcoff_new_init): Update.
2808         * mipsread.c (mipscoff_new_init): Update.
2809         * mdebugread.c (mdebug_build_psymtabs): Update.
2810         * elfread.c (elf_new_init): Update.
2811         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
2812         Update.
2813         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
2814         (coffstab_build_psymtabs, elfstab_build_psymtabs)
2815         (stabsect_build_psymtabs): Update.
2816         * buildsym.h (buildsym_init): Don't declare.
2817         * buildsym.c: Update comment.
2818         (prepare_for_building): Remove.
2819         (start_symtab, restart_symtab): Update.
2820         (reset_symtab_globals): Update comment.
2821         (buildsym_init): Remove.
2822
2823 2018-07-20  Tom Tromey  <tom@tromey.com>
2824
2825         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
2826         * stabsread.c (patch_block_stabs, define_symbol, read_type)
2827         (read_enum_type, common_block_start, common_block_end)
2828         (cleanup_undefined_types_1, finish_global_stabs): Update.
2829         * mdebugread.c (psymtab_to_symtab_1): Update.
2830         * dwarf2read.c (fixup_go_packaging, read_func_scope)
2831         (read_lexical_block_scope, new_symbol): Update.
2832         * dbxread.c (process_one_symbol): Update.
2833         * coffread.c (coff_symtab_read, process_coff_symbol)
2834         (coff_read_enum_type): Update.
2835         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
2836         declare.
2837         (get_local_symbols, get_file_symbols, get_global_symbols): New
2838         functions.
2839         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
2840         m_global_symbols.
2841         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
2842         (~scoped_free_pendings): Update.
2843         (finish_block, prepare_for_building, reset_symtab_globals)
2844         (end_symtab_get_static_block, end_symtab_with_blockvector)
2845         (augment_type_symtab, push_context): Update.
2846         (get_local_symbols, get_file_symbols, get_global_symbols): New
2847         functions.
2848         (buildsym_init): Update.
2849
2850 2018-07-20  Tom Tromey  <tom@tromey.com>
2851
2852         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
2853         (process_full_type_unit): Likewise.
2854         (dwarf2_start_symtab): Set list_in_scope.
2855
2856 2018-07-20  Tom Tromey  <tom@tromey.com>
2857
2858         * dwarf2read.c (process_psymtab_comp_unit_reader)
2859         (build_type_psymtabs_reader): Do not set list_in_scope.
2860
2861 2018-07-20  Tom Tromey  <tom@tromey.com>
2862
2863         * buildsym.c (free_pendings): Remove.
2864         (add_symbol_to_list, scoped_free_pendings)
2865         (finish_block_internal, buildsym_init): Update.
2866
2867 2018-07-20  Tom Tromey  <tom@tromey.com>
2868
2869         * xcoffread.c (read_xcoff_symtab): Update.
2870         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
2871         Update.
2872         * dbxread.c (process_one_symbol): Update.
2873         * coffread.c (coff_symtab_read): Update.
2874         * buildsym.h (finish_block): Update.
2875         * buildsym.c (finish_block): Remove "listhead" argument.
2876         (end_symtab_get_static_block): Update.
2877
2878 2018-07-20  Tom Tromey  <tom@tromey.com>
2879
2880         * buildsym.h (class scoped_free_pendings): Remove constructor.
2881         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
2882         method.
2883         <m_pending_block_obstack, m_pending_blocks>: New members.
2884         (pending_block_obstack, pending_blocks): Remove.
2885         (scoped_free_pendings::scoped_free_pendings): Default.
2886         (~scoped_free_pendings): Update.
2887         (free_pending_blocks): Remove.
2888         (finish_block_internal, record_pending_block, make_blockvector)
2889         (end_symtab_get_static_block, augment_type_symtab, push_context)
2890         (buildsym_init): Update.
2891
2892 2018-07-20  Tom Tromey  <tom@tromey.com>
2893
2894         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
2895         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
2896         members.
2897         (pending_addrmap, pending_addrmap_obstack)
2898         (pending_addrmap_interesting): Remove.
2899         (scoped_free_pendings, record_block_range, make_blockvector)
2900         (prepare_for_building, reset_symtab_globals, buildsym_init):
2901         Update.
2902
2903 2018-07-20  Tom Tromey  <tom@tromey.com>
2904
2905         * xcoffread.c (process_linenos): Update.
2906         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
2907         * mdebugread.c (psymtab_to_symtab_1): Update.
2908         * dwarf2read.c (setup_type_unit_groups)
2909         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
2910         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
2911         * dbxread.c (process_one_symbol): Update.
2912         * coffread.c (coff_symtab_read, enter_linenos)
2913         (process_coff_symbol): Update.
2914         * buildsym.h (current_subfile): Don't declare.
2915         (get_current_subfile): Declare.
2916         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
2917         member.
2918         (start_subfile, free_buildsym_compunit, push_subfile)
2919         (prepare_for_building, start_symtab): Update.
2920         (get_current_subfile): New function.
2921
2922 2018-07-20  Tom Tromey  <tom@tromey.com>
2923
2924         * coffread.c (coff_symtab_read): Update.
2925         * xcoffread.c (read_xcoff_symtab): Update.
2926         * dwarf2read.c (new_symbol): Update.
2927         (read_func_scope, read_lexical_block_scope): Update.
2928         * dbxread.c (process_one_symbol): Update.
2929         * buildsym.h (context_stack, context_stack_depth): Don't declare.
2930         (outermost_context_p): Remove macro.
2931         (outermost_context_p, get_current_context_stack)
2932         (get_context_stack_depth): Declare.
2933         (pop_context): Return struct context_stack.
2934         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
2935         member.
2936         (context_stack_size): Remove.
2937         (INITIAL_CONTEXT_STACK_SIZE): Remove.
2938         (prepare_for_building, end_symtab_get_static_block)
2939         (augment_type_symtab, push_context): Update.
2940         (pop_context): Return struct context_stack.
2941         (outermost_context_p, get_current_context_stack)
2942         (get_context_stack_depth): New functions.
2943         (buildsym_init): Update.
2944
2945 2018-07-20  Tom Tromey  <tom@tromey.com>
2946
2947         * rust-exp.y: Now a pure parser.  Update all rules.
2948         (%union): Move earlier.
2949         (current_parser, work_obstack): Remove globals.
2950         (rust_parser, ~rust_parser): Update.
2951         (class rust_parser) <copy_name, concat3, crate_name, super_name,
2952         lex_character, lex_number, lex_string, lex_identifier,
2953         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
2954         convert_name, convert_params_to_expression,
2955         convert_ast_to_expression, ast_basic_type, ast_operation,
2956         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
2957         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
2958         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
2959         ast_array_type, ast_slice_type, ast_reference_type,
2960         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
2961         (rust_parse): Update.
2962         (rustyyerror, rustyylex): Add parser parameter.
2963         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
2964         (rust_lex_stringish_test, rust_lex_test_sequence)
2965         (rust_lex_test_trailing_dot, rust_lex_test_completion)
2966         (rust_lex_test_push_back, rust_lex_tests): Update.
2967
2968 2018-07-19  Pedro Alves  <palves@redhat.com>
2969
2970         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
2971         gdb::unique_xmalloc_ptr.
2972         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
2973         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
2974         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
2975         copy-initialization.
2976         * guile/scm-pretty-print.c (ppscm_print_children): Use
2977         gdb::unique_xmalloc_ptr instead of cleanups.
2978         (gdbscm_apply_val_pretty_printer): Remove cleanups.
2979         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
2980         gdb::unique_xmalloc_ptr.
2981         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2982         Adjust to use gdb::unique_xmalloc_ptr.
2983         * guile/scm-utils.c (extract_arg): Adjust.
2984         * guile/scm-value.c (gdbscm_value_field): Adjust to use
2985         gdb::unique_xmalloc_ptr instead of a cleanup.
2986
2987 2018-07-19  Tom Tromey  <tom@tromey.com>
2988
2989         * utils.c (do_value_free_to_mark)
2990         (make_cleanup_value_free_to_mark): Remove.
2991         * utils.h (make_cleanup_value_free_to_mark): Remove.
2992
2993 2018-07-19  Pedro Alves  <palves@redhat.com>
2994
2995         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
2996         forwarding reference.
2997
2998 2018-07-18  Pedro Alves  <palves@redhat.com>
2999
3000         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
3001         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
3002         cleanup.
3003
3004 2018-07-18  Pedro Alves  <palves@redhat.com>
3005
3006         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
3007         exceptions.
3008         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
3009         (gdbscm_wrap): New.
3010         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
3011         directly instead of a cleanup.
3012         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
3013         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
3014         (vlscm_binop_gdbthrow): New, factored out from ...
3015         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
3016         (vlscm_rich_compare): Use gdbscm_wrap.
3017         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
3018         instead of a cleanup.
3019         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
3020         cleanup.
3021         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
3022         Use xfree directly instead of a cleanup.
3023         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
3024         Adjust to use gdbscm_wrap and scoped_value_mark.
3025         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
3026         (gdbscm_value_address, gdbscm_value_dereference)
3027         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
3028         scoped_value_mark.
3029         (gdbscm_value_dynamic_type): Use scoped_value_mark.
3030         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
3031         scoped_value_mark.
3032         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
3033         gdbscm_wrap and scoped_value_mark.
3034         (gdbscm_value_to_string): Use xfree directly instead of a
3035         cleanup.  Move 'buffer' unique_ptr to TRY scope.
3036         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
3037         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
3038         scoped_value_mark.
3039         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
3040         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
3041         scoped_value_mark.
3042         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
3043         gdbscm_wrap.
3044
3045 2018-07-18  Tom de Vries  <tdevries@suse.de>
3046
3047         * findvar.c (default_read_var_value): Also resolve dynamic type for
3048         LOC_OPTIMIZED_OUT vars.
3049
3050 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
3051
3052         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
3053         decoding.
3054
3055 2018-07-17  Tom Tromey  <tom@tromey.com>
3056
3057         * guile/scm-param.c (pascm_set_func, pascm_show_func)
3058         (compute_enum_list, pascm_set_param_value_x)
3059         (gdbscm_parameter_value): Update.
3060         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
3061         (gdbscm_scm_to_host_string): Update.
3062         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
3063         Update.
3064         * guile/scm-cmd.c (cmdscm_add_completion): Update.
3065         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
3066         * guile/scm-string.c (gdbscm_scm_to_string): Return
3067         unique_xmalloc_ptr.
3068         (gdbscm_scm_to_host_string): Likewise.
3069
3070 2018-07-17  Tom Tromey  <tom@tromey.com>
3071
3072         * guile/guile.c (gdbscm_eval_from_control_command): Update.
3073         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
3074         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
3075         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
3076         unique_xmalloc_ptr.
3077
3078 2018-07-17  Tom Tromey  <tom@tromey.com>
3079
3080         * guile/scm-param.c (pascm_signal_setshow_error): Update.
3081         * guile/guile-internal.h (gdbscm_exception_message_to_string):
3082         Update.
3083         * guile/scm-cmd.c (cmdscm_function): Update.
3084         * guile/scm-pretty-print.c
3085         (ppscm_print_exception_unless_memory_error): Update.
3086         * guile/scm-exception.c (gdbscm_exception_message_to_string):
3087         Return unique_xmalloc_ptr.
3088
3089 2018-07-17  Tom Tromey  <tom@tromey.com>
3090
3091         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
3092         Use string_printf.
3093
3094 2018-07-17  Jim Wilson  <jimw@sifive.com>
3095
3096         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
3097         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
3098         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
3099         unecessary braces after EF_RISCV_RVC test.  Delete call to
3100         set_gdbarch_decr_pc_after_break.
3101
3102         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
3103         RISCV_LAST_FP_REGNUM + 1.
3104         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
3105
3106 2018-07-17  Tom Tromey  <tom@tromey.com>
3107
3108         * configure.ac: Remove --disable-gdbcli.
3109         * configure: Rebuild.
3110         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
3111         (SUBDIR_CLI_CFLAGS): Remove.
3112         (SFILES): Use SUBDIR_CLI_SRCS.
3113         (COMMON_OBS): Use SUBDIR_CLI_OBS.
3114
3115 2018-07-17  Tom Tromey  <tom@tromey.com>
3116
3117         PR gdb/18624:
3118         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
3119
3120 2018-07-16  Jim Wilson  <jimw@sifive.com>
3121
3122         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
3123
3124 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
3125
3126         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
3127         variable.
3128         (libunwind_frame_sniffer): Likewise.
3129         (libunwind_frame_prev_register): Likewise.
3130         (libunwind_sigtramp_frame_sniffer): Likewise.
3131         * ia64-tdep.c (ia64_access_reg): Likewise.
3132         (ia64_access_rse_reg): Likewise.
3133         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
3134         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
3135
3136 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
3137
3138         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
3139
3140 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
3141
3142         * remote-sim.c (gdbsim_target::close,
3143         gdbsim_target::mourn_inferior): Remove unused variables.
3144
3145 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
3146
3147         * ia64-tdep.c (ktab_buf): New global.
3148         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
3149         (get_kernel_table): Adjust.
3150
3151 2018-07-16  Tom Tromey  <tom@tromey.com>
3152
3153         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
3154         * dwarf2read.c (using_directives, new_symbol): Use
3155         outermost_context_p.
3156         * dbxread.c (process_one_symbol): Use outermost_context_p.
3157         * coffread.c (coff_symtab_read): Use outermost_context_p.
3158
3159 2018-07-16  Tom Tromey  <tom@tromey.com>
3160
3161         * dwarf2read.c (using_directives, read_func_scope)
3162         (read_lexical_block_scope): Update.
3163         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
3164         * buildsym.h (local_using_directives, global_using_directives):
3165         Don't declare.
3166         (get_local_using_directives, set_local_using_directives)
3167         (get_global_using_directives): Declare.
3168         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
3169         m_global_using_directives>: New members.
3170         (finish_block_internal, prepare_for_building)
3171         (reset_symtab_globals, end_symtab_get_static_block)
3172         (push_context): Update.
3173         (get_local_using_directives, set_local_using_directives)
3174         (get_global_using_directives): New functions.
3175         (buildsym_init): Update.
3176
3177 2018-07-16  Tom Tromey  <tom@tromey.com>
3178
3179         * xcoffread.c (xcoff_initial_scan): Don't call
3180         free_pending_blocks.
3181         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
3182         * buildsym.h (class scoped_free_pendings): Add constructor.
3183         (free_pending_blocks): Don't declare.
3184         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
3185         (free_pending_blocks): Now static.
3186
3187 2018-07-16  Tom Tromey  <tom@tromey.com>
3188
3189         * buildsym.h (push_subfile, pop_subfile): Update declarations.
3190         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
3191         member.
3192         (struct subfile_stack): Remove.
3193         (subfile_stack): Remove.
3194         (push_subfile, pop_subfile, buildsym_init): Update.
3195
3196 2018-07-16  Tom Tromey  <tom@tromey.com>
3197
3198         * buildsym.c (push_subfile): Use gdb_assert.
3199         (pop_subfile): Use gdb_assert.
3200
3201 2018-07-16  Tom Tromey  <tom@tromey.com>
3202
3203         * buildsym.h (merge_symbol_lists): Remove.
3204         * buildsym.c (merge_symbol_lists): Remove.
3205
3206 2018-07-16  Tom Tromey  <tom@tromey.com>
3207
3208         * stabsread.c (scan_file_globals): Update comment.
3209         * stabsread.h (scan_file_globals): Move from buildsym.h.
3210         * buildsym.h (scan_file_globals): Move to stabsread.h.
3211
3212 2018-07-16  Tom Tromey  <tom@tromey.com>
3213
3214         * xcoffread.c (xcoff_new_init): Update.
3215         * mipsread.c (mipscoff_new_init): Update.
3216         * mdebugread.c (mdebug_build_psymtabs): Update.
3217         * elfread.c (elf_new_init): Update.
3218         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
3219         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
3220         * buildsym.h (buildsym_new_init): Don't declare.
3221         * buildsym.c (buildsym_new_init): Remove.
3222
3223 2018-07-16  Tom Tromey  <tom@tromey.com>
3224
3225         * stabsread.h (within_function): Move from buildsym.h.
3226         * stabsread.c (start_stabs): Clear within_function.
3227         * coffread.c (coff_start_symtab): Clear within_function.
3228         * buildsym.h (within_function): Move to stabsread.h.
3229         * buildsym.c (prepare_for_building): Update.
3230
3231 2018-07-16  Tom Tromey  <tom@tromey.com>
3232
3233         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
3234         * dwarf2read.c (dwarf2_start_symtab): Don't set
3235         processing_gcc_compilation.
3236         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
3237
3238 2018-07-16  Tom Tromey  <tom@tromey.com>
3239
3240         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
3241         (next_symbol_text_func): Move from buildsym.h.
3242         * stabsread.c (hashname): Move from buildsym.c.
3243         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
3244         (next_symbol_text_func, hashname): Move to stabsread.h.
3245         * buildsym.c: Don't include bcache.h
3246         (hashname): Move to stasbread.c.
3247
3248 2018-07-16  Tom Tromey  <tom@tromey.com>
3249
3250         * buildsym.h (context_stack_size): Don't declare.
3251         * buildsym.c (context_stack_size): New global.
3252
3253 2018-07-16  Tom Tromey  <tom@tromey.com>
3254
3255         * dbxread.c (processing_acc_compilation): New global.
3256         * buildsym.h (processing_acc_compilation): Don't declare.
3257
3258 2018-07-16  Tom Tromey  <tom@tromey.com>
3259
3260         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
3261         * dbxread.c (read_ofile_symtab): Update.
3262         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
3263         * buildsym.h (last_source_start_addr): Remove.
3264         (set_last_source_start_addr, get_last_source_start_addr):
3265         Declare.
3266         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
3267         parameter.
3268         (struct buildsym_compunit) <m_last_source_start_addr>: New
3269         member.
3270         (prepare_for_building): Remove start_addr parameter.
3271         (start_symtab, restart_symtab, end_symtab_get_static_block)
3272         (end_symtab_with_blockvector): Update.
3273         (set_last_source_start_addr, get_last_source_start_addr): New
3274         functions.
3275
3276 2018-07-16  Tom Tromey  <tom@tromey.com>
3277
3278         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
3279         member.
3280         (have_line_numbers): Remove.
3281         (record_line, prepare_for_building, end_symtab_get_static_block)
3282         (augment_type_symtab): Update.
3283
3284 2018-07-16  Tom Tromey  <tom@tromey.com>
3285
3286         * buildsym.c (~buildsym_compunit): Free the macro table.
3287         (struct buildsym_compunit) <get_macro_table, release_macros>: New
3288         methods.
3289         <m_pending_macros>: New member.
3290         (pending_macros): Remove.
3291         (~scoped_free_pendings, get_macro_table, prepare_for_building)
3292         (reset_symtab_globals, end_symtab_get_static_block)
3293         (end_symtab_with_blockvector, augment_type_symtab)
3294         (buildsym_init): Update.
3295
3296 2018-07-16  Tom Tromey  <tom@tromey.com>
3297
3298         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
3299         parameter.
3300         (buildsym_compunit::set_last_source_file): New method.
3301         <m_last_source_file>: New member.
3302         (prepare_for_building): Remove "name" parameter.
3303         (start_symtab, restart_symtab, reset_symtab_globals): Update.
3304         (last_source_file): Remove.
3305         (set_last_source_file, get_last_source_file): Update.
3306
3307 2018-07-16  Tom Tromey  <tom@tromey.com>
3308
3309         * buildsym.c (prepare_for_building): Add assert.
3310
3311 2018-07-16  Tom Tromey  <tom@tromey.com>
3312
3313         * buildsym.c (~buildsym_compunit): Update.
3314         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
3315         (start_subfile, patch_subfile_names)
3316         (end_symtab_with_blockvector): Update.
3317
3318 2018-07-16  Tom Tromey  <tom@tromey.com>
3319
3320         * buildsym.c (struct buildsym_compunit): Add constructor,
3321         destructor, initializers.
3322         (start_buildsym_compunit): Remove.
3323         (free_buildsym_compunit): Use "delete".
3324         (start_symtab, restart_symtab): Use "new".
3325
3326 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
3327
3328         * symfile.c (set_objfile_default_section_offset): Remove struct
3329         keyword.
3330
3331 2018-07-14  Stafford Horne  <shorne@gmail.com>
3332
3333         * (Responsible Maintainers): Add myself as or1k maintainer.
3334
3335 2018-07-13  Tom Tromey  <tom@tromey.com>
3336
3337         * symfile.c (set_objfile_default_section_offset): Use extra braces
3338         around initializer.
3339
3340 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3341
3342         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
3343         non-branching basr.
3344
3345 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3346
3347         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3348         unittests/cli-utils-selftests.c
3349         * unittests/cli-utils-selftests.c: New file.
3350
3351 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3352
3353         * NEWS: Mention new commands. Mention change to 'thread apply'.
3354
3355 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3356
3357         * thread.c (thr_try_catch_cmd): New function.
3358         (thread_apply_all_command): Handle qcs flags.
3359         (thread_apply_command): Handle qcs flags.
3360         (taas_command): New function.
3361         (tfaas_command): New function.
3362         (_initialize_thread): Update to setup the new commands 'taas
3363         and 'tfaas'. Change doc string for 'thread apply'.
3364
3365 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3366
3367         * stack.c: (trailing_outermost_frame): New function, mostly
3368         extracted from backtrace_command_1.
3369         (leading_innermost_frame): New function.
3370         (backtrace_command_1): Update to call trailing_outermost_frame.
3371         (frame_apply_command_count): New function.
3372         (frame_apply_level_command): New function.
3373         (frame_apply_all_command): New function.
3374         (frame_apply_command): New function.
3375         (faas_command): New function.
3376         (frame_cmd_list): New variable.
3377         (_initialize_stack): Update to setup the new commands 'frame apply'
3378         and 'faas'.
3379
3380 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3381
3382         * cli-utils.c (number_or_range_parser::get_number): Only handle
3383         numbers or convenience var as numbers.
3384         (parse_flags): New function.
3385         (parse_flags_qcs): New function.
3386         (number_or_range_parser::finished): Ensure parsing end is detected
3387         before end of string.
3388         * cli-utils.h (parse_flags): New function.
3389         (parse_flags_qcs): New function.
3390         (number_or_range_parser): Remove m_finished bool.
3391         (number_or_range_parser::skip_range): Set m_in_range to false.
3392
3393 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
3394
3395         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
3396         on Windows.
3397
3398 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
3399             Jan Kratochvil  <jan.kratochvil@redhat.com>
3400             Paul Fertser  <fercerpav@gmail.com>
3401             Tsutomu Seki  <sekiriki@gmail.com>
3402             Pedro Alves  <palves@redhat.com>
3403
3404         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3405         'unittests/parse-connection-spec-selftests.c'.
3406         (COMMON_SFILES): Add 'common/netstuff.c'.
3407         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
3408         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
3409         * common/netstuff.c: New file.
3410         * common/netstuff.h: New file.
3411         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
3412         (wait_for_connect): Update comment.  New parameter
3413         'gdb::optional<int> sock' instead of 'struct serial *scb'.
3414         Use 'sock' directly instead of 'scb->fd'.
3415         (try_connect): New function, with code from 'net_open'.
3416         (net_open): Rewrite main loop to deal with multiple
3417         sockets/addresses.  Handle IPv6-style hostnames; implement
3418         support for IPv6 connections.
3419         * unittests/parse-connection-spec-selftests.c: New file.
3420
3421 2018-07-11  Pedro Alves  <palves@redhat.com>
3422
3423         PR gdb/23377
3424         * remote.c (remote_target::remote_detach_pid): Call
3425         set_current_process.
3426
3427 2018-07-11  Pedro Alves  <palves@redhat.com>
3428
3429         * h8300-tdep.c (h8300_gdbarch_init): Remove
3430         set_gdbarch_ecoff_reg_to_regnum calls.
3431
3432 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
3433
3434         PR c++/23373
3435         * c-typeprint.c (c_type_print_base_struct_union): Don't print
3436         offsets/sizes for static members of a class/struct.
3437
3438 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
3439
3440         * target-descriptions.c (tdesc_register_bitsize): Rename.
3441         * target-descriptions.h (tdesc_register_bitsize): Likewise.
3442         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
3443         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
3444
3445 2018-07-10  Tom Tromey  <tom@tromey.com>
3446
3447         * breakpoint.c (moribund_locations): Now static and a
3448         std::vector.
3449         (breakpoint_init_inferior, moribund_breakpoint_here_p)
3450         (build_bpstat_chain, update_global_location_list)
3451         (breakpoint_retire_moribund): Update.
3452         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
3453         VEC.
3454
3455 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
3456
3457         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
3458         (riscv_register_reggroup_p): Use new function, remove unneeded
3459         parenthesis.
3460         (riscv_push_dummy_call): Extend assert to compare against xlen or
3461         flen based on register type.
3462
3463 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
3464
3465         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
3466
3467 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
3468
3469         * remote.c (show_hardware_watchpoint_limit): New function.
3470         (show_hardware_watchpoint_length_limit): New function.
3471         (show_hardware_breakpoint_limit): New function.
3472         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
3473         where appropriate, update help text.
3474
3475 2018-07-09  Tom Tromey  <tom@tromey.com>
3476
3477         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
3478         (CLIBS): Don't mention NAT_CLIBS.
3479
3480 2018-07-09  Tom Tromey  <tom@tromey.com>
3481
3482         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
3483         (LIBGDB_OBS, clean mostlyclean): Update.
3484         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
3485
3486 2018-07-09  Tom Tromey  <tom@tromey.com>
3487
3488         * Makefile.in (%.c: %.y): Use ECHO_YACC.
3489         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
3490         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
3491
3492 2018-07-09  Tom Tromey  <tom@tromey.com>
3493
3494         * Makefile.in (ALLDEPFILES): Remove exec.c.
3495         (COMMON_OBS): Remove exec.o.
3496         (COMMON_SFILES): Add exec.c.
3497
3498 2018-07-09  Tom Tromey  <tom@tromey.com>
3499
3500         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
3501
3502 2018-07-09  Tom Tromey  <tom@tromey.com>
3503
3504         * Makefile.in (clean mostlyclean): Remove stamp-version.
3505         (version.c): Depend on stamp-version.
3506         (stamp-version): New rule, from version.c rule.
3507
3508 2018-07-09  Tom Tromey  <tom@tromey.com>
3509
3510         * Makefile.in (init.c): Depend on stamp-init.
3511         (stamp-init): New rule, from init.c rule.
3512         (clean mostlyclean): Remove stamp-init.
3513
3514 2018-07-09  Tom Tromey  <tom@tromey.com>
3515
3516         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
3517         SUBDIR_GCC_COMPILE_SRCS.
3518
3519 2018-07-09  Tom Tromey  <tom@tromey.com>
3520
3521         * Makefile.in (init.c): Remove some unused sed rules.
3522
3523 2018-07-09  Tom Tromey  <tom@tromey.com>
3524
3525         * Makefile.in (TSOBS): Remove.
3526         (INIT_FILES): Update.
3527         (LIBGDB_OBS): Update.
3528         (COMMON_SFILES): Add inflow.c.
3529         (SFILES): Remove inflow.c.
3530
3531 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
3532
3533         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
3534
3535 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
3536
3537         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
3538         get_saveloc_name, is_signal_frame_name, step_name,
3539         init_remote_name, create_addr_space_name,
3540         destroy_addr_space_name, search_unwind_table_name,
3541         find_dyn_list_name): Constify.
3542
3543 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
3544
3545         * darwin-nat.c (darwin_pthread_kill): New function.
3546         (darwin_resume_thread): Use darwin_pthread_kill.
3547
3548 2018-07-05  Tom de Vries  <tdevries@suse.de>
3549
3550         * macroexp.c (macro_buffer) <operator=>: New member function.
3551
3552 2018-07-04  Tom Tromey  <tom@tromey.com>
3553
3554         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
3555
3556 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
3557
3558         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
3559         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
3560         * maint.c: Likewise.
3561         * top.c: Likewise.
3562
3563 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
3564
3565         * NEWS: Create a new section for the next release branch.
3566         Rename the section of the current branch, now that it has
3567         been cut.
3568
3569 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
3570
3571         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
3572         * version.in: Bump version to 8.2.50.DATE-git.
3573
3574 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
3575             Pedro Alves  <palves@redhat.com>
3576
3577         * linux-nat.c (linux_init_ptrace): Rename to ...
3578         (linux_init_ptrace_procfs): ... this.  Call
3579         linux_proc_init_warnings.
3580         (linux_nat_target::post_attach)
3581         (linux_nat_target::post_startup_inferior): Adjust.
3582         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
3583         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
3584
3585 2018-07-04  Tom de Vries  <tdevries@suse.de>
3586
3587         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
3588         check ...
3589         (read_comp_unit_head): ... here.
3590
3591 2018-07-03  Tom Tromey  <tom@tromey.com>
3592
3593         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
3594         (stop_tracing, tstatus_command)
3595         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
3596         (print_one_static_tracepoint_marker): Update.
3597         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
3598         std::vector.
3599         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
3600         VEC.
3601         (all_tracepoints, static_tracepoints_here): Return std::vector.
3602
3603 2018-07-03  Tom Tromey  <tom@tromey.com>
3604
3605         * common/ptid.c (ptid_equal): Remove.
3606         * common/ptid.h (ptid_equal): Don't declare.
3607         * ada-tasks.c: Update.
3608         * breakpoint.c: Update.
3609         * common/agent.c: Update.
3610         * corelow.c: Update.
3611         * darwin-nat-info.c: Update.
3612         * darwin-nat.c: Update.
3613         * dcache.c: Update.
3614         * dtrace-probe.c: Update.
3615         * dummy-frame.c: Update.
3616         * fbsd-nat.c: Update.
3617         * frame.c: Update.
3618         * gdbthread.h: Update.
3619         * gnu-nat.c: Update.
3620         * go32-nat.c: Update.
3621         * inf-loop.c: Update.
3622         * inf-ptrace.c: Update.
3623         * infcall.c: Update.
3624         * infcmd.c: Update.
3625         * inflow.c: Update.
3626         * infrun.c: Update.
3627         * linux-fork.c: Update.
3628         * linux-nat.c: Update.
3629         * linux-thread-db.c: Update.
3630         * mi/mi-cmd-var.c: Update.
3631         * mi/mi-interp.c: Update.
3632         * mi/mi-main.c: Update.
3633         * nto-procfs.c: Update.
3634         * ppc-linux-tdep.c: Update.
3635         * procfs.c: Update.
3636         * python/py-inferior.c: Update.
3637         * python/py-record-btrace.c: Update.
3638         * python/py-record.c: Update.
3639         * ravenscar-thread.c: Update.
3640         * regcache.c: Update.
3641         * remote-sim.c: Update.
3642         * remote.c: Update.
3643         * sol-thread.c: Update.
3644         * solib.c: Update.
3645         * target.c: Update.
3646         * tui/tui-stack.c: Update.
3647         * varobj.c: Update.
3648         * windows-nat.c: Update.
3649         * windows-tdep.c: Update.
3650
3651 2018-07-03  Tom Tromey  <tom@tromey.com>
3652
3653         * common/ptid.c (ptid_match): Remove.
3654         * common/ptid.h (ptid_match): Don't declare.
3655         * fbsd-nat.c: Update.
3656         * infcmd.c: Update.
3657         * infrun.c: Update.
3658         * linux-nat.c: Update.
3659         * record-btrace.c: Update.
3660         * regcache.c: Update.
3661         * remote.c: Update.
3662
3663 2018-07-03  Tom Tromey  <tom@tromey.com>
3664
3665         * common/ptid.c (ptid_tid_p): Remove.
3666         * common/ptid.h (ptid_tid_p): Don't declare.
3667         * sol-thread.c: Update.
3668
3669 2018-07-03  Tom Tromey  <tom@tromey.com>
3670
3671         * common/ptid.c (ptid_lwp_p): Remove.
3672         * common/ptid.h (ptid_lwp_p): Don't declare.
3673         * fbsd-nat.c: Update.
3674         * linux-nat.c: Update.
3675         * nat/linux-procfs.c: Update.
3676         * nat/x86-linux-dregs.c: Update.
3677         * sol-thread.c: Update.
3678
3679 2018-07-03  Tom Tromey  <tom@tromey.com>
3680
3681         * common/ptid.c (ptid_is_pid): Remove.
3682         * common/ptid.h (ptid_is_pid): Don't declare.
3683         * infrun.c: Update.
3684         * linux-nat.c: Update.
3685         * mi/mi-interp.c: Update.
3686         * remote.c: Update.
3687         * thread.c: Update.
3688
3689 2018-07-03  Tom Tromey  <tom@tromey.com>
3690
3691         * common/ptid.c (ptid_get_tid): Remove.
3692         * common/ptid.h (ptid_get_tid): Don't declare.
3693         * ada-tasks.c: Update.
3694         * aix-thread.c: Update.
3695         * bsd-uthread.c: Update.
3696         * darwin-nat.c: Update.
3697         * fbsd-nat.c: Update.
3698         * i386-darwin-nat.c: Update.
3699         * infrun.c: Update.
3700         * linux-tdep.c: Update.
3701         * nto-procfs.c: Update.
3702         * ppc-ravenscar-thread.c: Update.
3703         * python/py-infthread.c: Update.
3704         * ravenscar-thread.c: Update.
3705         * sol-thread.c: Update.
3706         * sparc-ravenscar-thread.c: Update.
3707         * windows-nat.c: Update.
3708
3709 2018-07-03  Tom Tromey  <tom@tromey.com>
3710
3711         * common/ptid.c (ptid_get_lwp): Remove.
3712         * common/ptid.h (ptid_get_lwp): Don't declare.
3713         * aarch64-linux-nat.c: Update.
3714         * ada-tasks.c: Update.
3715         * aix-thread.c: Update.
3716         * amd64-linux-nat.c: Update.
3717         * arm-linux-nat.c: Update.
3718         * corelow.c: Update.
3719         * fbsd-nat.c: Update.
3720         * fbsd-tdep.c: Update.
3721         * gnu-nat.c: Update.
3722         * i386-cygwin-tdep.c: Update.
3723         * i386-gnu-nat.c: Update.
3724         * i386-linux-nat.c: Update.
3725         * ia64-linux-nat.c: Update.
3726         * inf-ptrace.c: Update.
3727         * infrun.c: Update.
3728         * linux-fork.c: Update.
3729         * linux-nat.c: Update.
3730         * linux-tdep.c: Update.
3731         * linux-thread-db.c: Update.
3732         * mips-linux-nat.c: Update.
3733         * nat/aarch64-linux-hw-point.c: Update.
3734         * nat/aarch64-linux.c: Update.
3735         * nat/linux-btrace.c: Update.
3736         * nat/linux-osdata.c: Update.
3737         * nat/linux-procfs.c: Update.
3738         * nat/x86-linux-dregs.c: Update.
3739         * obsd-nat.c: Update.
3740         * ppc-fbsd-nat.c: Update.
3741         * ppc-linux-nat.c: Update.
3742         * procfs.c: Update.
3743         * python/py-infthread.c: Update.
3744         * ravenscar-thread.c: Update.
3745         * remote.c: Update.
3746         * s390-linux-nat.c: Update.
3747         * sol-thread.c: Update.
3748         * sol2-tdep.c: Update.
3749         * spu-linux-nat.c: Update.
3750         * x86-linux-nat.c: Update.
3751         * xtensa-linux-nat.c: Update.
3752
3753 2018-07-03  Tom Tromey  <tom@tromey.com>
3754
3755         * common/ptid.c (ptid_get_pid): Remove.
3756         * common/ptid.h (ptid_get_pid): Don't declare.
3757         * aarch64-linux-nat.c: Update.
3758         * ada-lang.c: Update.
3759         * aix-thread.c: Update.
3760         * alpha-bsd-nat.c: Update.
3761         * amd64-fbsd-nat.c: Update.
3762         * amd64-linux-nat.c: Update.
3763         * arm-linux-nat.c: Update.
3764         * arm-nbsd-nat.c: Update.
3765         * auxv.c: Update.
3766         * break-catch-syscall.c: Update.
3767         * breakpoint.c: Update.
3768         * bsd-uthread.c: Update.
3769         * corelow.c: Update.
3770         * ctf.c: Update.
3771         * darwin-nat.c: Update.
3772         * fbsd-nat.c: Update.
3773         * fbsd-tdep.c: Update.
3774         * gcore.c: Update.
3775         * gnu-nat.c: Update.
3776         * hppa-nbsd-nat.c: Update.
3777         * hppa-obsd-nat.c: Update.
3778         * i386-fbsd-nat.c: Update.
3779         * ia64-linux-nat.c: Update.
3780         * inf-ptrace.c: Update.
3781         * infcmd.c: Update.
3782         * inferior.c: Update.
3783         * inferior.h: Update.
3784         * inflow.c: Update.
3785         * infrun.c: Update.
3786         * linux-fork.c: Update.
3787         * linux-nat.c: Update.
3788         * linux-tdep.c: Update.
3789         * linux-thread-db.c: Update.
3790         * m68k-bsd-nat.c: Update.
3791         * mi/mi-interp.c: Update.
3792         * mi/mi-main.c: Update.
3793         * mips-linux-nat.c: Update.
3794         * mips-nbsd-nat.c: Update.
3795         * mips64-obsd-nat.c: Update.
3796         * nat/aarch64-linux-hw-point.c: Update.
3797         * nat/aarch64-linux.c: Update.
3798         * nat/linux-btrace.c: Update.
3799         * nat/linux-osdata.c: Update.
3800         * nat/linux-procfs.c: Update.
3801         * nat/x86-linux-dregs.c: Update.
3802         * nto-procfs.c: Update.
3803         * obsd-nat.c: Update.
3804         * ppc-linux-nat.c: Update.
3805         * ppc-nbsd-nat.c: Update.
3806         * ppc-obsd-nat.c: Update.
3807         * proc-service.c: Update.
3808         * procfs.c: Update.
3809         * python/py-inferior.c: Update.
3810         * python/py-infthread.c: Update.
3811         * ravenscar-thread.c: Update.
3812         * record.c: Update.
3813         * remote-sim.c: Update.
3814         * remote.c: Update.
3815         * rs6000-nat.c: Update.
3816         * s390-linux-nat.c: Update.
3817         * sh-nbsd-nat.c: Update.
3818         * sol-thread.c: Update.
3819         * sparc-nat.c: Update.
3820         * sparc64-tdep.c: Update.
3821         * spu-linux-nat.c: Update.
3822         * spu-tdep.c: Update.
3823         * target-debug.h: Update.
3824         * target.c: Update.
3825         * thread.c: Update.
3826         * tid-parse.c: Update.
3827         * tracefile-tfile.c: Update.
3828         * vax-bsd-nat.c: Update.
3829         * windows-nat.c: Update.
3830         * x86-linux-nat.c: Update.
3831         * x86-nat.c: Update.
3832
3833 2018-07-03  Tom Tromey  <tom@tromey.com>
3834
3835         * common/ptid.c (pid_to_ptid): Remove.
3836         * common/ptid.h (pid_to_ptid): Don't declare.
3837         * aix-thread.c: Update.
3838         * arm-linux-nat.c: Update.
3839         * common/ptid.c: Update.
3840         * common/ptid.h: Update.
3841         * corelow.c: Update.
3842         * ctf.c: Update.
3843         * darwin-nat.c: Update.
3844         * fbsd-nat.c: Update.
3845         * fork-child.c: Update.
3846         * gnu-nat.c: Update.
3847         * go32-nat.c: Update.
3848         * inf-ptrace.c: Update.
3849         * infcmd.c: Update.
3850         * inferior.c: Update.
3851         * infrun.c: Update.
3852         * linux-fork.c: Update.
3853         * linux-nat.c: Update.
3854         * nat/aarch64-linux-hw-point.c: Update.
3855         * nat/fork-inferior.c: Update.
3856         * nat/x86-linux-dregs.c: Update.
3857         * nto-procfs.c: Update.
3858         * obsd-nat.c: Update.
3859         * procfs.c: Update.
3860         * progspace.c: Update.
3861         * remote.c: Update.
3862         * rs6000-nat.c: Update.
3863         * s390-linux-nat.c: Update.
3864         * sol-thread.c: Update.
3865         * spu-linux-nat.c: Update.
3866         * target.c: Update.
3867         * top.c: Update.
3868         * tracefile-tfile.c: Update.
3869         * windows-nat.c: Update.
3870
3871 2018-07-03  Tom Tromey  <tom@tromey.com>
3872
3873         * common/ptid.h (ptid_build): Don't declare.
3874         * common/ptid.c (ptid_build): Remove.
3875         * aix-thread.c: Update.
3876         * bsd-kvm.c: Update.
3877         * bsd-uthread.c: Update.
3878         * common/agent.c: Update.
3879         * common/ptid.c: Update.
3880         * common/ptid.h: Update.
3881         * corelow.c: Update.
3882         * darwin-nat.c: Update.
3883         * fbsd-nat.c: Update.
3884         * gnu-nat.c: Update.
3885         * linux-fork.c: Update.
3886         * linux-nat.c: Update.
3887         * linux-thread-db.c: Update.
3888         * nat/linux-osdata.c: Update.
3889         * nat/linux-procfs.c: Update.
3890         * nto-procfs.c: Update.
3891         * obsd-nat.c: Update.
3892         * proc-service.c: Update.
3893         * procfs.c: Update.
3894         * ravenscar-thread.c: Update.
3895         * remote-sim.c: Update.
3896         * remote.c: Update.
3897         * sol-thread.c: Update.
3898         * target.c: Update.
3899         * windows-nat.c: Update.
3900
3901 2018-07-03  Tom Tromey  <tom@tromey.com>
3902
3903         * infrun.c (follow_exec): Use exit_inferior_silent.
3904         * inferior.c (exit_inferior_num_silent): Remove.
3905         * inferior.h (exit_inferior_num_silent): Don't declare.
3906
3907 2018-07-03  Tom Tromey  <tom@tromey.com>
3908
3909         PR cli/23340:
3910         * darwin-nat.c (darwin_attach_pid): Reset inferior and
3911         inferior_ptid on error.
3912
3913 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
3914             Simon Marchi  <simon.marchi@polymtl.ca>
3915
3916         PR tdep/8282
3917         * disasm.h (gdb_disassembler): Add
3918         `m_disassembler_options_holder'. member
3919         * disasm.c (get_all_disassembler_options): New function.
3920         (gdb_disassembler::gdb_disassembler): Use it.
3921         (gdb_buffered_insn_length_init_dis): Likewise.
3922         (gdb_buffered_insn_length): Adjust accordingly.
3923         (set_disassembler_options): Handle options with arguments.
3924         (show_disassembler_options_sfunc): Likewise.  Add a leading new
3925         line if showing options with descriptions.
3926         (disassembler_options_completer): Adapt to using the
3927         `disasm_options_and_args_t' structure.
3928         * mips-tdep.c (mips_disassembler_options): New variable.
3929         (mips_disassembler_options_o32): Likewise.
3930         (mips_disassembler_options_n32): Likewise.
3931         (mips_disassembler_options_n64): Likewise.
3932         (gdb_print_insn_mips): Don't set `disassembler_options'.
3933         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
3934         functions.
3935         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
3936         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
3937         `gdbarch_disassembler_options_implicit' and
3938         `gdbarch_valid_disassembler_options'.
3939         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
3940         `disasm_options_and_args_t' structure.
3941         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
3942         method.
3943         (valid_disassembler_options): Switch from `disasm_options_t' to
3944         the `disasm_options_and_args_t' structure.
3945         * NEWS: Document `set disassembler-options' support for the MIPS
3946         target.
3947         * gdbarch.h: Regenerate.
3948         * gdbarch.c: Regenerate.
3949
3950 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
3951
3952         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
3953
3954 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
3955
3956         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
3957         parameter in call to amd64_target_description.
3958         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
3959         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
3960         (amd64fbsd_init_abi): Likewise.
3961         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
3962         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
3963         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
3964         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
3965
3966 2018-06-29  Pedro Alves  <palves@redhat.com>
3967
3968         * gdb/amd64-tdep.h (amd64_create_target_description): Add
3969         "segments" parameter.
3970         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
3971         (_initialize_amd64_tdep): Update call to
3972         amd64_create_target_description.
3973         (amd64_target_description): Add "segments" parameter.  Adjust
3974         the implementation to use it.
3975         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
3976         call to amd64_create_target_description.
3977         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
3978         * gdb/arch/amd64.h (amd64_create_target_description): Add
3979         "segments" register.
3980         * gdb/arch/amd64.c (amd64_create_target_description): Add
3981         "segments" parameter.  Call create_feature_i386_64bit_segments
3982         only if SEGMENTS is true.
3983         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
3984         call to amd64_create_target_description.
3985
3986 2018-06-29  Pedro Alves  <palves@redhat.com>
3987
3988         * thread.c (thread_target_id_str): New, factored out from ...
3989         (print_thread_info_1): ... here.  Use it to compute the max
3990         "Target Id" column width.
3991
3992 2018-06-29  Pedro Alves  <palves@redhat.com>
3993
3994         * remote.c (remote_target::extra_thread_info): Delete
3995         'display_buf' and 'n' locals.  from the cache, regardless of
3996         packet mechanims is in use.  Use cache for qThreadExtra and qP
3997         methods too.
3998
3999 2018-06-29  Pedro Alves  <palves@redhat.com>
4000
4001         * blockframe.c (find_pc_sect_containing_function): New function.
4002         * breakpoint.c (print_breakpoint_location): Don't call
4003         find_pc_sect_function.
4004         * linespec.c (create_sals_line_offset): Record the location's
4005         symbol in the sal.
4006         * linespec.c (convert_address_location_to_sals): Fill in sal's
4007         symbol with find_pc_sect_containing_function.
4008         * symtab.c (find_function_start_sal): Rename to ...
4009         (find_function_start_sal_1): ... this.
4010         (find_function_start_sal): Reimplement as wrapper around
4011         find_function_start_sal_1, and use
4012         find_pc_sect_containing_function to fill in the sal's symbol.
4013         (find_function_start_sal(symbol*, bool)): Adjust.
4014         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
4015         comments.
4016         (find_pc_sect_containing_function): Declare.
4017
4018 2018-06-29  Pedro Alves  <palves@redhat.com>
4019
4020         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
4021         true if the the location has no symbol.
4022
4023 2018-06-28  Tom Tromey  <tom@tromey.com>
4024
4025         * NEWS: Mention --enable-codesign.
4026         * silent-rules.mk (ECHO_SIGN): New variable.
4027         * configure.ac: Add --enable-codesign.
4028         * configure: Rebuild.
4029         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
4030         (gdb$(EXEEXT)): Optionally invoke codesign.
4031
4032 2018-06-28  Pedro Alves  <palves@redhat.com>
4033
4034         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
4035         comments.
4036         (switch_to_thread_no_regs): Adjust comment.
4037         * infcmd.c (stop_pc): Delete.
4038         (post_create_inferior, info_program_command): Replace references
4039         to stop_pc with references to thread_info->suspend.stop_pc.
4040         * inferior.h (stop_pc): Delete declaration.
4041         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
4042         (handle_inferior_event_1, handle_signal_stop)
4043         (process_event_stop_test, keep_going_stepped_thread)
4044         (handle_step_into_function, handle_step_into_function_backward)
4045         (print_stop_location): Replace references to stop_pc with
4046         references to thread_info->suspend.stop_pc.
4047         (struct infcall_suspend_state) <stop_pc>: Delete field.
4048         (save_infcall_suspend_state, restore_infcall_suspend_state):
4049         Remove references to inf_stat->stop_pc.
4050         * linux-fork.c (fork_load_infrun_state): Likewise.
4051         * record-btrace.c (record_btrace_set_replay): Likewise.
4052         * record-full.c (record_full_goto_entry): Likewise.
4053         * remote.c (print_one_stopped_thread): Likewise.
4054         * target.c (target_resume): Extend comment.
4055         * thread.c (set_executing_thread): New.
4056         (set_executing): Use it.
4057         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
4058         Remove references to stop_pc.
4059
4060 2018-06-28  Pedro Alves  <palves@redhat.com>
4061
4062         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
4063         Moving fetching stop_pc until after ecs->event_thread is refreshed.
4064
4065 2018-06-28  Tom Tromey  <tom@tromey.com>
4066
4067         * coffread.c (coff_symfile_finish): Update.
4068         * xcoffread.c (xcoff_symfile_finish): Update.
4069         * elfread.c (elf_symfile_finish): Update.
4070         * symfile.h (dwarf2_free_objfile): Don't declare.
4071         * dwarf2read.c (_initialize_dwarf2_read): Use
4072         register_objfile_data_with_cleanup.
4073         (dwarf2_free_objfile): Now static.  Change signature.
4074
4075 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4076
4077         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
4078         option "-o" to add-symbol-file-load to add an offset to each
4079         section's load address.
4080         * symfile.c (set_objfile_default_section_offset): New function.
4081
4082 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4083
4084         * symfile.c (add_symbol_file_command): Make sure that sections
4085         with the same name are sorted in the same order.
4086
4087 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4088
4089         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
4090         require the second argument.  If omitted, load sections at the
4091         addresses specified in the file.
4092
4093 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4094
4095         * symfile.c (symbol_file_command, symbol_file_add_main_1)
4096         (_initialize_symfile): Add option "-o" to symbol-file to add an
4097         offset to each section of the symbol file.
4098
4099 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4100
4101         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
4102
4103 2018-06-27  Tom Tromey  <tom@tromey.com>
4104
4105         * stack.c (_initialize_stack): Update "func" help text.
4106
4107 2018-06-27  Tom Tromey  <tom@tromey.com>
4108
4109         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
4110         std::vector.
4111         (unwind_infopy_str, pyuw_create_unwind_info)
4112         (unwind_infopy_add_saved_register, pyuw_sniffer)
4113         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
4114         Update.
4115         (struct saved_reg): Add constructor.
4116         <value>: Now a gdbpy_ref<>.
4117
4118 2018-06-27  Tom Tromey  <tom@tromey.com>
4119
4120         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
4121
4122 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4123
4124         * gdb-gdb.py.in: Format using autopep8.
4125
4126 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4127
4128         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
4129         (type_lookup_function): Recognize CORE_ADDR values.
4130
4131 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4132
4133         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
4134         print tag_name.
4135
4136 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4137
4138         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
4139         <__lt__>: Add.
4140
4141 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4142
4143         * gdb-gdb.py: Move to...
4144         * gdb-gdb.py.in: ... here.
4145         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
4146         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
4147         dependencies.
4148         (distclean): Remove gdb-gdb.py when cleaning.
4149         (gdb-gdb.py, gdb-gdb.gdb): New rules.
4150         * configure: Re-generate.
4151
4152 2018-06-27  Pedro Alves  <palves@redhat.com>
4153
4154         * proc-service.c (get_ps_regcache): New.
4155         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4156         (ps_lsetfpregs): Use it.
4157
4158 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
4159
4160         PR gdb/21695
4161         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
4162         (dwarf_decode_lines_1): Adjust.
4163
4164 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4165
4166         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
4167         override.
4168         <info_proc>: Likewise.
4169
4170 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
4171
4172         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
4173         to windows_fetch_one_register, and only handle the case of
4174         fetching one register.  Move the code that reloads the context
4175         and iterates over all registers if R is negative to...
4176         (windows_nat_target::fetch_registers): ... here.
4177         (do_windows_store_inferior_registers): Rename to
4178         windows_store_one_register, and only handle the case of storing
4179         one register.  Move the code that handles the case where r is
4180         negative to...
4181         (windows_nat_target::store_registers) ... here.
4182
4183 2018-06-26  Tom Tromey  <tom@tromey.com>
4184
4185         PR rust/22574:
4186         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
4187         * rust-lang.c (rust_print_struct_def): Add podata parameter.
4188         Update.
4189         (rust_internal_print_type): Add podata parameter.
4190         (rust_print_type): Update.
4191
4192 2018-06-26  Tom Tromey  <tom@tromey.com>
4193
4194         * typeprint.h (struct print_offset_data) <update, finish,
4195         maybe_print_hole>: New methods.
4196         <indentation>: New constant.
4197         * typeprint.c (print_offset_data::indentation): Define.
4198         (print_offset_data::maybe_print_hole, print_offset_data::update)
4199         (print_offset_data::finish): Move from c-typeprint.c and rename.
4200         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
4201         (print_spaces_filtered_with_print_options): Update.
4202         (c_print_type_union_field_offset, maybe_print_hole)
4203         (c_print_type_struct_field_offset): Move to typeprint.c and
4204         rename.
4205         (c_type_print_base_struct_union): Update.
4206
4207 2018-06-25  Pedro Alves  <palves@redhat.com>
4208
4209         * gdbthread.h (thread_info_ref, delete_thread)
4210         (delete_thread_silent, first_thread_of_inferior)
4211         (any_thread_of_inferior, switch_to_thread)
4212         (enable_thread_stack_temporaries)
4213         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4214         (get_last_thread_stack_temporary)
4215         (value_in_thread_stack_temporaries, can_access_registers_thread):
4216         Spell out "struct thread_info" instead of just "thread_info".
4217         * inferior.h (notice_new_inferior): Likewise.
4218
4219 2018-06-25  Pedro Alves  <palves@redhat.com>
4220
4221         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
4222         pass thread_info pointer to delete_thread.
4223         (windows_nat_target::detach): Pass inferior pointer to
4224         detach_inferior.
4225         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
4226         delete_thread.
4227         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
4228         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
4229         and pass a thread_info pointer to delete_thread.
4230         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
4231         pass thread_info pointer to delete_thread.
4232         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
4233         delete_thread_silent call.
4234         * procfs.c (procfs_target::detach): Pass inferior pointer to
4235         detach_inferior.
4236         (procfs_target::wait): Pass thread_info pointer to delete_thread.
4237         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
4238         delete_thread_silent call.
4239         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
4240         pass thread_info pointer to delete_thread.
4241         (windows_nat_target::detach): Pass inferior pointer to
4242         delete_inferior.
4243
4244 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
4245
4246         * regcache.c (readable_regcache::read_part): Fix asserts.
4247         (reg_buffer::raw_collect_part): New function.
4248         (regcache::write_part): Fix asserts.
4249         (reg_buffer::raw_supply_part): New function.
4250         (regcache::transfer_regset_register): New helper function.
4251         (regcache::transfer_regset): Call new functions.
4252         (regcache_supply_regset): Use gdb_byte*.
4253         (regcache::supply_regset): Likewise.
4254         (regcache_collect_regset): Likewise.
4255         (regcache::collect_regset): Likewise.
4256         * regcache.h (reg_buffer::raw_collect_part): New declaration.
4257         (reg_buffer::raw_supply_part): Likewise.
4258         (regcache::transfer_regset_register): Likewise.
4259         (regcache::transfer_regset): Use gdb_byte*.
4260
4261 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
4262
4263         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
4264
4265 2018-06-21  Pedro Alves  <palves@redhat.com>
4266
4267         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
4268         instead of a ptid_t.  All callers adjusted.
4269         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
4270         adjusted.
4271         (print_ada_task_info, display_current_task_id, task_command_1):
4272         Adjust.
4273         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
4274         inferior_thread.
4275         (breakpoint_kind): Adjust.
4276         (remove_breakpoints_pid): Rename to ...
4277         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
4278         pointer.  All callers adjusted.
4279         (bpstat_clear_actions): Use inferior_thread.
4280         (get_bpstat_thread): New.
4281         (bpstat_do_actions): Use it.
4282         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
4283         to take a thread_info pointer.  All callers adjusted.
4284         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
4285         (breakpoint_re_set_thread): Use inferior_thread.
4286         * breakpoint.h (struct inferior): Forward declare.
4287         (bpstat_stop_status): Update.
4288         (remove_breakpoints_pid): Delete.
4289         (remove_breakpoints_inf): New.
4290         * bsd-uthread.c (bsd_uthread_target::wait)
4291         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
4292         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
4293         (maint_btrace_packet_history_cmd)
4294         (maint_btrace_clear_packet_history_cmd): Adjust.
4295         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
4296         inferior_thread.
4297         * cli/cli-interp.c: Include "inferior.h".
4298         * common/refcounted-object.h (struct
4299         refcounted_object_ref_policy): New.
4300         * compile/compile-object-load.c: Include gdbthread.h.
4301         (store_regs): Use inferior_thread.
4302         * corelow.c (core_target::close): Use current_inferior.
4303         (core_target_open): Adjust to use first_thread_of_inferior and use
4304         the current inferior.
4305         * ctf.c (ctf_target::close): Adjust to use current_inferior.
4306         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
4307         <thread>: ... this new field.  All references adjusted.
4308         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
4309         Take a thread_info pointer instead of a ptid_t.
4310         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
4311         (dummy_frame_discard, register_dummy_frame_dtor): Take a
4312         thread_info pointer instead of a ptid_t.
4313         * elfread.c: Include "inferior.h".
4314         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
4315         Use inferior_thread.
4316         * eval.c (evaluate_subexp): Likewise.
4317         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
4318         inferior_thread.
4319         * gdb_proc_service.h (struct thread_info): Forward declare.
4320         (struct ps_prochandle) <ptid>: Delete, replaced by ...
4321         <thread>: ... this new field.  All references adjusted.
4322         * gdbarch.h, gdbarch.c: Regenerate.
4323         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
4324         'thread' parameter.  All implementations and callers adjusted.
4325         * gdbthread.h (thread_info) <set_running>: New method.
4326         (delete_thread, delete_thread_silent): Take a thread_info pointer
4327         instead of a ptid.
4328         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
4329         (first_thread_of_process): Delete, replaced by ...
4330         (first_thread_of_inferior): ... this new function.  All callers
4331         adjusted.
4332         (any_live_thread_of_process): Delete, replaced by ...
4333         (any_live_thread_of_inferior): ... this new function.  All callers
4334         adjusted.
4335         (switch_to_thread, switch_to_no_thread): Declare.
4336         (is_executing): Delete.
4337         (enable_thread_stack_temporaries): Update comment.
4338         <enable_thread_stack_temporaries>: Take a thread_info pointer
4339         instead of a ptid_t.  Incref the thread.
4340         <~enable_thread_stack_temporaries>: Decref the thread.
4341         <m_ptid>: Delete
4342         <m_thr>: New.
4343         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4344         (get_last_thread_stack_temporary)
4345         (value_in_thread_stack_temporaries, can_access_registers_thread):
4346         Take a thread_info pointer instead of a ptid_t.  All callers
4347         adjusted.
4348         * infcall.c (get_call_return_value): Use inferior_thread.
4349         (run_inferior_call): Work with thread pointers instead of ptid_t.
4350         (call_function_by_hand_dummy): Work with thread pointers instead
4351         of ptid_t.  Use thread_info_ref.
4352         * infcmd.c (proceed_thread_callback): Access thread's state
4353         directly.
4354         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
4355         access thread's state directly.
4356         (continue_command): Use inferior_thread.
4357         (info_program_command): Use find_thread_ptid and access thread
4358         state directly.
4359         (proceed_after_attach_callback): Use thread state directly.
4360         (notice_new_inferior): Take a thread_info pointer instead of a
4361         ptid_t.  All callers adjusted.
4362         (exit_inferior): Take an inferior pointer instead of a pid.  All
4363         callers adjusted.
4364         (exit_inferior_silent): New.
4365         (detach_inferior): Delete.
4366         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
4367         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
4368         (detach_inferior_command, kill_inferior_command): Use
4369         find_inferior_id instead of valid_gdb_inferior_id and
4370         gdb_inferior_id_to_pid.
4371         (inferior_command): Use inferior and thread pointers.
4372         * inferior.h (struct thread_info): Forward declare.
4373         (notice_new_inferior): Take a thread_info pointer instead of a
4374         ptid_t.  All callers adjusted.
4375         (detach_inferior): Delete declaration.
4376         (exit_inferior, exit_inferior_silent): Take an inferior pointer
4377         instead of a pid.  All callers adjusted.
4378         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
4379         (valid_gdb_inferior_id): Delete.
4380         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
4381         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
4382         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
4383         ...
4384         <inf>: ... this new field.
4385         <step_ptid>: Delete, replaced by ...
4386         <step_thread>: ... this new field.
4387         (get_displaced_stepping_state): Take an inferior pointer instead
4388         of a pid.  All callers adjusted.
4389         (displaced_step_in_progress_any_inferior): Adjust.
4390         (displaced_step_in_progress_thread): Take a thread pointer instead
4391         of a ptid_t.  All callers adjusted.
4392         (displaced_step_in_progress, add_displaced_stepping_state): Take
4393         an inferior pointer instead of a pid.  All callers adjusted.
4394         (get_displaced_step_closure_by_addr): Adjust.
4395         (remove_displaced_stepping_state): Take an inferior pointer
4396         instead of a pid.  All callers adjusted.
4397         (displaced_step_prepare_throw, displaced_step_prepare)
4398         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
4399         All callers adjusted.
4400         (start_step_over): Adjust.
4401         (infrun_thread_ptid_changed): Remove bit updating ptids in the
4402         displaced step queue.
4403         (do_target_resume): Adjust.
4404         (fetch_inferior_event): Use inferior_thread.
4405         (context_switch, get_inferior_stop_soon): Take an
4406         execution_control_state pointer instead of a ptid_t.  All callers
4407         adjusted.
4408         (switch_to_thread_cleanup): Delete.
4409         (stop_all_threads): Use scoped_restore_current_thread.
4410         * inline-frame.c: Include "gdbthread.h".
4411         (inline_state) <inline_state>: Take a thread pointer instead of a
4412         ptid_t.  All callers adjusted.
4413         <ptid>: Delete, replaced by ...
4414         <thread>: ... this new field.
4415         (find_inline_frame_state): Take a thread pointer instead of a
4416         ptid_t.  All callers adjusted.
4417         (skip_inline_frames, step_into_inline_frame)
4418         (inline_skipped_frames, inline_skipped_symbol): Take a thread
4419         pointer instead of a ptid_t.  All callers adjusted.
4420         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
4421         (inline_skipped_frames, inline_skipped_symbol): Likewise.
4422         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
4423         pointers directly.
4424         * linux-nat.c (get_detach_signal): Likewise.
4425         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
4426         (thread_db_notice_clone): Adjust.
4427         (thread_db_find_new_threads_silently)
4428         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
4429         a thread pointer instead of a ptid_t.  All callers adjusted.
4430         * mi/mi-cmd-var.c: Include "inferior.h".
4431         (mi_cmd_var_update_iter): Update to use thread pointers.
4432         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
4433         inferior directly.
4434         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
4435         out to ...
4436         (mi_output_running): ... this new function.
4437         (mi_on_resume_1): Adjust to use it.
4438         (mi_user_selected_context_changed): Adjust to use inferior_thread.
4439         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
4440         directly.
4441         (interrupt_thread_callback): : Adjust to use thread and inferior
4442         pointers.
4443         * proc-service.c: Include "gdbthread.h".
4444         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
4445         * progspace-and-thread.c: Include "inferior.h".
4446         * progspace.c: Include "inferior.h".
4447         * python/py-exitedevent.c (create_exited_event_object): Adjust to
4448         hold a reference to an inferior_object.
4449         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
4450         inferior_thread.
4451         * python/py-inferior.c (struct inferior_object): Give the type a
4452         tag name instead of a typedef.
4453         (python_on_normal_stop): No need to check if the current thread is
4454         listed.
4455         (inferior_to_inferior_object): Change return type to
4456         inferior_object.  All callers adjusted.
4457         (find_thread_object): Delete, bits factored out to ...
4458         (thread_to_thread_object): ... this new function.
4459         * python/py-infthread.c (create_thread_object): Use
4460         inferior_to_inferior_object.
4461         (thpy_is_stopped): Use thread pointer directly.
4462         (gdbpy_selected_thread): Use inferior_thread.
4463         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
4464         field, replaced with ...
4465         <thread>: ... this new field.  All users adjusted.
4466         (btpy_insn_or_gap_new): Drop const.
4467         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
4468         callers adjusted.
4469         * python/py-record.c: Include "gdbthread.h".
4470         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
4471         a ptid_t.  All callers adjusted.
4472         (gdbpy_current_recording): Use inferior_thread.
4473         * python/py-record.h (recpy_record_object) <ptid>: Delete
4474         field, replaced with ...
4475         <thread>: ... this new field.  All users adjusted.
4476         (recpy_element_object) <ptid>: Delete
4477         field, replaced with ...
4478         <thread>: ... this new field.  All users adjusted.
4479         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
4480         a ptid_t.  All callers adjusted.
4481         * python/py-threadevent.c: Include "gdbthread.h".
4482         (get_event_thread): Use thread_to_thread_object.
4483         * python/python-internal.h (struct inferior_object): Forward
4484         declare.
4485         (find_thread_object, find_inferior_object): Delete declarations.
4486         (thread_to_thread_object, inferior_to_inferior_object): New
4487         declarations.
4488         * record-btrace.c: Include "inferior.h".
4489         (require_btrace_thread): Use inferior_thread.
4490         (record_btrace_frame_sniffer)
4491         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
4492         (get_thread_current_frame): Use scoped_restore_current_thread and
4493         switch_to_thread.
4494         (get_thread_current_frame): Use thread pointer directly.
4495         (record_btrace_replay_at_breakpoint): Use thread's inferior
4496         pointer directly.
4497         * record-full.c: Include "inferior.h".
4498         * regcache.c: Include "gdbthread.h".
4499         (get_thread_arch_regcache): Use the inferior's address space
4500         directly.
4501         (get_thread_regcache, registers_changed_thread): New.
4502         * regcache.h (get_thread_regcache(thread_info *thread)): New
4503         overload.
4504         (registers_changed_thread): New.
4505         (remote_target) <remote_detach_1>: Swap order of parameters.
4506         (remote_add_thread): <remote_add_thread>: Return the new thread.
4507         (get_remote_thread_info(ptid_t)): New overload.
4508         (remote_target::remote_notice_new_inferior): Use thread pointers
4509         directly.
4510         (remote_target::process_initial_stop_replies): Use
4511         thread_info::set_running.
4512         (remote_target::remote_detach_1, remote_target::detach)
4513         (extended_remote_target::detach): Adjust.
4514         * stack.c (frame_show_address): Use inferior_thread.
4515         * target-debug.h (target_debug_print_thread_info_pp): New.
4516         * target-delegates.c: Regenerate.
4517         * target.c (default_thread_address_space): Delete.
4518         (memory_xfer_partial_1): Use current_inferior.
4519         (target_detach): Use current_inferior.
4520         (target_thread_address_space): Delete.
4521         (generic_mourn_inferior): Use current_inferior.
4522         * target.h (struct target_ops) <thread_address_space>: Delete.
4523         (target_thread_address_space): Delete.
4524         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
4525         pointers directly.
4526         (delete_thread_1, delete_thread, delete_thread_silent): Take a
4527         thread pointer instead of a ptid_t.  Adjust all callers.
4528         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
4529         (first_thread_of_process): Delete, replaced by ...
4530         (first_thread_of_inferior): ... this new function.  All callers
4531         adjusted.
4532         (any_thread_of_process): Rename to ...
4533         (any_thread_of_inferior): ... this, and take an inferior pointer.
4534         (any_live_thread_of_process): Rename to ...
4535         (any_live_thread_of_inferior): ... this, and take an inferior
4536         pointer.
4537         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4538         (value_in_thread_stack_temporaries)
4539         (get_last_thread_stack_temporary): Take a thread pointer instead
4540         of a ptid_t.  Adjust all callers.
4541         (thread_info::set_running): New.
4542         (validate_registers_access): Use inferior_thread.
4543         (can_access_registers_ptid): Rename to ...
4544         (can_access_registers_thread): ... this, and take a thread
4545         pointer.
4546         (print_thread_info_1): Adjust to compare thread pointers instead
4547         of ptids.
4548         (switch_to_no_thread, switch_to_thread): Make extern.
4549         (scoped_restore_current_thread::~scoped_restore_current_thread):
4550         Use m_thread pointer directly.
4551         (scoped_restore_current_thread::scoped_restore_current_thread):
4552         Use inferior_thread.
4553         (thread_command): Use thread pointer directly.
4554         (thread_num_make_value_helper): Use inferior_thread.
4555         * top.c (execute_command): Use inferior_thread.
4556         * tui/tui-interp.c: Include "inferior.h".
4557         * varobj.c (varobj_create): Use inferior_thread.
4558         (value_of_root_1): Use find_thread_global_id instead of
4559         global_thread_id_to_ptid.
4560
4561 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
4562
4563         * regcache.c (readable_regcache::read_part): Avoid memcpy when
4564         possible.
4565         (regcache::write_part): Likewise.
4566         (readable_regcache::cooked_read_part): Update comment.
4567         (readable_regcache::cooked_write_part): Likewise.
4568         * regcache.h: (readable_regcache::read_part): Likewise.
4569         (regcache::write_part): Likewise.
4570
4571 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
4572             Dirk Schubert  <dirk.schubert@arm.com>
4573
4574         * aarch64-linux-nat.c (post_attach): New.
4575         (aarch64_linux_nat_target::post_attach): Override post_attach to
4576         record the number of hardware debug registers.
4577
4578 2018-06-20  Tom Tromey  <tom@tromey.com>
4579
4580         * python/py-param.c (add_setshow_generic): Make parameters const.
4581         (parmpy_init): Update.
4582
4583 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
4584
4585         * regcache.h (regcache_cooked_read_ftype): Rename to...
4586         (register_read_ftype): ...this, change type to function_view.
4587         (class reg_buffer) <save>: Remove src parameter.
4588         (readonly_detached_regcache) <readonly_detached_regcache>: Make
4589         parameter non-const in first overload.  Remove src parameter in
4590         second overload.
4591         * regcache.c (do_cooked_read): Remove.
4592         (readonly_detached_regcache::readonly_detached_regcache): Make
4593         parameter non-const, adjust call to other constructor.
4594         (reg_buffer::save): Remove src parameter.
4595         * frame.c (do_frame_register_read): Remove.
4596         (frame_save_as_regcache): Use lambda function.
4597         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
4598         parameter to ppu2spu_data *.
4599         (ppu2spu_sniffer): Use lambda function.
4600
4601 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
4602
4603         * record-full.c (record_full_target::insert_breakpoint): Remove
4604         "struct" keyword, add const.
4605
4606 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
4607
4608         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
4609         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
4610         * configure.ac: Remove AC_PREREQ, add missing quoting.
4611         * gnulib/configure.ac: Modernize usage of
4612         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
4613         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
4614         (AUTOMAKE_VERSION): Bump to 1.15.1.
4615         * configure: Re-generate.
4616         * config.in: Re-generate.
4617         * aclocal.m4: Re-generate.
4618         * gnulib/aclocal.m4: Re-generate.
4619         * gnulib/config.in: Re-generate.
4620         * gnulib/configure: Re-generate.
4621         * gnulib/import/Makefile.in: Re-generate.
4622
4623 2018-06-19  Pedro Alves  <palves@redhat.com>
4624
4625         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
4626         (lookup_minimal_symbol_by_pc_section): ... here with
4627         gdb_assert_not_reached added.
4628
4629 2018-06-19  Pedro Alves  <palves@redhat.com>
4630
4631         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
4632         parameter with a block parameter.  Compare location's block symbol
4633         with the frame's block instead of addresses.
4634         (skip_inline_frames): Pass the current block instead of the
4635         frame's address.  Break out as soon as we determine the frame
4636         should not be skipped.
4637
4638 2018-06-18  Tom Tromey  <tom@tromey.com>
4639
4640         * solib-aix.c (solib_aix_get_section_offsets): Return
4641         unique_xmalloc_ptr.
4642         (solib_aix_solib_create_inferior_hook): Update.
4643
4644 2018-06-18  Tom Tromey  <tom@tromey.com>
4645
4646         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
4647
4648 2018-06-18  Tom Tromey  <tom@tromey.com>
4649
4650         * solib-frv.c (frv_relocate_main_executable): Use
4651         unique_xmalloc_ptr.
4652         * solib-dsbt.c (dsbt_relocate_main_executable): Use
4653         unique_xmalloc_ptr.
4654
4655 2018-06-18  Tom Tromey  <tom@tromey.com>
4656
4657         * objfiles.h (inhibit_section_map_updates): Update.
4658         (resume_section_map_updates, resume_section_map_updates_cleanup):
4659         Remove.
4660         * solib-svr4.c (svr4_handle_solib_event): Update.
4661         * objfiles.c (inhibit_section_map_updates): Return
4662         scoped_restore_tmpl<int>.
4663         (resume_section_map_updates, resume_section_map_updates_cleanup):
4664         Remove.
4665
4666 2018-06-18  Tom Tromey  <tom@tromey.com>
4667
4668         * valprint.h (read_string): Update.
4669         * valprint.c (read_string): Change type of "buffer".
4670         (val_print_string): Update.
4671         * python/py-value.c (valpy_string): Update.
4672         * language.h (struct language_defn) <la_get_string>: Change
4673         type of "buffer".
4674         (default_get_string, c_get_string): Update.
4675         * language.c (default_get_string): Change type of "buffer".
4676         * guile/scm-value.c (gdbscm_value_to_string): Update.
4677         * c-lang.c (c_get_string): Change type of "buffer".
4678
4679 2018-06-18  Tom Tromey  <tom@tromey.com>
4680
4681         * ser-mingw.c (struct pipe_state_destroyer): New.
4682         (pipe_state_up): New typedef.
4683         (cleanup_pipe_state): Remove.
4684         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
4685
4686 2018-06-18  Tom Tromey  <tom@tromey.com>
4687
4688         * rust-lang.h (rust_yyerror): Don't declare.
4689         * rust-lang.c (rust_language_defn): Update.
4690         * rust-exp.y (yyerror): Now static.
4691         * parse.c (parse_exp_in_context_1): Update.
4692         * p-lang.h (p_yyerror): Don't declare.
4693         * p-lang.c (p_language_defn): Update.
4694         * p-exp.y (yyerror): Now static.
4695         * opencl-lang.c (opencl_language_defn): Update.
4696         * objc-lang.c (objc_language_defn): Update.
4697         * m2-lang.h (m2_yyerror): Don't declare.
4698         * m2-lang.c (m2_language_defn): Update.
4699         * m2-exp.y (yyerror): Now static.
4700         * language.h (struct language_defn) <la_error>: Remove.
4701         * language.c (unk_lang_error): Remove.
4702         (unknown_language_defn, auto_language_defn): Remove.
4703         * go-lang.h (go_yyerror): Don't declare.
4704         * go-lang.c (go_language_defn): Update.
4705         * go-exp.y (yyerror): Now static.
4706         * f-lang.h (f_yyerror): Don't declare.
4707         * f-lang.c (f_language_defn): Update.
4708         * f-exp.y (yyerror): Now static.
4709         * d-lang.h (d_yyerror): Don't declare.
4710         * d-lang.c (d_language_defn): Update.
4711         * d-exp.y (yyerror): Now static.
4712         * c-lang.h (c_yyerror): Don't declare.
4713         * c-lang.c (c_language_defn, cplus_language_defn)
4714         (asm_language_defn, minimal_language_defn): Update.
4715         * c-exp.y (yyerror): Now static.
4716         * ada-lang.h (ada_yyerror): Don't declare.
4717         * ada-lang.c (ada_language_defn): Update.
4718         * ada-exp.y (yyerror): Now static.
4719
4720 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
4721
4722         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
4723         (store_sveregs_to_thread): Likewise.
4724         (aarch64_linux_fetch_inferior_registers): Check for SVE.
4725         (aarch64_linux_store_inferior_registers): Likewise.
4726         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
4727         function.
4728         (aarch64_sve_regs_copy_to_regcache): Likewise.
4729         (aarch64_sve_regs_copy_from_regcache): Likewise.
4730         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
4731         declaration.
4732         (aarch64_sve_regs_copy_to_regcache): Likewise.
4733         (aarch64_sve_regs_copy_from_regcache): Likewise.
4734         (sve_context): Structure from Linux headers.
4735         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
4736         (SVE_SIG_ZREG_SIZE): Likewise.
4737         (SVE_SIG_PREG_SIZE): Likewise.
4738         (SVE_SIG_FFR_SIZE): Likewise.
4739         (SVE_SIG_REGS_OFFSET): Likewise.
4740         (SVE_SIG_ZREGS_OFFSET): Likewise.
4741         (SVE_SIG_ZREG_OFFSET): Likewise.
4742         (SVE_SIG_ZREGS_SIZE): Likewise.
4743         (SVE_SIG_PREGS_OFFSET): Likewise.
4744         (SVE_SIG_PREG_OFFSET): Likewise.
4745         (SVE_SIG_PREGS_SIZE): Likewise.
4746         (SVE_SIG_FFR_OFFSET): Likewise.
4747         (SVE_SIG_REGS_SIZE): Likewise.
4748         (SVE_SIG_CONTEXT_SIZE): Likewise.
4749         (SVE_PT_REGS_MASK): Likewise.
4750         (SVE_PT_REGS_FPSIMD): Likewise.
4751         (SVE_PT_REGS_SVE): Likewise.
4752         (SVE_PT_VL_INHERIT): Likewise.
4753         (SVE_PT_VL_ONEXEC): Likewise.
4754         (SVE_PT_REGS_OFFSET): Likewise.
4755         (SVE_PT_FPSIMD_OFFSET): Likewise.
4756         (SVE_PT_FPSIMD_SIZE): Likewise.
4757         (SVE_PT_SVE_ZREG_SIZE): Likewise.
4758         (SVE_PT_SVE_PREG_SIZE): Likewise.
4759         (SVE_PT_SVE_FFR_SIZE): Likewise.
4760         (SVE_PT_SVE_FPSR_SIZE): Likewise.
4761         (SVE_PT_SVE_FPCR_SIZE): Likewise.
4762         (__SVE_SIG_TO_PT): Likewise.
4763         (SVE_PT_SVE_OFFSET): Likewise.
4764         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
4765         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
4766         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
4767         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
4768         (SVE_PT_SVE_PREG_OFFSET): Likewise.
4769         (SVE_PT_SVE_PREGS_SIZE): Likewise.
4770         (SVE_PT_SVE_FFR_OFFSET): Likewise.
4771         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
4772         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
4773         (SVE_PT_SVE_SIZE): Likewise.
4774         (SVE_PT_SIZE): Likewise.
4775         (HAS_SVE_STATE): New define.
4776
4777 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
4778
4779         * nat/aarch64-sve-linux-sigcontext.h: New file.
4780         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
4781         new files.
4782         (SVE_VQ_MIN): Likewise.
4783         (SVE_VQ_MAX): Likewise.
4784         (SVE_VL_MIN): Likewise.
4785         (SVE_VL_MAX): Likewise.
4786         (SVE_NUM_ZREGS): Likewise.
4787         (SVE_NUM_PREGS): Likewise.
4788         (sve_vl_valid): Likewise.
4789         (struct user_sve_header): Likewise.
4790
4791 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
4792             Richard Bunt <Richard.Bunt@arm.com>
4793
4794         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
4795         was requested by GDB.
4796
4797 2018-06-15  Tom de Vries  <tdevries@suse.de>
4798
4799         * MAINTAINERS (Write After Approval): Add Tom de Vries.
4800
4801 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
4802
4803         * gnulib/update-gnulib.sh: Print expected versions of
4804         autoconf/aclocal.
4805
4806 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
4807
4808         * arch-utils.c (default_type_align): Use type_length_units.
4809         * gdbtypes.c (type_align): Use type_length_units.
4810
4811 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4812
4813         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
4814         of 'define' command.
4815
4816 2018-06-14  Tom de Vries  <tdevries@suse.de>
4817
4818         PR cli/22573
4819         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
4820         get_no_prettyformat_print_options.
4821
4822 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
4823
4824         * sparc-nat.h: Include target.h.
4825         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
4826         <fetch_registers>: Remove this argument in function call.
4827         <store_registers>: Remove this argument in function call, remove
4828         extra semicolon.
4829         <low_forget_process>: Call sparc64_forget_process instead of
4830         sparc_forget_process.
4831
4832 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4833
4834         * procfs.c (_initialize_procfs): Use add_inf_child_target.
4835         (procfs_target::make_corefile_notes): Adjust to new
4836         target_read_alloc return type.
4837
4838 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
4839             Stephen Roberts  <stephen.roberts@arm.com>
4840
4841         PR gdb/22882
4842         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
4843         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
4844         Move should_notify_stop local into more inner scope.
4845
4846 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
4847             Stephen Roberts  <stephen.roberts@arm.com>
4848
4849         PR gdb/22882
4850         * infrun.c (resume_1): Add call to mark_async_event_handler.
4851
4852 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
4853
4854         * infrun.c (do_target_wait): Change old version of $pc printed.
4855
4856 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
4857
4858         * dwarf2read.c (read_index_from_section): Rename to...
4859         (read_gdb_index_from_section): ... this, update all callers.
4860         (dwarf2_read_index): Rename to...
4861         (dwarf2_read_gdb_index): ... this, update all callers.
4862
4863 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
4864
4865         * gdb/hppa-linux-nat.c
4866         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
4867         hppa_linux_nat_target::fetch_registers.
4868
4869 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
4870
4871         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
4872         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
4873         (AARCH64_DWARF_SVE_FFR): Likewise.
4874         (AARCH64_DWARF_SVE_P0): Likewise.
4875         (AARCH64_DWARF_SVE_Z0): Likewise.
4876
4877 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
4878
4879         * common/common-regcache.h (raw_compare): New function.
4880         * regcache.c (regcache::raw_compare): Likewise.
4881         * regcache.h (regcache::raw_compare): New declaration.
4882
4883 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
4884
4885         * common/common-regcache.h (reg_buffer_common): New structure.
4886         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
4887         (reg_buffer::raw_supply): Likewise.
4888         (reg_buffer::raw_supply_integer): Likewise.
4889         (reg_buffer::raw_supply_zeroed): Likewise.
4890         (reg_buffer::raw_collect): Likewise.
4891         (reg_buffer::raw_collect_integer): Likewise.
4892         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
4893         (reg_buffer::raw_supply): Likewise.
4894         (reg_buffer::raw_supply_integer): Likewise.
4895         (reg_buffer::raw_supply_zeroed): Likewise.
4896         (reg_buffer::raw_collect): Likewise.
4897         (reg_buffer::raw_collect_integer): Likewise.
4898
4899 2018-06-10  Tom Tromey  <tom@tromey.com>
4900
4901         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
4902         (class remote_state) <stop_reply_queue>: Now std::vector.
4903         (remote_state::~remote_state)
4904         (remote_target::stop_reply_queue_length): Update.
4905         (struct queue_iter_param, remove_child_of_pending_fork)
4906         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
4907         (check_pending_event_prevents_wildcard_vcont_callback)
4908         (remove_stop_reply_for_inferior)
4909         (remove_stop_reply_of_remote_state)
4910         (remote_notif_remove_once_on_match)
4911         (stop_reply_match_ptid_and_ws)
4912         (remote_kill_child_of_pending_fork): Remove.
4913         (remote_target::remove_new_fork_children)
4914         (remote_target::check_pending_events_prevent_wildcard_vcont)
4915         (remote_target::discard_pending_stop_replies)
4916         (remote_target::discard_pending_stop_replies_in_queue)
4917         (remote_target::remote_notif_remove_queued_reply)
4918         (remote_target::queued_stop_reply)
4919         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
4920         (remote_target::wait, remote_target::kill_new_fork_children)
4921         (remote_target::async): Update.
4922
4923 2018-06-10  Tom Tromey  <tom@tromey.com>
4924
4925         * record-full.c (record_full_arch_list_cleanups): Remove.
4926         (record_full_message): Use try/catch.
4927         (record_full_wait_cleanups): Remove.
4928         (record_full_wait_1): Use try/catch.
4929         (record_full_restore): Likewise.
4930
4931 2018-06-10  Tom Tromey  <tom@tromey.com>
4932
4933         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
4934         declare VEC.  Add constructor.
4935         <in_target_beneath>: Now bool.
4936         (record_full_breakpoints): Now a std::vector, static.
4937         (record_full_sync_record_breakpoints)
4938         (record_full_init_record_breakpoints)
4939         (record_full_target::insert_breakpoint)
4940         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
4941
4942 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
4943
4944         * dwarf2read.c (process_cu_includes): Remove struct keyword.
4945         * serial.c (serial_interface_lookup): Remove struct keyword.
4946
4947 2018-06-10  Tom Tromey  <tom@tromey.com>
4948
4949         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
4950         method.
4951         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
4952         a method.
4953         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
4954         method.
4955         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
4956         "beneath" as a method.
4957         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
4958         Use "beneath" as a method.
4959
4960 2018-06-10  Tom Tromey  <tom@tromey.com>
4961
4962         * tracefile.c (struct trace_file_writer_deleter): New.
4963         <operator()>: Rename from trace_file_writer_xfree.
4964         (trace_file_writer_up): New typedef.
4965         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
4966
4967 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
4968
4969         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
4970         <m_registers, m_register_status>: Change type to
4971         std::unique_ptr.
4972         * regcache.c (reg_buffer::reg_buffer): Use new instead of
4973         XCNEWVEC.
4974
4975 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
4976
4977         * common/common-regcache.h (enum register_status): Add
4978         underlying type "signed char".
4979         * regcache.h (reg_buffer) <m_register_status>: Change type to
4980         register_status *.
4981         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
4982         register_status instead of signed char.
4983         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
4984         (reg_buffer::get_register_status): Remove cast.
4985         (readable_regcache::raw_read): Remove cast.
4986         (readable_regcache::cooked_read): Remove cast.
4987
4988 2018-06-09  Tom Tromey  <tom@tromey.com>
4989
4990         * source.c (reverse_search_command, forward_search_command): Use
4991         scoped_fd.
4992
4993 2018-06-09  Tom Tromey  <tom@tromey.com>
4994
4995         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
4996         (serial_ops_list): Now static, std::vector.
4997         (serial_interface_lookup, serial_add_interface): Update.
4998
4999 2018-06-09  Tom Tromey  <tom@tromey.com>
5000
5001         * dwarf2read.c (process_cu_includes): Update.
5002         (process_full_comp_unit): Update.
5003         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
5004         std::vector.
5005
5006 2018-06-08  Paul Koning  <paul_koning@dell.com>
5007
5008         PR gdb/23252
5009
5010         * python/python.c (do_start_initialization):
5011         Avoid call to internal Python API.
5012         (init__gdb_module): New function.
5013
5014 2018-06-08  Gary Benson <gbenson@redhat.com>
5015
5016         * linux-thread-db.c (valprint.h): New include.
5017         (struct check_thread_db_info): New structure.
5018         (check_thread_db_on_load, tdb_testinfo): New static globals.
5019         (check_thread_db, check_thread_db_callback): New functions.
5020         (try_thread_db_load_1): Run integrity checks if requested.
5021         (maintenance_check_libthread_db): New function.
5022         (_initialize_thread_db): Register "maint check libthread-db"
5023         and "maint set/show check-libthread-db".
5024         * NEWS: Mention the above new commands.
5025
5026 2018-06-08  Tom Tromey  <tom@tromey.com>
5027
5028         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
5029         now a method.
5030
5031 2018-06-08  Tom Tromey  <tom@tromey.com>
5032
5033         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
5034
5035 2018-06-08  Tom Tromey  <tom@tromey.com>
5036
5037         * common/btrace-common.h (struct btrace_data): Add constructor,
5038         destructor, move assignment operator.
5039         <empty, clear, fini>: New methods.
5040         <format>: Initialize.
5041         (btrace_data_init, btrace_data_fini, btrace_data_clear)
5042         (btrace_data_empty): Don't declare.
5043         * common/btrace-common.c (btrace_data_init): Remove.
5044         (btrace_data::fini): Rename from btrace_data_fini.
5045         (btrace_data::empty): Rename from btrace_data_empty.
5046         (btrace_data::clear): Rename from btrace_data_clear.  Return
5047         bool.
5048         * btrace.h (make_cleanup_btrace_data): Don't declare.
5049         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
5050         (parse_xml_btrace): Update.
5051         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
5052         (maint_btrace_clear_packet_history_cmd): Update.
5053
5054 2018-06-07  Pedro Alves  <palves@redhat.com>
5055
5056         * target.h (target_ops) <beneath>: Now a method.  All references
5057         updated.
5058         (class target_stack): New.
5059         * target.c (g_target_stack): New.
5060         (g_current_top_target): Delete.
5061         (current_top_target): Get the top target out of g_target_stack.
5062         (target_stack::push, target_stack::unpush): New.
5063         (push_target, unpush_target): Reimplement.
5064         (target_is_pushed): Reimplement in terms of g_target_stack.
5065         (target_ops::beneath, target_stack::find_beneath): New.
5066
5067 2018-06-07  Pedro Alves  <palves@redhat.com>
5068
5069         * target.h (find_target_beneath): Delete declaration.
5070         * target.c (find_target_beneath): Delete definition.
5071         * aix-thread.c: All callers of find_target_beneath adjusted to
5072         call target_ops::beneath instead.
5073         * bsd-uthread.c: Likewise.
5074         * linux-thread-db.c: Likewise.
5075         * ravenscar-thread.c: Likewise.
5076         * sol-thread.c: Likewise.
5077         * spu-multiarch.c: Likewise.
5078
5079 2018-06-07  Pedro Alves  <palves@redhat.com>
5080
5081         * target.h (target_ops) <beneath>: Now a method.  All references
5082         updated.
5083         (target_ops) <m_beneath>: New.
5084         * target.c (target_ops::beneath): New.
5085         * corelow.c: Adjust all references to target_ops::beneath.
5086         * linux-thread-db.c: Likewise.
5087         * make-target-delegates: Likewise.
5088         * record-btrace.c: Likewise.
5089         * record-full.c: Likewise.
5090         * remote.c: Likewise.
5091         * target.c: Likewise.
5092         * target-delegates.c: Regenerate.
5093
5094 2018-06-07  Pedro Alves  <palves@redhat.com>
5095
5096         * target.h (target_stack): Delete.
5097         (current_top_target): Declare function.
5098         * target.c (target_stack): Delete.
5099         (g_current_top_target): New.
5100         (current_top_target): New function.
5101         * auxv.c: Use current_top_target instead of target_stack
5102         throughout.
5103         * avr-tdep.c: Likewise.
5104         * breakpoint.c: Likewise.
5105         * corefile.c: Likewise.
5106         * elfread.c: Likewise.
5107         * eval.c: Likewise.
5108         * exceptions.c: Likewise.
5109         * frame.c: Likewise.
5110         * gdbarch-selftests.c: Likewise.
5111         * gnu-v3-abi.c: Likewise.
5112         * ia64-tdep.c: Likewise.
5113         * ia64-vms-tdep.c: Likewise.
5114         * infcall.c: Likewise.
5115         * infcmd.c: Likewise.
5116         * infrun.c: Likewise.
5117         * linespec.c: Likewise.
5118         * linux-tdep.c: Likewise.
5119         * minsyms.c: Likewise.
5120         * ppc-linux-nat.c: Likewise.
5121         * ppc-linux-tdep.c: Likewise.
5122         * procfs.c: Likewise.
5123         * regcache.c: Likewise.
5124         * remote.c: Likewise.
5125         * rs6000-tdep.c: Likewise.
5126         * s390-linux-nat.c: Likewise.
5127         * s390-tdep.c: Likewise.
5128         * solib-aix.c: Likewise.
5129         * solib-darwin.c: Likewise.
5130         * solib-dsbt.c: Likewise.
5131         * solib-spu.c: Likewise.
5132         * solib-svr4.c: Likewise.
5133         * solib-target.c: Likewise.
5134         * sparc-tdep.c: Likewise.
5135         * sparc64-tdep.c: Likewise.
5136         * spu-tdep.c: Likewise.
5137         * symfile.c: Likewise.
5138         * symtab.c: Likewise.
5139         * target-descriptions.c: Likewise.
5140         * target-memory.c: Likewise.
5141         * target.c: Likewise.
5142         * target.h: Likewise.
5143         * tracefile-tfile.c: Likewise.
5144         * tracepoint.c: Likewise.
5145         * valops.c: Likewise.
5146         * valprint.c: Likewise.
5147         * value.c: Likewise.
5148         * windows-tdep.c: Likewise.
5149         * mi/mi-main.c: Likewise.
5150
5151 2018-06-07  Tom Tromey  <tom@tromey.com>
5152
5153         * valprint.h (build_address_symbolic): Declare.
5154         * printcmd.c (print_address_symbolic): Update.
5155         (build_address_symbolic): Change "name" and "filename" to
5156         std::string.
5157         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
5158         Update.
5159         * defs.h (build_address_symbolic): Remove declaration.
5160
5161 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
5162
5163         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
5164         (aarch64_vnv_type): Add function.
5165         (aarch64_pseudo_register_name): Add V regs for SVE.
5166         (aarch64_pseudo_register_type): Likewise.
5167         (aarch64_pseudo_register_reggroup_p): Likewise.
5168         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
5169         (aarch64_pseudo_read_value): Add V regs for SVE.
5170         (aarch64_pseudo_write_2): Use V0 offset for SVE
5171         (aarch64_pseudo_write): Add V regs for SVE.
5172         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
5173
5174 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
5175
5176         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
5177         (sve_vl_from_vq): Likewise.
5178
5179 2018-06-05  Tom Tromey  <tom@tromey.com>
5180
5181         * cli/cli-cmds.c (show_version): Update.
5182         * top.c (print_gdb_version): Add "interactive" parameter.
5183         Update.
5184         * main.c (captured_main_1): Update.
5185         * top.h (print_gdb_version): Add "interactive" parameter and a
5186         comment.
5187
5188 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
5189
5190         * common/enum-flags.h: Add trailing semicolon to example in
5191         comment.
5192
5193 2018-06-05  Tom Tromey  <tom@tromey.com>
5194
5195         PR cli/12326:
5196         * NEWS: Add entry about pager.
5197         * utils.c (pagination_disabled_for_command): New global.
5198         (prompt_for_continue): Allow "c" response to prompt.
5199         (reinitialize_more_filter): Clear
5200         pagination_disabled_for_command.
5201         (fputs_maybe_filtered): Check pagination_disabled_for_command.
5202
5203 2018-06-04  Tom Tromey  <tom@tromey.com>
5204
5205         * ada-lang.h (ada_lookup_symbol_list): Update.
5206         * ada-lang.c (resolve_subexp): Update.
5207         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
5208         parameter.
5209         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
5210         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
5211         results parameter to std::vector.
5212         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
5213         Update.
5214         * ada-exp.y (block_lookup): Update.
5215         (select_possible_type_sym): Change type of syms.  Remove nsyms
5216         parameter.
5217         (write_var_or_type, write_name_assoc): Update.
5218
5219 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
5220
5221         * windows-nat.c (windows_nat_target::xfer_partial): Return
5222         TARGET_XFER_E_IO if we need to delegate to the target beneath
5223         but BENEATH is NULL.
5224
5225 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
5226
5227         * Makefile.in (config.status): Add configure.nat as a
5228         dependency.
5229
5230 2018-06-04  Tom Tromey  <tom@tromey.com>
5231
5232         * cp-name-parser.y (cpname_state): Add method declarations.
5233         (HANDLE_QUAL): Update.
5234         (cpname_state::d_grab, cpname_state::fill_comp)
5235         (cpname_state::make_operator, cpname_state::make_dtor)
5236         (cpname_state::make_builtin_type, cpname_state::make_name)
5237         (cpname_state::d_qualify, cpname_state::d_int_type)
5238         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
5239         (%union): Move earlier.
5240
5241 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5242
5243         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
5244
5245 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5246
5247         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
5248         (aarch64_pseudo_write_1): Likewise.
5249         (aarch64_pseudo_read_value): Use helper.
5250         (aarch64_pseudo_write): Likewise.
5251
5252 2018-06-04  Pedro Alves  <palves@redhat.com>
5253
5254         * darwin-nat.c (darwin_ops): Delete.
5255         (darwin_attach_pid): Use get_native_target.
5256
5257 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5258
5259         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
5260         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
5261
5262 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5263
5264         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
5265         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
5266         (aarch64_gdbarch_init): Check for SVE.
5267         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
5268
5269 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5270
5271         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
5272         * aarch64-tdep.h (aarch64_read_description): Likewise.
5273         * arch/aarch64.c (aarch64_create_target_description): Likewise.
5274         * arch/aarch64.h (aarch64_create_target_description): Likewise.
5275         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
5276         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
5277         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
5278
5279 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
5280
5281         * value.c (value_fetch_lazy_bitfield): New.
5282         (value_fetch_lazy_memory): New.
5283         (value_fetch_lazy_register): New.
5284         (value_fetch_lazy): Factor out to smaller functions.
5285
5286 2018-06-01  Tom Tromey  <tom@tromey.com>
5287
5288         * cp-name-parser.y (backslashable, represented): Now const.
5289
5290 2018-06-01  Tom Tromey  <tom@tromey.com>
5291
5292         * cp-name-parser.y: Include parser-defs.h.
5293         (parser_fprintf): Remove declaration.
5294
5295 2018-06-01  Tom Tromey  <tom@tromey.com>
5296
5297         * cp-name-parser.y: Use %pure-parser, %lex-param, and
5298         %parse-param.
5299         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
5300         (global_result): Remove globals.
5301         (struct cpname_state): New.
5302         (yyparse): Don't declare.
5303         (yylex, yyerror): Move declarations after %union.
5304         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
5305         (make_name): Add state parameter.
5306         Update all callers.
5307         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
5308         parameter.
5309         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
5310         Update.
5311         (yylex): Add lvalp, state parameters.
5312         (yyerror): Add state parameter.
5313         (cp_demangled_name_to_comp): Update.
5314
5315 2018-06-01  Tom Tromey  <tom@tromey.com>
5316
5317         * cp-name-parser.y (parser_fprintf): Declare.
5318         (GDB_YY_REMAP_PREFIX): Define.
5319         Include yy-remap.h.  Don't redefine yy* identifiers.
5320
5321 2018-06-01  Tom Tromey  <tom@tromey.com>
5322
5323         * python/py-type.c (typy_legacy_template_argument): Update.
5324         * cp-support.h (cp_demangled_name_to_comp): Update.
5325         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
5326         parameter to be a "std::string *".
5327         (main): Update.
5328
5329 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
5330
5331         * ada-lex.l: Include "diagnostics.h" instead of
5332         "common/diagnostics.h".
5333         * unittests/environ-selftests.c: Likewise.
5334         * common/diagnostics.h: Moved to ../include.
5335
5336 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
5337
5338         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
5339         to language_mode_manual while calling breakpoint_re_set_one.
5340
5341 2018-06-01  Tom Tromey  <tom@tromey.com>
5342
5343         * valops.c (value_cast_structs, destructor_name_p): Update.
5344         * symtab.c (gdb_mangle_name): Update.
5345         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
5346         Update.
5347         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
5348         (pascal_object_print_value_fields, pascal_object_print_value):
5349         Update.
5350         * p-typeprint.c (pascal_type_print_derivation_info): Update.
5351         * linespec.c (find_methods): Update.
5352         * gdbtypes.h (type_name_no_tag): Remove.
5353         (type_name_or_error): Rename from type_name_no_tag_or_error.
5354         * gdbtypes.c (type_name_no_tag): Remove.
5355         (type_name_or_error): Rename from type_name_no_tag_or_error.
5356         (lookup_struct_elt_type, check_typedef): Update.
5357         * expprint.c (print_subexp_standard): Update.
5358         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
5359         * d-namespace.c (d_lookup_nested_symbol): Update.
5360         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
5361         (cp_print_class_member): Update.
5362         * cp-namespace.c (cp_lookup_nested_symbol): Update.
5363         * completer.c (add_struct_fields): Update.
5364         * c-typeprint.c (cp_type_print_derivation_info)
5365         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
5366         Update.
5367         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
5368         (ada_prefer_type, ada_is_exception_sym): Update.
5369
5370 2018-06-01  Tom Tromey  <tom@tromey.com>
5371
5372         * valops.c (enum_constant_from_type, value_namespace_elt)
5373         (value_maybe_namespace_elt): Update.
5374         * valarith.c (find_size_for_pointer_math): Update.
5375         * target-descriptions.c (make_gdb_type): Update.
5376         * symmisc.c (print_symbol): Update.
5377         * stabsread.c (define_symbol, read_type)
5378         (complain_about_struct_wipeout, add_undefined_type)
5379         (cleanup_undefined_types_1): Update.
5380         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
5381         (rust_range_type_p, val_print_struct, rust_print_struct_def)
5382         (rust_internal_print_type, rust_composite_type)
5383         (rust_evaluate_funcall, rust_evaluate_subexp)
5384         (rust_inclusive_range_type_p): Update.
5385         * python/py-type.c (typy_get_tag): Update.
5386         * p-typeprint.c (pascal_type_print_base): Update.
5387         * mdebugread.c (parse_symbol, parse_type): Update.
5388         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
5389         Update.
5390         * guile/scm-type.c (gdbscm_type_tag): Update.
5391         * go-lang.c (sixg_string_p): Update.
5392         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
5393         Update.
5394         * gdbtypes.h (struct main_type) <tag_name>: Remove.
5395         (TYPE_TAG_NAME): Remove.
5396         * gdbtypes.c (type_name_no_tag): Simplify.
5397         (check_typedef, check_types_equal, recursive_dump_type)
5398         (copy_type_recursive, arch_composite_type): Update.
5399         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
5400         in summary mode when needed.
5401         * eval.c (evaluate_funcall): Update.
5402         * dwarf2read.c (fixup_go_packaging, read_structure_type)
5403         (process_structure_scope, read_enumeration_type)
5404         (read_namespace_type, read_module_type, determine_prefix): Update.
5405         * cp-support.c (inspect_type): Update.
5406         * coffread.c (process_coff_symbol, decode_base_type): Update.
5407         * c-varobj.c (c_is_path_expr_parent): Update.
5408         * c-typeprint.c (c_type_print_base_struct_union): Update.
5409         (c_type_print_base_1): Update.  Print struct/class/union/enum in
5410         summary when using C language.
5411         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
5412         (gen_maybe_namespace_elt): Update.
5413         * ada-lang.c (ada_type_name): Simplify.
5414         (empty_record, ada_template_to_fixed_record_type_1)
5415         (template_to_static_fixed_type)
5416         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
5417
5418 2018-06-01  Tom Tromey  <tom@tromey.com>
5419
5420         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
5421         c_print_type.
5422         * c-typeprint.c (c_print_type_1): Add "language" parameter.
5423         (c_print_type): Update.
5424         (c_print_type): New overload.
5425         (c_type_print_varspec_prefix, c_type_print_args)
5426         (c_type_print_varspec_suffix, c_print_type_no_offsets)
5427         (c_type_print_base_struct_union, c_type_print_base_1)
5428         (cp_type_print_method_args): Add "language" parameter.
5429         (c_type_print_base): Update.
5430         * c-lang.h (c_print_type): Add new overload.
5431
5432 2018-06-01  Tom Tromey  <tom@tromey.com>
5433
5434         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
5435         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
5436
5437 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
5438
5439         * aarch64-tdep.c (aarch64_sve_register_names): New const
5440         var.
5441         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
5442         (AARCH64_SVE_Z_REGS_NUM): New define.
5443         (AARCH64_SVE_P_REGS_NUM): Likewise.
5444         (AARCH64_SVE_NUM_REGS): Likewise.
5445
5446 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
5447
5448         * nat/linux-ptrace.h [__alpha__]
5449         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
5450         definitions.
5451
5452 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
5453
5454         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
5455         the endianness selected.
5456         * NEWS: Document `set endian auto' mode operation update.
5457
5458 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
5459
5460         * Makefile.in: Add new header.
5461         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
5462         (sve_vl_from_vg): Likewise.
5463         (sve_vq_from_vl): Likewise.
5464         (sve_vl_from_vq): Likewise.
5465         (sve_vq_from_vg): Likewise.
5466         (sve_vg_from_vq): Likewise.
5467         * configure.nat: Add new c file.
5468         * nat/aarch64-sve-linux-ptrace.c: New file.
5469         * nat/aarch64-sve-linux-ptrace.h: New file.
5470
5471 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
5472
5473         * aarch64-linux-nat.c (aarch64_linux_read_description):
5474         Add parmeter zero.
5475         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
5476         Likewise.
5477         * aarch64-tdep.c (tdesc_aarch64_list): Add.
5478         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
5479         (aarch64_gdbarch_init): Add parmeter zero.
5480         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
5481         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
5482         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
5483         parmeter.
5484         * doc/gdb.texinfo: Describe SVE feature
5485         * features/aarch64-sve.c: New file.
5486
5487 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
5488
5489         PR gdb/23210
5490         * gdbarch.sh (significant_addr_bit): Default to zero when
5491         not set by target architecture.
5492         * gdbarch.c: Re-generated.
5493         * utils.c (address_significant): Update.
5494
5495 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
5496
5497         * stack.c (func_command): Remove trailing newline in call to error.
5498
5499 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5500
5501         * regcache.h (regcache_raw_collect): Remove, update callers to
5502         use regcache::raw_collect.
5503         * regcache.c (regcache_raw_collect): Remove.
5504
5505 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5506
5507         * regcache.h (regcache_raw_supply): Remove, update callers to
5508         use detached_regcache::raw_supply.
5509         * regcache.c (regcache_raw_supply): Remove.
5510
5511 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5512
5513         * regcache.h (regcache_cooked_write_part): Remove, update
5514         callers to use regcache::cooked_write_part.
5515         * regcache.c (regcache_cooked_write_part): Remove.
5516
5517 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5518
5519         * regcache.h (regcache_cooked_read_part): Remove, update callers
5520         to use readable_regcache::cooked_read_part.
5521         * regcache.c (regcache_cooked_read_part): Remove.
5522
5523 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5524
5525         * regcache.h (regcache_cooked_read_value): Remove, update
5526         callers to use readable_regcache::cooked_read_value.
5527         * regcache.c (regcache_cooked_read_value): Remove.
5528
5529 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5530
5531         * regcache.h (regcache_cooked_write): Remove, update callers to
5532         use regcache::cooked_write.
5533         * regcache.c (regcache_cooked_write): Remove.
5534
5535 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5536
5537         * regcache.h (regcache_invalidate): Remove, update callers to
5538         use detached_regcache::invalidate instead.
5539         * regcache.c (regcache_invalidate): Remove.
5540
5541 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5542
5543         * regcache.h (regcache_raw_write_part): Remove, update callers
5544         to use regcache::raw_write_part instead.
5545         * regcache.c (regcache_raw_write_part): Remove.
5546
5547 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5548
5549         * regcache.h (regcache_raw_read_part): Remove, update callers to
5550         use readable_regcache::raw_read_part instead.
5551         * regcache.c (regcache_raw_read_part): Remove.
5552
5553 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5554
5555         * regcache.h (regcache_cooked_read): Remove, update callers to
5556         use readable_regcache::cooked_read instead.
5557         * regcache.c (regcache_cooked_read): Remove.
5558
5559 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5560
5561         * regcache.h (regcache_raw_write): Remove, update callers to use
5562         regcache::raw_write instead.
5563         * regcache.c (regcache_raw_write): Remove.
5564
5565 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5566
5567         * regcache.h (regcache_raw_read): Remove, update callers to use
5568         readable_regcache::raw_read instead.
5569         * regcache.c (regcache_raw_read): Remove.
5570
5571 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5572
5573         * regcache.h (regcache_raw_update): Remove, update callers to
5574         use readable_regcache::raw_update instead.
5575         * regcache.c (regcache_raw_update): Remove.
5576
5577 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5578
5579         * regcache.h (regcache_register_status): Remove, update callers
5580         to use reg_buffer::get_register_status directly instead.
5581         * regcache.c (regcache_register_status): Remove.
5582
5583 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5584
5585         * regcache.h (regcache_get_ptid): Remove, update all callers to
5586         call regcache::ptid instead.
5587         * regcache.c (regcache_get_ptid): Remove.
5588
5589 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5590
5591         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
5592
5593 2018-05-30  Pedro Alves  <palves@redhat.com>
5594
5595         * common/common-exceptions.h (exception_rethrow): Use
5596         ATTRIBUTE_NORETURN.
5597
5598 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
5599
5600         * breakpoint.c (print_solib_event, check_status_catch_solib):
5601         Remove struct keyword in range-based for loops.
5602         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
5603         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
5604         Likewise.
5605         * linespec.c (find_superclass_methods, search_minsyms_for_name):
5606         Likewise.
5607         * symfile.c (addr_info_make_relative): Likewise.
5608         * thread.c (value_in_thread_stack_temporaries): Likewise.
5609
5610 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
5611
5612         PR gdb/16841
5613         * valops.c (value_struct_elt_for_reference): Call check_typedef on
5614         aggregate type to get its real type before accessing it.
5615
5616 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
5617
5618         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
5619         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
5620         * coff-pe-read.c (add_pe_forwarded_sym): Replace
5621         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
5622         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
5623         * jit.c (jit_breakpoint_re_set_internal): Likewise.
5624         * printcmd.c (info_address_command): Likewise.
5625
5626 2018-05-29  Tom Tromey  <tom@tromey.com>
5627
5628         * windows-nat.c (handle_exception): Update fall-through comment.
5629
5630 2018-05-29  Tom Tromey  <tom@tromey.com>
5631
5632         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
5633         (struct program_space) <added_solibs>: Now a std::vector.
5634         * breakpoint.c (print_solib_event): Update.
5635         (check_status_catch_solib): Update.
5636         * progspace.c (clear_program_space_solib_cache): Update.
5637         * solib.c (update_solib_list): Update.
5638
5639 2018-05-29  Tom Tromey  <tom@tromey.com>
5640
5641         * python/py-type.c (typy_richcompare): Update.
5642         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
5643         * gdbtypes.h (types_deeply_equal): Return bool.
5644         (types_equal): Likewise.
5645         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
5646         declare VEC.
5647         (check_types_equal): Change worklist to std::vector.  Return
5648         bool.
5649         (struct type_equality_entry): Add constructor.
5650         (compare_maybe_null_strings): Return bool.
5651         (check_types_worklist): Return bool.  Change worklist to
5652         std::vector.
5653         (types_deeply_equal): Use std::vector.
5654         (types_equal): Return bool.
5655         (compare_maybe_null_strings): Simplify.
5656
5657 2018-05-29  Tom Tromey  <tom@tromey.com>
5658
5659         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
5660
5661 2018-05-29  Tom Tromey  <tom@tromey.com>
5662
5663         * objc-lang.h: Don't include cp-support.h.
5664         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
5665         declare VEC.
5666
5667 2018-05-27  Tom Tromey  <tom@tromey.com>
5668
5669         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
5670
5671 2018-05-25  Tom Tromey  <tom@tromey.com>
5672
5673         * value.c (value::location): Initialize.
5674
5675 2018-05-25  Tom Tromey  <tom@tromey.com>
5676
5677         * dbxread.c (init_bincl_list): Remove.
5678         (bincl_list): Now a std::vector.
5679         (bincls_allocated, next_bincl): Remove.
5680         (free_bincl_list, do_free_bincl_list_cleanup)
5681         (make_cleanup_free_bincl_list): Remove.
5682         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
5683         unique_xmalloc_ptr.
5684         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
5685         (struct header_file_location): Add constructor.
5686         (add_bincl_to_list): Remove.
5687
5688 2018-05-25  Tom Tromey  <tom@tromey.com>
5689
5690         * tui/tui.c (tui_enable): Update.
5691         * mi/mi-interp.c (mi_interp::init): Update.
5692         * interps.h (class interp) <name>: New method.
5693         <m_name>: Rename from name.
5694         (~scoped_restore_interp): Update.
5695         * interps.c (interp::interp): Update.
5696         (interp_add, interp_set, interp_lookup_existing)
5697         (current_interp_named_p): Update.
5698
5699 2018-05-25  Tom Tromey  <tom@tromey.com>
5700
5701         * interps.c (interp_name): Remove.
5702         * mi/mi-interp.c (mi_interp::init): Update.
5703         * interps.h (interp_name): Remove.
5704         (~scoped_restore_interp): Update.
5705         * tui/tui.c (tui_enable): Update.
5706
5707 2018-05-25  Tom Tromey  <tom@tromey.com>
5708
5709         * utils.c (fputs_maybe_filtered): Update.
5710         * linespec.c (decode_line_full): Update.
5711         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
5712         (mi_print_breakpoint_for_event, mi_solib_loaded)
5713         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
5714         (mi_user_selected_context_changed): Update.
5715         * mi/mi-main.c (mi_execute_command): Update.
5716         * cli/cli-script.c (execute_control_command): Update.
5717         * python/python.c (execute_gdb_command): Update.
5718         * solib.c (info_sharedlibrary_command): Update.
5719         * interps.c (interp_ui_out): Remove.
5720         * interps.h (interp_ui_out): Remove.
5721
5722 2018-05-25  Tom Tromey  <tom@tromey.com>
5723
5724         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
5725         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
5726         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
5727
5728 2018-05-25  Tom Tromey  <tom@tromey.com>
5729
5730         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
5731         * interps.c (interp_exec): Use scoped_restore.
5732
5733 2018-05-25  Tom Tromey  <tom@tromey.com>
5734
5735         * remote.c (remote_target::remote_file_get): Use
5736         gdb::byte_vector.
5737         (remote_target::remote_file_put): Likewise.
5738
5739 2018-05-25  Tom Tromey  <tom@tromey.com>
5740
5741         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
5742         a std::string.
5743         (get_pe_section_index, add_pe_exported_sym): Update.
5744         (read_pe_exported_syms): Use gdb::def_vector.
5745
5746 2018-05-25  Tom Tromey  <tom@tromey.com>
5747
5748         * frame.c (remove_prev_frame): Remove.
5749         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
5750
5751 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
5752
5753         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
5754         Remove prototypes.
5755         * mips-linux-nat.c (supply_fpregset): Always call
5756         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
5757         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
5758         `mips_fill_fpregset'.
5759         * mips-linux-tdep.c (mips_supply_fpregset)
5760         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
5761         (mips_fill_fpregset_wrapper): Remove functions.
5762         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
5763         (mips_linux_fpregset): Remove variable.
5764         (mips_linux_iterate_over_regset_sections): Use
5765         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
5766         (mips_linux_o32_sigframe_init): Remove comment.
5767
5768 2018-05-25  Pedro Alves  <palves@redhat.com>
5769
5770         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
5771         (struct readahead_cache, struct packet_reg, struct
5772         remote_arch_state, class remote_state): Move higher up in the
5773         file.
5774         (remote_target::m_remote_state): Now an object instead of a pointer.
5775         (remote_target::get_remote_state): Adjust.
5776
5777 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
5778
5779         * stack.c (select_and_print_frame): Delete.
5780         (struct function_bounds): Move struct within function.
5781         (func_command): Most content moved into new function
5782         find_frame_for_function, use new function, print result, add
5783         function comment.
5784         (find_frame_for_function): New function, now returns a result.
5785
5786 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5787
5788         * stack.c (iterate_over_block_arg_vars): Fix comment.
5789         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
5790
5791 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
5792
5793         PR gdb/23203
5794         * frame.c
5795         (scoped_restore_selected_frame::scoped_restore_selected_frame):
5796         Define.
5797         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
5798         Define.
5799         * frame.h (class scoped_restore_selected_frame): New class.
5800         * stack.c (print_frame_local_vars): Remove catching and rethrowing
5801         of any exception, use scoped_restore_selected_frame to restore the
5802         frame instead.
5803
5804 2018-05-24  Pedro Alves  <palves@redhat.com>
5805
5806         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
5807         override.
5808
5809 2018-05-23  Tom Tromey  <tom@tromey.com>
5810
5811         * complaints.c (struct complaints): Remove.
5812         (symfile_complaint_book): Remove.
5813         (series): New global.
5814         (complaint_internal): Update.
5815         (clear_complaints): Update.
5816
5817 2018-05-23  Tom Tromey  <tom@tromey.com>
5818
5819         * complaints.c (counters): New global.
5820         (struct complain): Remove.
5821         (struct complaints) <root>: Remove.
5822         (complaint_sentinel): Remove.
5823         (symfile_complaint_book): Update.
5824         (find_complaint) Remove.
5825         (complaint_internal, clear_complaints): Update.
5826
5827 2018-05-23  Tom Tromey  <tom@tromey.com>
5828
5829         * complaints.c (struct complain) <file, line>: Remove.
5830         (find_complaint): Remove file, line parameters.
5831         (complaint_internal): Update.
5832
5833 2018-05-23  Tom Tromey  <tom@tromey.com>
5834
5835         * complaints.c (vcomplaint): Remove.
5836         (complaint_internal) Merge in contents of vcomplaint.
5837
5838 2018-05-23  Tom Tromey  <tom@tromey.com>
5839
5840         * complaints.c (struct complaints) <explanation>: Remove.
5841         (symfile_explanations): Remove.
5842         (symfile_complaint_book): Update.
5843         (vcomplaint): Update.
5844         (struct explanation): Remove.
5845
5846 2018-05-23  Tom Tromey  <tom@tromey.com>
5847
5848         * complaints.c (symfile_complaints): Remove.
5849         (complaint_internal): Remove "complaints" parameter.
5850         (clear_complaints, vcomplaint): Remove "c" parameter.
5851         (get_complaints): Remove.
5852         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
5853         (dwarf2_debug_line_missing_file_complaint)
5854         (dwarf2_debug_line_missing_end_sequence_complaint)
5855         (dwarf2_complex_location_expr_complaint)
5856         (dwarf2_const_value_length_mismatch_complaint)
5857         (dwarf2_section_buffer_overflow_complaint)
5858         (dwarf2_macro_malformed_definition_complaint)
5859         (dwarf2_invalid_attrib_class_complaint)
5860         (create_addrmap_from_index, dw2_symtab_iter_next)
5861         (dw2_expand_marked_cus)
5862         (dw2_debug_names_iterator::find_vec_in_debug_names)
5863         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
5864         (create_debug_type_hash_table, init_cutu_and_read_dies)
5865         (partial_die_parent_scope, add_partial_enumeration)
5866         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
5867         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
5868         (read_import_statement, read_file_scope, create_dwo_cu_reader)
5869         (create_cus_hash_table, create_dwp_hash_table)
5870         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
5871         (dwarf2_rnglists_process, dwarf2_ranges_process)
5872         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
5873         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
5874         (handle_struct_member_die, process_structure_scope)
5875         (read_array_type, read_common_block, read_module_type)
5876         (read_tag_pointer_type, read_typedef, read_base_type)
5877         (read_subrange_type, load_partial_dies, partial_die_info::read)
5878         (partial_die_info::read, partial_die_info::read)
5879         (partial_die_info::read, read_checked_initial_length_and_offset)
5880         (dwarf2_string_attr, read_formatted_entries)
5881         (dwarf_decode_line_header)
5882         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
5883         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
5884         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
5885         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5886         (get_signatured_type, get_DW_AT_signature_type)
5887         (decode_locdesc, file_file_name, consume_improper_spaces)
5888         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
5889         (dwarf_decode_macro_bytes, dwarf_decode_macros)
5890         (dwarf2_symbol_mark_computed, set_die_type)
5891         (read_attribute_value): Update.
5892         * stap-probe.c (handle_stap_probe, get_stap_base_address):
5893         Update.
5894         * dbxread.c (unknown_symtype_complaint)
5895         (lbrac_mismatch_complaint, repeated_header_complaint)
5896         (set_namestring, function_outside_compilation_unit_complaint)
5897         (read_dbx_symtab, process_one_symbol): Update.
5898         * gdbtypes.c (stub_noname_complaint): Update.
5899         * windows-nat.c (handle_unload_dll): Update.
5900         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
5901         (decode_base_type): Update.
5902         * xcoffread.c (bf_notfound_complaint, ef_complaint)
5903         (eb_complaint, record_include_begin, record_include_end)
5904         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
5905         (process_xcoff_symbol, read_symbol)
5906         (function_outside_compilation_unit_complaint)
5907         (scan_xcoff_symtab): Update.
5908         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
5909         * buildsym.c (finish_block_internal, make_blockvector)
5910         (end_symtab_get_static_block, augment_type_symtab): Update.
5911         * dtrace-probe.c (dtrace_process_dof)
5912         (dtrace_static_probe_ops::get_probes): Update.
5913         * complaints.h (struct complaint): Don't declare.
5914         (symfile_complaints): Remove.
5915         (complaint_internal): Remove "complaints" parameter.
5916         (complaint): Likewise.
5917         (clear_complaints): Likewise.
5918         * symfile.c (syms_from_objfile_1, finish_new_objfile)
5919         (reread_symbols): Update.
5920         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
5921         (dwarf2_frame_cache, decode_frame_entry): Update.
5922         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
5923         * objc-lang.c (lookup_objc_class, lookup_child_selector)
5924         (info_selectors_command): Update.
5925         * macrotab.c (macro_include, check_for_redefinition)
5926         (macro_undef): Update.
5927         * objfiles.c (filter_overlapping_sections): Update.
5928         * stabsread.c (invalid_cpp_abbrev_complaint)
5929         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
5930         (define_symbol, error_type, read_type, rs6000_builtin_type)
5931         (stabs_method_name_from_physname, read_member_functions)
5932         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
5933         (attach_fields_to_type, complain_about_struct_wipeout)
5934         (read_range_type, read_args, common_block_start)
5935         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
5936         Update.
5937         * mdebugread.c (index_complaint, unknown_ext_complaint)
5938         (basic_type_complaint, bad_tag_guess_complaint)
5939         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
5940         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
5941         (parse_procedure, parse_lines)
5942         (function_outside_compilation_unit_complaint)
5943         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
5944         (bad_tag_guess_complaint, reg_value_complaint): Update.
5945         * cp-support.c (demangled_name_complaint): Update.
5946         * macroscope.c (sal_macro_scope): Update.
5947         * dwarf-index-write.c (class debug_names): Update.
5948
5949 2018-05-23  Tom Tromey  <tom@tromey.com>
5950
5951         * complaints.c (clear_complaints): Remove "noisy" parameter.
5952         * complaints.h (clear_complaints): Update.
5953         * symfile.c (syms_from_objfile_1, finish_new_objfile)
5954         (reread_symbols): Update.
5955
5956 2018-05-23  Tom Tromey  <tom@tromey.com>
5957
5958         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
5959         SUBSEQUENT_MESSAGE.
5960         (vcomplaint, clear_complaints): Update.
5961         (symfile_explanations): Remove some messages.
5962
5963 2018-05-23  Tom Tromey  <tom@tromey.com>
5964
5965         * complaints.c (internal_complaint): Remove.
5966         * complaints.h (internal_complaint): Remove.
5967
5968 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
5969
5970         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
5971
5972 2018-05-22  Pedro Alves  <palves@redhat.com>
5973
5974         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
5975         (remote_fileio_badfd, remote_fileio_return_errno)
5976         (remote_fileio_return_success, remote_fileio_func_open)
5977         (remote_fileio_func_open, remote_fileio_func_close)
5978         (remote_fileio_func_read, remote_fileio_func_write)
5979         (remote_fileio_func_lseek, remote_fileio_func_rename)
5980         (remote_fileio_func_unlink, remote_fileio_func_stat)
5981         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
5982         (remote_fileio_func_isatty, remote_fileio_func_system): Add
5983         remote_target parameter.
5984         (remote_fio_func_map) <func>: Add remote_target parameter.
5985         (do_remote_fileio_request, remote_fileio_request):
5986         * remote-fileio.h (remote_fileio_request):
5987         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
5988         remote_target parameter.
5989         (remote_notif_process, handle_notification): Adjust to pass down
5990         the remote.
5991         (remote_notif_state_allocate): Add remote_target parameter.  Save
5992         it.
5993         * remote-notif.h (struct remote_target): Forward declare.
5994         (struct notif_client) <parse, ack, can_get_pending_events>: Add
5995         remote_target parameter.
5996         (struct remote_notif_state) <remote>: New field.
5997         (remote_notif_ack, remote_notif_parse): Add remote_target
5998         parameter.
5999         (remote_notif_state_allocate, remote_notif_state_allocate): Add
6000         remote_target parameter.
6001         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
6002         (threads_listing_context, rmt_thread_action, protocol_feature)
6003         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
6004         (packet_result, struct threads_listing_context, remote_state):
6005         Move definitions and declarations higher up.
6006         (remote_target) <~remote_target>: Declare.
6007         (remote_download_command_source, remote_file_put, remote_file_get)
6008         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
6009         (remote_hostio_pread_vFile, remote_hostio_send_command)
6010         (remote_hostio_set_filesystem, remote_hostio_open)
6011         (remote_hostio_close, remote_hostio_unlink, remote_state)
6012         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
6013         (get_memory_write_packet_size, get_memory_read_packet_size)
6014         (append_pending_thread_resumptions, remote_detach_1)
6015         (append_resumption, remote_resume_with_vcont)
6016         (add_current_inferior_and_thread, wait_ns, wait_as)
6017         (process_stop_reply, remote_notice_new_inferior)
6018         (process_initial_stop_replies, remote_add_thread)
6019         (btrace_sync_conf, remote_btrace_maybe_reopen)
6020         (remove_new_fork_children, kill_new_fork_children)
6021         (discard_pending_stop_replies, stop_reply_queue_length)
6022         (check_pending_events_prevent_wildcard_vcont)
6023         (discard_pending_stop_replies_in_queue, stop_reply)
6024         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
6025         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
6026         (remote_interrupt_as, remote_interrupt_ns)
6027         (remote_get_noisy_reply, remote_query_attached)
6028         (remote_add_inferior, remote_current_thread, get_current_thread)
6029         (set_thread, set_general_thread, set_continue_thread)
6030         (set_general_process, write_ptid)
6031         (remote_unpack_thread_info_response, remote_get_threadinfo)
6032         (parse_threadlist_response, remote_get_threadlist)
6033         (remote_threadlist_iterator, remote_get_threads_with_ql)
6034         (remote_get_threads_with_qxfer)
6035         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
6036         (get_offsets, remote_check_symbols, remote_supported_packet)
6037         (remote_query_supported, remote_packet_size)
6038         (remote_serial_quit_handler, remote_detach_pid)
6039         (remote_vcont_probe, remote_resume_with_hc)
6040         (send_interrupt_sequence, interrupt_query)
6041         (remote_notif_get_pending_events, fetch_register_using_p)
6042         (send_g_packet, process_g_packet, fetch_registers_using_g)
6043         (store_register_using_P, store_registers_using_G)
6044         (set_remote_traceframe, check_binary_download)
6045         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
6046         (remote_xfer_live_readonly_partial, remote_read_bytes)
6047         (remote_send_printf, remote_flash_write, readchar)
6048         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
6049         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
6050         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
6051         (extended_remote_disable_randomization, extended_remote_run)
6052         (send_environment_packet, extended_remote_environment_support)
6053         (extended_remote_set_inferior_cwd, remote_write_qxfer)
6054         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
6055         (packet_command): Now methods of ...
6056         (remote_target): ... this class.
6057         (m_remote_state) <remote_target>: New field.
6058         (struct remote_state) <stop_reply_queue,
6059         remote_async_inferior_event_token, wait_forever_enabled_p>: New
6060         fields.
6061         (remote_state::remote_state): Allocate stop_reply_queue.
6062         (remote_state): Delete global.
6063         (get_remote_state_raw): Delete.
6064         (remote_target::get_remote_state): Allocate m_remote_state on
6065         demand.
6066         (get_current_remote_target): New.
6067         (remote_ops, extended_remote_ops): Delete.
6068         (wait_forever_enabled_p, remote_async_inferior_event_token):
6069         Delete, moved to struct remote_state.
6070         (remote_target::close): Delete self.  Destruction bits split to
6071         ...
6072         (remote_target::~remote_target): ... this.
6073         (show_memory_packet_size): Adjust to use
6074         get_current_remote_target.
6075         (struct protocol_feature) <func>: Add remote_target parameter.
6076         All callers adjusted.
6077         (curr_quit_handler_target): New.
6078         (remote_serial_quit_handler): Reimplement.
6079         (remote_target::open_1): Adjust to use get_current_remote_target.
6080         Heap-allocate remote_target/extended_remote_target instances.
6081         (vcont_builder::vcont_builder): Add remote_target parameter, and
6082         save it in m_remote.  All callers adjusted.
6083         (vcont_builder::m_remote): New field.
6084         (vcont_builder::restart, vcont_builder::flush)
6085         (vcont_builder::push_action): Use it.
6086         (remote_target::commit_resume): Use it.
6087         (struct queue_iter_param) <remote>: New field.
6088         (remote_target::remove_new_fork_children): Fill in 'remote' field.
6089         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
6090         (check_pending_event_prevents_wildcard_vcont_callback)
6091         (remote_target::check_pending_events_prevent_wildcard_vcont)
6092         (remote_target::discard_pending_stop_replies)
6093         (remote_target::discard_pending_stop_replies_in_queue)
6094         (remote_target::remote_notif_remove_queued_reply): Fill in
6095         'remote' field.
6096         (remote_notif_get_pending_events): New.
6097         (remote_target::readchar, remote_target::remote_serial_write):
6098         Save/restore curr_quit_handler_target.
6099         (putpkt): New.
6100         (kill_new_fork_children): Fill in 'remote' field.
6101         (packet_command): Use get_current_remote_target, defer to
6102         remote_target method of same name.
6103         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
6104         parameter, and save it in m_remote.  All callers adjusted.
6105         (scoped_remote_fd::release): Use m_remote.
6106         (scoped_remote_fd::m_remote): New field.
6107         (remote_file_put, remote_file_get, remote_file_delete): Use
6108         get_current_remote_target, defer to remote_target method of same
6109         name.
6110         (remote_btrace_reset): Add remote_state paremeter.  Update all
6111         callers.
6112         (remote_async_inferior_event_handler). Pass down 'data'.
6113         (remote_new_objfile): Use get_current_remote_target.
6114         (remote_target::vcont_r_supported): New.
6115         (set_range_stepping): Use get_current_remote_target and
6116         remote_target::vcont_r_supported.
6117         (_initialize_remote): Don't allocate 'remote_state' and
6118         'stop_reply_queue' globals.
6119         * remote.h (struct remote_target): Forward declare.
6120         (getpkt, putpkt, remote_notif_get_pending_events): Add
6121         'remote_target' parameter.
6122
6123 2018-05-22  Pedro Alves  <palves@redhat.com>
6124
6125         * remote.c (vcont_builder): Now a class.  Make all data members
6126         private.
6127         (vcont_builder) <vcont_builder, restart, flush, push_action>:
6128         Declare methods.
6129         (vcont_builder_restart): Rename to ...
6130         (vcont_builder::restart): ... this.
6131         (vcont_builder_flush): Rename to ...
6132         (vcont_builder::flush): ... this.
6133         (vcont_builder_push_action): Rename to ...
6134         (vcont_builder::push_action): ... this.
6135         (remote_target::commit_resume): Adjust.
6136
6137 2018-05-22  Pedro Alves  <palves@redhat.com>
6138
6139         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
6140         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
6141         (get_fixed_memory_packet_size): New.
6142         (get_memory_packet_size): Use it.
6143         (set_memory_packet_size): Don't override the config size with
6144         DEFAULT_MAX_MEMORY_PACKET_SIZE.
6145         (show_memory_packet_size): Use get_fixed_memory_packet_size.
6146         Don't refer to get_memory_packet_size if not connected to a remote
6147         target.  Show "(default)" if configured size is 0.
6148
6149 2018-05-22  Pedro Alves  <palves@redhat.com>
6150
6151         * remote.c (remote_target::mourn_inferior): Move
6152         discard_pending_stop_replies call here from ...
6153         (_initialize_remote): ... here.
6154
6155 2018-05-22  Pedro Alves  <palves@redhat.com>
6156
6157         * remote.c (compare_section_command): Remove set_general_process
6158         call.
6159
6160 2018-05-22  Pedro Alves  <palves@redhat.com>
6161
6162         * remote.c (struct packet_reg, struct remote_arch_state):
6163         Move higher up in the file.
6164         (remote_state) <m_arch_states>: Store remote_arch_state values
6165         instead of remote_arch_state pointers.
6166         (remote_state::get_remote_arch_state): Adjust.
6167
6168 2018-05-22  Pedro Alves  <palves@redhat.com>
6169
6170         * remote.c: Include <unordered_map>.
6171         (remote_state): Now a class.
6172         (remote_state) <get_remote_arch_state>: Declare method.
6173         <get_remote_arch_state>: New field.
6174         (remote_arch_state) <remote_arch_state>: Declare ctor.
6175         <regs>: Now a unique_ptr.
6176         (remote_gdbarch_data_handle): Delete.
6177         (get_remote_arch_state): Delete.
6178         (remote_state::get_remote_arch_state): New.
6179         (get_remote_state): Adjust to call remote_state's
6180         get_remote_arch_state method.
6181         (init_remote_state): Delete, bits factored out to ...
6182         (remote_arch_state::remote_arch_state): ... this new method.
6183         (get_remote_packet_size, get_memory_packet_size)
6184         (process_g_packet, remote_target::fetch_registers)
6185         (remote_target::prepare_to_store, store_registers_using_G)
6186         (remote_target::store_registers, remote_target::get_trace_status):
6187         Adjust to call remote_state's method.
6188         (_initialize_remote): Remove reference to
6189         remote_gdbarch_data_handle.
6190
6191 2018-05-22  Pedro Alves  <palves@redhat.com>
6192
6193         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
6194         pread>: New method declarations.
6195         (remote_target::open_1): Adjust.
6196         (readahead_cache_invalidate): Rename to ...
6197         (readahead_cache::invalidate): ... this, and adjust to be a class
6198         method.
6199         (readahead_cache_invalidate_fd): Rename to ...
6200         (readahead_cache::invalidate_fd): ... this, and adjust to be a
6201         class method.
6202         (remote_hostio_pwrite): Adjust.
6203         (remote_hostio_pread_from_cache): Rename to ...
6204         (readahead_cache::pread): ... this, and adjust to be a class
6205         method.
6206         (remote_hostio_close): Adjust.
6207
6208 2018-05-22  Pedro Alves  <palves@redhat.com>
6209
6210         * remote.c (remote_hostio_close_cleanup): Delete.
6211         (class scoped_remote_fd): New.
6212         (remote_file_put, remote_file_get): Use it.
6213
6214 2018-05-22  Pedro Alves  <palves@redhat.com>
6215
6216         (struct vCont_action_support): Use bool and initialize all fields.
6217         (struct readahead_cache): Initialize all fields.
6218         (remote_state): Use bool and initialize all fields.
6219         (remote_state::remote_state, remote_state::~remote_state): New.
6220         (new_remote_state): Delete.
6221         (_initialize_remote): Use new to allocate remote_state.
6222
6223 2018-05-22  Pedro Alves  <palves@redhat.com>
6224             張俊芝  <zjz@zjz.name>
6225
6226         PR gdb/22973
6227         * c-exp.y: Include "c-support.h".
6228         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
6229         of tolower.  Use c_ident_is_alpha to scan names.
6230         * c-lang.c: Include "c-support.h".
6231         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
6232         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
6233         * c-support.h: New file, with bits factored out from ...
6234         * cp-name-parser.y: ... this file.
6235         Include "c-support.h".
6236         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
6237         c-support.h and renamed.
6238         (symbol_end, yylex): Adjust.
6239
6240 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6241
6242         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
6243         parameter type to CORE_ADDR.
6244         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
6245         parameter type in declaration to CORE_ADDR.
6246         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
6247         target_auxv_search to get AT_HWCAP and use the result to get the
6248         target description.
6249         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
6250         to CORE_ADDR. Remove the cast of the return value to unsigned
6251         long. Fix error predicate of target_auxv_search.
6252         (ppc_linux_nat_target::read_description): Change the type of the
6253         hwcap variable to CORE_ADDR.
6254
6255 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6256
6257         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
6258         if the size of fpscr is larger than 32 bits.
6259
6260 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6261
6262         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
6263         (ppc32_linux_vsxregmap): New global.
6264         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
6265         regcache_supply_regset, and regcache_collect_regset.
6266         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
6267         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
6268         (fetch_vsx_register, store_vsx_register): Remove.
6269         (fetch_vsx_registers): Add regno parameter. Get regset using
6270         ppc_linux_vsxregset. Use regset to supply registers.
6271         (store_vsx_registers): Add regno parameter. Get regset using
6272         ppc_linux_vsxregset. Use regset to collect registers.
6273         (fetch_register): Call fetch_vsx_registers instead of
6274         fetch_vsx_register.
6275         (store_register): Call store_vsx_registers instead of
6276         store_vsx_register.
6277         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
6278         new regno parameter.
6279         (store_ppc_registers): Call store_vsx_registers with -1 for the
6280         new regno parameter.
6281         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
6282         (ppc_collect_vsxregset): Remove.
6283
6284 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6285
6286         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
6287         offset fields.
6288         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
6289         for vector register offset fields.
6290         (ppc64_fbsd_reg_offsets): Likewise.
6291         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
6292         to vector register offset fields.
6293         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
6294         to vector register offset fields.
6295         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
6296         vector register offset fields.
6297         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
6298         initializers for vector register offset fields.
6299         (rs6000_aix64_reg_offsets): Likewise.
6300         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
6301         (ppc_supply_vrregset): Remove.
6302         (ppc_collect_vrregset): Remove.
6303         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
6304         (ppc_linux_vrregset) : New function.
6305         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
6306         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
6307         (ppc32_linux_vrregset): Remove.
6308         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
6309         and use result instead of ppc32_linux_vrregset.
6310         (ppc32_linux_reg_offsets): Remove initializers for vector register
6311         offset fields.
6312         (ppc64_linux_reg_offsets): Likewise.
6313         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
6314         * ppc-linux-nat.c: Include regset.h.
6315         (gdb_vrregset_t): Adjust comment to account for little-endian
6316         mode.
6317         (supply_vrregset, fill_vrregset): Remove.
6318         (fetch_altivec_register, store_altivec_register): Remove.
6319         (fetch_altivec_registers): Add regno parameter. Get regset using
6320         ppc_linux_vrregset. Use regset to supply registers.
6321         (store_altivec_registers): Add regno parameter. Get regset using
6322         ppc_linux_vrregset. Use regset to collect registers.
6323         (fetch_register): Call fetch_altivec_registers instead of
6324         fetch_altivec_register.
6325         (store_register): Call store_altivec_registers instead of
6326         store_altivec_register.
6327         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
6328         the new regno parameter.
6329         (store_ppc_registers): Call store_altivec_registers with -1 for
6330         the new regno parameter.
6331
6332 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6333
6334         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
6335         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
6336         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
6337         (gdb_vrregset_t): Change array type size to
6338         PPC_LINUX_SIZEOF_VRREGSET.
6339         (gdb_vsxregset_t): Change array type size to
6340         PPC_LINUX_SIZEOF_VSXREGSET.
6341         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
6342         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
6343         PPC_LINUX_SIZEOF_VSXREGSET.
6344
6345 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6346
6347         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
6348         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
6349         nat/ppc-linux.c.
6350         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
6351         ppc_linux_target_wordsize with tid.
6352         (ppc_linux_nat_target::read_description): Call ppc_linux_target
6353         wordsize with tid.
6354         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
6355         (ppc64_64bit_inferior_p): Add static and inline specifiers.
6356         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
6357         tid parameter. Remove static specifier.
6358         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
6359         (ppc_linux_target_wordsize): New declaration.
6360
6361 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6362
6363         * arch/ppc-linux-common.c: New file.
6364         * arch/ppc-linux-common.h: New file.
6365         * arch/ppc-linux-tdesc.h: New file.
6366         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
6367         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
6368         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
6369         arch/ppc-linux-tdesc.h.
6370         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
6371         arch/ppc-linux-tdesc.h.
6372         (ppc_linux_nat_target::read_description): Remove target
6373         description matching code. Fill a ppc_linux_features struct and
6374         call ppc_linux_match_description with it. Move comment about ISA
6375         2.05 to ppc-linux-common.c.
6376         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
6377         arch/ppc-linux-tdesc.h.
6378         (ppc_linux_core_read_description): Remove target description
6379         matching code. Fill a ppc_linux_features struct and call
6380         ppc_linux_match_description with it.
6381         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
6382         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
6383         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
6384         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
6385         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
6386         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
6387         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
6388         (tdesc_powerpc_e500l): Remove.
6389
6390 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
6391
6392         * ada-lang.c (catch_assert_command): Pass empty string instead
6393         of NULL for excep_string argument.
6394
6395 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
6396
6397         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
6398         the width of the requested register exceeds the width of the
6399         `ptrace' data type.
6400
6401 2018-05-21  Tom Tromey  <tom@tromey.com>
6402
6403         * printcmd.c (output_command): Remove.
6404         (output_command_const): Rename to output_command.
6405         * valprint.h (output_command): Rename from output_command_const.
6406         * tracepoint.c (trace_dump_actions): Call output_command.
6407
6408 2018-05-21  Tom Tromey  <tom@tromey.com>
6409
6410         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
6411         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
6412         * ada-lang.h (create_ada_exception_catchpoint): Update.
6413         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
6414         std::string.
6415         (create_excep_cond_exprs, ~ada_catchpoint)
6416         (should_stop_exception, print_one_exception)
6417         (print_mention_exception, print_recreate_exception): Update.
6418         (ada_get_next_arg): Remove.
6419         (catch_ada_exception_command_split): Use std::string.  Change type
6420         of "excep_string", "cond_string".
6421         (catch_ada_exception_command): Update.
6422         (create_ada_exception_catchpoint): Change type of excep_string.
6423         (ada_exception_sal): Remove excep_string parameter.
6424         (~ada_catchpoint): Remove.
6425
6426 2018-05-21  Tom Tromey  <tom@tromey.com>
6427
6428         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
6429         cleanup.
6430
6431 2018-05-21  Tom Tromey  <tom@tromey.com>
6432
6433         * ada-lang.c (ada_exception_message_1, ada_exception_message):
6434         Return unique_xmalloc_ptr.
6435         (print_it_exception): Update.
6436
6437 2018-05-21  Tom Tromey  <tom@tromey.com>
6438
6439         * tracepoint.c (trace_dump_actions): Use std::string.
6440
6441 2018-05-21  Tom Tromey  <tom@tromey.com>
6442
6443         * symfile.c (reread_symbols): Use std::string for original_name.
6444
6445 2018-05-21  Tom Tromey  <tom@tromey.com>
6446
6447         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
6448         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
6449         constructor.
6450
6451 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
6452
6453         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
6454         instance to...
6455         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
6456         * objfiles.c (get_objfile_bfd_data): Allocate
6457         objfile_per_bfd_storage with obstack_new when allocating on
6458         obstack.
6459
6460 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
6461
6462         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
6463         OBSTACK_ZALLOC.
6464         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
6465         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
6466         * mdebugread.c (mdebug_build_psymtabs): Likewise.
6467         (add_pending): Likewise.
6468         (parse_symbol): Likewise.
6469         (parse_partial_symbols): Likewise.
6470         (psymtab_to_symtab_1): Likewise.
6471         (new_psymtab): Likewise.
6472         (elfmdebug_build_psymtabs): Likewise.
6473         * minsyms.c (terminate_minimal_symbol_table): Likewise.
6474         * objfiles.c (get_objfile_bfd_data): Likewise.
6475         (objfile_register_static_link): Likewise.
6476         * psymtab.c (allocate_psymtab): Likewise.
6477         * stabsread.c (read_member_functions): Likewise.
6478         * xcoffread.c (xcoff_end_psymtab): Likewise.
6479
6480 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
6481
6482         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
6483         compiler supports std::is_trivially_constructible.
6484         * common/poison.h: Include obstack.h.
6485         (IsMallocable): Define to is_trivially_constructible if the
6486         compiler supports it, define to true_type otherwise.
6487         (xobnew): New.
6488         (XOBNEW): Redefine.
6489         (xobnewvec): New.
6490         (XOBNEWVEC): Redefine.
6491         * gdb_obstack.h (obstack_zalloc): New.
6492         (OBSTACK_ZALLOC): Redefine.
6493         (obstack_calloc): New.
6494         (OBSTACK_CALLOC): Redefine.
6495         (obstack_new): New.
6496         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
6497         (gdbarch_obstack): New declaration in gdbarch.h, definition in
6498         gdbarch.c.
6499         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
6500         obstack_calloc/obstack_zalloc.
6501         (gdbarch_obstack_zalloc): Remove.
6502         * target-descriptions.c (tdesc_data_init): Use obstack_new.
6503
6504 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6505
6506         * stack.c (backtrace_command_1): Remove useless variable int i.
6507
6508 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6509
6510         * stack.c (print_frame_info): Fix comment.
6511
6512 2018-05-18  Tom Tromey  <tom@tromey.com>
6513
6514         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
6515         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
6516         (~dwarf2_per_objfile): Update
6517         (dwarf2_get_dwz_file): Use new.
6518         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
6519         unique_ptr.
6520
6521 2018-05-18  Tom Tromey  <tom@tromey.com>
6522
6523         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
6524         unique_ptr.
6525         * dwarf2read.c (struct dwp_file): Add constructor and
6526         initializers.
6527         (open_and_init_dwp_file): Return a unique_ptr.
6528         (dwarf2_per_objfile, create_dwp_hash_table)
6529         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
6530         (lookup_dwo_unit_in_dwp): Update.
6531         (open_and_init_dwp_file, get_dwp_file): Update.
6532
6533 2018-05-18  Tom Tromey  <tom@tromey.com>
6534
6535         * dwarf2read.c (dwarf2_per_objfile): Update.
6536         (struct mapped_index): Add initializers.
6537         (dwarf2_read_index): Use new.
6538         (dw2_symtab_iter_init): Update.
6539         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
6540         unique_ptr.
6541
6542 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
6543
6544         * dwarf2read.c (mapped_index) <total_size>: Remove.
6545
6546 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
6547
6548         * unittests/format_pieces-selftests.c (test_format_specifier):
6549         Add ARI comments.
6550
6551 2018-05-18  Tom Tromey  <tom@tromey.com>
6552
6553         * c-typeprint.c (maybe_print_hole): New function.
6554         (c_print_type_struct_field_offset): Update.
6555         (c_type_print_base_struct_union): Call maybe_print_hole.
6556
6557 2018-05-17  Keith Seitz  <keiths@redhat.com>
6558
6559         * breakpoint.c (build_bpstat_chain): New function, moved from
6560         bpstat_stop_status.
6561         (bpstat_stop_status): Add optional parameter, `stop_chain'.
6562         If no stop chain is passed, call build_bpstat_chain to build it.
6563         * breakpoint.h (build_bpstat_chain): Declare.
6564         (bpstat_stop_status): Move documentation here from breakpoint.c.
6565         * infrun.c (handle_signal_stop): Before eliding inlined frames,
6566         build the stop chain and pass it to skip_inline_frames.
6567         Pass this stop chain to bpstat_stop_status.
6568         * inline-frame.c: Include breakpoint.h.
6569         (stopped_by_user_bp_inline_frame): New function.
6570         (skip_inline_frames): Add parameter `stop_chain'.
6571         Move documention to inline-frame.h.
6572         If non-NULL, use stopped_by_user_bp_inline_frame to determine
6573         whether the frame should be elided.
6574         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
6575         Add moved documentation and update for new parameter.
6576
6577 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
6578
6579         PR cli/14975
6580         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6581         unittests/format_pieces-selftests.c.
6582         * common/format.h (format_piece) <operator==>: New.
6583         (format_pieces) <operator[]>: Remove.
6584         * common/format.c (format_pieces::format_pieces): Handle \e.
6585         * unittests/format_pieces-selftests.c: New.
6586
6587 2018-05-17  Tom Tromey  <tom@tromey.com>
6588
6589         PR symtab/23010:
6590         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
6591         (dw2_instantiate_symtab): Add skip_partial parameter.
6592         (dw2_find_last_source_symtab, dw2_map_expand_apply)
6593         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
6594         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
6595         (dw2_expand_symtabs_matching_one)
6596         (dw2_find_pc_sect_compunit_symtab)
6597         (dw2_debug_names_lookup_symbol)
6598         (dw2_debug_names_expand_symtabs_for_function): Update.
6599         (init_cutu_and_read_dies): Add skip_partial parameter.
6600         (process_psymtab_comp_unit, build_type_psymtabs_1)
6601         (process_skeletonless_type_unit, load_partial_comp_unit)
6602         (psymtab_to_symtab_1): Update.
6603         (load_full_comp_unit): Add skip_partial parameter.
6604         (process_imported_unit_die, dwarf2_read_addr_index)
6605         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
6606         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
6607         (read_signatured_type): Update.
6608
6609 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
6610
6611         * value.c (release_value): Remove unused variable.
6612         (record_latest_value): Likewise.
6613         (access_value_history): Likewise.
6614         (preserve_values): Likewise.
6615
6616 2018-05-17  Tom Tromey  <tom@tromey.com>
6617
6618         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
6619         Initialize.
6620
6621 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
6622
6623         PR gdb/22286
6624         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
6625         Also handle registers whose width is not a multiple of
6626         PTRACE_TYPE_RET.
6627         (linux_nat_trad_target::store_register): Likewise.
6628
6629 2018-05-16  Tom Tromey  <tom@tromey.com>
6630
6631         * gdbcore.h (core_bfd): Redefine.
6632         * corelow.c (core_target::close): Update.
6633         (core_target_open): Update.
6634         * progspace.h (struct program_space) <cbfd>: Now a
6635         gdb_bfd_ref_ptr.
6636
6637 2018-05-16  Tom Tromey  <tom@tromey.com>
6638
6639         PR cli/19551:
6640         * symfile-add-flags.h (enum symfile_add_flags)
6641         <SYMFILE_NOT_FILENAME>: New constant.
6642         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
6643         objfile name from BFD.
6644         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
6645         * minidebug.c (find_separate_debug_file_in_section): Put
6646         ".gnu_debugdata" into BFD's file name.
6647
6648 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
6649
6650         * regcache.c (regcache_read_ftype, regcache_write_ftype):
6651         Remove.
6652
6653 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
6654
6655         PR binutils/21446
6656         * aarch64-tdep.c (aarch64_analyze_prologue,
6657         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
6658         Indicate not interested in errors.
6659
6660 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
6661
6662         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
6663         Supply the MIPS_ZERO_REGNUM register.
6664
6665 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
6666
6667         * mips-tdep.c (mask_address_var): Make variable static.
6668
6669 2018-05-14  Tom Tromey  <tom@tromey.com>
6670
6671         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
6672
6673 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
6674
6675         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
6676         FXSAVE_ADDR for the mxcsr register.
6677
6678 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
6679
6680         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
6681
6682 2018-05-11  Pedro Alves  <palves@redhat.com>
6683
6684         * corelow.c (core_target) <core_target>: No longer inline.
6685         Initialize m_core_gdbarch, m_core_vec and build the section table
6686         here.
6687         <~core_target>: New.
6688         <core_gdbarch, get_core_register_section>: New methods.
6689         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
6690         factored out from ...
6691         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
6692         (core_ops): Delete.
6693         (sniff_core_bfd): Add gdbarch parameter.
6694         (core_close): Delete, merged into ...
6695         (core_target::close): ... here.  Delete self.
6696         (core_close_cleanup): Delete.
6697         (core_target_open): Allocate a core_target on the heap.  Use a
6698         unique_ptr instead of a cleanup.  Bits moved into the core_target
6699         ctor.  Adjust to use core_target methods instead of globals.
6700         (get_core_register_section): Rename to ...
6701         (core_target::get_core_register_section): ... this and adjust.
6702         (struct get_core_registers_cb_data): New.
6703         (get_core_registers_cb): Use it.  Use bool.
6704         (core_target::fetch_registers, core_target::files_info)
6705         (core_target::xfer_partial, core_target::read_description)
6706         (core_target::pid_to, core_target::thread_name): Adjust to
6707         reference class fields instead of globals.
6708         * target.h (struct target_ops_deleter, target_ops_up): New.
6709
6710 2018-05-11  Pedro Alves  <palves@redhat.com>
6711
6712         * corefile.c (core_file_command): Move to corelow.c.
6713         * corelow.c (the_core_target): Delete.
6714         (core_file_command): Moved from corefile.c.  Check exec_bfd
6715         instead of the_core_target.  Use target_detach instead of calling
6716         into the_core_target directly.
6717         (maybe_say_no_core_file_now): New.
6718         (core_target::detach): Use it.
6719         (_initialize_corelow): Remove references to the_core_target.
6720         * gdbcore.h (the_core_target): Delete.
6721
6722 2018-05-11  Tom Tromey  <tromey@redhat.com>
6723             Pedro Alves  <palves@redhat.com>
6724
6725         * corefile.c (core_bfd): Remove.
6726         * gdbcore.h (core_bfd): Now a macro.
6727         * progspace.h (struct program_space) <cbfd>: New field.
6728
6729 2018-05-11  Tom Tromey  <tom@tromey.com>
6730
6731         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
6732         gdb::def_vector.
6733
6734 2018-05-10  Tom Tromey  <tom@tromey.com>
6735
6736         * configure: Rebuild.
6737         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
6738
6739 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
6740
6741         PR server/23158:
6742         * regformats/regdat.sh: Adjust script, following the addition
6743         of the new expedite_regs parameter to init_target_desc.
6744
6745 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
6746     
6747         PR gdb/23127
6748         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
6749         set_gdbarch_significant_addr_bit.
6750         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
6751         set_gdbarch_significant_addr_bit.
6752         * utils.c (address_significant): Update to sign extend addr.
6753
6754 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
6755
6756         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
6757         (xtensa_linux_init_abi): Limit tdep->num_regs by
6758         tdep->num_nopriv_regs.
6759         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
6760         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
6761         not initialized.
6762
6763 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
6764
6765         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
6766
6767 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
6768
6769         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
6770         (I387_MXCSR_INIT_VAL): New constant.
6771         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
6772         buffer if it was supplied by the inferior.
6773         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
6774         (i387_xsave_get_clear_bv): New function.
6775         (i387_supply_xsave): Only read x87 control registers from the
6776         xsave buffer if the feature is enabled, and the state will have
6777         been written, otherwise, provide a suitable default.
6778         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
6779         including x87 control registers.  Update control registers if they
6780         have changed from the default value, and mark features as enabled
6781         as required.
6782         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
6783
6784 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
6785
6786         * spu-tdep.c (info_spu_event_command): Fix output formatting.
6787
6788 2018-05-07  Tom Tromey  <tom@tromey.com>
6789
6790         * configure: Rebuild.
6791         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
6792
6793 2018-05-07  Tom Tromey  <tom@tromey.com>
6794
6795         PR tdep/20362:
6796         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
6797         bit.  Use correct value for VDIV.
6798
6799 2018-05-04  Tom Tromey  <tom@tromey.com>
6800
6801         * configure: Rebuild.
6802         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
6803
6804 2018-05-04  Tom Tromey  <tom@tromey.com>
6805
6806         * linux-record.c (record_linux_system_call) <case
6807         RECORD_SYS_RECVFROM>: Add "break".
6808
6809 2018-05-04  Tom Tromey  <tom@tromey.com>
6810
6811         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
6812         Add missing "break".
6813         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
6814         Add missing "break".
6815
6816 2018-05-04  Tom Tromey  <tom@tromey.com>
6817
6818         * rs6000-tdep.c (ppc_process_record_op4)
6819         (ppc_process_record_op63): Add fall-through comment.
6820
6821 2018-05-04  Tom Tromey  <tom@tromey.com>
6822
6823         * i386-tdep.c (i386_process_record): Add fall-through comment.
6824
6825 2018-05-04  Tom Tromey  <tom@tromey.com>
6826
6827         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
6828         comment.
6829
6830 2018-05-04  Tom Tromey  <tom@tromey.com>
6831
6832         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
6833         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
6834         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
6835         comment.
6836         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
6837         comment.
6838         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
6839         comment.
6840
6841 2018-05-04  Tom Tromey  <tom@tromey.com>
6842
6843         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
6844
6845 2018-05-04  Tom Tromey  <tom@tromey.com>
6846
6847         * s390-tdep.c (s390_process_record): Fix fall-through comments.
6848         * xcoffread.c (scan_xcoff_symtab): Move comment later.
6849         * symfile.c (section_is_mapped): Fix fall-through comment.
6850         * stabsread.c (define_symbol, read_member_functions): Fix
6851         fall-through comment.
6852         * s390-linux-tdep.c (s390_process_record): Fix fall-through
6853         comment.
6854         * remote.c (remote_wait_as): Fix fall-through comment.
6855         * p-exp.y (yylex): Fix fall-through comment.
6856         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
6857         comment.
6858         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
6859         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
6860         * jv-exp.y (yylex): Fix fall-through comment.
6861         * go-exp.y (lex_one_token): Fix fall-through comment.
6862         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
6863         fall-through comment.
6864         * f-exp.y (yylex): Fix fall-through comment.
6865         * dwarf2read.c (process_die): Fix fall-through comments.
6866         * dbxread.c (process_one_symbol): Fix fall-through comment.
6867         * d-exp.y (lex_one_token): Fix fall-through comment.
6868         * cp-name-parser.y (yylex): Fix fall-through comment.
6869         * coffread.c (coff_symtab_read): Fix fall-through comment.
6870         * c-exp.y (lex_one_token): Fix fall-through comment.
6871         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
6872         comment.
6873         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
6874         comment.
6875
6876 2018-05-04  Tom Tromey  <tom@tromey.com>
6877
6878         PR python/22730:
6879         * NEWS: Mention gdb.execute change.
6880         * gdbcmd.h (execute_control_command): Don't declare.
6881         * python/python.c (execute_gdb_command): Use read_command_lines_1,
6882         execute_control_commands, execute_control_commands_to_string.
6883         * cli/cli-script.h (execute_control_commands)
6884         (execute_control_commands_to_string): Declare.
6885         (execute_control_command): Add from_tty parameter.
6886         * cli/cli-script.c (execute_control_commands)
6887         (execute_control_commands_to_string): New functions.
6888         (execute_user_command): Use execute_control_commands.
6889         (execute_control_command_1): Add "from_tty" parameter.  Update.
6890         (execute_control_command): Likewise.
6891
6892 2018-05-04  Tom Tromey  <tom@tromey.com>
6893
6894         PR python/22731:
6895         * NEWS: Mention that breakpoint commands are writable.
6896         * python/py-breakpoint.c (bppy_set_commands): New function.
6897         (breakpoint_object_getset) <"commands">: Use it.
6898
6899 2018-05-04  Tom Tromey  <tom@tromey.com>
6900
6901         * tracepoint.c (actions_command): Update.
6902         * mi/mi-cmd-break.c (mi_command_line_array)
6903         (mi_command_line_array_cnt, mi_command_line_array_ptr)
6904         (mi_read_next_line): Remove.
6905         (mi_cmd_break_commands): Update.
6906         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
6907         function_view.
6908         * cli/cli-script.c (get_command_line): Update.
6909         (process_next_line): Use function_view.  Constify.
6910         (recurse_read_control_structure, read_command_lines)
6911         (read_command_lines_1): Change argument types to function_view.
6912         (do_define_command, document_command): Update.
6913         * breakpoint.h (check_tracepoint_command): Don't declare.
6914         * breakpoint.c (check_tracepoint_command): Remove.
6915         (commands_command_1, create_tracepoint_from_upload): Update.
6916
6917 2018-05-04  Tom Tromey  <tom@tromey.com>
6918
6919         PR gdb/11750:
6920         * cli/cli-script.h (enum command_control_type) <define_control>:
6921         New constant.
6922         * cli/cli-script.c (multi_line_command_p): Handle define_control.
6923         (build_command_line, execute_control_command_1)
6924         (process_next_line): Likewise.
6925         (do_define_command): New function, extracted from define_command.
6926         (define_command): Use it.
6927
6928 2018-05-04  Tom Tromey  <tom@tromey.com>
6929
6930         * tracepoint.c (actions_command): Update.
6931         * cli/cli-script.h (read_command_lines): Update.
6932         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
6933         (MAX_TMPBUF): Remove define.
6934         (define_command): Use string_printf.
6935         (document_command): Likewise.
6936         * breakpoint.c (commands_command_1): Update.
6937
6938 2018-05-04  Tom Tromey  <tom@tromey.com>
6939
6940         * top.c (execute_command): Update.
6941         * cli/cli-script.h (print_command_lines): Now varargs.
6942         * cli/cli-script.c (print_command_lines): Now varargs.
6943         (execute_control_command_1) <case while_control, case if_control>:
6944         Update.
6945
6946 2018-05-04  Tom Tromey  <tom@tromey.com>
6947
6948         * tracepoint.c (all_tracepoint_actions): Rename from
6949         all_tracepoint_actions_and_cleanup.  Change return type.
6950         (actions_command, encode_actions_1, encode_actions)
6951         (trace_dump_actions, tdump_command): Update.
6952         * remote.c (remote_download_command_source): Update.
6953         * python/python.c (gdbpy_eval_from_control_command)
6954         (python_command, python_interactive_command): Update.
6955         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
6956         * guile/guile.c (guile_command)
6957         (gdbscm_eval_from_control_command, guile_command): Update.
6958         * compile/compile.c (compile_code_command)
6959         (compile_print_command, compile_to_object): Update.
6960         * cli/cli-script.h (struct command_lines_deleter): New.
6961         (counted_command_line): New typedef.
6962         (struct command_line): Add constructor, destructor.
6963         <body_list>: Remove.
6964         <body_list_0, body_list_1>: New members.
6965         (command_line_up): Remove typedef.
6966         (read_command_lines, read_command_lines_1, get_command_line):
6967         Update.
6968         (copy_command_lines): Don't declare.
6969         * cli/cli-script.c (build_command_line): Use "new".
6970         (get_command_line): Return counted_command_line.
6971         (print_command_lines, execute_user_command)
6972         (execute_control_command_1, while_command, if_command): Update.
6973         (realloc_body_list): Remove.
6974         (process_next_line, recurse_read_control_structure): Update.
6975         (read_command_lines, read_command_lines_1): Return counted_command_line.
6976         (free_command_lines): Use "delete".
6977         (copy_command_lines): Remove.
6978         (define_command, document_command, show_user_1): Update.
6979         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
6980         a counted_command_line.
6981         * breakpoint.h (counted_command_line): Remove typedef.
6982         (breakpoint_set_commands): Update.
6983         * breakpoint.c (check_no_tracepoint_commands)
6984         (validate_commands_for_breakpoint): Update.
6985         (breakpoint_set_commands): Change commands to be a
6986         counted_command_line.
6987         (commands_command_1, update_dprintf_command_list)
6988         (create_tracepoint_from_upload): Update.
6989
6990 2018-05-04  Tom Tromey  <tom@tromey.com>
6991
6992         * cli/cli-decode.h (cmd_list_element): New constructor.
6993         (~cmd_list_element): New destructor.
6994         (struct cmd_list_element): Add initializers.
6995         * cli/cli-decode.c (do_add_cmd): Use "new".
6996         (delete_cmd): Use "delete".
6997
6998 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
6999             Pedro Alves <palves@redhat.com>
7000
7001         PR breakpoints/19806 and support for PR external/20207.
7002         * NEWS: Mention Aarch64 watchpoint improvements.
7003         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
7004         watchpoints and PR external/20207 watchpoints.
7005         * nat/aarch64-linux-hw-point.c
7006         (kernel_supports_any_contiguous_range): New.
7007         (aarch64_watchpoint_offset): New.
7008         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
7009         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
7010         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
7011         (aarch64_align_watchpoint): New parameters aligned_offset_p and
7012         next_addr_orig_p.  Support PR external/20207 watchpoints.
7013         (aarch64_downgrade_regs): New.
7014         (aarch64_dr_state_insert_one_point): New parameters offset and
7015         addr_orig.
7016         (aarch64_dr_state_remove_one_point): Likewise.
7017         (aarch64_handle_breakpoint): Update caller.
7018         (aarch64_handle_aligned_watchpoint): Likewise.
7019         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
7020         aligned_offset.
7021         (aarch64_linux_set_debug_regs): Remove const from state.  Call
7022         aarch64_downgrade_regs.
7023         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
7024         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
7025         (DR_CONTROL_MASK): ... this.
7026         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
7027         (unsigned int aarch64_watchpoint_offset): New prototype.
7028         (aarch64_linux_set_debug_regs): Remove const from state.
7029         * utils.c (align_up, align_down): Move to ...
7030         * common/common-utils.c (align_up, align_down): ... here.
7031         * utils.h (align_up, align_down): Move to ...
7032         * common/common-utils.h (align_up, align_down): ... here.
7033
7034 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
7035
7036         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
7037         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
7038         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
7039         Re-implement to match the ABI as summarized in GCC's
7040         gcc/config/sparc/sparc.c.  All callers updated.
7041         (sparc32_store_arguments): Remove assertion.
7042
7043 2018-05-04  Tom Tromey  <tom@tromey.com>
7044
7045         * printcmd.c: Don't include tui.h.
7046         (decode_format): Use skip_spaces.
7047
7048 2018-05-04  Tom Tromey  <tom@tromey.com>
7049
7050         PR gdb/22619:
7051         * printcmd.c (last_count): New global.
7052         (x_command): Use saved count when repeating.
7053
7054 2018-05-04  Tom Tromey  <tom@tromey.com>
7055
7056         * nto-procfs.c (do_closedir_cleanup): Remove.
7057         (procfs_pidlist): Use gdb_dir_up.
7058         * procfs.c (do_closedir_cleanup): Remove.
7059         (proc_update_threads): Use gdb_dir_up.
7060         * common/filestuff.h (struct gdb_dir_deleter): New.
7061         (gdb_dir_up): New typedef.
7062
7063 2018-05-04  Tom Tromey  <tom@tromey.com>
7064
7065         * ada-lang.c (print_mention_exception): Use std::string.
7066
7067 2018-05-04  Tom Tromey  <tom@tromey.com>
7068
7069         * ada-lang.c (create_excep_cond_exprs): Update.
7070         (ada_exception_catchpoint_cond_string): Use std::string.
7071
7072 2018-05-04  Tom Tromey  <tom@tromey.com>
7073
7074         * ada-lang.c (xget_renaming_scope): Return std::string.
7075         (old_renaming_is_invisible): Update.
7076
7077 2018-05-04  Tom Tromey  <tom@tromey.com>
7078
7079         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
7080         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
7081
7082 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
7083
7084         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
7085
7086 2018-05-04  Tom Tromey  <tom@tromey.com>
7087
7088         * remote.c (remote_query_supported_append): Change type.
7089         (remote_check_symbols): Update.
7090
7091 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
7092
7093         PR gdb/11420
7094         * configure.ac: Prepend libpython.
7095         * python/python-config.py: Likewise.
7096         * configure: Regenerate.
7097
7098 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
7099
7100         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
7101
7102 2018-05-03  Pedro Alves  <palves@redhat.com>
7103
7104         * s390-linux-nat.c
7105         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
7106         override.  Write 'true' instead of '1'.
7107         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
7108         declaration.
7109
7110 2018-05-02  Pedro Alves  <palves@redhat.com>
7111
7112         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
7113         add_inf_child_target.
7114         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
7115         add_inf_child_target.
7116         * aix-thread.c (aix_thread_target_info): New.
7117         (aix_thread_target) <shortname, longname, doc>: Delete.
7118         <info>: New.
7119         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
7120         add_inf_child_target.
7121         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
7122         add_inf_child_target.
7123         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
7124         add_inf_child_target.
7125         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
7126         add_inf_child_target.
7127         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
7128         add_inf_child_target.
7129         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
7130         add_inf_child_target.
7131         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
7132         add_inf_child_target.
7133         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
7134         add_inf_child_target.
7135         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
7136         add_inf_child_target.
7137         * bfd-target.c (target_bfd_target_info): New.
7138         (target_bfd) <shortname, longname, doc>: Delete.
7139         <info>: New.
7140         * bsd-kvm.c (bsd_kvm_target_info): New.
7141         (bsd_kvm_target) <shortname, longname, doc>: Delete.
7142         <info>: New.
7143         (bsd_kvm_target::open): Rename to ...
7144         (bsd_kvm_target_open): ... this.  Adjust.
7145         * bsd-uthread.c (bsd_uthread_target_info): New.
7146         (bsd_uthread_target) <shortname, longname, doc>: Delete.
7147         <info>: New.
7148         * corefile.c (core_file_command): Adjust.
7149         * corelow.c (core_target_info): New.
7150         (core_target) <shortname, longname, doc>: Delete.
7151         <info>: New.
7152         (core_target::open): Rename to ...
7153         (core_target_open): ... this.  Adjust.
7154         * ctf.c (ctf_target_info): New.
7155         (ctf_target) <shortname, longname, doc>: Delete.
7156         <info>: New.
7157         (ctf_target::open): Rename to ...
7158         (ctf_target_open): ... this.
7159         (_initialize_ctf): Adjust.
7160         * exec.c (exec_target_info): New.
7161         (exec_target) <shortname, longname, doc>: Delete.
7162         <info>: New.
7163         (exec_target::open): Rename to ...
7164         (exec_target_open): ... this.
7165         * gdbcore.h (core_target_open): Declare.
7166         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
7167         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
7168         add_inf_child_target.
7169         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
7170         add_inf_child_target.
7171         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
7172         add_inf_child_target.
7173         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
7174         add_inf_child_target.
7175         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
7176         add_inf_child_target.
7177         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
7178         add_inf_child_target.
7179         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
7180         add_inf_child_target.
7181         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
7182         add_inf_child_target.
7183         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
7184         add_inf_child_target.
7185         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
7186         add_inf_child_target.
7187         * inf-child.c (inf_child_target_info): New.
7188         (inf_child_target::info): New.
7189         (inf_child_open_target): Remove 'target' parameter.  Use
7190         get_native_target instead.
7191         (inf_child_target::open): Delete.
7192         (add_inf_child_target): New.
7193         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
7194         Delete.
7195         <info>: New.
7196         (add_inf_child_target): Declare.
7197         (inf_child_open_target): Declare.
7198         * linux-thread-db.c (thread_db_target_info): New.
7199         (thread_db_target) <shortname, longname, doc>: Delete.
7200         <info>: New.
7201         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
7202         add_inf_child_target.
7203         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
7204         add_inf_child_target.
7205         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
7206         add_inf_child_target.
7207         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
7208         add_inf_child_target.
7209         * make-target-delegates (print_class): Adjust.
7210         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
7211         add_inf_child_target.
7212         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
7213         add_inf_child_target.
7214         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
7215         add_inf_child_target.
7216         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
7217         add_inf_child_target.
7218         * nto-procfs.c (nto_native_target_info): New.
7219         (nto_procfs_target_native) <shortname, longname, doc>:
7220         Delete.
7221         <info>: New.
7222         (nto_procfs_target_info): New.
7223         (nto_procfs_target_procfs) <shortname, longname, doc>:
7224         Delete.
7225         <info>: New.
7226         (init_procfs_targets): Adjust.
7227         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
7228         add_inf_child_target.
7229         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
7230         add_inf_child_target.
7231         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
7232         add_inf_child_target.
7233         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
7234         add_inf_child_target.
7235         * ravenscar-thread.c (ravenscar_target_info): New.
7236         (ravenscar_thread_target) <shortname, longname, doc>:
7237         Delete.
7238         <info>: New.
7239         * record-btrace.c (record_btrace_target_info):
7240         (record_btrace_target) <shortname, longname, doc>: Delete.
7241         <info>: New.
7242         (record_btrace_target::open): Rename to ...
7243         (record_btrace_target_open): ... this.  Adjust.
7244         * record-full.c (record_longname, record_doc): New.
7245         (record_full_base_target) <shortname, longname, doc>: Delete.
7246         <info>: New.
7247         (record_full_target_info): New.
7248         (record_full_target): <shortname>: Delete.
7249         <info>: New.
7250         (record_full_core_open_1, record_full_open_1): Update comments.
7251         (record_full_base_target::open): Rename to ...
7252         (record_full_open): ... this.
7253         (cmd_record_full_restore): Update.
7254         (_initialize_record_full): Update.
7255         * remote-sim.c (remote_sim_target_info): New.
7256         (gdbsim_target) <shortname, longname, doc>: Delete.
7257         <info>: New.
7258         (gdbsim_target::open): Rename to ...
7259         (gdbsim_target_open): ... this.
7260         (_initialize_remote_sim): Adjust.
7261         * remote.c (remote_doc): New.
7262         (remote_target_info): New.
7263         (remote_target) <shortname, longname, doc>: Delete.
7264         <info>: New.
7265         (extended_remote_target_info): New.
7266         (extended_remote_target) <shortname, longname, doc>: Delete.
7267         <info>: New.
7268         (remote_target::open_1): Make static.  Adjust.
7269         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
7270         * s390-linux-nat.c (_initialize_s390_nat): Use
7271         add_inf_child_target.
7272         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
7273         add_inf_child_target.
7274         * sol-thread.c (thread_db_target_info): New.
7275         (sol_thread_target) <shortname, longname, doc>: Delete.
7276         <info>: New.
7277         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
7278         add_inf_child_target.
7279         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
7280         add_inf_child_target.
7281         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
7282         add_inf_child_target.
7283         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
7284         add_inf_child_target.
7285         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
7286         add_inf_child_target.
7287         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
7288         add_inf_child_target.
7289         * spu-linux-nat.c (_initialize_spu_nat): Use
7290         add_inf_child_target.
7291         * spu-multiarch.c (spu_multiarch_target_info): New.
7292         (spu_multiarch_target) <shortname, longname, doc>: Delete.
7293         <info>: New.
7294         * target-delegates.c: Regenerate.
7295         * target.c: Include <unordered_map>.
7296         (target_ops_p): Delete.
7297         (DEF_VEC_P(target_ops_p)): Delete.
7298         (target_factories): New.
7299         (test_target_info): New.
7300         (test_target_ops::info): New.
7301         (open_target): Adjust to use target_factories.
7302         (add_target_with_completer): Rename to ...
7303         (add_target): ... this.  Change prototype.  Register target_info
7304         and open callback in target_factories.  Register target_info in
7305         command context instead of target_ops.
7306         (add_target): Delete old implementation.
7307         (add_deprecated_target_alias): Change prototype.  Adjust.
7308         (the_native_target): New.
7309         (set_native_target, get_native_target): New.
7310         (find_default_run_target): Use the_native_target.
7311         (find_attach_target, find_run_target): Simplify.
7312         (target_ops::open): Delete.
7313         (dummy_target_info): New.
7314         (dummy_target::shortname, dummy_target::longname)
7315         (dummy_target::doc): Delete.
7316         (dummy_target::info): New.
7317         (debug_target::shortname, debug_target::longname)
7318         (debug_target::doc): Delete.
7319         (debug_target::info): New.
7320         * target.h (struct target_info): New.
7321         (target_ops::~target_ops): Add comment.
7322         (target_ops::info): New.
7323         (target_ops::shortname, target_ops::longname, target_ops::doc): No
7324         longer virtual.  Implement in terms of target_info.
7325         (set_native_target, get_native_target): Declare.
7326         (target_open_ftype): New.
7327         (add_target, add_target_with_completer)
7328         (add_deprecated_target_alias): Change prototype.
7329         (test_target) <shortname, longname, doc>: Delete.
7330         <info>: New.
7331         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
7332         add_inf_child_target.
7333         * tracefile-tfile.c (tfile_target_info): New.
7334         (tfile_target) <shortname, longname, doc>: Delete.
7335         <info>: New.
7336         (tfile_target::open): Rename to ...
7337         (tfile_target_open): ... this.
7338         (_initialize_tracefile_tfile): Adjust.
7339         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
7340         add_inf_child_target.
7341         * windows-nat.c (_initialize_windows_nat): Use
7342         add_inf_child_target.
7343         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
7344         add_inf_child_target.
7345
7346 2018-05-02  Pedro Alves  <palves@redhat.com>
7347
7348         * linux-nat.h (linux_nat_target) <low_new_thread,
7349         low_delete_thread, low_new_fork, low_forget_process,
7350         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
7351         New virtual methods.
7352         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
7353         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
7354         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
7355         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
7356         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
7357         Delete.
7358         * linux-fork.c (delete_fork): Adjust to call low method.
7359         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
7360         (linux_nat_new_fork, linux_nat_forget_process_hook)
7361         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
7362         (linux_nat_status_is_event):
7363         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
7364         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
7365         to call low method.
7366         (sigtrap_is_event): Rename to ...
7367         (linux_nat_target::low_status_is_event): ... this.
7368         (linux_nat_set_status_is_event): Delete.
7369         (save_stop_reason, linux_nat_wait_1)
7370         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
7371         low methods.
7372         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
7373         (linux_nat_set_new_fork, linux_nat_set_forget_process)
7374         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
7375         (linux_nat_set_prepare_to_resume): Delete.
7376         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
7377         low virtual methods.
7378         * amd64-linux-nat.c: Likewise.
7379         * arm-linux-nat.c: Likewise.
7380         * i386-linux-nat.c: Likewise.
7381         * ia64-linux-nat.c: Likewise.
7382         * mips-linux-nat.c: Likewise.
7383         * ppc-linux-nat.c: Likewise.
7384         * s390-linux-nat.c: Likewise.
7385         * sparc64-linux-nat.c: Likewise.
7386         * x86-linux-nat.c: Likewise.
7387         * x86-linux-nat.h: Include "nat/x86-linux.h".
7388         (x86_linux_nat_target) <low_new_fork, low_forget_process,
7389         low_prepare_to_resume, low_new_thread, low_delete_thread>:
7390         Override methods.
7391
7392 2018-05-02  Pedro Alves  <palves@redhat.com>
7393
7394         * target.h (target_ops)
7395         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
7396         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
7397         stopped_by_watchpoint, have_continuable_watchpoint,
7398         stopped_data_address, watchpoint_addr_within_range,
7399         can_accel_watchpoint_condition, can_run, thread_alive,
7400         has_all_memory, has_memory, has_stack, has_registers,
7401         has_execution, can_async_p, is_async_p, supports_non_stop,
7402         always_non_stop_p, can_execute_reverse, supports_multi_process,
7403         supports_enable_disable_tracepoint,
7404         supports_disable_randomization, supports_string_tracing,
7405         supports_evaluation_of_breakpoint_conditions,
7406         can_run_breakpoint_commands, filesystem_is_local,
7407         can_download_tracepoint, get_trace_state_variable_value,
7408         set_trace_notes, get_tib_address, use_agent, can_use_agent,
7409         record_is_replaying, record_will_replay,
7410         augmented_libraries_svr4_read>: Adjust to return bool.
7411         * aarch64-linux-nat.c: All implementations adjusted.
7412         * aix-thread.c: All implementations adjusted.
7413         * arm-linux-nat.c: All implementations adjusted.
7414         * breakpoint.c: All implementations adjusted.
7415         * bsd-kvm.c: All implementations adjusted.
7416         * bsd-uthread.c: All implementations adjusted.
7417         * corelow.c: All implementations adjusted.
7418         * ctf.c: All implementations adjusted.
7419         * darwin-nat.c: All implementations adjusted.
7420         * darwin-nat.h: All implementations adjusted.
7421         * exec.c: All implementations adjusted.
7422         * fbsd-nat.c: All implementations adjusted.
7423         * fbsd-nat.h: All implementations adjusted.
7424         * gnu-nat.c: All implementations adjusted.
7425         * gnu-nat.h: All implementations adjusted.
7426         * go32-nat.c: All implementations adjusted.
7427         * ia64-linux-nat.c: All implementations adjusted.
7428         * inf-child.c: All implementations adjusted.
7429         * inf-child.h: All implementations adjusted.
7430         * inf-ptrace.c: All implementations adjusted.
7431         * inf-ptrace.h: All implementations adjusted.
7432         * linux-nat.c: All implementations adjusted.
7433         * linux-nat.h: All implementations adjusted.
7434         * mips-linux-nat.c: All implementations adjusted.
7435         * nto-procfs.c: All implementations adjusted.
7436         * ppc-linux-nat.c: All implementations adjusted.
7437         * procfs.c: All implementations adjusted.
7438         * ravenscar-thread.c: All implementations adjusted.
7439         * record-btrace.c: All implementations adjusted.
7440         * record-full.c: All implementations adjusted.
7441         * remote-sim.c: All implementations adjusted.
7442         * remote.c: All implementations adjusted.
7443         * s390-linux-nat.c: All implementations adjusted.
7444         * sol-thread.c: All implementations adjusted.
7445         * spu-multiarch.c: All implementations adjusted.
7446         * target-delegates.c: All implementations adjusted.
7447         * target.c: All implementations adjusted.
7448         * target.h: All implementations adjusted.
7449         * tracefile-tfile.c: All implementations adjusted.
7450         * tracefile.c: All implementations adjusted.
7451         * tracefile.h: All implementations adjusted.
7452         * windows-nat.c: All implementations adjusted.
7453         * x86-linux-nat.h: All implementations adjusted.
7454         * x86-nat.h: All implementations adjusted.
7455
7456 2018-05-02  Pedro Alves  <palves@redhat.com>
7457
7458         * make-target-delegates (scan_target_h): Don't trim lines here.
7459         Replace sequences of tabs and/or whitespace with a single
7460         whitespace.
7461         (top level, parsing methods): Trim each line before processing it
7462         here.
7463
7464 2018-05-02  Pedro Alves  <palves@redhat.com>
7465             John Baldwin  <jhb@freebsd.org>
7466
7467         * target.h (enum strata) <debug_stratum>: New.
7468         (struct target_ops) <all delegation methods>: Replace by C++
7469         virtual methods, and drop "to_" prefix.  All references updated
7470         throughout.
7471         <to_shortname, to_longname, to_doc, to_data,
7472         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
7473         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
7474         virtual methods.  All references updated throughout.
7475         <can_attach, supports_terminal_ours, can_create_inferior,
7476         get_thread_control_capabilities, attach_no_wait>: New
7477         virtual methods.
7478         <insert_breakpoint, remove_breakpoint>: Now
7479         TARGET_DEFAULT_NORETURN methods.
7480         <info_proc>: Now returns bool.
7481         <to_magic>: Delete.
7482         (OPS_MAGIC): Delete.
7483         (current_target): Delete.  All references replaced by references
7484         to ...
7485         (target_stack): ... this.  New.
7486         (target_shortname, target_longname): Adjust.
7487         (target_can_run): Now a function declaration.
7488         (default_child_has_all_memory, default_child_has_memory)
7489         (default_child_has_stack, default_child_has_registers)
7490         (default_child_has_execution): Remove target_ops parameter.
7491         (complete_target_initialization): Delete.
7492         (memory_breakpoint_target): New template class.
7493         (test_target_ops): Refactor as a C++ class with virtual methods.
7494         * make-target-delegates (NAME_PART): Tighten.
7495         (POINTER_PART, CP_SYMBOL): New.
7496         (SIMPLE_RETURN_PART): Reimplement.
7497         (VEC_RETURN_PART): Expect less.
7498         (RETURN_PART, VIRTUAL_PART): New.
7499         (METHOD): Adjust to C++ virtual methods.
7500         (scan_target_h): Remove reference to C99.
7501         (dname): Output "target_ops::" prefix.
7502         (write_function_header): Adjust to output a C++ class method.
7503         (write_declaration): New.
7504         (write_delegator): Adjust to output a C++ class method.
7505         (tdname): Output "dummy_target::" prefix.
7506         (write_tdefault, write_debugmethod): Adjust to output a C++ class
7507         method.
7508         (tdefault_names, debug_names): Delete.
7509         (return_types, tdefaults, styles, argtypes_array): New.
7510         (top level): All methods are delegators.
7511         (print_class): New.
7512         (top level): Print dummy_target and debug_target classes.
7513         * target-delegates.c: Regenerate.
7514         * target-debug.h (target_debug_print_enum_info_proc_what)
7515         (target_debug_print_thread_control_capabilities)
7516         (target_debug_print_thread_info_p): New.
7517         * target.c (dummy_target): Delete.
7518         (the_dummy_target, the_debug_target): New.
7519         (target_stack): Now extern.
7520         (set_targetdebug): Push/unpush debug target.
7521         (default_child_has_all_memory, default_child_has_memory)
7522         (default_child_has_stack, default_child_has_registers)
7523         (default_child_has_execution): Remove target_ops parameter.
7524         (complete_target_initialization): Delete.
7525         (add_target_with_completer): No longer call
7526         complete_target_initialization.
7527         (target_supports_terminal_ours): Use regular delegation.
7528         (update_current_target): Delete.
7529         (push_target): No longer check magic number.  Don't call
7530         update_current_target.
7531         (unpush_target): Don't call update_current_target.
7532         (target_is_pushed): No longer check magic number.
7533         (target_require_runnable): Skip for all stratums over
7534         process_stratum.
7535         (target_ops::info_proc): New.
7536         (target_info_proc): Use find_target_at and
7537         find_default_run_target.
7538         (target_supports_disable_randomization): Use regular delegation.
7539         (target_get_osdata): Use find_target_at.
7540         (target_ops::open, target_ops::close, target_ops::can_attach)
7541         (target_ops::attach, target_ops::can_create_inferior)
7542         (target_ops::create_inferior, target_ops::can_run)
7543         (target_can_run): New.
7544         (default_fileio_target): Use regular delegation.
7545         (target_ops::fileio_open, target_ops::fileio_pwrite)
7546         (target_ops::fileio_pread, target_ops::fileio_fstat)
7547         (target_ops::fileio_close, target_ops::fileio_unlink)
7548         (target_ops::fileio_readlink): New.
7549         (target_fileio_open_1, target_fileio_unlink)
7550         (target_fileio_readlink): Always call the target method.  Handle
7551         FILEIO_ENOSYS.
7552         (return_zero, return_zero_has_execution): Delete.
7553         (init_dummy_target): Delete.
7554         (dummy_target::dummy_target, dummy_target::shortname)
7555         (dummy_target::longname, dummy_target::doc)
7556         (debug_target::debug_target, debug_target::shortname)
7557         (debug_target::longname, debug_target::doc): New.
7558         (target_supports_delete_record): Use regular delegation.
7559         (setup_target_debug): Delete.
7560         (maintenance_print_target_stack): Skip debug_stratum.
7561         (initialize_targets): Instantiate the_dummy_target and
7562         the_debug_target.
7563         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
7564         use target_stack.
7565         (target_auxv_search, fprint_target_auxv): Adjust.
7566         (info_auxv_command): Adjust to use target_stack.
7567         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
7568         * exceptions.c (print_flush): Handle a NULL target_stack.
7569         * regcache.c (target_ops_no_register): Refactor as class with
7570         virtual methods.
7571
7572         * exec.c (exec_target): New class.
7573         (exec_ops): Now an exec_target.
7574         (exec_open, exec_close_1, exec_get_section_table)
7575         (exec_xfer_partial, exec_files_info, exec_has_memory)
7576         (exec_make_note_section): Refactor as exec_target methods.
7577         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
7578         Delete.
7579         (exec_target::find_memory_regions): New.
7580         (_initialize_exec): Don't call init_exec_ops.
7581         * gdbcore.h (exec_file_clear): Delete.
7582
7583         * corefile.c (core_target): Delete.
7584         (core_file_command): Adjust.
7585         * corelow.c (core_target): New class.
7586         (the_core_target): New.
7587         (core_close): Remove target_ops parameter.
7588         (core_close_cleanup): Adjust.
7589         (core_target::close): New.
7590         (core_open, core_detach, get_core_registers, core_files_info)
7591         (core_xfer_partial, core_thread_alive, core_read_description)
7592         (core_pid_to_str, core_thread_name, core_has_memory)
7593         (core_has_stack, core_has_registers, core_info_proc): Rework as
7594         core_target methods.
7595         (ignore, core_remove_breakpoint, init_core_ops): Delete.
7596         (_initialize_corelow): Initialize the_core_target.
7597         * gdbcore.h (core_target): Delete.
7598         (the_core_target): New.
7599
7600         * ctf.c: (ctf_target): New class.
7601         (ctf_ops): Now a ctf_target.
7602         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
7603         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
7604         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
7605         methods.
7606         (init_ctf_ops): Delete.
7607         (_initialize_ctf): Don't call it.
7608         * tracefile-tfile.c (tfile_target): New class.
7609         (tfile_ops): Now a tfile_target.
7610         (tfile_open, tfile_close, tfile_files_info)
7611         (tfile_get_tracepoint_status, tfile_trace_find)
7612         (tfile_fetch_registers, tfile_xfer_partial)
7613         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
7614         Refactor as tfile_target methods.
7615         (tfile_xfer_partial_features): Remove target_ops parameter.
7616         (init_tfile_ops): Delete.
7617         (_initialize_tracefile_tfile): Don't call it.
7618         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
7619         (tracefile_has_stack, tracefile_has_registers)
7620         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
7621         tracefile_target methods.
7622         (init_tracefile_ops): Delete.
7623         (tracefile_target::tracefile_target): New.
7624         * tracefile.h: Include "target.h".
7625         (tracefile_target): New class.
7626         (init_tracefile_ops): Delete.
7627
7628         * spu-multiarch.c (spu_multiarch_target): New class.
7629         (spu_ops): Now a spu_multiarch_target.
7630         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
7631         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
7632         (spu_search_memory, spu_mourn_inferior): Refactor as
7633         spu_multiarch_target methods.
7634         (init_spu_ops): Delete.
7635         (_initialize_spu_multiarch): Remove references to init_spu_ops,
7636         complete_target_initialization.
7637
7638         * ravenscar-thread.c (ravenscar_thread_target): New class.
7639         (ravenscar_ops): Now a ravenscar_thread_target.
7640         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
7641         (ravenscar_thread_alive, ravenscar_pid_to_str)
7642         (ravenscar_fetch_registers, ravenscar_store_registers)
7643         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
7644         (ravenscar_stopped_by_hw_breakpoint)
7645         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
7646         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
7647         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
7648         methods.
7649         (init_ravenscar_thread_ops): Delete.
7650         (_initialize_ravenscar): Remove references to
7651         init_ravenscar_thread_ops and complete_target_initialization.
7652
7653         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
7654         (bsd_uthread_target): New class.
7655         (bsd_uthread_ops): Now a bsd_uthread_target.
7656         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
7657         (bsd_uthread_close, bsd_uthread_mourn_inferior)
7658         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
7659         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
7660         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
7661         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
7662         (bsd_uthread_target): Delete function.
7663         (_initialize_bsd_uthread): Remove reference to
7664         complete_target_initialization.
7665
7666         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
7667         (target_bfd): ... this new class.
7668         (target_bfd_xfer_partial, target_bfd_get_section_table)
7669         (target_bfd_close): Refactor as target_bfd methods.
7670         (target_bfd::~target_bfd): New.
7671         (target_bfd_reopen): Adjust.
7672         (target_bfd::close): New.
7673
7674         * record-btrace.c (record_btrace_target): New class.
7675         (record_btrace_ops): Now a record_btrace_target.
7676         (record_btrace_open, record_btrace_stop_recording)
7677         (record_btrace_disconnect, record_btrace_close)
7678         (record_btrace_async, record_btrace_info)
7679         (record_btrace_insn_history, record_btrace_insn_history_range)
7680         (record_btrace_insn_history_from, record_btrace_call_history)
7681         (record_btrace_call_history_range)
7682         (record_btrace_call_history_from, record_btrace_record_method)
7683         (record_btrace_is_replaying, record_btrace_will_replay)
7684         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
7685         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
7686         (record_btrace_store_registers, record_btrace_prepare_to_store)
7687         (record_btrace_to_get_unwinder)
7688         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
7689         (record_btrace_commit_resume, record_btrace_wait)
7690         (record_btrace_stop, record_btrace_can_execute_reverse)
7691         (record_btrace_stopped_by_sw_breakpoint)
7692         (record_btrace_supports_stopped_by_sw_breakpoint)
7693         (record_btrace_stopped_by_hw_breakpoint)
7694         (record_btrace_supports_stopped_by_hw_breakpoint)
7695         (record_btrace_update_thread_list, record_btrace_thread_alive)
7696         (record_btrace_goto_begin, record_btrace_goto_end)
7697         (record_btrace_goto, record_btrace_stop_replaying_all)
7698         (record_btrace_execution_direction)
7699         (record_btrace_prepare_to_generate_core)
7700         (record_btrace_done_generating_core): Refactor as
7701         record_btrace_target methods.
7702         (init_record_btrace_ops): Delete.
7703         (_initialize_record_btrace): Remove reference to
7704         init_record_btrace_ops.
7705         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
7706         the execution_direction global.
7707         (record_full_base_target, record_full_target)
7708         (record_full_core_target): New classes.
7709         (record_full_ops): Now a record_full_target.
7710         (record_full_core_ops): Now a record_full_core_target.
7711         (record_full_target::detach, record_full_target::disconnect)
7712         (record_full_core_target::disconnect)
7713         (record_full_target::mourn_inferior, record_full_target::kill):
7714         New.
7715         (record_full_open, record_full_close, record_full_async): Refactor
7716         as methods of the record_full_base_target class.
7717         (record_full_resume, record_full_commit_resume): Refactor
7718         as methods of the record_full_target class.
7719         (record_full_wait, record_full_stopped_by_watchpoint)
7720         (record_full_stopped_data_address)
7721         (record_full_stopped_by_sw_breakpoint)
7722         (record_full_supports_stopped_by_sw_breakpoint)
7723         (record_full_stopped_by_hw_breakpoint)
7724         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
7725         methods of the record_full_base_target class.
7726         (record_full_store_registers, record_full_xfer_partial)
7727         (record_full_insert_breakpoint, record_full_remove_breakpoint):
7728         Refactor as methods of the record_full_target class.
7729         (record_full_can_execute_reverse, record_full_get_bookmark)
7730         (record_full_goto_bookmark, record_full_execution_direction)
7731         (record_full_record_method, record_full_info, record_full_delete)
7732         (record_full_is_replaying, record_full_will_replay)
7733         (record_full_goto_begin, record_full_goto_end, record_full_goto)
7734         (record_full_stop_replaying): Refactor as methods of the
7735         record_full_base_target class.
7736         (record_full_core_resume, record_full_core_kill)
7737         (record_full_core_fetch_registers)
7738         (record_full_core_prepare_to_store)
7739         (record_full_core_store_registers, record_full_core_xfer_partial)
7740         (record_full_core_insert_breakpoint)
7741         (record_full_core_remove_breakpoint)
7742         (record_full_core_has_execution): Refactor
7743         as methods of the record_full_core_target class.
7744         (record_full_base_target::supports_delete_record): New.
7745         (init_record_full_ops): Delete.
7746         (init_record_full_core_ops): Delete.
7747         (record_full_save): Refactor as method of the
7748         record_full_base_target class.
7749         (_initialize_record_full): Remove references to
7750         init_record_full_ops and init_record_full_core_ops.
7751
7752         * remote.c (remote_target, extended_remote_target): New classes.
7753         (remote_ops): Now a remote_target.
7754         (extended_remote_ops): Now an extended_remote_target.
7755         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
7756         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
7757         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
7758         (remote_pass_signals, remote_set_syscall_catchpoint)
7759         (remote_program_signals, )
7760         (remote_thread_always_alive): Remove target_ops parameter.
7761         (remote_thread_alive, remote_thread_name)
7762         (remote_update_thread_list, remote_threads_extra_info)
7763         (remote_static_tracepoint_marker_at)
7764         (remote_static_tracepoint_markers_by_strid)
7765         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
7766         (remote_open): Refactor as methods of remote_target.
7767         (extended_remote_open, extended_remote_detach)
7768         (extended_remote_attach, extended_remote_post_attach):
7769         (extended_remote_supports_disable_randomization)
7770         (extended_remote_create_inferior): : Refactor as method of
7771         extended_remote_target.
7772         (remote_set_permissions, remote_open_1, remote_detach)
7773         (remote_follow_fork, remote_follow_exec, remote_disconnect)
7774         (remote_resume, remote_commit_resume, remote_stop)
7775         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
7776         (remote_terminal_ours, remote_wait, remote_fetch_registers)
7777         (remote_prepare_to_store, remote_store_registers)
7778         (remote_flash_erase, remote_flash_done, remote_files_info)
7779         (remote_kill, remote_mourn, remote_insert_breakpoint)
7780         (remote_remove_breakpoint, remote_insert_watchpoint)
7781         (remote_watchpoint_addr_within_range)
7782         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
7783         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
7784         (remote_supports_stopped_by_sw_breakpoint)
7785         (remote_stopped_by_hw_breakpoint)
7786         (remote_supports_stopped_by_hw_breakpoint)
7787         (remote_stopped_by_watchpoint, remote_stopped_data_address)
7788         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
7789         (remote_verify_memory): Refactor as methods of remote_target.
7790         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
7791         parameter.
7792         (remote_xfer_partial, remote_get_memory_xfer_limit)
7793         (remote_search_memory, remote_rcmd, remote_memory_map)
7794         (remote_pid_to_str, remote_get_thread_local_address)
7795         (remote_get_tib_address, remote_read_description): Refactor as
7796         methods of remote_target.
7797         (remote_target::fileio_open, remote_target::fileio_pwrite)
7798         (remote_target::fileio_pread, remote_target::fileio_close): New.
7799         (remote_hostio_readlink, remote_hostio_fstat)
7800         (remote_filesystem_is_local, remote_can_execute_reverse)
7801         (remote_supports_non_stop, remote_supports_disable_randomization)
7802         (remote_supports_multi_process, remote_supports_cond_breakpoints)
7803         (remote_supports_enable_disable_tracepoint)
7804         (remote_supports_string_tracing)
7805         (remote_can_run_breakpoint_commands, remote_trace_init)
7806         (remote_download_tracepoint, remote_can_download_tracepoint)
7807         (remote_download_trace_state_variable, remote_enable_tracepoint)
7808         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
7809         (remote_trace_start, remote_get_trace_status)
7810         (remote_get_tracepoint_status, remote_trace_stop)
7811         (remote_trace_find, remote_get_trace_state_variable_value)
7812         (remote_save_trace_data, remote_get_raw_trace_data)
7813         (remote_set_disconnected_tracing, remote_core_of_thread)
7814         (remote_set_circular_trace_buffer, remote_traceframe_info)
7815         (remote_get_min_fast_tracepoint_insn_len)
7816         (remote_set_trace_buffer_size, remote_set_trace_notes)
7817         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
7818         (remote_disable_btrace, remote_teardown_btrace)
7819         (remote_read_btrace, remote_btrace_conf)
7820         (remote_augmented_libraries_svr4_read, remote_load)
7821         (remote_pid_to_exec_file, remote_can_do_single_step)
7822         (remote_execution_direction, remote_thread_handle_to_thread_info):
7823         Refactor as methods of remote_target.
7824         (init_remote_ops, init_extended_remote_ops): Delete.
7825         (remote_can_async_p, remote_is_async_p, remote_async)
7826         (remote_thread_events, remote_upload_tracepoints)
7827         (remote_upload_trace_state_variables): Refactor as methods of
7828         remote_target.
7829         (_initialize_remote): Remove references to init_remote_ops and
7830         init_extended_remote_ops.
7831
7832         * remote-sim.c (gdbsim_target): New class.
7833         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
7834         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
7835         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
7836         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
7837         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
7838         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
7839         Refactor as methods of gdbsim_target.
7840         (gdbsim_ops): Now a gdbsim_target.
7841         (init_gdbsim_ops): Delete.
7842         (gdbsim_cntrl_c): Adjust.
7843         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
7844
7845         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
7846         (the_amd64_linux_nat_target): New.
7847         (amd64_linux_fetch_inferior_registers)
7848         (amd64_linux_store_inferior_registers): Refactor as methods of
7849         amd64_linux_nat_target.
7850         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
7851         * i386-linux-nat.c: Don't include "linux-nat.h".
7852         (i386_linux_nat_target): New class.
7853         (the_i386_linux_nat_target): New.
7854         (i386_linux_fetch_inferior_registers)
7855         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
7856         as methods of i386_linux_nat_target.
7857         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
7858         * inf-child.c (inf_child_ops): Delete.
7859         (inf_child_fetch_inferior_registers)
7860         (inf_child_store_inferior_registers): Delete.
7861         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
7862         methods of inf_child_target.
7863         (inf_child_target::supports_terminal_ours)
7864         (inf_child_target::terminal_init)
7865         (inf_child_target::terminal_inferior)
7866         (inf_child_target::terminal_ours_for_output)
7867         (inf_child_target::terminal_ours, inf_child_target::interrupt)
7868         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
7869         New.
7870         (inf_child_open, inf_child_disconnect, inf_child_close)
7871         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
7872         (inf_child_post_startup_inferior, inf_child_can_run)
7873         (inf_child_pid_to_exec_file): Refactor as methods of
7874         inf_child_target.
7875         (inf_child_follow_fork): Delete.
7876         (inf_child_target::can_create_inferior)
7877         (inf_child_target::can_attach): New.
7878         (inf_child_target::has_all_memory, inf_child_target::has_memory)
7879         (inf_child_target::has_stack, inf_child_target::has_registers)
7880         (inf_child_target::has_execution): New.
7881         (inf_child_fileio_open, inf_child_fileio_pwrite)
7882         (inf_child_fileio_pread, inf_child_fileio_fstat)
7883         (inf_child_fileio_close, inf_child_fileio_unlink)
7884         (inf_child_fileio_readlink, inf_child_use_agent)
7885         (inf_child_can_use_agent): Refactor as methods of
7886         inf_child_target.
7887         (return_zero, inf_child_target): Delete.
7888         (inf_child_target::inf_child_target): New.
7889         * inf-child.h: Include "target.h".
7890         (inf_child_target): Delete function prototype.
7891         (inf_child_target): New class.
7892         (inf_child_open_target, inf_child_mourn_inferior)
7893         (inf_child_maybe_unpush_target): Delete.
7894         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
7895         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
7896         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
7897         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
7898         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
7899         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
7900         (inf_ptrace_wait, inf_ptrace_xfer_partial)
7901         (inf_ptrace_thread_alive, inf_ptrace_files_info)
7902         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
7903         methods of inf_ptrace_target.
7904         (inf_ptrace_target): Delete function.
7905         * inf-ptrace.h: Include "inf-child.h".
7906         (inf_ptrace_target): Delete function declaration.
7907         (inf_ptrace_target): New class.
7908         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
7909         * linux-nat.c (linux_target): New.
7910         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
7911         (linux_nat_target::~linux_nat_target): New.
7912         (linux_child_post_attach, linux_child_post_startup_inferior)
7913         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
7914         (linux_child_remove_fork_catchpoint)
7915         (linux_child_insert_vfork_catchpoint)
7916         (linux_child_remove_vfork_catchpoint)
7917         (linux_child_insert_exec_catchpoint)
7918         (linux_child_remove_exec_catchpoint)
7919         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
7920         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
7921         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
7922         (linux_nat_stopped_data_address)
7923         (linux_nat_stopped_by_sw_breakpoint)
7924         (linux_nat_supports_stopped_by_sw_breakpoint)
7925         (linux_nat_stopped_by_hw_breakpoint)
7926         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
7927         (linux_nat_kill, linux_nat_mourn_inferior)
7928         (linux_nat_xfer_partial, linux_nat_thread_alive)
7929         (linux_nat_update_thread_list, linux_nat_pid_to_str)
7930         (linux_nat_thread_name, linux_child_pid_to_exec_file)
7931         (linux_child_static_tracepoint_markers_by_strid)
7932         (linux_nat_is_async_p, linux_nat_can_async_p)
7933         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
7934         (linux_nat_supports_multi_process)
7935         (linux_nat_supports_disable_randomization, linux_nat_async)
7936         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
7937         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
7938         (linux_nat_fileio_open, linux_nat_fileio_readlink)
7939         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
7940         methods of linux_nat_target.
7941         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
7942         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
7943         parameter.
7944         (check_stopped_by_watchpoint): Adjust.
7945         (linux_xfer_partial): Delete.
7946         (linux_target_install_ops, linux_target, linux_nat_add_target):
7947         Delete.
7948         (linux_nat_target::linux_nat_target): New.
7949         * linux-nat.h: Include "inf-ptrace.h".
7950         (linux_nat_target): New.
7951         (linux_target, linux_target_install_ops, linux_nat_add_target):
7952         Delete function declarations.
7953         (linux_target): Declare global.
7954         * linux-thread-db.c (thread_db_target): New.
7955         (thread_db_target::thread_db_target): New.
7956         (thread_db_ops): Delete.
7957         (the_thread_db_target): New.
7958         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
7959         (thread_db_update_thread_list, thread_db_pid_to_str)
7960         (thread_db_extra_thread_info)
7961         (thread_db_thread_handle_to_thread_info)
7962         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
7963         (thread_db_resume): Refactor as methods of thread_db_target.
7964         (init_thread_db_ops): Delete.
7965         (_initialize_thread_db): Remove reference to init_thread_db_ops.
7966         * x86-linux-nat.c: Don't include "linux-nat.h".
7967         (super_post_startup_inferior): Delete.
7968         (x86_linux_nat_target::~x86_linux_nat_target): New.
7969         (x86_linux_child_post_startup_inferior)
7970         (x86_linux_read_description, x86_linux_enable_btrace)
7971         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
7972         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
7973         methods of x86_linux_nat_target.
7974         (x86_linux_create_target): Delete.  Bits folded ...
7975         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
7976         pointer.
7977         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
7978         (x86_linux_nat_target): New class.
7979         (x86_linux_create_target): Delete.
7980         (x86_linux_add_target): Now takes a linux_nat_target pointer.
7981         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
7982         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
7983         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
7984         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
7985         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
7986         make extern.
7987         (x86_use_watchpoints): Delete.
7988         * x86-nat.h: Include "breakpoint.h" and "target.h".
7989         (x86_use_watchpoints): Delete.
7990         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
7991         (x86_stopped_by_watchpoint, x86_stopped_data_address)
7992         (x86_insert_watchpoint, x86_remove_watchpoint)
7993         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
7994         (x86_stopped_by_hw_breakpoint): New declarations.
7995         (x86_nat_target): New template class.
7996
7997         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
7998         (the_ppc_linux_nat_target): New.
7999         (ppc_linux_fetch_inferior_registers)
8000         (ppc_linux_can_use_hw_breakpoint)
8001         (ppc_linux_region_ok_for_hw_watchpoint)
8002         (ppc_linux_ranged_break_num_registers)
8003         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
8004         (ppc_linux_insert_mask_watchpoint)
8005         (ppc_linux_remove_mask_watchpoint)
8006         (ppc_linux_can_accel_watchpoint_condition)
8007         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
8008         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
8009         (ppc_linux_watchpoint_addr_within_range)
8010         (ppc_linux_masked_watch_num_registers)
8011         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
8012         (ppc_linux_read_description): Refactor as methods of
8013         ppc_linux_nat_target.
8014         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
8015
8016         * procfs.c (procfs_xfer_partial): Delete forward declaration.
8017         (procfs_target): New class.
8018         (the_procfs_target): New.
8019         (procfs_target): Delete function.
8020         (procfs_auxv_parse, procfs_attach, procfs_detach)
8021         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
8022         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
8023         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
8024         (procfs_create_inferior, procfs_update_thread_list)
8025         (procfs_thread_alive, procfs_pid_to_str)
8026         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
8027         (procfs_stopped_data_address, procfs_insert_watchpoint)
8028         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
8029         (proc_find_memory_regions, procfs_info_proc)
8030         (procfs_make_note_section): Refactor as methods of procfs_target.
8031         (_initialize_procfs): Adjust.
8032         * sol-thread.c (sol_thread_target): New class.
8033         (sol_thread_ops): Now a sol_thread_target.
8034         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
8035         (sol_thread_fetch_registers, sol_thread_store_registers)
8036         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
8037         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
8038         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
8039         (init_sol_thread_ops): Delete.
8040         (_initialize_sol_thread): Adjust.  Remove references to
8041         init_sol_thread_ops and complete_target_initialization.
8042
8043         * windows-nat.c (windows_nat_target): New class.
8044         (windows_fetch_inferior_registers)
8045         (windows_store_inferior_registers, windows_resume, windows_wait)
8046         (windows_attach, windows_detach, windows_pid_to_exec_file)
8047         (windows_files_info, windows_create_inferior)
8048         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
8049         (windows_close, windows_pid_to_str, windows_xfer_partial)
8050         (windows_get_tib_address, windows_get_ada_task_ptid)
8051         (windows_thread_name, windows_thread_alive): Refactor as
8052         windows_nat_target methods.
8053         (do_initial_windows_stuff): Adjust.
8054         (windows_target): Delete function.
8055         (_initialize_windows_nat): Adjust.
8056
8057         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
8058         (darwin_mourn_inferior, darwin_kill_inferior)
8059         (darwin_create_inferior, darwin_attach, darwin_detach)
8060         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
8061         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
8062         (darwin_supports_multi_process): Refactor as darwin_nat_target
8063         methods.
8064         (darwin_resume_to, darwin_files_info): Delete.
8065         (_initialize_darwin_inferior): Rename to ...
8066         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
8067         * darwin-nat.h: Include "inf-child.h".
8068         (darwin_nat_target): New class.
8069         (darwin_complete_target): Delete.
8070         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
8071         (darwin_target): New.
8072         (i386_darwin_fetch_inferior_registers)
8073         (i386_darwin_store_inferior_registers): Refactor as methods of
8074         darwin_nat_target.
8075         (darwin_complete_target): Delete, with ...
8076         (_initialize_i386_darwin_nat): ... bits factored out here.
8077
8078         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
8079         (the_alpha_linux_nat_target): New.
8080         (alpha_linux_register_u_offset): Refactor as
8081         alpha_linux_nat_target method.
8082         (_initialize_alpha_linux_nat): Adjust.
8083         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
8084         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
8085         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
8086         methods of linux_nat_trad_target.
8087         (linux_trad_target): Delete.
8088         * linux-nat-trad.h (linux_trad_target): Delete function.
8089         (linux_nat_trad_target): New class.
8090         * mips-linux-nat.c (mips_linux_nat_target): New class.
8091         (super_fetch_registers, super_store_registers, super_close):
8092         Delete.
8093         (the_mips_linux_nat_target): New.
8094         (mips64_linux_regsets_fetch_registers)
8095         (mips64_linux_regsets_store_registers)
8096         (mips64_linux_fetch_registers, mips64_linux_store_registers)
8097         (mips_linux_register_u_offset, mips_linux_read_description)
8098         (mips_linux_can_use_hw_breakpoint)
8099         (mips_linux_stopped_by_watchpoint)
8100         (mips_linux_stopped_data_address)
8101         (mips_linux_region_ok_for_hw_watchpoint)
8102         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
8103         (mips_linux_close): Refactor as methods of mips_linux_nat.
8104         (_initialize_mips_linux_nat): Adjust to C++ification.
8105
8106         * aix-thread.c (aix_thread_target): New class.
8107         (aix_thread_ops): Now an aix_thread_target.
8108         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
8109         (aix_thread_fetch_registers, aix_thread_store_registers)
8110         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
8111         (aix_thread_thread_alive, aix_thread_pid_to_str)
8112         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
8113         Refactor as methods of aix_thread_target.
8114         (init_aix_thread_ops): Delete.
8115         (_initialize_aix_thread): Remove references to init_aix_thread_ops
8116         and complete_target_initialization.
8117         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
8118         (rs6000_nat_target): New class.
8119         (the_rs6000_nat_target): New.
8120         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
8121         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
8122         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
8123         (super_create_inferior): Delete.
8124         (_initialize_rs6000_nat): Adjust to C++ification.
8125
8126         * arm-linux-nat.c (arm_linux_nat_target): New class.
8127         (the_arm_linux_nat_target): New.
8128         (arm_linux_fetch_inferior_registers)
8129         (arm_linux_store_inferior_registers, arm_linux_read_description)
8130         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
8131         (arm_linux_remove_hw_breakpoint)
8132         (arm_linux_region_ok_for_hw_watchpoint)
8133         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
8134         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
8135         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
8136         arm_linux_nat_target.
8137         (_initialize_arm_linux_nat): Adjust to C++ification.
8138
8139         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
8140         (the_aarch64_linux_nat_target): New.
8141         (aarch64_linux_fetch_inferior_registers)
8142         (aarch64_linux_store_inferior_registers)
8143         (aarch64_linux_child_post_startup_inferior)
8144         (aarch64_linux_read_description)
8145         (aarch64_linux_can_use_hw_breakpoint)
8146         (aarch64_linux_insert_hw_breakpoint)
8147         (aarch64_linux_remove_hw_breakpoint)
8148         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
8149         (aarch64_linux_region_ok_for_hw_watchpoint)
8150         (aarch64_linux_stopped_data_address)
8151         (aarch64_linux_stopped_by_watchpoint)
8152         (aarch64_linux_watchpoint_addr_within_range)
8153         (aarch64_linux_can_do_single_step): Refactor as methods of
8154         aarch64_linux_nat_target.
8155         (super_post_startup_inferior): Delete.
8156         (_initialize_aarch64_linux_nat): Adjust to C++ification.
8157
8158         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
8159         (the_hppa_linux_nat_target): New.
8160         (hppa_linux_fetch_inferior_registers)
8161         (hppa_linux_store_inferior_registers): Refactor as methods of
8162         hppa_linux_nat_target.
8163         (_initialize_hppa_linux_nat): Adjust to C++ification.
8164
8165         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
8166         (the_ia64_linux_nat_target): New.
8167         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
8168         (ia64_linux_stopped_data_address)
8169         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
8170         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
8171         ia64_linux_nat_target methods.
8172         (super_xfer_partial): Delete.
8173         (_initialize_ia64_linux_nat): Adjust to C++ification.
8174
8175         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
8176         (the_m32r_linux_nat_target): New.
8177         (m32r_linux_fetch_inferior_registers)
8178         (m32r_linux_store_inferior_registers): Refactor as
8179         m32r_linux_nat_target methods.
8180         (_initialize_m32r_linux_nat): Adjust to C++ification.
8181
8182         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
8183         (the_m68k_linux_nat_target): New.
8184         (m68k_linux_fetch_inferior_registers)
8185         (m68k_linux_store_inferior_registers): Refactor as
8186         m68k_linux_nat_target methods.
8187         (_initialize_m68k_linux_nat): Adjust to C++ification.
8188
8189         * s390-linux-nat.c (s390_linux_nat_target): New class.
8190         (the_s390_linux_nat_target): New.
8191         (s390_linux_fetch_inferior_registers)
8192         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
8193         (s390_insert_watchpoint, s390_remove_watchpoint)
8194         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
8195         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
8196         (s390_auxv_parse, s390_read_description): Refactor as methods of
8197         s390_linux_nat_target.
8198         (_initialize_s390_nat): Adjust to C++ification.
8199
8200         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
8201         (the_sparc_linux_nat_target): New.
8202         (_initialize_sparc_linux_nat): Adjust to C++ification.
8203         * sparc-nat.c (sparc_fetch_inferior_registers)
8204         (sparc_store_inferior_registers): Remove target_ops parameter.
8205         * sparc-nat.h (sparc_fetch_inferior_registers)
8206         (sparc_store_inferior_registers): Remove target_ops parameter.
8207         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
8208         (the_sparc64_linux_nat_target): New.
8209         (_initialize_sparc64_linux_nat): Adjust to C++ification.
8210
8211         * spu-linux-nat.c (spu_linux_nat_target): New class.
8212         (the_spu_linux_nat_target): New.
8213         (spu_child_post_startup_inferior, spu_child_post_attach)
8214         (spu_child_wait, spu_fetch_inferior_registers)
8215         (spu_store_inferior_registers, spu_xfer_partial)
8216         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
8217         methods.
8218         (_initialize_spu_nat): Adjust to C++ification.
8219
8220         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
8221         (the_tilegx_linux_nat_target): New.
8222         (fetch_inferior_registers, store_inferior_registers):
8223         Refactor as methods.
8224         (_initialize_tile_linux_nat): Adjust to C++ification.
8225
8226         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
8227         (the_xtensa_linux_nat_target): New.
8228         (xtensa_linux_fetch_inferior_registers)
8229         (xtensa_linux_store_inferior_registers): Refactor as
8230         xtensa_linux_nat_target methods.
8231         (_initialize_xtensa_linux_nat): Adjust to C++ification.
8232
8233         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
8234         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
8235         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
8236         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
8237         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
8238         (fbsd_stopped_by_sw_breakpoint)
8239         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
8240         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
8241         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
8242         (fbsd_post_startup_inferior, fbsd_post_attach)
8243         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
8244         (fbsd_set_syscall_catchpoint)
8245         (super_xfer_partial, super_resume, super_wait)
8246         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
8247         (fbsd_handle_debug_trap): Remove target_ops parameter.
8248         (fbsd_nat_add_target): Delete.
8249         * fbsd-nat.h: Include "inf-ptrace.h".
8250         (fbsd_nat_add_target): Delete.
8251         (USE_SIGTRAP_SIGINFO): Define.
8252         (fbsd_nat_target): New class.
8253
8254         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
8255         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
8256         (amd64bsd_target): Delete.
8257         * amd64-bsd-nat.h: New file.
8258         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
8259         "x86-bsd-nat.h".
8260         (amd64_fbsd_nat_target): New class.
8261         (the_amd64_fbsd_nat_target): New.
8262         (amd64fbsd_read_description): Refactor as method of
8263         amd64_fbsd_nat_target.
8264         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
8265         (_initialize_amd64fbsd_nat): Adjust to C++ification.
8266         * amd64-nat.h (amd64bsd_target): Delete function declaration.
8267         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
8268         (i386bsd_store_inferior_registers): Remove target_ops parameter.
8269         (i386bsd_target): Delete.
8270         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
8271         (i386bsd_fetch_inferior_registers)
8272         (i386bsd_store_inferior_registers): Declare.
8273         (i386_bsd_nat_target): New class.
8274         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
8275         (the_i386_fbsd_nat_target): New.
8276         (i386fbsd_resume, i386fbsd_read_description): Refactor as
8277         i386_fbsd_nat_target methods.
8278         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
8279         (_initialize_i386fbsd_nat): Adjust to C++ification.
8280         * x86-bsd-nat.c (super_mourn_inferior): Delete.
8281         (x86bsd_mourn_inferior, x86bsd_target): Delete.
8282         (_initialize_x86_bsd_nat): Adjust to C++ification.
8283         * x86-bsd-nat.h: Include "x86-nat.h".
8284         (x86bsd_target): Delete declaration.
8285         (x86bsd_nat_target): New class.
8286
8287         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
8288         (the_aarch64_fbsd_nat_target): New.
8289         (aarch64_fbsd_fetch_inferior_registers)
8290         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
8291         aarch64_fbsd_nat_target.
8292         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
8293         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
8294         (the_alpha_bsd_nat_target): New.
8295         (alphabsd_fetch_inferior_registers)
8296         (alphabsd_store_inferior_registers): Refactor as
8297         alpha_bsd_nat_target methods.
8298         (_initialize_alphabsd_nat): Refactor as methods of
8299         alpha_bsd_nat_target.
8300         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
8301         (the_amd64_nbsd_nat_target): New.
8302         (_initialize_amd64nbsd_nat): Adjust to C++ification.
8303         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
8304         (the_amd64_obsd_nat_target): New.
8305         (_initialize_amd64obsd_nat): Adjust to C++ification.
8306         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
8307         (the_arm_fbsd_nat_target): New.
8308         (arm_fbsd_fetch_inferior_registers)
8309         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
8310         (_initialize_arm_fbsd_nat): Refactor as methods of
8311         arm_fbsd_nat_target.
8312         (_initialize_arm_fbsd_nat): Adjust to C++ification.
8313         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
8314         (the_arm_netbsd_nat_target): New.
8315         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
8316         arm_netbsd_nat_target.
8317         (_initialize_arm_netbsd_nat): Adjust to C++ification.
8318         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
8319         (the_hppa_nbsd_nat_target): New.
8320         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
8321         hppa_nbsd_nat_target methods.
8322         (_initialize_hppanbsd_nat): Adjust to C++ification.
8323         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
8324         (the_hppa_obsd_nat_target): New.
8325         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
8326         methods of hppa_obsd_nat_target.
8327         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
8328         add_target.
8329         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
8330         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
8331         add_target.
8332         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
8333         (_initialize_i386obsd_nat): Use add_target.
8334         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
8335         (the_m68k_bsd_nat_target): New.
8336         (m68kbsd_fetch_inferior_registers)
8337         (m68kbsd_store_inferior_registers): Refactor as methods of
8338         m68k_bsd_nat_target.
8339         (_initialize_m68kbsd_nat): Adjust to C++ification.
8340         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
8341         (the_mips_fbsd_nat_target): New.
8342         (mips_fbsd_fetch_inferior_registers)
8343         (mips_fbsd_store_inferior_registers): Refactor as methods of
8344         mips_fbsd_nat_target.
8345         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
8346         add_target.
8347         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
8348         (the_mips_nbsd_nat_target): New.
8349         (mipsnbsd_fetch_inferior_registers)
8350         (mipsnbsd_store_inferior_registers): Refactor as methods of
8351         mips_nbsd_nat_target.
8352         (_initialize_mipsnbsd_nat): Adjust to C++ification.
8353         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
8354         (the_mips64_obsd_nat_target): New.
8355         (mips64obsd_fetch_inferior_registers)
8356         (mips64obsd_store_inferior_registers): Refactor as methods of
8357         mips64_obsd_nat_target.
8358         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
8359         add_target.
8360         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
8361         nbsd_nat_target.
8362         * nbsd-nat.h: Include "inf-ptrace.h".
8363         (nbsd_nat_target): New class.
8364         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
8365         (obsd_wait): Refactor as methods of obsd_nat_target.
8366         (obsd_add_target): Delete.
8367         * obsd-nat.h: Include "inf-ptrace.h".
8368         (obsd_nat_target): New class.
8369         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
8370         (the_ppc_fbsd_nat_target): New.
8371         (ppcfbsd_fetch_inferior_registers)
8372         (ppcfbsd_store_inferior_registers): Refactor as methods of
8373         ppc_fbsd_nat_target.
8374         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
8375         add_target.
8376         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
8377         (the_ppc_nbsd_nat_target): New.
8378         (ppcnbsd_fetch_inferior_registers)
8379         (ppcnbsd_store_inferior_registers): Refactor as methods of
8380         ppc_nbsd_nat_target.
8381         (_initialize_ppcnbsd_nat): Adjust to C++ification.
8382         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
8383         (the_ppc_obsd_nat_target): New.
8384         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
8385         methods of ppc_obsd_nat_target.
8386         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
8387         add_target.
8388         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
8389         (the_sh_nbsd_nat_target): New.
8390         (shnbsd_fetch_inferior_registers)
8391         (shnbsd_store_inferior_registers): Refactor as methods of
8392         sh_nbsd_nat_target.
8393         (_initialize_shnbsd_nat): Adjust to C++ification.
8394         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
8395         (inf_ptrace_xfer_partial): Delete.
8396         (sparc_xfer_partial, sparc_target): Delete.
8397         * sparc-nat.h (sparc_fetch_inferior_registers)
8398         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
8399         (sparc_target): Delete function declaration.
8400         (sparc_target): New template class.
8401         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
8402         (_initialize_sparcnbsd_nat): Adjust to C++ification.
8403         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
8404         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
8405         add_target.
8406         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
8407         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
8408         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
8409         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
8410         add_target.
8411         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
8412         (the_vax_bsd_nat_target): New.
8413         (vaxbsd_fetch_inferior_registers)
8414         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
8415         methods.
8416         (_initialize_vaxbsd_nat): Adjust to C++ification.
8417
8418         * bsd-kvm.c (bsd_kvm_target): New class.
8419         (bsd_kvm_ops): Now a bsd_kvm_target.
8420         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
8421         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
8422         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
8423         bsd_kvm_target.
8424         (bsd_kvm_return_one): Delete.
8425         (bsd_kvm_add_target): Adjust to C++ification.
8426
8427         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
8428         (nto_procfs_target_procfs): New classes.
8429         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
8430         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
8431         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
8432         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
8433         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
8434         (procfs_remove_hw_breakpoint, procfs_resume)
8435         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
8436         (procfs_kill_inferior, procfs_store_registers)
8437         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
8438         as methods of nto_procfs_target.
8439         (nto_procfs_ops): Now an nto_procfs_target_procfs.
8440         (nto_native_ops): Delete.
8441         (procfs_open, procfs_native_open): Delete.
8442         (nto_native_ops): Now an nto_procfs_target_native.
8443         (init_procfs_targets): Adjust to C++ification.
8444         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
8445         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
8446         Refactor as methods of nto_procfs_target.
8447
8448         * go32-nat.c (go32_nat_target): New class.
8449         (the_go32_nat_target): New.
8450         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
8451         (go32_store_registers, go32_xfer_partial, go32_files_info)
8452         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
8453         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
8454         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
8455         (go32_pid_to_str): Refactor as methods of go32_nat_target.
8456         (go32_target): Delete.
8457         (_initialize_go32_nat): Adjust to C++ification.
8458
8459         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
8460         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
8461         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
8462         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
8463         gnu_nat_target.
8464         (gnu_target): Delete.
8465         * gnu-nat.h (gnu_target): Delete.
8466         (gnu_nat_target): New class.
8467         * i386-gnu-nat.c (gnu_base_target): New.
8468         (i386_gnu_nat_target): New class.
8469         (the_i386_gnu_nat_target): New.
8470         (_initialize_i386gnu_nat): Adjust to C++ification.
8471
8472 2018-05-02  Pedro Alves  <palves@redhat.com>
8473
8474         * bfd-target.c (target_bfd_xclose): Rename to ...
8475         (target_bfd_close): ... this.
8476         (target_bfd_reopen): Adjust.
8477         * target.c (target_close): Remove references to to_xclose.
8478         * target.h (target_ops::to_xclose): Delete.
8479         (target_ops::to_close): Update comments.
8480
8481 2018-05-02  Pedro Alves  <palves@redhat.com>
8482
8483         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
8484         "linux-nat.h".
8485         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
8486         * inf-ptrace.c (inf_ptrace_register_u_offset)
8487         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
8488         (inf_ptrace_store_register, inf_ptrace_store_registers)
8489         (inf_ptrace_trad_target): Move to ...
8490         * linux-nat-trad.c: ... this new file.
8491         * linux-nat-trad.h: New file.
8492         * linux-nat.c (linux_target_install_ops): Make extern.
8493         (linux_trad_target): Delete.
8494         * linux-nat.h (linux_trad_target): Delete declaration.
8495         (linux_target_install_ops): Declare.
8496         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
8497         "linux-nat.h".
8498
8499 2018-05-02  Pedro Alves  <palves@redhat.com>
8500
8501         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
8502         procfs_target/add_target here.
8503         * procfs.c (procfs_target): Make static.
8504         (_initialize_procfs): Call add_target here.
8505         * procfs.h (struct target_ops): Remove forward declaration.
8506         (procfs_target): Remove declaration.
8507         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
8508
8509 2018-05-02  Pedro Alves  <palves@redhat.com>
8510
8511         * procfs.c (procfs_stopped_by_watchpoint)
8512         (procfs_insert_watchpoint, procfs_remove_watchpoint)
8513         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
8514         Forward declare.
8515         (procfs_use_watchpoints): Delete, move contents...
8516         (procfs_target): ... here.
8517         * procfs.h (procfs_use_watchpoints): Delete declaration.
8518         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
8519         procfs_use_watchpoints.
8520         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
8521         procfs_use_watchpoints.
8522
8523 2018-05-02  Tom Tromey  <tom@tromey.com>
8524
8525         PR python/20084:
8526         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
8527         and var_zuinteger_unlimited.
8528         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
8529         and PARAM_ZUINTEGER_UNLIMITED.
8530         (set_parameter_value): Handle var_zuinteger and
8531         var_zuinteger_unlimited.
8532         (add_setshow_generic): Likewise.
8533         (parmpy_init): Likewise.
8534
8535 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
8536
8537         PR rust/23124
8538         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
8539         pointer is not null before dereferencing it.
8540
8541 2018-04-30  Tom Tromey  <tom@tromey.com>
8542
8543         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
8544         is_mi_like_p.
8545
8546 2018-04-30  Tom Tromey  <tom@tromey.com>
8547
8548         * breakpoint.c (mention): Remove use of is_mi_like_p.
8549         (print_mention_ranged_breakpoint): Likewise.
8550         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
8551         of is_mi_like_p.
8552
8553 2018-04-30  Tom Tromey  <tom@tromey.com>
8554
8555         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
8556
8557 2018-04-30  Tom Tromey  <tom@tromey.com>
8558
8559         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
8560         (info_spu_event_command): Remove some uses of is_mi_like_p.
8561
8562 2018-04-30  Tom Tromey  <tom@tromey.com>
8563
8564         * python/py-framefilter.c (py_print_single_arg)
8565         (enumerate_locals, py_print_args, py_print_frame): Remove some
8566         uses of is_mi_like_p.
8567
8568 2018-04-30  Tom Tromey  <tom@tromey.com>
8569
8570         * ui-out.c: Update.
8571         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
8572         * ui-out.h (ui_out::is_mi_like_p): Now const.
8573         (ui_out::do_is_mi_like_p): Now const.
8574         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
8575
8576 2018-04-30  Tom Tromey  <tom@tromey.com>
8577
8578         * varobj.c (varobj_set_visualizer): Use new_reference.
8579         * python/python.c (gdbpy_decode_line): Use new_reference.
8580         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
8581         new_reference.
8582
8583 2018-04-30  Tom Tromey  <tom@tromey.com>
8584
8585         * varobj.c (install_new_value): Use new_reference.
8586         * value.h (value_incref): Return void.  Swap intro comment with
8587         value_decref.
8588         * value.c (set_value_parent): Use new_reference.
8589         (value_incref): Return void.  Update intro comment.
8590         (release_value): Use new_reference.
8591         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
8592
8593 2018-04-30  Tom Tromey  <tom@tromey.com>
8594
8595         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
8596         * gdb_bfd.h (new_bfd_ref): Remove.
8597         (gdb_bfd_open): Update comment.
8598         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
8599         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
8600         (gdb_bfd_fdopenr): Use new_reference.
8601         * exec.c (exec_file_attach): Use new_reference.
8602
8603 2018-04-30  Tom Tromey  <tom@tromey.com>
8604
8605         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
8606         method.
8607
8608 2018-04-30  Tom Tromey  <tom@tromey.com>
8609
8610         * jit.c (jit_read_code_entry): Use type_align.
8611         * i386-tdep.c (i386_gdbarch_init): Don't call
8612         set_gdbarch_long_long_align_bit.
8613         * gdbarch.sh: Remove long_long_align_bit.
8614         * gdbarch.c, gdbarch.h: Rebuild.
8615         * arc-tdep.c (arc_type_align): New function.
8616         (arc_gdbarch_init): Use arc_type_align.  Don't call
8617         set_gdbarch_long_long_align_bit.
8618
8619 2018-04-30  Tom Tromey  <tom@tromey.com>
8620
8621         * rust-lang.c (rust_type_alignment): Remove.
8622         (rust_composite_type): Use type_align.
8623
8624 2018-04-30  Tom Tromey  <tom@tromey.com>
8625
8626         * NEWS: Mention Type.align.
8627         * python/py-type.c (typy_get_alignof): New function.
8628         (type_object_getset): Add "alignof".
8629
8630 2018-04-30  Tom Tromey  <tom@tromey.com>
8631
8632         PR exp/17095:
8633         * NEWS: Update.
8634         * std-operator.def (UNOP_ALIGNOF): New operator.
8635         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
8636         New.
8637         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
8638         * c-lang.c (c_op_print_tab): Add alignof.
8639         * c-exp.y (ALIGNOF): New token.
8640         (exp): Add "ALIGNOF" production.
8641         (ident_tokens): Add _Alignof and alignof.
8642
8643 2018-04-30  Tom Tromey  <tom@tromey.com>
8644
8645         * i386-tdep.c (i386_type_align): New function.
8646         (i386_gdbarch_init): Update.
8647         * gdbarch.sh (type_align): New method.
8648         * gdbarch.c, gdbarch.h: Rebuild.
8649         * arch-utils.h (default_type_align): Declare.
8650         * arch-utils.c (default_type_align): New function.
8651         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
8652         (struct type) <align_log2>: New field.
8653         <instance_flags>: Now a bitfield.
8654         (TYPE_RAW_ALIGN): New macro.
8655         (type_align, type_raw_align, set_type_align): Declare.
8656         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
8657         functions.
8658         * dwarf2read.c (quirk_rust_enum): Set type alignment.
8659         (get_alignment, maybe_set_alignment): New functions.
8660         (read_structure_type, read_enumeration_type, read_array_type)
8661         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
8662         (read_subrange_type, read_base_type): Set type alignment.
8663
8664 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
8665
8666         * dwarf2read.c (read_index_from_section): Use bool.
8667
8668 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
8669
8670         PR gdb/22950
8671         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
8672         with #ifdef.
8673
8674 2018-04-29  John Reiser  <jreiser@BitWagon.com>
8675
8676         PR build/22873
8677         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
8678         last step, and do it atomically.
8679
8680 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
8681
8682         * compile/compile-c-types.c (convert_int, convert_float):
8683         Update for C FE v1.
8684
8685 2018-04-27  Tom Tromey  <tom@tromey.com>
8686
8687         PR rust/22545:
8688         * rust-lang.c (rust_inclusive_range_type_p): New function.
8689         (rust_range): Handle inclusive ranges.
8690         (rust_compute_range): Likewise.
8691         * rust-exp.y (struct rust_op) <inclusive>: New field.
8692         (DOTDOTEQ): New constant.
8693         (range_expr): Add "..=" productions.
8694         (operator_tokens): Add "..=" token.
8695         (ast_range): Add "inclusive" parameter.
8696         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
8697         ranges.
8698         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
8699         bounds values.
8700         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
8701         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
8702         Update comments.
8703         * expprint.c (print_subexp_standard): Handle new bounds values.
8704         (dump_subexp_body_standard): Likewise.
8705
8706 2018-04-27  Tom Tromey  <tom@tromey.com>
8707
8708         * configure: Rebuild.
8709         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
8710         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
8711         "OVERRIDE".
8712         (class symbol_needs_eval_context): Likewise.
8713         * dwarf2read.c (mock_mapped_index::symbol_name_count)
8714         (mock_mapped_index::symbol_name_at): Use "override".  Remove
8715         "virtual".
8716         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
8717         "override".
8718         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
8719         * aarch64-tdep.c (instruction_reader::read): Use "override".
8720         (instruction_reader_test::read): Likewise.
8721         * arm-tdep.c (instruction_reader::read): Use "override".
8722         (instruction_reader_thumb::read): Likewise.
8723
8724 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
8725
8726         PR remote/9665
8727         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
8728         instead of remote_send.
8729         (remote_send): Remove.
8730
8731 2018-04-26  Pedro Alves  <palves@redhat.com>
8732
8733         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
8734         find_function_start_sal instead of find_pc_line.
8735
8736 2018-04-26  Pedro Alves  <palves@redhat.com>
8737
8738         * breakpoint.c (set_breakpoint_location_function): Handle
8739         mst_data_gnu_ifunc.
8740         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
8741         * elfread.c (elf_symtab_read): Give data symbols with
8742         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
8743         (elf_rel_plt_read): Update comment.
8744         * linespec.c (convert_linespec_to_sals): Handle
8745         mst_data_gnu_ifunc.
8746         (minsym_found): Handle mst_data_gnu_ifunc.
8747         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
8748         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
8749         * parse.c (find_minsym_type_and_address): Handle
8750         mst_data_gnu_ifunc.
8751         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
8752         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
8753         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
8754         comment.
8755         <mst_data_gnu_ifunc>: New enumerator.
8756
8757 2018-04-26  Pedro Alves  <palves@redhat.com>
8758
8759         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
8760         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
8761         'want_trampoline' parameter by a lookup_msym_prefer parameter.
8762         Handle it.
8763         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
8764         (lookup_minimal_symbol_by_pc): Adjust.
8765         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
8766         (lookup_solib_trampoline_symbol_by_pc): Adjust.
8767         * minsyms.h (lookup_msym_prefer): New enum.
8768         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8769         parameter by a lookup_msym_prefer parameter.
8770
8771 2018-04-26  Pedro Alves  <palves@redhat.com>
8772
8773         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
8774         ends in "@plt" instead of looking at the symbol's section.
8775
8776 2018-04-26  Pedro Alves  <palves@redhat.com>
8777
8778         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
8779         all references.
8780         (find_pc_partial_function_gnu_ifunc): Rename to ...
8781         (find_pc_partial_function): ... this, and remove references to
8782         'is_gnu_ifunc_p'.
8783         (find_pc_partial_function): Delete old implementation.
8784         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
8785
8786 2018-04-26  Pedro Alves  <palves@redhat.com>
8787
8788         * linespec.c (struct bound_minimal_symbol_search_key): New.
8789         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
8790         skip first line if we found a GNU ifunc minimal symbol by name.
8791         (compare_msymbols): Change parameters to work with a destructured
8792         lhs minsym.
8793         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
8794         functions.
8795
8796 2018-04-26  Pedro Alves  <palves@redhat.com>
8797
8798         * breakpoint.c (set_breakpoint_location_function): Don't resolve
8799         ifunc targets here.  Instead, if we have an ifunc minsym, use its
8800         address/name.
8801         (add_location_to_breakpoint): Store the minsym and the objfile in
8802         the breakpoint location.
8803         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
8804         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
8805         Record the minsym in the sal.
8806         * symtab.h (symtab_and_line) <msymbol>: New field.
8807
8808 2018-04-26  Pedro Alves  <palves@redhat.com>
8809
8810         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
8811         unless we actually resolved the ifunc.
8812
8813 2018-04-26  Pedro Alves  <palves@redhat.com>
8814
8815         * c-exp.y (variable production): Prefer ifunc minsyms over
8816         regular function symbols.
8817         * symtab.c (find_gnu_ifunc): New function.
8818         * minsyms.h (lookup_msym_prefer): New enum.
8819         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8820         parameter by a lookup_msym_prefer parameter.
8821         * symtab.h (find_gnu_ifunc): New declaration.
8822
8823 2018-04-26  Pedro Alves  <palves@redhat.com>
8824
8825         * blockframe.c (find_gnu_ifunc_target_type): New function.
8826         (find_function_type): New.
8827         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
8828         return a value with a memory address.
8829         (eval_call): For calls to GNU ifunc functions, try to find the
8830         type of the target function from the type that the resolver
8831         returns.
8832         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
8833         symbols.
8834         * infcall.c (find_function_return_type): Delete.
8835         (find_function_addr): Add 'function_type' parameter.  For calls to
8836         GNU ifunc functions, try to find the type of the target function
8837         from the type that the resolver returns, and return it via
8838         FUNCTION_TYPE.
8839         (call_function_by_hand_dummy): Adjust to use the function type
8840         returned by find_function_addr.
8841         (find_function_addr): Add 'function_type' parameter and move
8842         description here.
8843         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
8844         declarations.
8845
8846 2018-04-26  Pedro Alves  <palves@redhat.com>
8847
8848         * c-exp.y (variable production): Skip finding an alias for ifunc
8849         symbols.
8850
8851 2018-04-26  Pedro Alves  <palves@redhat.com>
8852
8853         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
8854
8855 2018-04-25  Pedro Alves  <palves@redhat.com>
8856
8857         * infcmd.c (kill_command): Print the pid as string, not the whole
8858         thread's ptid.  Add comment.  s/has been killed/killed/ in output
8859         message.
8860         * remote.c (remote_detach_1): Print the pid as string, not the
8861         whole thread's ptid.
8862
8863 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
8864             Sergio Durigan Junior  <sergiodj@redhat.com>
8865             Pedro Alves  <palves@redhat.com>
8866
8867         * infcmd.c (kill_command): Print message when inferior has
8868         been killed.
8869         * inferior.c (print_inferior_events): Remove 'static'.  Set as
8870         '1'.
8871         (add_inferior): Improve message printed when
8872         'print_inferior_events' is on.
8873         (exit_inferior): Remove message printed when
8874         'print_inferior_events' is on.
8875         (detach_inferior): Improve message printed when
8876         'print_inferior_events' is on.
8877         (initialize_inferiors): Use 'add_inferior_silent' to set
8878         'current_inferior_'.
8879         * inferior.h (print_inferior_events): Declare here as
8880         'extern'.
8881         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
8882         '[Detaching...]' messages when 'print_inferior_events' is on.
8883         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
8884         as prefix/suffix for messages.  Remove periods.  Fix erroneous
8885         'Detaching after fork from child...', replace it by '... from
8886         parent...'.
8887         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
8888         prefix/suffix when printing 'Detaching...' messages.  Print
8889         them when 'print_inferior_events' is on.
8890         * remote.c (remote_detach_1): Print message when detaching
8891         from inferior and '!is_fork_parent'.
8892
8893 2018-04-24  Tom Tromey  <tom@tromey.com>
8894
8895         * cli-out.h: Reindent.
8896
8897 2018-04-24  Tom Tromey  <tom@tromey.com>
8898
8899         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
8900         (cli_ui_out::do_field_string): Use fputs_filtered.
8901         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
8902
8903 2018-04-23  Tom Tromey  <tom@tromey.com>
8904
8905         * guile/scm-frame.c (gdbscm_frame_read_var): Use
8906         gdb::unique_xmalloc_ptr.
8907
8908 2018-04-23  Tom Tromey  <tom@tromey.com>
8909
8910         * configure: Rebuild.
8911
8912 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
8913
8914         PR gdb/23095
8915         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
8916         prepare_for_testing.  Set normal_bp to r_debug_state if target
8917         is bsd.
8918
8919 2018-04-21  Pedro Alves  <palves@redhat.com>
8920             Rajendra SY  <rajendra.sy@gmail.com>
8921
8922         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
8923         * remote.c (extended_remote_attach): In all-stop mode, mark the
8924         thread as executing.
8925
8926 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8927
8928         * thread.c (thread_apply_all_command): Fix comment.
8929         (thread_command): Fix comment.
8930
8931 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
8932
8933         * common/tdesc.h (tdesc_create_feature): Remove xml filename
8934         parameter.
8935         * features/aarch64-core.c (create_feature_aarch64_core):
8936         Regenerate.
8937         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
8938         Likewise.
8939         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
8940         Likewise.
8941         * features/i386/32bit-avx512.c
8942         (create_feature_i386_32bit_avx512): Likewise.
8943         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
8944         Likewise.
8945         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
8946         Likewise.
8947         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
8948         Likewise.
8949         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
8950         Likewise.
8951         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
8952         Likewise.
8953         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
8954         Likewise.
8955         * features/i386/64bit-avx512.c
8956         (create_feature_i386_64bit_avx512): Likewise.
8957         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
8958         Likewise.
8959         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
8960         Likewise.
8961         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
8962         Likewise.
8963         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
8964         Likewise.
8965         * features/i386/64bit-segments.c
8966         (create_feature_i386_64bit_segments): Likewise.
8967         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
8968         Likewise.
8969         * features/i386/x32-core.c
8970         (create_feature_i386_x32_core): Likewise.
8971         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
8972         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
8973         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
8974         * target-descriptions.c: In generated code, don't pass xml
8975         filename.
8976
8977 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8978
8979         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
8980         (print_xml_feature::visit_post): Likewise.
8981         (print_xml_feature::visit): Likewise.
8982         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
8983         (print_xml_feature): Add new class.
8984         * regformats/regdat.sh: Null xmltarget on feature targets.
8985         * target-descriptions.c (struct target_desc): Add xmltarget.
8986         (maintenance_check_tdesc_xml_convert): Add unittest function.
8987         (tdesc_get_features_xml): Add function to get xml.
8988         (maintenance_check_xml_descriptions): Test xml generation.
8989         * xml-tdesc.c (string_read_description_xml): Add function.
8990         * xml-tdesc.h (string_read_description_xml): Add declaration.
8991
8992 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8993
8994         * features/Makefile: Add feature marker to targets with new style
8995         target descriptions.
8996         * regformats/aarch64.dat: Regenerate.
8997         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
8998         * regformats/i386/amd64-avx-linux.dat: Likewise.
8999         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
9000         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
9001         * regformats/i386/amd64-linux.dat: Likewise.
9002         * regformats/i386/amd64-mpx-linux.dat: Likewise.
9003         * regformats/i386/amd64.dat: Likewise.
9004         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
9005         * regformats/i386/i386-avx-linux.dat: Likewise.
9006         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
9007         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
9008         * regformats/i386/i386-linux.dat: Likewise.
9009         * regformats/i386/i386-mmx-linux.dat: Likewise.
9010         * regformats/i386/i386-mpx-linux.dat: Likewise.
9011         * regformats/i386/i386.dat: Likewise.
9012         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
9013         * regformats/i386/x32-avx-linux.dat: Likewise.
9014         * regformats/i386/x32-linux.dat: Likewise.
9015         * regformats/tic6x-c62x-linux.dat: Likewise.
9016         * regformats/tic6x-c64x-linux.dat: Likewise.
9017         * regformats/tic6x-c64xp-linux.dat: Likewise.
9018         * regformats/regdat.sh: Parse feature marker.
9019
9020 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9021
9022         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
9023         (tdesc_osabi_name): Likewise.
9024         * target-descriptions.c (tdesc_architecture_name): Add new
9025         function.
9026         (tdesc_osabi_name): Likewise.
9027
9028 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9029
9030         * common/tdesc.c (tdesc_predefined_type): Move to here.
9031         (tdesc_named_type): Likewise.
9032         (tdesc_create_vector): Likewise.
9033         (tdesc_create_struct): Likewise.
9034         (tdesc_set_struct_size): Likewise.
9035         (tdesc_create_union): Likewise.
9036         (tdesc_create_flags): Likewise.
9037         (tdesc_create_enum): Likewise.
9038         (tdesc_add_field): Likewise.
9039         (tdesc_add_typed_bitfield): Likewise.
9040         (tdesc_add_bitfield): Likewise.
9041         (tdesc_add_flag): Likewise.
9042         (tdesc_add_enum_value): Likewise.
9043         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
9044         (struct tdesc_type_vector): Likewise.
9045         (struct tdesc_type_field): Likewise.
9046         (struct tdesc_type_with_fields): Likewise.
9047         (tdesc_create_enum): Add declaration.
9048         (tdesc_add_typed_bitfield): Likewise.
9049         (tdesc_add_enum_value): Likewise.
9050         * target-descriptions.c (tdesc_type_field): Move from here.
9051         (tdesc_type_builtin): Likewise.
9052         (tdesc_type_vector): Likewise.
9053         (tdesc_type_with_fields): Likewise.
9054         (tdesc_predefined_types): Likewise.
9055         (tdesc_named_type): Likewise.
9056         (tdesc_create_vector): Likewise.
9057         (tdesc_create_struct): Likewise.
9058         (tdesc_set_struct_size): Likewise.
9059         (tdesc_create_union): Likewise.
9060         (tdesc_create_flags): Likewise.
9061         (tdesc_create_enum): Likewise.
9062         (tdesc_add_field): Likewise.
9063         (tdesc_add_typed_bitfield): Likewise.
9064         (tdesc_add_bitfield): Likewise.
9065         (tdesc_add_flag): Likewise.
9066         (tdesc_add_enum_value): Likewise.
9067         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
9068         (tdesc_add_typed_bitfield): Likewise.
9069         (tdesc_add_enum_value): Likewise.
9070
9071 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9072
9073         * common/tdesc.c (tdesc_feature::accept): Move to here.
9074         (tdesc_feature::operator==): Likewise.
9075         (tdesc_create_reg): Likewise.
9076         * common/tdesc.h (tdesc_type_kind): Likewise.
9077         (struct tdesc_type): Likewise.
9078         (struct tdesc_feature): Likewise.
9079         * regformats/regdat.sh: Create a feature.
9080         * target-descriptions.c (tdesc_type_kind): Move from here.
9081         (tdesc_type): Likewise.
9082         (tdesc_type_up): Likewise.
9083         (tdesc_feature): Likewise.
9084         (tdesc_create_reg): Likewise.
9085
9086 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9087
9088         * Makefile.in: Add arch/tdesc.c
9089         * common/tdesc.c: New file.
9090         * common/tdesc.h (tdesc_element_visitor): Move to here.
9091         (tdesc_element): Likewise.
9092         (tdesc_reg): Likewise.
9093         (tdesc_reg_up): Likewise.
9094         * regformats/regdef.h (reg): Add offset to constructors.
9095         * target-descriptions.c (tdesc_element_visitor): Move from here.
9096         (tdesc_element): Likewise.
9097         (tdesc_reg): Likewise.
9098         (tdesc_reg_up): Likewise.
9099
9100 2018-04-17  Tom Tromey  <tom@tromey.com>
9101
9102         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
9103         discriminant field.
9104
9105 2018-04-17  Tom Tromey  <tom@tromey.com>
9106
9107         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
9108
9109 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9110
9111         * symtab.c (print_symbol_info): Skip printing filename and line
9112         number when `last' is NULL.
9113         (symtab_symbol_info): Use empty string instead of NULL for first
9114         invocation of print_symbol_info.
9115         (rbreak_command): Pass NULL to `last' parameter of
9116         print_symbol_info.
9117
9118 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
9119
9120         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
9121         instead of nullptr.
9122
9123 2018-04-16  Pedro Alves  <palves@redhat.com>
9124
9125         * MAINTAINERS (sh): Remove.
9126         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
9127         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
9128         (ALLDEPFILES): Remove sh64-tdep.c.
9129         * NEWS: Mentions that support for SH-5/SH64 is removed.
9130         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
9131         (sh*-*-openbsd*): Ditto.
9132         (sh64-*-elf*): Remove.
9133         (sh*): Remove.
9134         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
9135         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
9136         * sh-tdep.c: No longer include "sh64-tdep.h".
9137         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
9138         * sh64-tdep.c, sh64-tdep.h: Remove files.
9139
9140 2018-04-16  Pedro Alves  <palves@redhat.com>
9141
9142         * MAINTAINERS: Remove m88k.
9143         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
9144         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
9145         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
9146         * NEWS: Mention that support for m88k was removed.
9147         * configure.host (m88*-*-*): Remove support.
9148         * configure.nat (m88k-*-*): Remove support.
9149         * configure.tgt (m88*-*-openbsd*): Remove.
9150         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
9151
9152 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
9153
9154         * configure.tgt (x86_tobjs): New variable.
9155         (amd64_tobjs, i386_tobjs): Use it.
9156
9157 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9158
9159         * symtab.c (print_symbol_info): Precede the symbol definition by
9160         the line number when available.
9161         * NEWS: Advertise this enhancement.
9162
9163 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
9164
9165         * NEWS (New options): announce set/show record btrace cpu.
9166         * btrace.c: Include record-btrace.h.
9167         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
9168         the vendor is unknown.
9169         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
9170         Maybe overwrite the btrace configuration's cpu.
9171         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
9172         (btrace_fetch): Add cpu parameter.  Update callers.
9173         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
9174         Maybe overwrite the btrace configuration's cpu.  Skip enabling
9175         errata workarounds if the vendor is unknown.
9176         * python/py-record-btrace.c: Include record-btrace.h.
9177         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
9178         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
9179         * record-btrace.c (record_btrace_cpu_state_kind): New.
9180         (record_btrace_cpu): New.
9181         (set_record_btrace_cpu_cmdlist): New.
9182         (record_btrace_get_cpu): New.
9183         (require_btrace_thread, record_btrace_info)
9184         (record_btrace_resume_thread): Call record_btrace_get_cpu.
9185         (cmd_set_record_btrace_cpu_none): New.
9186         (cmd_set_record_btrace_cpu_auto): New.
9187         (cmd_set_record_btrace_cpu): New.
9188         (cmd_show_record_btrace_cpu): New.
9189         (_initialize_record_btrace): Initialize set/show record btrace cpu
9190         commands.
9191         * record-btrace.h (record_btrace_get_cpu): New.
9192
9193 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
9194
9195         * record.c (set_record_command): Fix typo in message.
9196
9197 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
9198
9199         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
9200
9201 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
9202
9203         * infrun.c (process_event_stop_test): Call
9204         gdbarch_in_indirect_branch_thunk.
9205         * gdbarch.sh (in_indirect_branch_thunk): New.
9206         * gdbarch.c: Regenerated.
9207         * gdbarch.h: Regenerated.
9208         * x86-tdep.h: New.
9209         * x86-tdep.c: New.
9210         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
9211         (HFILES_NO_SRCDIR): Add x86-tdep.h.
9212         (ALLDEPFILES): Add x86-tdep.c.
9213         * arch-utils.h (default_in_indirect_branch_thunk): New.
9214         * arch-utils.c (default_in_indirect_branch_thunk): New.
9215         * i386-tdep: Include x86-tdep.h.
9216         (i386_in_indirect_branch_thunk): New.
9217         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
9218         function.
9219         * amd64-tdep: Include x86-tdep.h.
9220         (amd64_in_indirect_branch_thunk): New.
9221         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
9222
9223 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
9224
9225         PR gdb/23053
9226         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
9227         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
9228         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
9229         regression.
9230
9231 2018-04-12  Tom Tromey  <tom@tromey.com>
9232
9233         * rust-lang.c (rust_print_struct_def): Remove univariant code.
9234         (rust_evaluate_subexp): Likewise.
9235
9236 2018-04-12  Pedro Alves  <palves@redhat.com>
9237
9238         * procfs.c (procfs_detach): Make forward declaration's prototype
9239         match definition's protototype.
9240         (proc_get_LDT_entry): Remove stale do_cleanups call.
9241
9242 2018-04-12  Pedro Alves  <palves@redhat.com>
9243
9244         * target.h (target_ops::to_has_exited): Delete.
9245         (target_has_exited): Delete.
9246         * target-delegates.c: Regenerate.
9247
9248 2018-04-11  Pedro Alves  <palves@redhat.com>
9249
9250         * target.c (fileio_fh_t::t): Add comment.
9251         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
9252         (target_fileio_close): Handle a NULL target.
9253         (invalidate_fileio_fh): New.
9254         (target_close): Call it.
9255         * remote.c (remote_hostio_send_command): No longer check whether
9256         remote_desc is open.
9257
9258 2018-04-11  Pedro Alves  <palves@redhat.com>
9259
9260         * target.c (fileio_fh_t): Make it a named struct instead of a
9261         typedef.
9262         (fileio_fh_t::is_closed): New method.
9263         (DEF_VEC_O (fileio_fh_t)): Remove.
9264         (fileio_fhandles): Now a std::vector.
9265         (is_closed_fileio_fh): Delete.
9266         (acquire_fileio_fd): Adjust.  Rename parameters.
9267         (release_fileio_fd): Adjust.
9268         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
9269         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
9270         (target_fileio_close): Adjust.
9271
9272 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
9273
9274         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
9275         index.
9276
9277 2018-04-10  Pedro Alves  <palves@redhat.com>
9278
9279         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
9280         (scoped_finish_thread_state): New class.
9281         * infcmd.c (run_command_1): Use it instead of finish_thread_state
9282         cleanup.
9283         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
9284         (fetch_inferior_event, normal_stop): Likewise.
9285         * thread.c (finish_thread_state_cleanup): Delete.
9286
9287 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9288             Pedro Alves  <palves@redhat.com>
9289
9290         * value.c: Include "selftest.h" and "common/array-view.h".
9291         (struct range) <operator ==>: New.
9292         (test_ranges_contain): New.
9293         (check_ranges_vector): New.
9294         (test_insert_into_bit_range_vector): New.
9295         (_initialize_values): Register selftests.
9296         * common/array-view.h (operator==, operator!=): New.
9297
9298 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9299
9300         * common/gdb_vecs.h (unordered_remove): Add overload that takes
9301         an iterator.
9302         * inline-frame.c: Include <algorithm>.
9303         (struct inline_state): Add constructor.
9304         (inline_state_s): Remove.
9305         (DEF_VEC_O(inline_state_s)): Remove.
9306         (inline_states): Change type to std::vector.
9307         (find_inline_frame_state): Adjust to std::vector.
9308         (allocate_inline_frame_state): Remove.
9309         (clear_inline_frame_state): Adjust to std::vector.
9310         (skip_inline_frames): Adjust to std::vector.
9311
9312 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9313
9314         * tracepoint.h (struct trace_state_variable): Add constructor.
9315         <name>: Change type to std::string.
9316         * tracepoint.c (tsv_s): Remove.
9317         (DEF_VEC_O(tsv_s)): Remove.
9318         (tvariables): Change to std::vector.
9319         (create_trace_state_variable): Adjust to std::vector.
9320         (find_trace_state_variable): Likewise.
9321         (find_trace_state_variable_by_number): Likewise.
9322         (delete_trace_state_variable): Likewise.
9323         (trace_variable_command): Adjust to std::string.
9324         (delete_trace_variable_command): Likewise.
9325         (tvariables_info_1): Adjust to std::vector.
9326         (save_trace_state_variables): Likewise.
9327         (start_tracing): Likewise.
9328         (merge_uploaded_trace_state_variables): Adjust to std::vector
9329         and std::string.
9330         * target.h (struct target_ops)
9331         <to_download_trace_state_variable>: Pass reference to
9332         trace_state_variable.
9333         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
9334         * target-delegates.c: Re-generate.
9335         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
9336         (mi_tsv_deleted): Likewise.
9337         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
9338         * remote.c (remote_download_trace_state_variable): Change
9339         pointer to reference and adjust.
9340         * make-target-delegates (parse_argtypes): Handle references.
9341         (write_function_header): Likewise.
9342         (munge_type): Likewise.
9343
9344 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9345
9346         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9347         string_view-selftests.c.
9348         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
9349         testsuite.
9350         * unittests/basic_string_view/cons/char/1.cc: Likewise.
9351         * unittests/basic_string_view/cons/char/2.cc: Likewise.
9352         * unittests/basic_string_view/cons/char/3.cc: Likewise.
9353         * unittests/basic_string_view/element_access/char/1.cc:
9354         Likewise.
9355         * unittests/basic_string_view/element_access/char/empty.cc:
9356         Likewise.
9357         * unittests/basic_string_view/element_access/char/front_back.cc:
9358         Likewise.
9359         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
9360         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
9361         Likewise.
9362         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
9363         Likewise.
9364         * unittests/basic_string_view/modifiers/swap/char/1.cc:
9365         Likewise.
9366         * unittests/basic_string_view/operations/compare/char/1.cc:
9367         Likewise.
9368         * unittests/basic_string_view/operations/compare/char/13650.cc:
9369         Likewise.
9370         * unittests/basic_string_view/operations/copy/char/1.cc:
9371         Likewise.
9372         * unittests/basic_string_view/operations/data/char/1.cc:
9373         Likewise.
9374         * unittests/basic_string_view/operations/find/char/1.cc:
9375         Likewise.
9376         * unittests/basic_string_view/operations/find/char/2.cc:
9377         Likewise.
9378         * unittests/basic_string_view/operations/find/char/3.cc:
9379         Likewise.
9380         * unittests/basic_string_view/operations/find/char/4.cc:
9381         Likewise.
9382         * unittests/basic_string_view/operations/rfind/char/1.cc:
9383         Likewise.
9384         * unittests/basic_string_view/operations/rfind/char/2.cc:
9385         Likewise.
9386         * unittests/basic_string_view/operations/rfind/char/3.cc:
9387         Likewise.
9388         * unittests/basic_string_view/operations/substr/char/1.cc:
9389         Likewise.
9390         * unittests/basic_string_view/operators/char/2.cc: Likewise.
9391         * unittests/string_view-selftests.c: New file.
9392
9393 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9394
9395         * unittests/basic_string_view/capacity/1.cc: New file.
9396         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
9397         * unittests/basic_string_view/cons/char/1.cc: New file.
9398         * unittests/basic_string_view/cons/char/2.cc: New file.
9399         * unittests/basic_string_view/cons/char/3.cc: New file.
9400         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
9401         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
9402         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
9403         * unittests/basic_string_view/element_access/char/1.cc: New file.
9404         * unittests/basic_string_view/element_access/char/2.cc: New file.
9405         * unittests/basic_string_view/element_access/char/empty.cc: New file.
9406         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
9407         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
9408         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
9409         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
9410         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
9411         * unittests/basic_string_view/include.cc: New file.
9412         * unittests/basic_string_view/inserters/char/1.cc: New file.
9413         * unittests/basic_string_view/inserters/char/2.cc: New file.
9414         * unittests/basic_string_view/inserters/char/3.cc: New file.
9415         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
9416         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
9417         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
9418         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
9419         * unittests/basic_string_view/literals/types.cc: New file.
9420         * unittests/basic_string_view/literals/values.cc: New file.
9421         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
9422         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
9423         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
9424         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
9425         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
9426         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
9427         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
9428         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
9429         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
9430         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
9431         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
9432         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
9433         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
9434         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
9435         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
9436         * unittests/basic_string_view/operations/data/char/1.cc: New file.
9437         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
9438         * unittests/basic_string_view/operations/find/char/1.cc: New file.
9439         * unittests/basic_string_view/operations/find/char/2.cc: New file.
9440         * unittests/basic_string_view/operations/find/char/3.cc: New file.
9441         * unittests/basic_string_view/operations/find/char/4.cc: New file.
9442         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
9443         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
9444         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
9445         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
9446         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
9447         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
9448         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
9449         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
9450         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
9451         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
9452         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
9453         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
9454         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
9455         * unittests/basic_string_view/operators/char/2.cc: New file.
9456         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
9457         * unittests/basic_string_view/range_access/char/1.cc: New file.
9458         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
9459         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
9460         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
9461         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
9462         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
9463         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
9464         * unittests/basic_string_view/requirements/typedefs.cc: New file.
9465         * unittests/basic_string_view/typedefs.cc: New file.
9466         * unittests/basic_string_view/types/1.cc: New file.
9467
9468 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9469
9470         * common/gdb_string_view.h: Remove libstdc++ implementation
9471         details, adjust to gdb reality.
9472         * common/gdb_string_view.tcc: Likewise.
9473         * cli/cli-script.c (struct string_view): Remove.
9474         (user_args) <m_args>: Change element type to gdb::string_view.
9475         (user_args::insert_args): Adjust.
9476
9477 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9478
9479         * common/gdb_string_view.h: New file.
9480         * common/gdb_string_view.tcc: New file.
9481
9482 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9483
9484         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
9485         * configure: Re-generate.
9486
9487 2018-04-09  Pedro Alves  <palves@redhat.com>
9488
9489         * gdbarch.sh: Include "observable.h" instead of "observer.h".
9490         (set_target_gdbarch): Call
9491         gdb::observers::architecture_changed.notify instead of
9492         observer_notify_architecture_changed.
9493
9494 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9495
9496         * tracepoint.c (struct current_traceframe_cleanup): Remove.
9497         (do_restore_current_traceframe_cleanup): Remove.
9498         (restore_current_traceframe_cleanup_dtor): Remove.
9499         (make_cleanup_restore_current_traceframe): Remove.
9500         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
9501         New.
9502         * tracepoint.h (struct scoped_restore_current_traceframe): New.
9503         * infrun.c (fetch_inferior_event): Use
9504         scoped_restore_current_traceframe.
9505
9506 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9507
9508         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
9509         Remove.
9510         <n_allocated_type_units>: Remove.
9511         <all_type_units>: Change to std::vector.
9512         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
9513         to std::vector change.
9514         (dwarf2_per_objfile::get_cutu): Likewise.
9515         (dwarf2_per_objfile::get_tu): Likewise.
9516         (create_signatured_type_table_from_index): Likewise.
9517         (create_signatured_type_table_from_debug_names): Likewise.
9518         (dw2_symtab_iter_next): Likewise.
9519         (dw2_print_stats): Likewise.
9520         (dw2_expand_all_symtabs): Likewise.
9521         (dw2_expand_marked_cus): Likewise.
9522         (dw2_debug_names_iterator::next): Likewise.
9523         (dwarf2_initialize_objfile): Likewise.
9524         (add_signatured_type_cu_to_table): Likewise.
9525         (create_all_type_units): Likewise.
9526         (add_type_unit): Likewise.
9527         (struct tu_abbrev_offset): Add constructor.
9528         (build_type_psymtabs_1): Adjust to std::vector change.
9529         (print_tu_stats): Likewise.
9530         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9531         (write_debug_names): Likewise.
9532
9533 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9534
9535         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
9536         Make an std::vector.
9537         <n_comp_units>: Remove.
9538         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
9539         to std::vector change.
9540         (dwarf2_per_objfile::get_cutu): Likewise.
9541         (dwarf2_per_objfile::get_cu): Likewise.
9542         (create_cus_from_index): Likewise.
9543         (create_addrmap_from_index): Likewise.
9544         (create_addrmap_from_aranges): Likewise.
9545         (dwarf2_read_index): Likewise.
9546         (dw2_find_last_source_symtab): Likewise.
9547         (dw2_map_symtabs_matching_filename): Likewise.
9548         (dw2_symtab_iter_next): Likewise.
9549         (dw2_print_stats): Likewise.
9550         (dw2_expand_all_symtabs): Likewise.
9551         (dw2_expand_symtabs_with_fullname): Likewise.
9552         (dw2_expand_marked_cus): Likewise.
9553         (dw2_map_symbol_filenames): Likewise.
9554         (create_cus_from_debug_names): Likewise.
9555         (dwarf2_read_debug_names): Likewise.
9556         (dw2_debug_names_iterator::next): Likewise.
9557         (dwarf2_initialize_objfile): Likewise.
9558         (set_partial_user): Likewise.
9559         (dwarf2_build_psymtabs_hard): Likewise.
9560         (read_comp_units_from_section): Remove arguments, adjust to
9561         std::vector change.
9562         (create_all_comp_units): Adjust to std::vector and
9563         read_comp_units_from_section changes.
9564         (dwarf2_find_containing_comp_unit): Adjust to std::vector
9565         change.
9566         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9567         (psyms_seen_size): Likewise.
9568         (write_gdbindex): Likewise.
9569         (write_debug_names): Likewise.
9570
9571 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9572
9573         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
9574         with dwarf2_per_objfile.
9575         (create_cus_from_index): Likewise.
9576         (create_signatured_type_table_from_index): Likewise.
9577         (dwarf2_read_index): Likewise.
9578         (dwarf2_initialize_objfile): Likewise.
9579         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
9580         per_cu rather than get_dwarf2_per_objfile.
9581
9582 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9583
9584         * dwarf2read.h (struct signatured_type): Forward declare.
9585         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
9586         New methods.
9587         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
9588         (dw2_get_cutu): ...this.
9589         (dwarf2_per_objfile::get_cu): Rename from...
9590         (dw2_get_cu): ...this.
9591         (dwarf2_per_objfile::get_tu): New.
9592         (create_addrmap_from_index): Adjust.
9593         (create_addrmap_from_aranges): Adjust.
9594         (dw2_find_last_source_symtab): Adjust.
9595         (dw2_map_symtabs_matching_filename): Adjust.
9596         (dw2_symtab_iter_next): Adjust.
9597         (dw2_print_stats): Adjust.
9598         (dw2_expand_all_symtabs): Adjust.
9599         (dw2_expand_symtabs_with_fullname): Adjust.
9600         (dw2_expand_marked_cus): Adjust.
9601         (dw_expand_symtabs_matching_file_matcher): Adjust.
9602         (dw2_map_symbol_filenames): Adjust.
9603         (dw2_debug_names_iterator::next): Adjust.
9604         (dwarf2_initialize_objfile): Adjust.
9605         (set_partial_user): Adjust.
9606         (dwarf2_build_psymtabs_hard): Adjust.
9607
9608 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9609
9610         * dwarf2read.c (create_signatured_type_table_from_debug_names):
9611         Remove unused variables.
9612         (dw2_map_symtabs_matching_filename): Likewise.
9613         (dwarf2_record_block_ranges): Likewise.
9614         (dwarf2_read_addr_index): Likewise.
9615         (follow_die_offset): Likewise.
9616
9617 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9618
9619         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
9620         to symbol_file_add_main.
9621
9622 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9623
9624         PR mi/22299
9625         * mi/mi-console.c (do_fputc_async_safe): New.
9626         (mi_console_file::write_async_safe): New.
9627         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
9628         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
9629         New.
9630         * ui-file.c (ui_file::putstrn): Adjust call to
9631         fputstrn_unfiltered.
9632         * utils.c (printchar): Replace do_fputs and do_fprintf
9633         parameters by do_fputc.
9634         (fputstr_filtered): Adjust call to printchar.
9635         (fputstr_unfiltered): Likewise.
9636         (fputstrn_filtered): Likewise.
9637         (fputstrn_unfiltered): Add do_fputc parameter, pass to
9638         printchar.
9639         * utils.h (do_fputc_ftype): New typedef.
9640         (fputstrn_unfiltered): Add do_fputc parameter.
9641
9642 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9643
9644         * regformats/i386/i386-avx.dat: Remove.
9645
9646 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
9647
9648         PR gdb/22979
9649         * amd64-tdep.c (amd64_none_init_abi): New function.
9650         (amd64_x32_none_init_abi): New function.
9651         (_initialize_amd64_tdep): Register handlers for x86-64 and
9652         x64_32 with GDB_OSABI_NONE.
9653         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
9654         GDB_OSABI_NONE osabi.
9655
9656 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
9657
9658         PR gdb/22980
9659         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
9660         GDB_OSABI_NONE.
9661         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
9662         * osabi.c (gdb_osabi_names): Add "unknown" entry.
9663
9664 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
9665
9666         * common/byte-vector.h (char_vector): New type.
9667         * target.h (target_read_alloc): Return
9668         gdb::optional<byte_vector>.
9669         (target_read_stralloc): Return gdb::optional<char_vector>.
9670         (target_get_osdata): Return gdb::optional<char_vector>.
9671         * target.c (target_read_alloc_1): Templatize.  Replacement
9672         manual memory management with vector.
9673         (target_read_alloc): Change return type, adjust.
9674         (target_read_stralloc): Change return type, adjust.
9675         (target_get_osdata): Change return type, adjust.
9676         * auxv.c (struct auxv_info) <length>: Remove.
9677         <data>: Change type to gdb::optional<byte_vector>.
9678         (auxv_inferior_data_cleanup): Free auxv_info with delete.
9679         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
9680         (target_auxv_search): Adjust.
9681         (fprint_target_auxv): Adjust.
9682         * avr-tdep.c (avr_io_reg_read_command): Adjust.
9683         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
9684         (linux_make_corefile_notes): Adjust.
9685         * osdata.c (get_osdata): Adjust.
9686         * remote.c (remote_get_threads_with_qxfer): Adjust.
9687         (remote_memory_map): Adjust.
9688         (remote_traceframe_info): Adjust.
9689         (btrace_read_config): Adjust.
9690         (remote_read_btrace): Adjust.
9691         (remote_pid_to_exec_file): Adjust.
9692         * solib-aix.c (solib_aix_get_library_list): Adjust.
9693         * solib-dsbt.c (decode_loadmap): Don't free buf.
9694         (dsbt_get_initial_loadmaps): Adjust.
9695         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
9696         * solib-target.c (solib_target_current_sos): Adjust.
9697         * tracepoint.c (sdata_make_value): Adjust.
9698         * xml-support.c (xinclude_start_include): Adjust.
9699         (xml_fetch_content_from_file): Adjust.
9700         * xml-support.h (xml_fetch_another): Change return type.
9701         (xml_fetch_content_from_file): Change return type.
9702         * xml-syscall.c (xml_init_syscalls_info): Adjust.
9703         * xml-tdesc.c (file_read_description_xml): Adjust.
9704         (fetch_available_features_from_target): Change return type.
9705         (target_fetch_description_xml): Adjust.
9706         (target_read_description_xml): Adjust.
9707
9708 2018-04-06  Tom Tromey  <tom@tromey.com>
9709
9710         * value.c (~value): Update.
9711         (struct value) <contents>: Now unique_xmalloc_ptr.
9712         (value_contents_bits_eq, allocate_value_contents)
9713         (value_contents_raw, value_contents_all_raw)
9714         (value_contents_for_printing, value_contents_for_printing_const)
9715         (set_value_enclosing_type): Update.
9716
9717 2018-04-06  Tom Tromey  <tom@tromey.com>
9718
9719         * value.c (range_s): Remove typedef, VEC.
9720         (struct range): Add operator<.
9721         (range_lessthan): Remove.
9722         (ranges_contain): Change type.
9723         (~value): Update.
9724         (struct value) <unavailable, optimized_out>: Now std::vector.
9725         (value_entirely_available)
9726         (value_entirely_covered_by_range_vector)
9727         (value_entirely_unavailable, value_entirely_optimized_out):
9728         Update.
9729         (insert_into_bit_range_vector): Change argument type.
9730         (find_first_range_overlap): Likewise.
9731         (struct ranges_and_idx, value_contents_bits_eq)
9732         (require_not_optimized_out, require_available): Update.
9733         (ranges_copy_adjusted): Change argument types.
9734         (value_optimized_out, value_copy, value_fetch_lazy): Update.
9735
9736 2018-04-06  Tom Tromey  <tom@tromey.com>
9737
9738         * value.c (~value): Update.
9739         (struct value) <parent>: Now a value_ref_ptr.
9740         (value_parent, set_value_parent, value_address, value_copy):
9741         Update.
9742
9743 2018-04-06  Tom Tromey  <tom@tromey.com>
9744
9745         * value.c (struct value): Add constructor, destructor, and member
9746         initializers.
9747         (allocate_value_lazy, value_decref): Update.
9748
9749 2018-04-06  Tom Tromey  <tom@tromey.com>
9750
9751         * value.c (struct value) <released, next>: Remove.
9752         (all_values): Now a std::vector.
9753         (allocate_value_lazy): Update.
9754         (value_next): Remove.
9755         (value_mark, value_free_to_mark, release_value)
9756         (value_release_to_mark): Update.
9757
9758 2018-04-06  Tom Tromey  <tom@tromey.com>
9759
9760         * value.h (fetch_subexp_value, value_release_to_mark): Update.
9761         (free_value_chain): Remove.
9762         * value.c (free_value_chain): Remove.
9763         (value_release_to_mark): Return a std::vector.
9764         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
9765         std::vector.
9766         (check_condition): Update.
9767         * eval.c (fetch_subexp_value): Change "val_chain" to a
9768         std::vector.
9769         * breakpoint.c (update_watchpoint): Update.
9770         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
9771
9772 2018-04-06  Tom Tromey  <tom@tromey.com>
9773
9774         * value.h (free_all_values): Remove.
9775         * value.c (free_all_values): Remove.
9776
9777 2018-04-06  Tom Tromey  <tom@tromey.com>
9778
9779         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
9780         (value_history_chain, value_history_count): Remove.
9781         (value_history): New global.
9782         (record_latest_value, access_value_history, show_values)
9783         (preserve_values): Update.
9784
9785 2018-04-06  Tom Tromey  <tom@tromey.com>
9786
9787         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
9788         * varobj.c (varobj_set_display_format, varobj_set_value)
9789         (install_default_visualizer, construct_visualizer)
9790         (install_new_value, ~varobj, varobj_get_value_type)
9791         (my_value_of_variable, varobj_editable_p): Update.
9792         * c-varobj.c (c_describe_child, c_value_of_variable)
9793         (cplus_number_of_children, cplus_describe_child): Update.
9794         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
9795         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
9796         (ada_value_of_variable, ada_value_is_changeable_p): Update.
9797
9798 2018-04-06  Tom Tromey  <tom@tromey.com>
9799
9800         * printcmd.c (last_examine_address): Change type to
9801         value_ref_ptr.
9802         (do_examine, x_command): Update.
9803
9804 2018-04-06  Tom Tromey  <tom@tromey.com>
9805
9806         * value.c (release_value): Update.
9807         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
9808         (struct bpstats) <val>: Now a value_ref_ptr.
9809         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9810         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9811         (~watchpoint, print_it_watchpoint, watch_command_1)
9812         (invalidate_bp_value_on_memory_change): Update.
9813
9814 2018-04-06  Tom Tromey  <tom@tromey.com>
9815
9816         * varobj.c (varobj_clear_saved_item)
9817         (update_dynamic_varobj_children, install_new_value, ~varobj):
9818         Update.
9819         * value.h (value_incref): Move declaration earlier.
9820         (value_decref): Rename from value_free.
9821         (struct value_ref_policy): New.
9822         (value_ref_ptr): New typedef.
9823         (struct value_deleter): Remove.
9824         (gdb_value_up): Remove typedef.
9825         (release_value): Change return type.
9826         (release_value_or_incref): Remove.
9827         * value.c (set_value_parent): Update.
9828         (value_incref): Change return type.
9829         (value_decref): Rename from value_free.
9830         (value_free_to_mark, free_all_values, free_value_chain): Update.
9831         (release_value): Return value_ref_ptr.
9832         (release_value_or_incref): Remove.
9833         (record_latest_value, set_internalvar, clear_internalvar):
9834         Update.
9835         * stack.c (info_frame_command): Don't call value_free.
9836         * python/py-value.c (valpy_dealloc, valpy_new)
9837         (value_to_value_object): Update.
9838         * printcmd.c (do_examine): Update.
9839         * opencl-lang.c (lval_func_free_closure): Update.
9840         * mi/mi-main.c (register_changed_p): Don't call value_free.
9841         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
9842         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
9843         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
9844         value_free.
9845         * guile/scm-value.c (vlscm_free_value_smob)
9846         (vlscm_scm_from_value): Update.
9847         * frame.c (frame_register_unwind, frame_unwind_register_signed)
9848         (frame_unwind_register_unsigned, get_frame_register_bytes)
9849         (put_frame_register_bytes): Don't call value_free.
9850         * findvar.c (address_from_register): Don't call value_free.
9851         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
9852         * dwarf2loc.c (entry_data_value_free_closure)
9853         (value_of_dwarf_reg_entry, free_pieced_value_closure)
9854         (dwarf2_evaluate_loc_desc_full): Update.
9855         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9856         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9857         (~watchpoint, watch_command_1)
9858         (invalidate_bp_value_on_memory_change): Update.
9859         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
9860
9861 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
9862
9863         PR gdb/23022
9864         * warning.m4: Add -Wno-error=deprecated-register.
9865         * configure: Re-generate.
9866
9867 2018-04-05  Tom Tromey  <tom@tromey.com>
9868
9869         * linespec.h: Remove include of "vec.h".
9870
9871 2018-04-05  Tom Tromey  <tom@tromey.com>
9872
9873         * linespec.c (typep): Remove typedef.
9874         (find_methods, find_superclass_methods): Take a std::vector.
9875         (find_method): Use std::vector.
9876
9877 2018-04-05  Tom Tromey  <tom@tromey.com>
9878
9879         * utils.c (compare_strings): Remove.
9880         * utils.h (compare_strings): Remove.
9881         * objc-lang.h (find_imps): Update.
9882         * objc-lang.c (find_methods): Take a std::vector.
9883         (uniquify_strings, find_imps): Likewise.
9884         * linespec.c (find_methods): Take a std::vector.
9885         (decode_objc): Use std::vector.
9886         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
9887         a std::vector.
9888         (find_method, find_function_symbols): Use std::vector.
9889
9890 2018-04-05  Tom Tromey  <tom@tromey.com>
9891
9892         * completer.c (completion_tracker::completion_tracker): Remove
9893         cast.
9894         (completion_tracker::discard_completions): Likewise.
9895         * breakpoint.c (ambiguous_names_p): Remove cast.
9896         * ada-lang.c (_initialize_ada_language): Remove cast.
9897         * utils.h (streq): Update.
9898         (streq_hash): Add new declaration.
9899         * utils.c (streq): Return bool.
9900         (streq_hash): New function.
9901
9902 2018-04-05  Tom Tromey  <tom@tromey.com>
9903
9904         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
9905         Remove a string copy.
9906
9907 2018-04-05  Tom Tromey  <tom@tromey.com>
9908
9909         * linespec.c (filter_results): Use std::vector.
9910         (decode_line_2, decode_line_full): Update.
9911
9912 2018-04-05  Tom Tromey  <tom@tromey.com>
9913
9914         * linespec.c (canonical_to_fullform): Return std::string.
9915         (filter_results): Update.
9916         (struct decode_line_2_item): Add constructor.
9917         <fullform, displayform>: Now std::string.
9918         (decode_line_2_compare_items): Now a std::sort comparator.
9919         (decode_line_2): Update.
9920
9921 2018-04-05  Tom Tromey  <tom@tromey.com>
9922
9923         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
9924         (unexpected_linespec_error): Update.
9925         (linespec_parse_basic, parse_linespec): Update.
9926
9927 2018-04-05  Tom Tromey  <tom@tromey.com>
9928
9929         * linespec.c (linespec_parse_basic): Reindent.
9930
9931 2018-04-05  Tom Tromey  <tom@tromey.com>
9932
9933         * minsyms.h (iterate_over_minimal_symbols): Update.
9934         * minsyms.c (iterate_over_minimal_symbols): Take a
9935         gdb::function_view.
9936         * linespec.c (struct collect_minsyms): Remove.
9937         (compare_msyms): Now a std::sort comparator.
9938         (add_minsym): Add parameters.
9939         (search_minsyms_for_name): Update.  Use std::vector.
9940
9941 2018-04-03  Tom Tromey  <tom@tromey.com>
9942
9943         * mipsread.c (read_alphacoff_dynamic_symtab): Use
9944         gdb::byte_vector.
9945
9946 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
9947
9948         * MAINTAINERS (Write After Approval): Add Weimin Pan.
9949
9950 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
9951
9952         PR gdb/16959
9953         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
9954         printing static type.
9955
9956 2018-04-01  Tom Tromey  <tom@tromey.com>
9957
9958         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
9959         (rs6000_xfer_shared_libraries): Update.
9960
9961 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
9962
9963         * common/gdb_vecs.h (char_ptr): Remove.
9964         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
9965
9966 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
9967
9968         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
9969         with std::vector.
9970         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
9971
9972 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
9973
9974         * tracepoint.h (struct uploaded_tp): Initialize fields.
9975         <actions, step_actions, cmd_strings>: Change type to
9976         std::vector<char *>.
9977         * tracepoint.c (get_uploaded_tp): Allocate with new.
9978         (free_uploaded_tps): Free with delete.
9979         (parse_tracepoint_definition): Adjust to std::vector change.
9980         * breakpoint.c (read_uploaded_action): Likewise.
9981         (create_tracepoint_from_upload): Likewise.
9982         * ctf.c (ctf_write_uploaded_tp): Likewise.
9983         (SET_ARRAY_FIELD): Likewise.
9984         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
9985
9986 2018-03-30  Tom Tromey  <tom@tromey.com>
9987
9988         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
9989         std::unique_ptr.
9990         (svr4_keep_data_in_core): Update.
9991         (svr4_read_so_list): Update.
9992
9993 2018-03-30  Tom Tromey  <tom@tromey.com>
9994
9995         * windows-nat.c (handle_output_debug_string, handle_exception):
9996         Update.
9997         * target.h (target_read_string): Update.
9998         * target.c (target_read_string): Change "string" to
9999         unique_xmalloc_ptr.
10000         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
10001         Update.
10002         * solib-frv.c (frv_current_sos): Update.
10003         * solib-dsbt.c (dsbt_current_sos): Update.
10004         * solib-darwin.c (darwin_current_sos): Update.
10005         * linux-thread-db.c (inferior_has_bug): Update.
10006         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
10007         Update.  Remove alloca.
10008         * ada-lang.c (ada_main_name): Update.
10009
10010 2018-03-30  Tom Tromey  <tom@tromey.com>
10011
10012         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
10013         (struct dwo_file_deleter): New.
10014         (dwo_file_up): New typedef.
10015         (open_and_init_dwo_file): Use dwo_file_up.
10016         (free_dwo_file_cleanup): Remove.
10017
10018 2018-03-30  Tom Tromey  <tom@tromey.com>
10019
10020         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
10021         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
10022
10023 2018-03-30  Tom Tromey  <tom@tromey.com>
10024
10025         * dwarf2read.c (class free_cached_comp_units): New class.
10026         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
10027         (free_cached_comp_units): Remove function.
10028
10029 2018-03-30  Tom Tromey  <tom@tromey.com>
10030
10031         * utils.h (make_cleanup_unpush_target): Remove.
10032         * inf-ptrace.c (struct target_unpusher): New.
10033         (target_unpush_up) New typedef.
10034         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
10035         target_unpush_up.
10036         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
10037
10038 2018-03-27  Tom Tromey  <tom@tromey.com>
10039
10040         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
10041
10042 2018-03-27  Pedro Alves  <palves@redhat.com>
10043             Tom Tromey  <tom@tromey.com>
10044
10045         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
10046         destructor.  Now a class.
10047         (gdb_readline_wrapper_cleanup): Remove function.
10048         (gdb_readline_wrapper): Remove cleanups.
10049
10050 2018-03-27  Tom Tromey  <tom@tromey.com>
10051
10052         * typeprint.h (struct type_print_options) <local_typedefs,
10053         global_typedefs>: Remove "struct" keyword.
10054         (class typedef_hash_table): New class.
10055         (recursively_update_typedef_hash, add_template_parameters)
10056         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
10057         (find_typedef_in_hash): Don't declare.
10058         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
10059         (typedef_hash_table::recursively_update): Rename from
10060         recursively_update_typedef_hash.  Now a member.
10061         (typedef_hash_table::add_template_parameters): Rename from
10062         add_template_parameters.  Now a member.
10063         (typedef_hash_table::typedef_hash_table): Now a constructor;
10064         rename from create_typedef_hash.
10065         (typedef_hash_table::~typedef_hash_table): Now a destructor;
10066         rename from free_typedef_hash.
10067         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
10068         (do_free_global_table): Remove.
10069         (typedef_hash_table::typedef_hash_table): New constructor; renamed
10070         from copy_type_recursive.
10071         (create_global_typedef_table): Remove.
10072         (typedef_hash_table::find_global_typedef): Now a member of
10073         typedef_hash_table.
10074         (typedef_hash_table::find_typedef): Rename from
10075         find_typedef_in_hash; now a member.
10076         (whatis_exp): Update.
10077         * extension.h (struct ext_lang_type_printers): Add constructor and
10078         destructor.
10079         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
10080         declare.
10081         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
10082         Now a constructor; rename from start_ext_lang_type_printers.
10083         (ext_lang_type_printers): Now a destructor; rename from
10084         free_ext_lang_type_printers.
10085         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
10086         Update.
10087         (c_type_print_base_struct_union): Update.  Remove cleanups.
10088
10089 2018-03-27  Tom Tromey  <tom@tromey.com>
10090
10091         * dwarf-index-write.c: Include <cmath>.
10092
10093 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
10094
10095         * NEWS: Add entry describing new "set|show varsize-limit" command.
10096         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
10097         command.
10098         * printcmd.c (_initialize_printcmd): Add "set var" alias of
10099         "set variable".
10100
10101 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
10102
10103         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
10104         dwarf-index-write.c
10105         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
10106         * dwarf-index-common.c: New file.
10107         * dwarf-index-common.h: New file.
10108         * dwarf-index-write.c: New file.
10109         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
10110         (struct dwarf2_section_info): Move from here.
10111         (dwarf2_section_info_def): Likewise.
10112         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
10113         (offset_type): Likewise.
10114         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
10115         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
10116         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
10117         (byte_swap): Likewise.
10118         (MAYBE_SWAP): Likewise.
10119         (dwarf2_per_cu_ptr): Likewise.
10120         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
10121         (struct tu_stats): Likewise.
10122         (struct dwarf2_per_objfile): Likewise.
10123         (struct dwarf2_per_cu_data): Likewise.
10124         (struct signatured_type): Likewise.
10125         (sig_type_ptr): Likewise.
10126         (DEF_VEC_P (sig_type_ptr)): Likewise.
10127         (INDEX4_SUFFIX): Likewise.
10128         (INDEX5_SUFFIX): Likewise.
10129         (DEBUG_STR_SUFFIX): Likewise.
10130         (dwarf2_read_section): Make non-static.
10131         (mapped_index_string_hash): Move from here.
10132         (dwarf5_djb_hash): Likewise.
10133         (file_write): Likewise.
10134         (class data_buf): Likewise.
10135         (struct symtab_index_entry): Likewise.
10136         (struct mapped_symtab): Likewise.
10137         (find_slot): Likewise.
10138         (hash_expand): Likewise.
10139         (add_index_entry): Likewise.
10140         (uniquify_cu_indices): Likewise.
10141         (class c_str_view): Likewise.
10142         (class c_str_view_hasher): Likewise.
10143         (class vector_hasher): Likewise.
10144         (write_hash_table): Likewise.
10145         (psym_index_map): Likewise.
10146         (struct addrmap_index_data): Likewise.
10147         (add_address_entry): Likewise.
10148         (add_address_entry_worker): Likewise.
10149         (write_address_map): Likewise.
10150         (symbol_kind): Likewise.
10151         (write_psymbols): Likewise.
10152         (struct signatured_type_index_data): Likewise.
10153         (write_one_signatured_type): Likewise.
10154         (recursively_count_psymbols): Likewise.
10155         (recursively_write_psymbols): Likewise.
10156         (class debug_names): Likewise.
10157         (check_dwarf64_offsets): Likewise.
10158         (psyms_seen_size): Likewise.
10159         (write_gdbindex): Likewise.
10160         (write_debug_names): Likewise.
10161         (assert_file_size): Likewise.
10162         (write_psymtabs_to_index): Likewise.
10163         (save_gdb_index_command): Likewise.
10164         (_initialize_dwarf2_read): Don't register the "save gdb-index"
10165         command.
10166         * dwarf2read.h: New file.
10167
10168 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
10169
10170         PR gdb/22670
10171         * dwarf2read.c (dwarf2_physname): Do not return the demangled
10172         symbol name if the CU's language stores symbol names in linkage
10173         format.
10174         * language.h (struct language_defn)
10175         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
10176         all instances of this struct.
10177
10178 2018-03-26  Tom Tromey  <tom@tromey.com>
10179
10180         * stack.c (backtrace_command_1): Remove verbose code.
10181
10182 2018-03-26  Tom Tromey  <tom@tromey.com>
10183
10184         * python/py-framefilter.c (py_print_type): Don't catch
10185         exceptions.  Return void.
10186         (py_print_value): Likewise.
10187         (py_print_single_arg): Likewise.
10188         (enumerate_args): Don't catch exceptions.
10189         (py_print_args): Likewise.
10190         (py_print_frame): Likewise.
10191         (gdbpy_apply_frame_filter): Catch exceptions here.
10192
10193 2018-03-26  Tom Tromey  <tom@tromey.com>
10194
10195         * stack.c (_initialize_stack): Remove trailing newlines from help
10196         text.  Add "Usage" line to "backtrace" help.
10197
10198 2018-03-26  Tom Tromey  <tom@tromey.com>
10199
10200         PR python/16486:
10201         * python/py-framefilter.c (py_print_args): Call wrap_hint.
10202
10203 2018-03-26  Tom Tromey  <tom@tromey.com>
10204
10205         * python/py-framefilter.c (py_print_single_arg): Return
10206         EXT_LANG_BT_ERROR from catch.
10207
10208 2018-03-26  Tom Tromey  <tom@tromey.com>
10209
10210         PR backtrace/15584:
10211         * stack.c (backtrace_command_1): Move some code into no-filters
10212         "if".
10213
10214 2018-03-26  Tom Tromey  <tom@tromey.com>
10215
10216         * python/py-framefilter.c (throw_quit_or_print_exception): New
10217         function.
10218         (gdbpy_apply_frame_filter): Use it.
10219
10220 2018-03-26  Tom Tromey  <tom@tromey.com>
10221
10222         PR cli/17716:
10223         * python/py-framefilter.c (py_print_type, py_print_value)
10224         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
10225         RETURN_MASK_ERROR.
10226
10227 2018-03-26  Tom Tromey  <tom@tromey.com>
10228
10229         * python/py-framefilter.c (enumerate_args): Use
10230         gdb::unique_xmalloc_ptr.
10231
10232 2018-03-26  Tom Tromey  <tom@tromey.com>
10233
10234         * python/py-framefilter.c (py_print_frame): Return
10235         EXT_LANG_BT_OK.
10236         (gdbpy_apply_frame_filter): Update comment.
10237         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
10238         Remove.
10239         <EXT_LANG_BT_NO_FILTERS>: Change value.
10240
10241 2018-03-26  Tom Tromey  <tom@tromey.com>
10242
10243         PR backtrace/15582:
10244         * stack.c (backtrace_command): Parse "hide" argument.
10245         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
10246         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
10247         constant.
10248
10249 2018-03-26  Tom Tromey  <tom@tromey.com>
10250
10251         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
10252         add "flags".
10253         (backtrace_command): Remove "fulltrace", add "flags".
10254
10255 2018-03-26  Tom Tromey  <tom@tromey.com>
10256
10257         * stack.c (backtrace_command): Rewrite command line parsing.
10258
10259 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
10260
10261         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
10262
10263 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
10264
10265         * filename-seen-cache.h: Add include guard.
10266
10267 2018-03-26  Keith Seitz  <keiths@redhat.com>
10268
10269         * symfile.c (place_section): Remove "struct" from section_addr_info
10270         in comment.
10271         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
10272         "struct" keyword from section_addr_info.
10273
10274 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
10275
10276         * regformats/regdef.h (reg): Add constructors.
10277
10278 2018-03-25  Pedro Alves  <palves@redhat.com>
10279
10280         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
10281         if then/else bodies in var_func_name extraction.
10282
10283 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
10284
10285         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
10286         lookup_minimal_symbol() to find symbol entry.
10287         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
10288
10289 2018-03-23  Keith Seitz  <keiths@redhat.com>
10290
10291         PR c++/22968
10292         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
10293         nested type definitions for C++, too.
10294
10295 2018-03-23  Tom Tromey  <tom@tromey.com>
10296
10297         * machoread.c (struct oso_el): Add a constructor.  Don't define as
10298         a typedef.
10299         (macho_register_oso): Remove.
10300         (macho_symtab_read): Take a std::vector.
10301         (oso_el_compare_name): Now a std::sort comparator.
10302         (macho_symfile_read_all_oso): Take a std::vector.
10303         (macho_symfile_read): Use std::vector.  Remove cleanups.
10304
10305 2018-03-22  Tom Tromey  <tom@tromey.com>
10306
10307         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
10308         (record_full_goto_bookmark): Use std::string.
10309
10310 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
10311
10312         PR tdep/18295
10313         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
10314         a single mask.
10315
10316 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
10317
10318         * rs6000-tdep.c (store_insn_p): New function.
10319         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
10320         and cr_reg to their unshifted values. Use store_insn_p to
10321         match LR saves using either R1 or fdata->alloca_reg. Use
10322         store_insn_p to match CR saves. Set alloca_reg_offset
10323         when alloca_reg and framep are set. Remove lr_reg shift
10324         when assigning to fdata->lr_register.
10325
10326 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10327
10328         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
10329         command line args instead of emitting a warning.
10330
10331 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
10332
10333         * tracepoint.h (struct static_tracepoint_marker): Initialize
10334         fields, define default constructor, move constructor and move
10335         assignment, disable the rest.
10336         <str_id, extra>: Make std::string.
10337         (release_static_tracepoint_marker): Remove.
10338         (free_current_marker): Remove.
10339         * tracepoint.c (free_current_marker): Remove.
10340         (parse_static_tracepoint_marker_definition): Adjust to
10341         std::string, use new hex2str overload.
10342         (release_static_tracepoint_marker): Remove.
10343         (print_one_static_tracepoint_marker): Get marker by reference
10344         and adjust to std::string.
10345         (info_static_tracepoint_markers_command): Adjust to std::vector
10346         changes
10347         * target.h (static_tracepoint_marker_p): Remove typedef.
10348         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
10349         (struct target_ops) <to_static_tracepoint_marker_at>: Return
10350         bool.
10351         <to_static_tracepoint_markers_by_strid>: Return std::vector.
10352         * target-debug.h
10353         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
10354         (target_debug_print_std_vector_static_tracepoint_marker): New.
10355         (target_debug_print_struct_static_tracepoint_marker_p): Rename
10356         to...
10357         (target_debug_print_static_tracepoint_marker_p): ... this.
10358         * target-delegates.c: Re-generate.
10359         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
10360         Make std::string.
10361         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
10362         (decode_static_tracepoint_spec): Adjust to std::vector.
10363         (tracepoint_print_one_detail): Adjust to std::string.
10364         (strace_marker_decode_location): Adjust to std::string.
10365         (update_static_tracepoint): Adjust to std::string, remove call
10366         to release_static_tracepoint_marker.
10367         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
10368         Adjust to std::vector.
10369         * remote.c (remote_static_tracepoint_marker_at): Return bool.
10370         (remote_static_tracepoint_markers_by_strid): Adjust to
10371         std::vector.
10372         * common/rsp-low.h (hex2str): New overload with explicit count
10373         of bytes.
10374         * common/rsp-low.c (hex2str): New overload with explicit count
10375         of bytes.
10376         * unittests/rsp-low-selftests.c (test_hex2str): New function.
10377         (_initialize_rsp_low_selftests): Add test_hex2str test.
10378         * unittests/tracepoint-selftests.c
10379         (test_parse_static_tracepoint_marker_definition): Adjust to
10380         std::string.
10381
10382 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
10383
10384         * tracepoint.c (parse_static_tracepoint_marker_definition):
10385         Consider case where the definition is followed by more
10386         definitions.
10387         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10388         tracepoint-selftests.c.
10389         * unittests/tracepoint-selftests.c: New.
10390
10391 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
10392
10393         * MAINTAINERS (Write After Approval): Add Pedro Franco de
10394         Carvalho.
10395
10396 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
10397
10398         * symtab.c (find_pc_sect_line): fixed indentation.
10399
10400 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
10401
10402         * symtab.c (find_pc_sect_line): now uses binary search.
10403
10404 2018-03-19  Tom Tromey  <tom@tromey.com>
10405
10406         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
10407         "IDENT" production.
10408
10409 2018-03-19  Pedro Alves  <palves@redhat.com>
10410             Tom Tromey  <tom@tromey.com>
10411
10412         * unittests/observable-selftests.c: New file.
10413         * common/observable.h: New file.
10414         * observable.h: New file.
10415         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
10416         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
10417         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
10418         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
10419         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
10420         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
10421         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
10422         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
10423         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
10424         python/py-breakpoint.c, python/py-finishbreakpoint.c,
10425         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
10426         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
10427         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
10428         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
10429         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
10430         tui/tui-interp.c, valops.c: Update all users.
10431         * tui/tui-hooks.c (tui_bp_created_observer)
10432         (tui_bp_deleted_observer, tui_bp_modified_observer)
10433         (tui_inferior_exit_observer, tui_before_prompt_observer)
10434         (tui_normal_stop_observer, tui_register_changed_observer):
10435         Remove.
10436         (tui_observers_token): New global.
10437         (attach_or_detach, tui_attach_detach_observers): New functions.
10438         (tui_install_hooks, tui_remove_hooks): Use
10439         tui_attach_detach_observers.
10440         * record-btrace.c (record_btrace_thread_observer): Remove.
10441         (record_btrace_thread_observer_token): New global.
10442         * observer.sh: Remove.
10443         * observer.c: Rename to observable.c.
10444         * observable.c (namespace gdb_observers): Define new objects.
10445         (observer_debug): Move into gdb_observers namespace.
10446         (struct observer, struct observer_list, xalloc_observer_list_node)
10447         (xfree_observer_list_node, generic_observer_attach)
10448         (generic_observer_detach, generic_observer_notify): Remove.
10449         (_initialize_observer): Update.
10450         Don't include observer.inc.
10451         * Makefile.in (generated_files): Remove observer.h, observer.inc.
10452         (clean mostlyclean): Likewise.
10453         (observer.h, observer.inc): Remove targets.
10454         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
10455         (COMMON_SFILES): Use observable.c, not observer.c.
10456         * .gitignore: Remove observer.h.
10457
10458 2018-03-18  Tom Tromey  <tom@tromey.com>
10459
10460         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
10461         gdb::def_vector.
10462         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
10463
10464 2018-03-17  Tom Tromey  <tom@tromey.com>
10465
10466         * auto-load.c (auto_load_objfile_script_1): Use std::string.
10467
10468 2018-03-17  Tom Tromey  <tom@tromey.com>
10469
10470         * target.c (class scoped_target_fd): New.
10471         (target_fileio_close_cleanup): Remove.
10472         (target_fileio_read_alloc_1): Use scoped_target_fd.
10473
10474 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
10475
10476         * silent-rules.mk: New.
10477         * Makefile.in: Include silent-rules.mk
10478         (srcdir, VPATH, top_srcdir): Move up.
10479         (COMPILE): Add ECHO_CXX.
10480         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
10481         (init.c): Add ECHO_INIT_C.
10482         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
10483         (version.c): Add ECHO_GEN.
10484         (printcmd.o): Add ECHO_CXX.
10485         (target-float.o): Add ECHO_CXX.
10486         (ada-exp.o): Add ECHO_CXX.
10487         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
10488         (insight$(EXEEXT)): Add ECHO_CXXLD.
10489         * gnulib/configure.ac: Add AM_SILENT_RULES.
10490         * gnulib/aclocal.m4: Re-generate.
10491         * gnulib/configure: Re-generate.
10492         * gnulib/import/Makefile.in: Re-generate.
10493
10494 2018-03-16  Tom Tromey  <tom@tromey.com>
10495
10496         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
10497         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
10498         * utils.c (do_free_section_addr_info)
10499         (make_cleanup_free_section_addr_info): Remove.
10500         * symfile.h (struct other_sections): Add constructor.
10501         (struct section_addr_info): Remove.
10502         (section_addr_info): New typedef.
10503         (struct sym_fns) <sym_offsets>: Change type of parameter.
10504         (build_section_addr_info_from_objfile)
10505         (relative_addr_info_to_section_offsets, addr_info_make_relative)
10506         (default_symfile_offsets, symbol_file_add)
10507         (symbol_file_add_from_bfd)
10508         (build_section_addr_info_from_section_table): Update.
10509         (alloc_section_addr_info, free_section_addr_info): Don't declare.
10510         * symfile.c (alloc_section_addr_info): Remove.
10511         (build_section_addr_info_from_section_table): Change return type.
10512         Update.
10513         (build_section_addr_info_from_bfd)
10514         (build_section_addr_info_from_objfile): Likewise.
10515         (free_section_addr_info): Remove.
10516         (relative_addr_info_to_section_offsets): Change type of "addrs".
10517         (addrs_section_compar): Now a std::sort comparator.
10518         (addrs_section_sort): Change return type.
10519         (addr_info_make_relative): Change type of "addrs".  Update.
10520         (default_symfile_offsets, syms_from_objfile_1)
10521         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
10522         (symbol_file_add_separate): Update.
10523         (symbol_file_add): Change type of "addrs".  Update.
10524         (add_symbol_file_command): Update.  Remove cleanups.
10525         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
10526         cleanups.
10527         * symfile-debug.c (debug_sym_offsets): Change type of "info".
10528         * solib.c (solib_read_symbols): Update.
10529         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
10530         * machoread.c (macho_symfile_offsets): Update.
10531         * jit.c (jit_bfd_try_read_symtab): Update.
10532
10533 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
10534
10535         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10536         unittests/utils-selftests.c.
10537         * unittests/utils-selftests.c: New file.
10538
10539 2018-03-14  Tom Tromey  <tom@tromey.com>
10540
10541         PR cli/14977:
10542         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
10543         for NULL.
10544
10545 2018-03-14  Tom Tromey  <tom@tromey.com>
10546
10547         PR cli/19918:
10548         * printcmd.c (printf_pointer): Allow "-" in format.
10549
10550 2018-03-14  Tom Tromey  <tom@tromey.com>
10551
10552         * printcmd.c (_initialize_printcmd): Add usage to printf.
10553
10554 2018-03-14  Yao Qi  <qiyao@sourceware.org>
10555
10556         * MAINTAINERS: Update my email address.
10557
10558 2018-03-13  Tom Tromey  <tom@tromey.com>
10559
10560         * machoread.c (macho_check_dsym): Change filenamep to a
10561         std::string*.
10562         (macho_symfile_read): Update.
10563         * symfile.c (load_command): Use std::string.
10564
10565 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
10566
10567         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
10568         to error message string.
10569         (riscv_register_name): Use xsnprintf instead of sprintf.
10570         (riscv_insn::fetch_instruction): Use gdb_assert instead of
10571         internal_error.
10572         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
10573         error.
10574         (riscv_push_dummy_call): Likewise.
10575
10576 2018-03-12  Tom Tromey  <tom@tromey.com>
10577
10578         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
10579         Use gdb::byte_vector.
10580         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
10581
10582 2018-03-12  Yao Qi  <yao.qi@linaro.org>
10583
10584         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
10585         parameter type to readable_regcache.
10586         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
10587         the declaration.
10588
10589 2018-03-11  Tom Tromey  <tom@tromey.com>
10590
10591         * dwarf2read.c (struct nextfield): Add initializers.
10592         (struct nextfnfield): Remove.
10593         (struct fnfieldlist): Add initializers.  Remove "length" and
10594         "head", use std::vector.
10595         (struct decl_field_list): Remove.
10596         (struct field_info): Add initializers.
10597         <fields, baseclasses>: Now std::vector.
10598         <nbaseclasses, nfnfields, typedef_field_list_count,
10599         nested_types_list_count>: Remove.
10600         (dwarf2_add_field, dwarf2_add_type_defn)
10601         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
10602         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
10603         (process_structure_scope): Update.
10604
10605 2018-03-11  Tom Tromey  <tom@tromey.com>
10606
10607         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
10608         for use by std::sort.
10609         (build_type_psymtabs_1): Use std::vector.
10610
10611 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
10612
10613         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
10614         and LIBMPFR in the printed configuration.
10615
10616 2018-03-08  Tom Tromey  <tom@tromey.com>
10617
10618         * source.c (get_filename_and_charpos): Use scoped_fd.
10619         * nto-procfs.c (procfs_open_1): Use scoped_fd.
10620         (procfs_pidlist): Likewise.
10621         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
10622         (iterate_over_mappings): Likewise.
10623
10624 2018-03-08  Tom Tromey  <tom@tromey.com>
10625
10626         * infcall.c (struct call_return_meta_info)
10627         <stack_temporaries_enabled>: Remove.
10628         (get_call_return_value, call_function_by_hand_dummy): Update.
10629         * thread.c (disable_thread_stack_temporaries): Remove.
10630         (enable_thread_stack_temporaries): Remove.
10631         (thread_stack_temporaries_enabled_p): Return bool.
10632         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
10633         (get_last_thread_stack_temporary): Update.
10634         * eval.c (evaluate_subexp): Update.
10635         * gdbthread.h (class enable_thread_stack_temporaries): Now a
10636         class, not a function.
10637         (value_ptr, value_vec): Remove typedefs.
10638         (class thread_info) <stack_temporaries_enabled>: Now bool.
10639         <stack_temporaries>: Now a std::vector.
10640         (thread_stack_temporaries_enabled_p)
10641         (value_in_thread_stack_temporaries): Return bool.
10642
10643 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
10644
10645         * remote.c (putpkt_binary): Fix omitted bytes reporting.
10646         (getpkt_or_notif_sane_1): Likewise.
10647
10648 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
10649
10650         * build-id.c (build_id_to_debug_bfd): Use std::string.
10651
10652 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
10653
10654         * build-id.c (find_separate_debug_file_by_buildid): Return
10655         std::string.
10656         * build-id.h (find_separate_debug_file_by_buildid): Return
10657         std::string.
10658         * coffread.c (coff_symfile_read): Adjust to std::string.
10659         * elfread.c (elf_symfile_read): Adjust to std::string.
10660         * symfile.c (separate_debug_file_exists): Change parameter to
10661         std::string.
10662         (find_separate_debug_file): Return std::string.
10663         (find_separate_debug_file_by_debuglink): Return std::string.
10664         * symfile.h (find_separate_debug_file_by_debuglink): Return
10665         std::string.
10666
10667 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
10668
10669         * common/xml-utils.c (xml_escape_text): Move code to...
10670         (xml_escape_text_append): ... this new function.
10671         * common/xml-utils.h (xml_escape_text_append): New declaration.
10672         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
10673         New function.
10674         (_initialize_xml_utils): register test_xml_escape_text_append as
10675         a selftest.
10676
10677 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
10678
10679         * defs.h: Remove MAX_REGISTER_SIZE.
10680         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
10681         asserts.
10682         * python/py-unwind.c (pyuw_sniffer): Likewise.
10683
10684 2018-03-07  Tom Tromey  <tom@tromey.com>
10685
10686         * linux-tdep.c (linux_info_proc): Update.
10687         * target.h (struct target_ops) <to_fileio_readlink>: Return
10688         optional<string>.
10689         (target_fileio_readlink): Return optional<string>.
10690         * remote.c (remote_hostio_readlink): Return optional<string>.
10691         * inf-child.c (inf_child_fileio_readlink): Return
10692         optional<string>.
10693         * target.c (target_fileio_readlink): Return optional<string>.
10694
10695 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
10696
10697         * regcache.c (cooked_read_test): Add riscv to the list of
10698         architectures that have a save_reggroup.
10699
10700 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10701
10702         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
10703         value is not a dynamic class object.
10704
10705 2018-03-06  Tom Tromey  <tom@tromey.com>
10706
10707         * rust-exp.y: Formatting fixes.
10708
10709 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10710
10711         * riscv-tdep.c (riscv_register_name): Remove target description
10712         support.
10713         (riscv_gdbarch_init): Remove target description check.
10714
10715 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10716
10717         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
10718         comment.
10719         * riscv-tdep.h: Likewise.
10720
10721 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10722
10723         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
10724         (riscv_pseudo_register_write): Delete.
10725         (riscv_gdbarch_init): Remove all use of pseudo registers.
10726
10727 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
10728
10729         * record-btrace.c (btrace_print_lines): Replace cleanup
10730         parameter with RAII equivalents.
10731         (btrace_insn_history): Replace cleanup with RAII equivalents.
10732         * ui-out.h (make_cleanup_ui_out_list_begin_end,
10733         make_cleanup_ui_out_tuple_begin_end): Remove.
10734         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
10735         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
10736         make_cleanup_ui_out_list_begin_end): Remove.
10737
10738 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
10739
10740         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
10741         parameter types to std::vector.  Use bool.
10742         (record_btrace_wait): Replace VEC(tp_t) with
10743         std::vector<thread_info *>.
10744         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
10745
10746 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
10747
10748         * record-btrace.c (record_btrace_disable_callback): Remove.
10749         (struct scoped_btrace_disable): New.
10750         (record_btrace_open): Use scoped_btrace_disable.
10751
10752 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10753
10754         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
10755         reading values from registers.
10756
10757 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10758
10759         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
10760         where appropriate.
10761
10762 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10763
10764         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
10765         change parameter type.  Use GDB's print functions, and use
10766         core_addr_to_string where appropriate.
10767         (riscv_push_dummy_call): Use core_addr_to_string where
10768         appropriate, update call to riscv_print_arg_location, and reindent
10769         a few lines.
10770         (riscv_return_value): Update call to riscv_print_arg_location.
10771
10772 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10773             Tim Newsome <tim@sifive.com>
10774             Albert Ou <a0u@eecs.berkeley.edu>
10775             Darius Rad <darius@bluespec.com>
10776
10777         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
10778         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
10779         (ALLDEPFILES): Add riscv-tdep.c
10780         * configure.tgt: Add riscv support.
10781         * riscv-tdep.c: New file.
10782         * riscv-tdep.h: New file.
10783         * NEWS: Mention new target.
10784         * MAINTAINERS: Add entry for riscv.
10785
10786 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10787
10788         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
10789         fields within aggregates.
10790
10791 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
10792
10793         * record-btrace.c (btrace_print_lines): Change type of flags to
10794         gdb_disassembly_flags.
10795
10796 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
10797
10798         * fbsd-nat.c: Include "inf-ptrace.h".
10799         (USE_SIGTRAP_SIGINFO): Conditionally define.
10800         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
10801         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
10802         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
10803         function.
10804         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
10805         Likewise.
10806         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
10807         Likewise.
10808         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
10809         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
10810         "supports_stopped_by_hw_breakpoint" target methods.
10811
10812 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
10813
10814         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
10815         * fbsd-nat.c (debug_fbsd_nat): New variable.
10816         (show_fbsd_nat_debug): New function.
10817         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
10818         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
10819
10820 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
10821
10822         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
10823         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
10824         prototype.
10825         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
10826         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
10827         method.
10828
10829 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10830
10831         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
10832         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
10833
10834 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10835
10836         * charset.c (struct charset_vector): New.
10837         (charsets): Change type to charset_vector.
10838         (find_charset_names): Adjust.
10839         (add_one): Adjust.
10840         (_initialize_charset): Adjust.
10841
10842 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10843
10844         * progspace.h (struct program_space) <deleted_solibs>: Change
10845         type to std::vector<std::string>.
10846         * progspace.c (clear_program_space_solib_cache): Adjust.
10847         * breakpoint.c (print_solib_event): Adjust.
10848         (check_status_catch_solib): Adjust.
10849         * solib.c (update_solib_list): Adjust.
10850         * ui-out.h (class ui_out) <field_string>: New overload.
10851         * ui-out.c (ui_out::field_string): New overload.
10852
10853 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10854
10855         * progspace.h (struct program_space): Add constructor and
10856         destructor, initialize fields.
10857         (add_program_space): Remove.
10858         * progspace.c (add_program_space): Rename to...
10859         (program_space::program_space): ... this.
10860         (release_program_space): Rename to...
10861         (program_space::~program_space): ... this.
10862         (delete_program_space): Use delete to delete program_space.
10863         (initialize_progspace): Use new to allocate program_space.
10864         * inferior.c (add_inferior_with_spaces): Likewise.
10865         (clone_inferior_command): Likewise.
10866         * infrun.c (follow_fork_inferior): Likewise.
10867         (handle_vfork_child_exec_or_exit): Likewise.
10868
10869 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10870
10871         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
10872         (delim_string_to_char_ptr_vec): Return std::vector of
10873         gdb::unique_xmalloc_ptr.
10874         (dirnames_to_char_ptr_vec_append): Take std::vector of
10875         gdb::unique_xmalloc_ptr.
10876         (dirnames_to_char_ptr_vec): Return std::vector of
10877         gdb::unique_xmalloc_ptr.
10878         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
10879         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
10880         (delim_string_to_char_ptr_vec): Return an std::vector of
10881         gdb::unique_xmalloc_ptr, adjust the code.
10882         (dirnames_to_char_ptr_vec_append): Take an std::vector of
10883         gdb::unique_xmalloc_ptr, adjust the code.
10884         (dirnames_to_char_ptr_vec): Return an std::vector of
10885         gdb::unique_xmalloc_ptr, adjust the code.
10886         * auto-load.c (auto_load_safe_path_vec): Change type to
10887         std::vector of gdb::unique_xmalloc_ptr.
10888         (auto_load_expand_dir_vars): Return an std::vector of
10889         gdb::unique_xmalloc_ptr, adjust the code.
10890         (auto_load_safe_path_vec_update): Adjust.
10891         (filename_is_in_auto_load_safe_path_vec): Adjust.
10892         (auto_load_objfile_script_1): Adjust.
10893         * build-id.c (build_id_to_debug_bfd): Adjust.
10894         * linux-thread-db.c (thread_db_load_search): Adjust.
10895         * source.c (add_path): Adjust.
10896         (openp): Adjust.
10897         * symfile.c (find_separate_debug_file): Adjust.
10898         * utils.c (do_free_char_ptr_vec): Remove.
10899         (make_cleanup_free_char_ptr_vec): Remove.
10900
10901 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
10902
10903         PR gdb/22907
10904         * common/pathstuff.c: Conditionally include "<windows.h>".
10905
10906 2018-03-01  Georg Sauthoff  <mail@georg.so>
10907
10908         PR gdb/22888
10909         * gcore.in: Quote variables and switch interpreter to bash.
10910
10911 2018-03-01  Tom Tromey  <tom@tromey.com>
10912
10913         * dwarf2read.c (alloc_discriminant_info): Fix default_index
10914         assertion.  Add assertion for discriminant_index.
10915         (quirk_rust_enum): Use correct base type name in univariant case.
10916
10917 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
10918
10919         * record.c (get_call_history_modifiers): Return a
10920         record_print_flags.
10921         (cmd_record_call_history): Adjust.
10922         * record-btrace.c (record_btrace_call_history): Adjust.
10923         (record_btrace_call_history_range): Adjust.
10924         (record_btrace_call_history_from): Adjust.
10925         * target-debug.h (target_debug_print_record_print_flags): New.
10926         * target-delegates.c: Re-generate.
10927         * target.c (target_call_history): Change flags type.
10928         (target_call_history_from): Likewise.
10929         (target_call_history_range): Likewise.
10930         * target.h (struct target_ops) <target_call_history>: Likewise.
10931         (target_call_history_from): Likewise.
10932         (target_call_history_range): Likewise.
10933
10934 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
10935             Simon Marchi  <simon.marchi@polymtl.ca>
10936
10937         * common/common-utils.c: Include "sys/stat.h".
10938         (is_regular_file): Move here from "source.c"; change return
10939         type to "bool".
10940         * common/common-utils.h (is_regular_file): New prototype.
10941         * common/pathstuff.c (contains_dir_separator): New function.
10942         * common/pathstuff.h (contains_dir_separator): New prototype.
10943         * source.c: Don't include "sys/stat.h".
10944         (is_regular_file): Move to "common/common-utils.c".
10945
10946 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
10947
10948         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
10949         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
10950         * auto-load.c: Include "common/pathstuff.h".
10951         * common/common-def.h (current_directory): Move here.
10952         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
10953         function.
10954         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
10955         prototype.
10956         * common/pathstuff.c: New file.
10957         * common/pathstuff.h: New file.
10958         * compile/compile.c: Include "common/pathstuff.h".
10959         * defs.h (current_directory): Move to "common/common-defs.h".
10960         * dwarf2read.c: Include "common/pathstuff.h".
10961         * exec.c: Likewise.
10962         * guile/scm-safe-call.c: Likewise.
10963         * linux-thread-db.c: Likewise.
10964         * main.c: Likewise.
10965         * nto-tdep.c: Likewise.
10966         * objfiles.c: Likewise.
10967         * source.c: Likewise.
10968         * symtab.c: Likewise.
10969         * utils.c: Include "common/pathstuff.h".
10970         (gdb_realpath): Move to "common/pathstuff.c".
10971         (gdb_realpath_keepfile): Likewise.
10972         (gdb_abspath): Likewise.
10973         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
10974         (gdb_realpath_keepfile): Likewise.
10975         (gdb_abspath): Likewise.
10976
10977 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
10978
10979         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
10980         wildcard process pid for super_resume for kernels with a
10981         specific bug.
10982
10983 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
10984
10985         * compile/compile.c (get_args): Add additional comments
10986         explaining function.
10987
10988 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
10989             Tom Tromey  <tom@tromey.com>
10990
10991         * target.h (memory_write_request_s): Remove typedef.  Don't define
10992         VEC.
10993         (target_write_memory_blocks): Change argument to std::vector.
10994         (struct memory_write_request): Add constructor.
10995         * target-memory.c (compare_block_starting_address): Return bool.
10996         Change argument types.
10997         (claim_memory): Change arguments to use std::vector.
10998         (split_regular_and_flash_blocks, blocks_to_erase)
10999         (compute_garbled_blocks): Likewise.
11000         (cleanup_request_data, cleanup_write_requests_vector): Remove.
11001         (target_write_memory_blocks): Change argument to std::vector.
11002         * symfile.c (struct load_section_data): Add constructor and
11003         destructor.  Use std::vector for "requests".
11004         (struct load_progress_data): Add initializers.
11005         (load_section_callback): Update.  Use "new".
11006         (clear_memory_write_data): Remove.
11007         (generic_load): Update.
11008
11009 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
11010
11011         * arch/aarch64.h: Use common/tdesc.h.
11012
11013 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
11014
11015         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
11016         architecture with a 64-bit ABI.
11017
11018 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
11019
11020         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
11021         ahead of target description loading.
11022
11023 2018-02-26  Tom Tromey  <tom@tromey.com>
11024
11025         * stack.c (backtrace_command_1): Update.
11026         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
11027         of "flags".
11028         * python/py-framefilter.c (py_print_frame)
11029         (gdbpy_apply_frame_filter): Change type of "flags".
11030         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
11031         of "flags".
11032         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
11033         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
11034         * extension.h (enum frame_filter_flag): Rename from
11035         frame_filter_flags.
11036         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
11037         (apply_ext_lang_frame_filter): Change type of "flags".
11038         * extension.c (apply_ext_lang_frame_filter): Change type of
11039         "flags".
11040         * extension-priv.h (struct extension_language_ops)
11041         <apply_frame_filter>: Change type of "flags".
11042
11043 2018-02-26  Tom Tromey  <tom@tromey.com>
11044
11045         PR python/16497:
11046         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
11047         off-by-one in py_end computation.
11048         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
11049         PRINT_MORE_FRAMES.
11050         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
11051         constant.
11052
11053 2018-02-26  Tom Tromey  <tom@tromey.com>
11054
11055         * dwarf2read.c (struct variant_field): New.
11056         (struct nextfield) <variant>: New field.
11057         (dwarf2_add_field): Handle DW_TAG_variant_part.
11058         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
11059         discriminated union.
11060         (read_structure_type): Handle DW_TAG_variant_part.
11061         (handle_struct_member_die): New function, extracted from
11062         process_structure_scope.  Handle DW_TAG_variant.
11063         (process_structure_scope): Handle discriminated unions.  Call
11064         handle_struct_member_die.
11065
11066 2018-02-26  Tom Tromey  <tom@tromey.com>
11067
11068         * rust-lang.h (rust_last_path_segment): Declare.
11069         * rust-lang.c (rust_last_path_segment): Now public.  Change
11070         contract.
11071         (struct disr_info): Remove.
11072         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
11073         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
11074         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
11075         (rust_enum_p, rust_enum_variant): New function.
11076         (rust_underscore_fields): Remove "offset" parameter.
11077         (rust_print_enum): New function.
11078         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
11079         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
11080         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
11081         enums.
11082         (rust_internal_print_type): New function, from rust_print_type.
11083         Remove enum code.
11084         (rust_print_type): Call rust_internal_print_type.
11085         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
11086         Update enum handling.
11087         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
11088         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
11089         (rust_union_quirks): New functions.
11090         (process_full_comp_unit, process_full_type_unit): Call
11091         rust_union_quirks.
11092         (process_structure_scope): Update rust_unions if necessary.
11093
11094 2018-02-26  Tom Tromey  <tom@tromey.com>
11095
11096         * value.h (value_union_variant): Declare.
11097         * valops.c (value_union_variant): New function.
11098         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
11099         (struct discriminant_info): New.
11100         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
11101         enumerator.
11102         (struct main_type) <flag_discriminated_union>: New field.
11103
11104 2018-02-26  Tom Tromey  <tom@tromey.com>
11105
11106         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11107         unittests/unpack-selftests.c.
11108         * unittests/unpack-selftests.c: New file.
11109         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
11110
11111 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11112
11113         * dwarf2read.c (struct partial_die_info) <read>: New method.
11114         (read_partial_die): Remove the declaration.
11115         (load_partial_dies): Update.
11116         (partial_die_info::partial_die_info):
11117         (read_partial_die): Change it to partial_die_info::read.
11118
11119 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11120
11121         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
11122         (fixup_partial_die): Remove declaration.
11123         (scan_partial_symbols): Update.
11124         (partial_die_parent_scope): Likewise.
11125         (partial_die_full_name): Likewise.
11126         (fixup_partial_die): Change it to partial_die_info::fixup.
11127
11128 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11129
11130         * dwarf2read.c (read_partial_die): Update the declaration.
11131         (load_partial_dies): Caller update.
11132         (read_partial_die): Remove one argument abbrev_len.
11133
11134 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11135
11136         * dwarf2read.c (struct partial_die_info): Add ctor, delete
11137         assignment operator.
11138         (load_partial_dies): Use ctor and copy ctor.
11139         (read_partial_die): Update.
11140         (dwarf2_cu::find_partial_die): Use ctor.
11141
11142 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11143
11144         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
11145         (find_partial_die_in_comp_unit): Change it to
11146         dwarf2_cu::find_partial_die.
11147         (find_partial_die): Update.
11148
11149 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11150
11151         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
11152         is NULL.
11153
11154 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11155
11156         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
11157
11158 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
11159
11160         * arch/amd64.h: Use common/tdesc.h.
11161         * arch/i386.c: Likewise.
11162         * arch/i386.h: Likewise.
11163         * arch/tic6x.c: Likewise.
11164         * arch/tdesc.h: Move file from here...
11165         * common/tdesc.h: ...to here.
11166         * features/aarch64-core.c: Regenerate.
11167         * features/aarch64-fpu.c: Regenerate.
11168         * features/i386/32bit-avx.c: Regenerate.
11169         * features/i386/32bit-avx512.c: Regenerate.
11170         * features/i386/32bit-core.c: Regenerate.
11171         * features/i386/32bit-linux.c: Regenerate.
11172         * features/i386/32bit-mpx.c: Regenerate.
11173         * features/i386/32bit-pkeys.c: Regenerate.
11174         * features/i386/32bit-sse.c: Regenerate.
11175         * features/i386/64bit-avx.c: Regenerate.
11176         * features/i386/64bit-avx512.c: Regenerate.
11177         * features/i386/64bit-core.c: Regenerate.
11178         * features/i386/64bit-linux.c: Regenerate.
11179         * features/i386/64bit-mpx.c: Regenerate.
11180         * features/i386/64bit-pkeys.c: Regenerate.
11181         * features/i386/64bit-segments.c: Regenerate.
11182         * features/i386/64bit-sse.c: Regenerate.
11183         * features/i386/x32-core.c: Regenerate.
11184         * features/tic6x-c6xp.c: Regenerate.
11185         * features/tic6x-core.c: Regenerate.
11186         * features/tic6x-gp.c: Regenerate.
11187         * target-descriptions.c: Use common/tdesc.h.
11188         * target-descriptions.h: Likewise.
11189
11190 2018-02-24  Tom Tromey  <tom@tromey.com>
11191
11192         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
11193         (try_thread_db_load_from_dir, thread_db_load_search): Use
11194         std::string.
11195         (info_auto_load_libthread_db_compare): Return bool.  Change
11196         argument types.
11197         (info_auto_load_libthread_db): Use std::vector, std::string.
11198         Remove cleanups.
11199
11200 2018-02-24  Tom Tromey  <tom@tromey.com>
11201
11202         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
11203         std::string.
11204         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
11205         std::string*.
11206         * gdbarch.c: Rebuild.
11207         * gdbarch.h: Rebuild.
11208         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
11209         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
11210         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
11211         std::string*.
11212
11213 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
11214
11215         * gdbtypes.h (sect_offset): Change type to uint64_t.
11216         (sect_offset_str): New function.
11217         * dwarf2read.c (create_addrmap_from_aranges): Use
11218         sect_offset_str.
11219         (error_check_comp_unit_head): Likewise.
11220         (create_debug_type_hash_table): Likewise.
11221         (read_cutu_die_from_dwo): Likewise.
11222         (init_cutu_and_read_dies): Likewise.
11223         (init_cutu_and_read_dies_no_follow): Likewise.
11224         (process_psymtab_comp_unit_reader): Likewise.
11225         (partial_die_parent_scope): Likewise.
11226         (peek_die_abbrev): Likewise.
11227         (process_queue): Likewise.
11228         (dwarf2_physname): Likewise.
11229         (read_namespace_alias): Likewise.
11230         (read_import_statement): Likewise.
11231         (create_dwo_cu_reader): Likewise.
11232         (create_cus_hash_table): Likewise.
11233         (lookup_dwo_cutu): Likewise.
11234         (inherit_abstract_dies): Likewise.
11235         (read_func_scope): Likewise.
11236         (read_call_site_scope): Likewise.
11237         (dwarf2_add_member_fn): Likewise.
11238         (read_common_block): Likewise.
11239         (read_module_type): Likewise.
11240         (read_typedef): Likewise.
11241         (read_subrange_type): Likewise.
11242         (load_partial_dies): Likewise.
11243         (read_partial_die): Likewise.
11244         (find_partial_die): Likewise.
11245         (read_str_index): Likewise.
11246         (dwarf2_string_attr): Likewise.
11247         (build_error_marker_type): Likewise.
11248         (lookup_die_type): Likewise.
11249         (dump_die_shallow): Likewise.
11250         (follow_die_ref): Likewise.
11251         (dwarf2_fetch_die_loc_sect_off): Likewise.
11252         (dwarf2_fetch_constant_bytes): Likewise.
11253         (follow_die_sig): Likewise.
11254         (get_signatured_type): Likewise.
11255         (get_DW_AT_signature_type): Likewise.
11256         (dwarf2_find_containing_comp_unit): Likewise.
11257         (set_die_type): Likewise.
11258
11259 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
11260
11261         * arch/aarch64.c: Include "common-defs.h".
11262         * arch/amd64.c: Likewise.
11263         * arch/i386.c: Likewise.
11264
11265 2018-02-21  Tom Tromey  <tom@tromey.com>
11266
11267         * value.h: (extract_field_op): Update.
11268         * eval.c (extract_field_op): Return a const char *.
11269         * expression.h (parse_expression_for_completion): Update.
11270         * completer.c (complete_expression): Update.
11271         (add_struct_fields): Make fieldname const.
11272         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
11273         (mark_completion_tag, parse_exp_in_context_1): Update.
11274         (parse_expression_for_completion): Change "name" to
11275         unique_xmalloc_ptr*.
11276
11277 2018-02-21  Tom Tromey  <tom@tromey.com>
11278
11279         * infcall.c (call_function_by_hand_dummy): Use std::vector.
11280
11281 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11282
11283         * avr-tdep.c (avr_read_pc): Change parameter type to
11284         readable_regcache.
11285         * gdbarch.sh (read_pc): Likewise.
11286         * gdbarch.c: Re-generated.
11287         * gdbarch.h: Re-generated.
11288         * hppa-tdep.c (hppa_read_pc): Change parameter type to
11289         readable_regcache.
11290         * ia64-tdep.c (ia64_read_pc): Likewise.
11291         * mips-tdep.c (mips_read_pc): Likewise.
11292         * spu-tdep.c (spu_read_pc): Likewise.
11293
11294 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11295
11296         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
11297         * regcache-dump.c: New file.
11298         * regcache.c: Move register_dump to regcache-dump.c.
11299         (maintenance_print_registers): Likewise.
11300         (maintenance_print_raw_registers): Likewise.
11301         (maintenance_print_cooked_registers): Likewise.
11302         (maintenance_print_register_groups): Likewise.
11303         (maintenance_print_remote_registers): Likewise.
11304         (_initialize_regcache): Likewise.
11305         * regcache.h (register_dump): Moved from regcache.c.
11306
11307 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11308
11309         * regcache.c (regcache::regcache): Update.
11310         (regcache::invalidate): Move it to detached_regcache::invalidate.
11311         (get_thread_arch_aspace_regcache): Update.
11312         (regcache::raw_update): Update.
11313         (regcache::cooked_read): Remove some code.
11314         (regcache::cooked_read_value): Likewise.
11315         (regcache::raw_write): Remove assert on m_readonly_p.
11316         (regcache::raw_supply_integer): Move it to
11317         detached_regcache::raw_supply_integer.
11318         (regcache::raw_supply_zeroed): Likewise.
11319         * regcache.h (detached_regcache) <raw_supply_integer>: New
11320         declaration.
11321         <raw_supply_zeroed, invalidate>: Likewise.
11322         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
11323         <invalidate>: Likewise.
11324         <m_readonly_p>: Removed.
11325
11326 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11327
11328         * infcmd.c (get_return_value): Let stop_regs point to
11329         get_current_regcache.
11330         * regcache.c (regcache::regcache): Remove.
11331         (register_dump_reg_buffer): New class.
11332         (regcache_print): Adjust.
11333         * regcache.h (regcache): Remove constructors.
11334
11335 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11336
11337         * regcache.c (class register_dump): New class.
11338         (register_dump_regcache, register_dump_none): New class.
11339         (register_dump_remote, register_dump_groups): New class.
11340         (regcache_print): Update.
11341         * regcache.h (regcache_dump_what): Move it to regcache.c.
11342         (regcache) <dump>: Remove.
11343
11344 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11345
11346         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
11347          reg_buffer_rw *.
11348         (jit_unwind_reg_set_impl): Call raw_supply.
11349         (jit_frame_sniffer): Use reg_buffer_rw.
11350         * record-full.c (record_full_core_regbuf): Change its type.
11351         (record_full_core_open_1): Use reg_buffer_rw.
11352         (record_full_close): Likewise.
11353         (record_full_core_fetch_registers): Use regcache->raw_supply.
11354         (record_full_core_store_registers): Likewise.
11355         * regcache.c (regcache::get_register_status): Move it to
11356         reg_buffer.
11357         (regcache_raw_set_cached_value): Remove.
11358         (regcache::raw_set_cached_value): Remove.
11359         (regcache::raw_write): Call raw_supply.
11360         (regcache::raw_supply): Move it to reg_buffer_rw.
11361         * regcache.h (regcache_raw_set_cached_value): Remove.
11362         (reg_buffer_rw): New class.
11363
11364 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11365
11366         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
11367         readonly_detached_regcache.
11368         (dummy_frame_prev_register): Use regcache->cooked_read.
11369         * frame.c (frame_save_as_regcache): Change return type.
11370         (frame_pop): Update.
11371         * frame.h (frame_save_as_regcache): Update declaration.
11372         * inferior.h (get_infcall_suspend_state_regcache): Update
11373         declaration.
11374         * infrun.c (infcall_suspend_state) <registers>: use
11375         readonly_detached_regcache.
11376         (save_infcall_suspend_state): Don't use regcache_dup.
11377         (get_infcall_suspend_state_regcache): Change return type.
11378         * linux-fork.c (struct fork_info) <savedregs>: Change to
11379         readonly_detached_regcache.
11380         <pc>: New field.
11381         (fork_save_infrun_state): Don't use regcache_dup.
11382         (info_checkpoints_command): Adjust.
11383         * mi/mi-main.c (register_changed_p): Update declaration.
11384         (mi_cmd_data_list_changed_registers): Use
11385         readonly_detached_regcache.
11386         (register_changed_p): Change parameter type to
11387         readonly_detached_regcache.
11388         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
11389         readonly_detached_regcache.
11390         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
11391         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
11392         New.
11393         (regcache::save): Move it to reg_buffer.
11394         (regcache::restore): Change parameter type.
11395         (regcache_dup): Remove.
11396         * regcache.h (reg_buffer) <save>: New method.
11397         (readonly_detached_regcache): New class.
11398         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
11399         readonly_detached_regcache.
11400         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
11401
11402 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11403
11404         * frame.c (frame_save_as_regcache): Use regcache method save.
11405         (frame_pop): Use regcache method restore.
11406         * infrun.c (restore_infcall_suspend_state): Likewise.
11407         * linux-fork.c (fork_load_infrun_state): Likewise.
11408         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
11409         save.
11410         * regcache.c (regcache_save): Remove.
11411         (regcache::restore): More asserts.
11412         (regcache_cpy): Remove.
11413         * regcache.h (regcache_save): Remove the declaration.
11414         (regcache::restore): Move from private to public.
11415         Remove the friend declaration of regcache_cpy.
11416         (regcache_cpy): Remove declaration.
11417
11418 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11419
11420         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
11421         parameter type to 'readable_regcache *'.
11422         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
11423         * arm-tdep.c (arm_neon_quad_read): Likewise.
11424         (arm_pseudo_read): Likewise.
11425         * avr-tdep.c (avr_pseudo_register_read): Likewise.
11426         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
11427         * frv-tdep.c (frv_pseudo_register_read): Likewise.
11428         * gdbarch.c: Re-generated.
11429         * gdbarch.h: Re-generated.
11430         * gdbarch.sh (pseudo_register_read): Change parameter type to
11431         'readable_regcache *'.
11432         (pseudo_register_read_value): Likewise.
11433         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
11434         (h8300_pseudo_register_read): Likewise.
11435         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
11436         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
11437         (i386_pseudo_register_read_into_value): Likewise.
11438         (i386_pseudo_register_read_value): Likewise.
11439         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
11440         declaration.
11441         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
11442         * m32c-tdep.c (m32c_raw_read): Likewise.
11443         (m32c_read_flg): Likewise.
11444         (m32c_banked_register): Likewise.
11445         (m32c_banked_read): Likewise.
11446         (m32c_sb_read): Likewise.
11447         (m32c_part_read): Likewise.
11448         (m32c_cat_read): Likewise.
11449         (m32c_r3r2r1r0_read): Likewise.
11450         (m32c_pseudo_register_read): Likewise.
11451         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
11452         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
11453         (mep_pseudo_cr64_read): Likewise.
11454         (mep_pseudo_register_read): Likewise.
11455         * mips-tdep.c (mips_pseudo_register_read): Likewise.
11456         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
11457         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
11458         * regcache.c (regcache::raw_read): Move it to readable_regcache.
11459         (regcache::cooked_read): Likewise.
11460         (regcache::cooked_read_value): Likewise.
11461         (regcache_cooked_read_signed):
11462         (regcache::cooked_read): Likewise.
11463         * regcache.h (readable_regcache): New class.
11464         (regcache): Inherit readable_regcache.  Move some methods to
11465         readable_regcache.
11466         * rl78-tdep.c (rl78_pseudo_register_read): Change
11467         parameter type to 'readable_regcache *'.
11468         * rs6000-tdep.c (do_regcache_raw_read): Remove.
11469         (e500_pseudo_register_read): Change parameter type to
11470         'readable_regcache *'.
11471         (dfp_pseudo_register_read): Likewise.
11472         (vsx_pseudo_register_read): Likewise.
11473         (efpr_pseudo_register_read): Likewise.
11474         * s390-tdep.c (s390_pseudo_register_read): Likewise.
11475         * sh-tdep.c (sh_pseudo_register_read): Likewise.
11476         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
11477         (sh64_pseudo_register_read): Likewise.
11478         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
11479         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
11480         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
11481         (spu_pseudo_register_read): Likewise.
11482         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
11483         (xtensa_pseudo_register_read): Likewise.
11484
11485 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11486
11487         * regcache.c (regcache::regcache): Call reg_buffer ctor.
11488         (regcache::arch): Move it to reg_buffer::arch.
11489         (regcache::register_buffer): Likewise.
11490         (regcache::assert_regnum): Likewise.
11491         (regcache::num_raw_registers): Likewise.
11492         * regcache.h (reg_buffer): New class.
11493         (regcache): Inherit reg_buffer.
11494
11495 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
11496
11497         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
11498         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
11499
11500 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
11501
11502         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
11503
11504 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
11505
11506         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
11507         (SFILES): Remove common/*.c files.
11508         (COMMON_OBS): Remove some *.o files built from common/*.c files.
11509         * common/common.host: Add common reference.
11510         * configure.ac: Likewise.
11511         * configure: Regenerate.
11512
11513 2018-02-16  Yao Qi  <yao.qi@linaro.org>
11514
11515         * block.c (block_namespace_info): Inherit allocate_on_obstack.
11516         (block_initialize_namespace): Use new.
11517         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
11518         (dwarf2_free_objfile): Use delete.
11519         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
11520         (copy_type_recursive): Use new.
11521         * gdb_obstack.h (allocate_on_obstack): New.
11522
11523 2018-02-15  Yao Qi  <yao.qi@linaro.org>
11524
11525         PR gdb/22849
11526         * inferior.c (exit_inferior_1): Reset inf->control.
11527
11528 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
11529
11530         * ada-lang.c (ada_to_fixed_value_create): Delete advance
11531         declaration.
11532
11533 2018-02-14  Pedro Alves  <palves@redhat.com>
11534
11535         * frame-unwind.c (frame_unwind_try_unwinder): Always call
11536         frame_cleanup_after_sniffer on exception.
11537
11538 2018-02-14  Tom Tromey  <tom@tromey.com>
11539
11540         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
11541         const.
11542         (solib_bfd_open): Make pathname const.
11543         * solib.c (solib_bfd_open): Make pathname const.
11544         * solib-spu.c (spu_bfd_fopen): Make name const.
11545         (spu_bfd_open): Make pathname const.
11546         * solib-darwin.c (darwin_bfd_open): Make pathname const.
11547         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
11548
11549 2018-02-14  Tom Tromey  <tom@tromey.com>
11550
11551         * symfile.c (symfile_bfd_open): Update.
11552         * source.h (openp, source_full_path_of, find_and_open_source):
11553         Change argument type to unique_xmalloc_ptr.
11554         * source.c (openp): Take a unique_xmalloc_ptr.
11555         (source_full_path_of, find_and_open_source): Likewise.
11556         (open_source_file, symtab_to_fullname): Update.
11557         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
11558         unique_xmalloc_ptr.
11559         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
11560         (exec_file_find): Update.
11561         * psymtab.c (psymtab_to_fullname): Update.
11562         * nto-tdep.h (nto_find_and_open_solib): Update.
11563         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
11564         unique_xmalloc_ptr.
11565         * exec.c (exec_file_attach): Update.
11566         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
11567         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
11568
11569 2018-02-14  Tom Tromey  <tom@tromey.com>
11570
11571         * solib.c: Include source.h.
11572         * nto-tdep.c: Include source.h.
11573         * mi/mi-cmd-env.c: Include source.h.
11574         * infcmd.c: Include source.h.
11575         * exec.c: Include source.h.
11576         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
11577         (add_path, directory_switch, source_path, init_source_path): Move
11578         declarations...
11579         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
11580         (add_path, directory_switch, source_path, init_source_path):
11581         ...here.
11582
11583 2018-02-14  Tom Tromey  <tom@tromey.com>
11584
11585         * solist.h (exec_file_find, solib_find): Return
11586         unique_xmalloc_ptr.
11587         (solib_bfd_fopen): Take a const char *.
11588         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
11589         (exec_file_find, solib_find): Likewise.
11590         (solib_bfd_fopen): Do not take ownership of "pathname".
11591         (solib_bfd_open): Use unique_xmalloc_ptr.
11592         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
11593         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
11594         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
11595         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
11596
11597 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
11598
11599         * ada-lang.c (name_match_type_from_name): Remove reference to
11600         ada_name_for_lookup in function's documentation.
11601         * ada-lang.h (ada_name_for_lookup): Delete declaration.
11602
11603 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
11604
11605         * defs.h (enum openp_flags): New enum.
11606         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
11607         Move to enum openp_flags.
11608         (openp_flags): New enum flags.
11609         (openp): Change parameter type to openp_flags.
11610         * source.c (openp): Change parameter type to openp_flags.
11611         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
11612         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
11613
11614 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
11615
11616         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
11617         per-command.
11618
11619 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
11620
11621         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
11622         into...
11623         (class dwarf2_queue_guard): ...the destructor of this new class.
11624         (dw2_do_instantiate_symtab): Create instance of the new class
11625         dwarf2_queue_guard, remove cleanup.
11626
11627 2018-02-09  Tom Tromey  <tom@tromey.com>
11628
11629         * source.c (find_source_lines): Don't reference past the end of
11630         the vector.
11631
11632 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11633
11634         * remote.c (remote_btrace_maybe_reopen): Change error message.
11635         * btrace.c (btrace_enable): Likewise.
11636         (parse_xml_btrace): Likewise.
11637         (parse_xml_btrace_conf): Likewise.
11638
11639 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11640
11641         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
11642         (linux_enable_pt, linux_enable_bts): Call
11643         diagnose_perf_event_open_fail.
11644
11645 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11646
11647         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
11648         Remove parameter and change return type.  Update callers.  Move it.
11649         (linux_enable_bts, linux_enable_pt): Improve error message.
11650         (linux_enable_pt): Remove zero buffer size check.
11651         (linux_enable_btrace): Improve error messages.  Remove NULL return
11652         check.
11653
11654 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11655
11656         * btrace.c (btrace_enable): Remove target_supports_btrace call.
11657         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
11658         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
11659         (linux_supports_pt, linux_supports_btrace): Remove.
11660         (linux_enable_bts): Call cpu_supports_bts.
11661         * nat/linux-btrace.h (linux_supports_btrace): Remove.
11662         * remote.c (remote_supports_btrace): Remove.
11663         (init_remote_ops): Remove remote_supports_btrace.
11664         * target-delegates.c: Regenerated.
11665         * target.c (target_supports_btrace): Remove.
11666         * target.h (target_ops) <to_supports_btrace>: Remove
11667         (target_supports_btrace): Remove.
11668         * x86-linux-nat.c (x86_linux_create_target): Remove
11669         linux_supports_btrace.
11670
11671 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11672
11673         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
11674         btrace failed.
11675         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
11676         exception and use message in own exception.
11677
11678 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11679
11680         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
11681         (perf_event_pt_event_type): Use gdb_file_up.
11682         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
11683         scoped_fd, and scoped_mmap.
11684
11685 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11686
11687         * common/scoped_mmap.h: New.
11688         * unittests/scoped_mmap-selftest.c: New.
11689         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11690         unittests/scoped_mmap-selftest.c.
11691
11692 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11693
11694         * common/scoped_fd.h: New.
11695         * unittests/scoped_fd-selftest.c: New.
11696         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11697         unittests/scoped_fd-selftest.c.
11698
11699 2018-02-09  Tom Tromey  <tom@tromey.com>
11700
11701         * auto-load.c (auto_load_section_scripts): Use
11702         gdb::unique_xmalloc_ptr.
11703
11704 2018-02-09  Tom Tromey  <tom@tromey.com>
11705
11706         * auto-load.c (execute_script_contents): Use std::string.
11707
11708 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
11709
11710         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
11711         Python function, rather than a new command.
11712
11713 2018-02-08  Tom Tromey  <tom@tromey.com>
11714
11715         * solib.c (solib_find_1): Use std::string.
11716         (solib_bfd_fopen): Use unique_xmalloc_ptr.
11717
11718 2018-02-08  Tom Tromey  <tom@tromey.com>
11719
11720         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
11721
11722 2018-02-08  Tom Tromey  <tom@tromey.com>
11723
11724         * source.c (find_source_lines): Use gdb::def_vector.
11725
11726 2018-02-08  Tom Tromey  <tom@tromey.com>
11727
11728         * macrocmd.c (struct temporary_macro_definition): New.
11729         (macro_define_command): Use temporary_macro_definition.  Remove
11730         cleanups.
11731         (free_macro_definition_ptr): Remove.
11732
11733 2018-02-08  Tom Tromey  <tom@tromey.com>
11734
11735         * macroexp.c (maybe_expand): Use std::string.
11736
11737 2018-02-08  Tom Tromey  <tom@tromey.com>
11738
11739         * macroexp.c (struct macro_buffer): Add initializers for some
11740         members.
11741         (init_buffer, init_shared_buffer, free_buffer)
11742         (free_buffer_return_text): Remove.
11743         (macro_buffer): New constructors.
11744         (~macro_buffer): New destructor.
11745         (macro_buffer::set_shared): New method.
11746         (macro_buffer::resize_buffer, macro_buffer::appendc)
11747         (macro_buffer::appendmem): Now methods, not free functions.
11748         (set_token, append_tokens_without_splicing, stringify)
11749         (macro_stringify): Update.
11750         (gather_arguments): Change return type.  Remove argc_p argument,
11751         add args_ptr argument.  Use std::vector.
11752         (substitute_args): Remove argc argument.  Accept std::vector.
11753         (expand): Update.  Use std::vector.
11754         (scan, macro_expand, macro_expand_next): Update.
11755
11756 2018-02-08  Tom Tromey  <tom@tromey.com>
11757
11758         * symtab.c (default_collect_symbol_completion_matches_break_on):
11759         Use unique_xmalloc_ptr.
11760         * macroscope.h: (sal_macro_scope, user_macro_scope)
11761         (default_macro_scope): Return unique_xmalloc_ptr.
11762         * macroscope.c (sal_macro_scope, user_macro_scope)
11763         (default_macro_scope): Return unique_xmalloc_ptr.
11764         * macroexp.h (macro_expand, macro_expand_once): Return
11765         unique_xmalloc_ptr.
11766         * macroexp.c (macro_expand, macro_expand_once): Return
11767         unique_xmalloc_ptr.
11768         * macrocmd.c (macro_expand_command, macro_expand_once_command)
11769         (info_macro_command, info_macros_command): Use
11770         unique_xmalloc_ptr.
11771         * compile/compile-c-support.c (write_macro_definitions): Use
11772         unique_xmalloc_ptr.
11773         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
11774
11775 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
11776
11777         * value.c (value_static_field): Assign field type instead of
11778         containing type when returning an optimized out value.
11779
11780 2018-02-06  Yao Qi  <yao.qi@linaro.org>
11781
11782         * ft32-tdep.c (ft32_read_pc): Remove.
11783         (ft32_write_pc): Remove.
11784         (ft32_gdbarch_init): Update.
11785         * m32r-tdep.c (m32r_read_pc): Remove.
11786         (m32r_gdbarch_init): Update.
11787         * mep-tdep.c (mep_read_pc): Remove.
11788         (mep_gdbarch_init): Update.
11789         * microblaze-tdep.c (microblaze_write_pc): Remove.
11790         (microblaze_gdbarch_init): Update.
11791         * mn10300-tdep.c (mn10300_read_pc): Remove.
11792         (mn10300_write_pc): Remove.
11793         (mn10300_gdbarch_init): Update.
11794         * moxie-tdep.c (moxie_read_pc): Remove.
11795         (moxie_write_pc): Remove.
11796         (moxie_gdbarch_init): Update.
11797
11798 2018-02-06  Yao Qi  <yao.qi@linaro.org>
11799
11800         * expprint.c (print_subexp_standard): Handle
11801         OP_F77_UNDETERMINED_ARGLIST.
11802         (dump_subexp_body_standard): Likewise.
11803
11804 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
11805
11806         * target-descriptions.c (tdesc_element_visitor) Add empty
11807         implementations.
11808         (tdesc_type): Move make_gdb_type from here.
11809         (tdesc_type_builtin): Likewise.
11810         (tdesc_type_vector): Likewise.
11811         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
11812         (make_gdb_type_struct): Move from tdesc_type_with_fields.
11813         (make_gdb_type_union): Likewise.
11814         (make_gdb_type_flags): Likewise.
11815         (make_gdb_type_enum): Likewise.
11816         (make_gdb_type): New function.
11817         (tdesc_register_type): Use static make_gdb_type.
11818
11819 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
11820
11821         * infcmd.c (default_print_one_register_info): Align natural-format
11822         column values consistently one under another.
11823         (pad_to_column): New function.
11824
11825 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
11826
11827         * dwarf2read.c (dwarf2_physname): Move commment.
11828
11829 2018-02-01  Leszek Swirski  <leszeks@google.com>
11830
11831         * varobj.c (varobj_formatted_print_options): Allow recursive
11832         pretty printing if pretty printing is enabled.
11833
11834 2018-02-01  Leszek Swirski  <leszeks@google.com>
11835
11836         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
11837         names after a structop as a filename.
11838
11839 2018-02-01  Yao Qi  <yao.qi@linaro.org>
11840
11841         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
11842         (arm_record_coproc_data_proc): Likewise.
11843
11844 2018-02-01  Yao Qi  <yao.qi@linaro.org>
11845
11846         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
11847
11848 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
11849
11850         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
11851         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
11852
11853 2018-01-31  Pedro Alves  <palves@redhat.com>
11854
11855         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
11856         * inflow.c (child_terminal_save_inferior): Wrap reference to
11857         tcgetpgrp in HAVE_TERMIOS_H.
11858         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
11859         _WIN32.
11860         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
11861         always iterate over all inferiors.
11862         (gdbsim_cntrl_c): Adjust.
11863         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
11864
11865 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
11866
11867         * gdbtypes.c (lookup_array_range_type): Make sure the array's
11868         index type is objfile-owned if the element type is as well.
11869
11870 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
11871
11872         GDB 8.1 released.
11873
11874 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11875
11876         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
11877         "features/s390x-linux64.c".
11878         (_initialize_s390_linux_tdep): Remove initialization of tdescs
11879         s390_linux32 and s390x_linux64.
11880         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
11881         default tdesc.
11882         * s390-tdep.c: Include "features/s390-linux32.c" and
11883         "features/s390x-linux64.c".
11884         (s390_tdesc_valid): Add check for tdesc_has_registers.
11885         (s390_gdbarch_init): Make sure there is always a valid tdesc.
11886         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
11887         tdesc_s390x_linux64.
11888         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
11889         tdesc_s390x_linux64 to...
11890         * s390-tdep.h: ...here.
11891
11892 2018-01-30  Pedro Alves  <palves@redhat.com>
11893
11894         PR gdb/13211
11895         * config.in, configure: Regenerate.
11896         * configure.ac: Check for getpgid.
11897         * go32-nat.c (go32_pass_ctrlc): New.
11898         (go32_target): Install it.
11899         * inf-child.c (inf_child_target): Install
11900         child_terminal_save_inferior, child_pass_ctrlc and
11901         child_interrupt.
11902         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
11903         (inf_ptrace_target): No longer install it.
11904         * infcmd.c (interrupt_target_1): Adjust.
11905         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
11906         (child_interrupt): Declare.
11907         (inferior::terminal_state): New.
11908         * inflow.c (struct terminal_info): Update comments.
11909         (inferior_process_group): Delete.
11910         (terminal_is_ours): Delete.
11911         (gdb_tty_state): New.
11912         (child_terminal_init): Adjust.
11913         (is_gdb_terminal, sharing_input_terminal_1)
11914         (sharing_input_terminal): New functions.
11915         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
11916         Set the process's actual process group in the foreground if
11917         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
11918         mark terminal as the inferior's if not sharing GDB's terminal.
11919         Don't check attach_flag.
11920         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
11921         pass down a target_terminal_state.
11922         (child_terminal_save_inferior): New, factored out from ...
11923         (child_terminal_ours_1): ... this.  Handle
11924         target_terminal_state::is_ours_for_output.
11925         (child_interrupt, child_pass_ctrlc): New.
11926         (inflow_inferior_exit): Clear the inferior's terminal_state.
11927         (copy_terminal_info): Copy the inferior's terminal state.
11928         (_initialize_inflow): Remove reference to terminal_is_ours.
11929         * inflow.h (inferior_process_group): Delete.
11930         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
11931         * procfs.c (procfs_target): Don't install procfs_interrupt.
11932         (procfs_interrupt): Delete.
11933         * remote.c (remote_serial_quit_handler): Adjust.
11934         (remote_interrupt): Remove ptid parameter.  Adjust.
11935         * target-delegates.c: Regenerate.
11936         * target.c: Include "terminal.h".
11937         (target_terminal::terminal_state): Rename to ...
11938         (target_terminal::m_terminal_state): ... this.
11939         (target_terminal::init): Adjust.
11940         (target_terminal::inferior): Adjust to per-inferior
11941         terminal_state.
11942         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
11943         (target_terminal::ours, target_terminal::ours_for_output): Use
11944         target_terminal_is_ours_kind.
11945         (target_interrupt): Remove ptid parameter.  Adjust.
11946         (default_target_pass_ctrlc): Adjust.
11947         * target.h (target_ops::to_terminal_save_inferior): New field.
11948         (target_ops::to_interrupt): Remove ptid_t parameter.
11949         (target_interrupt): Remove ptid_t parameter.  Update comment.
11950         (target_pass_ctrlc): Update comment.
11951         * target/target.h (target_terminal_state): New scoped enum,
11952         factored out of ...
11953         (target_terminal::terminal_state): ... here.
11954         (target_terminal::inferior): Update comments.
11955         (target_terminal::restore_inferior): New.
11956         (target_terminal::is_inferior, target_terminal::is_ours)
11957         (target_terminal::is_ours_for_output): Adjust.
11958         (target_terminal::scoped_restore_terminal_state): Adjust to
11959         rename, and call restore_inferior() instead of inferior().
11960         (target_terminal::scoped_restore_terminal_state::m_state): Change
11961         type.
11962         (target_terminal::terminal_state): Rename to ...
11963         (target_terminal::m_terminal_state): ... this and change type.
11964
11965 2018-01-30  Pedro Alves  <palves@redhat.com>
11966
11967         * linux-nat.c (wait_for_signal): New function.
11968         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
11969         directly.
11970         (async_terminal_is_ours)
11971         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
11972         (linux_nat_add_target): Don't override
11973         to_terminal_inferior/to_terminal_ours.
11974
11975 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
11976
11977         * remote.c (remote_follow_fork): Don't call "detach_inferior".
11978
11979 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
11980
11981         * dwarf2read.c (free_dwo_files): Add forward-declaration.
11982         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
11983         dwarf2_per_objfile_free here.
11984         (dwarf2_per_objfile_free): Remove.
11985         (_initialize_dwarf2_read): Don't register
11986         dwarf2_per_objfile_free as a registry cleanup.
11987
11988 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
11989
11990         Avoid compilation errors in MinGW native builds
11991
11992         The error is triggered by including python-internal.h, and the
11993         error message is:
11994
11995              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
11996                       from build-gnulib/import/math.h:27,
11997                       from d:/usr/Python26/include/pyport.h:235,
11998                       from d:/usr/Python26/include/Python.h:58,
11999                       from python/python-internal.h:94,
12000                       from python/py-arch.c:24:
12001              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
12002         using ::hypot;
12003                 ^~~~~
12004
12005         This happens because Python headers define 'hypot' to expand t
12006         '_hypot' in the Windows builds.
12007         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
12008         'hypoth'.  This avoids a compilation error.
12009
12010 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
12011
12012         * MAINTAINERS (Write After Approval): Fix ordering.
12013
12014 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
12015
12016         * MAINTAINERS (Write After Approval): Add Alan Hayward.
12017
12018 2018-01-26  Alan Modra  <amodra@gmail.com>
12019
12020         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
12021         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
12022         Remove nop.  Make const.  Comment.
12023         (powerpc32_plt_stub_so_2): New.
12024         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
12025         Correct count.  Update uses.
12026         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
12027         Move common code reading PLT entry word.  Correct
12028         powerpc32_plt_stub PLT address calculation.
12029         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
12030         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
12031         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
12032         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
12033         (ppc64_standard_linkage8): Likewise.
12034         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
12035         Correct insns description.
12036         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
12037
12038 2018-01-24  Pedro Alves  <palves@redhat.com>
12039
12040         GCC PR libstdc++/83906
12041         * gdbtypes.c (operator==(const dynamic_prop &,
12042         const dynamic_prop &)): New.
12043         (operator==(const range_bounds &, const range_bounds &)): New.
12044         (check_types_equal): Use them instead of memcmp.
12045         * gdbtypes.h (operator==(const dynamic_prop &,
12046         const dynamic_prop &)): Declare.
12047         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
12048         (operator==(const range_bounds &, const range_bounds &)): Declare.
12049         (operator!=(const range_bounds &, const range_bounds &)): Declare.
12050
12051 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12052
12053         * s390-linux-tdep.c (s390_record_address_mask)
12054         (s390_record_calc_disp_common, s390_record_calc_disp)
12055         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12056         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12057         (s390_process_record): Move to s390-tdep.c.
12058         (s390_linux_init_abi_any): Adjust.
12059         * s390-tdep.c (s390_record_address_mask)
12060         (s390_record_calc_disp_common, s390_record_calc_disp)
12061         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12062         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12063         (s390_process_record): Moved from s390-linux-tdep.c
12064         (s390_gdbarch_init): Adjust.
12065
12066 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12067
12068         * s390-linux-nat.c (s390-tdep.h): New include.
12069         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
12070         (HFILES_NO_SRCDIR): Add s390-tdep.h.
12071         (ALLDEPFILES): Add s390-tdep.c.
12072         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
12073         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
12074         * s390-tdep.h: ...this.  New file.
12075         * s390-linux-tdep.c (s390-tdep.h): New include.
12076         (_initialize_s390_tdep): Rename to...
12077         (_initialize_s390_linux_tdep): ...this and adjust.
12078         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
12079         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
12080         s390-tdep.h.
12081         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
12082         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
12083         (s390_is_partial_instruction, s390_software_single_step)
12084         (is_non_branch_ril, s390_displaced_step_copy_insn)
12085         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
12086         (s390_prologue_data, s390_addr, s390_store, s390_load)
12087         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
12088         (s390_register_call_saved, s390_guess_tracepoint_registers)
12089         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
12090         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
12091         (s390_pseudo_register_name, s390_pseudo_register_type)
12092         (s390_pseudo_register_read, s390_pseudo_register_write)
12093         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
12094         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
12095         (s390_addr_bits_remove, s390_address_class_type_flags)
12096         (s390_address_class_type_flags_to_name)
12097         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
12098         (s390_function_arg_float, s390_function_arg_vector)
12099         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
12100         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
12101         (s390_frame_align, s390_register_return_value, s390_return_value)
12102         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
12103         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
12104         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
12105         (s390_trad_frame_prev_register, s390_unwind_cache)
12106         (s390_prologue_frame_unwind_cache)
12107         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
12108         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
12109         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
12110         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
12111         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
12112         (s390_frame_base_address, s390_local_base_address)
12113         (s390_frame_base, s390_gcc_target_options)
12114         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
12115         (s390_validate_reg_range, s390_tdesc_valid)
12116         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
12117         * s390-tdep.c: ...this.  New file.
12118
12119 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12120
12121         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
12122         (s390_process_record, s390_gdbarch_tdep_alloc)
12123         (s390_linux_init_abi_any): Use/set new hook.
12124
12125 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12126
12127         * s390-linux-tdep.c (osabi.h): New include.
12128         (s390_linux_init_abi_31, s390_linux_init_abi_64)
12129         (s390_linux_init_abi_any): New functions.
12130         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
12131
12132 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12133
12134         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
12135         tdesc_has_registers check
12136
12137 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12138
12139         * s390-linux-tdep.c (s390_tdesc_valid): New function.
12140         (s390_validate_reg_range): New macro.
12141         (s390_gdbarch_init): Adjust.
12142
12143 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12144
12145         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
12146         (s390_gdbarch_tdep_alloc): Adjust.
12147         (s390_gdbarch_init): Adjust.
12148
12149 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12150
12151         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
12152         <have_tdb>: Change type to bool.
12153         (s390_gdbarch_tdep_alloc): Adjust.
12154         (s390_gdbarch_init): Adjust.
12155
12156 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12157
12158         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
12159         (gdbarch_tdep) <have_upper, have_vx>: New fields.
12160         (s390_gdbarch_tdep_alloc): New function.
12161         (s390_gdbarch_init): Allocate tdep at start and use its fields
12162         instead of separate variables.
12163
12164 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12165
12166         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
12167         when looking for cached gdbarch and add comment for remaining.
12168
12169 2018-01-22  Pedro Alves  <palves@redhat.com>
12170             Sergio Durigan Junior  <sergiodj@redhat.com>
12171
12172         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
12173         case.
12174
12175 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
12176
12177         * MAINTAINERS: Update my company e-mail address.
12178
12179 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12180
12181         * regcache.c (cooked_write_test): New function.
12182         (_initialize_regcache): Register the test.
12183
12184 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12185
12186         * ia64-tdep.c (ia64_pseudo_register_read): Call
12187         regcache->cooked_read instead of regcache_cooked_read_unsigned.
12188         * m32c-tdep.c (m32c_cat_read): Likewise.
12189         (m32c_r3r2r1r0_read): Likewise.
12190         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
12191         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
12192
12193 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12194
12195         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
12196         method raw_read instead of regcache_raw_read.
12197         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
12198         * arm-tdep.c (arm_neon_quad_read): Likewise.
12199         * avr-tdep.c (avr_pseudo_register_read): Likewise.
12200         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
12201         * frv-tdep.c (frv_pseudo_register_read): Likewise.
12202         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
12203         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
12204         (i386_pseudo_register_read_into_value): Likewise.
12205         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
12206         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
12207         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
12208         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
12209         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
12210         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
12211         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
12212         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
12213         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
12214
12215 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12216
12217         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
12218         * configure.tgt: Remove target mt.
12219         * mt-tdep.c: Remove.
12220         * regcache.c (cooked_read_test): Remove the check for mt.
12221
12222 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12223
12224         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
12225         instead of gdbarch_pseudo_register_read_value.
12226
12227 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
12228
12229         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
12230         language is Ada.
12231
12232 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
12233
12234         * linespec.c (create_sals_line_offset): Remove code that preserved
12235         the symtab_and_line's line number.
12236
12237 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12238
12239         * varobj.c (varobj_create): Don't set valid_block when creating a
12240         floating varobj.
12241
12242 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12243
12244         * varobj.c (varobj_create): Remove out of date comment.
12245
12246 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12247
12248         PR mi/20395
12249         * ada-exp.y (write_var_from_sym): Pass extra parameter when
12250         updating innermost block.
12251         * parse.c (innermost_block_tracker::update): Take extra type
12252         parameter, and check types match before updating innermost block.
12253         (write_dollar_variable): Update innermost block for registers.
12254         * parser-defs.h (enum innermost_block_tracker_type): New enum.
12255         (innermost_block_tracker::innermost_block_tracker): Initialise
12256         m_types member.
12257         (innermost_block_tracker::reset): Take type parameter.
12258         (innermost_block_tracker::update): Take type parameter, and pass
12259         type through as needed.
12260         (innermost_block_tracker::m_types): New member.
12261         * varobj.c (varobj_create): Pass type when reseting innermost
12262         block.
12263
12264 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12265
12266         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
12267         * ada-lang.c (resolve_subexp): Likewise.
12268         * breakpoint.c (set_breakpoint_condition) Likewise.
12269         (watch_command_1) Likewise.
12270         * c-exp.y (variable): Likewise.
12271         * d-exp.y (PrimaryExpression): Likewise.
12272         * f-exp.y (variable): Likewise.
12273         * go-exp.y (variable): Likewise.
12274         * m2-exp.y (variable): Likewise.
12275         * objfiles.c (objfile::~objfile): Likewise.
12276         * p-exp.y (variable): Likewise.
12277         * parse.c (innermost_block): Change type.
12278         * parser-defs.h (class innermost_block_tracker): New.
12279         (innermost_block): Change to innermost_block_tracker.
12280         * printcmd.c (display_command): Switch to innermost_block API.
12281         (do_one_display): Likewise.
12282         * rust-exp.y (do_one_display): Likewise.
12283         * symfile.c (clear_symtab_users): Likewise.
12284         * varobj.c (varobj_create): Switch to innermost_block API, replace
12285         use of innermost_block with block stored on varobj object.
12286
12287 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12288
12289         * expression.h (innermost_block): Remove declaration.
12290         * varobj.c: Add 'parser-defs.h' include.
12291
12292 2018-01-19  Tom Tromey  <tom@tromey.com>
12293
12294         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
12295         symbols in the static and global blocks.
12296
12297 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
12298
12299         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
12300         gdb_ptrace.h, and move including gdb_wait.h ...
12301         * nat/linux-ptrace.h: ... to here.
12302
12303 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
12304
12305         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
12306         inf_ptrace_detach_success.
12307         (inf_ptrace_detach_success): Add inferior parameter, use it
12308         instead of inferior_ptid, pass it to detach_inferior.
12309         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
12310         parameter.
12311         * inferior.c (detach_inferior): Add overload that takes an
12312         inferior object.
12313         * inferior.h (detach_inferior): Likewise.
12314         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
12315         use inferior_ptid, adjust call to inf_ptrace_detach_success.
12316         * linux-thread-db.c (thread_db_detach): Use inf parameter.
12317
12318 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
12319
12320         * target.h (struct target_ops) <to_detach>: Add inferior
12321         parameter.
12322         (target_detach): Likewise.
12323         * target.c (dispose_inferior): Pass inferior down.
12324         (target_detach): Pass inferior down.  Assert that it is equal to
12325         the current inferior.
12326         * aix-thread.c (aix_thread_detach): Pass inferior down.
12327         * corefile.c (core_file_command): Pass current_inferior() down.
12328         * corelow.c (core_detach): Add inferior parameter.
12329         * darwin-nat.c (darwin_detach): Likewise.
12330         * gnu-nat.c (gnu_detach): Likewise.
12331         * inf-ptrace.c (inf_ptrace_detach): Likewise.
12332         * infcmd.c (detach_command): Pass current_inferior() down to
12333         target_detach.
12334         * infrun.c (follow_fork_inferior): Pass parent_inf to
12335         target_detach.
12336         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
12337         target_detach.
12338         * linux-nat.c (linux_nat_detach): Add inferior parameter.
12339         * linux-thread-db.c (thread_db_detach): Likewise.
12340         * nto-procfs.c (procfs_detach): Likewise.
12341         * procfs.c (procfs_detach): Likewise.
12342         * record.c (record_detach): Likewise.
12343         * record.h (struct inferior): Forward-declare.
12344         (record_detach): Add inferior parameter.
12345         * remote-sim.c (gdbsim_detach): Likewise.
12346         * remote.c (remote_detach_1): Likewise.
12347         (remote_detach): Likewise.
12348         (extended_remote_detach): Likewise.
12349         * sol-thread.c (sol_thread_detach): Likewise.
12350         * target-debug.h (target_debug_print_inferior_p): New macro.
12351         * target-delegates.c: Re-generate.
12352         * top.c (kill_or_detach): Pass inferior down to target_detach.
12353         * windows-nat.c (windows_detach): Add inferior parameter.
12354
12355 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
12356
12357         * target.h (struct target_ops) <to_detach>: Remove args
12358         parameter.
12359         (target_detach): Likewise.
12360         * target.c (dispose_inferior): Adjust.
12361         (target_detach): Remove args parameter, adjust.
12362         * aix-thread.c (aix_thread_detach): Adjust.
12363         * corefile.c (core_file_command): Adjust.
12364         * corelow.c (core_detach): Adjust.
12365         * darwin-nat.c (darwin_detach): Adjust.
12366         * gnu-nat.c (gnu_detach): Adjust.
12367         * inf-ptrace.c (inf_ptrace_detach): Adjust.
12368         * infcmd.c (detach_command): Adjust
12369         * infrun.c (follow_fork_inferior): Adjust.
12370         (handle_vfork_child_exec_or_exit): Adjust.
12371         * linux-fork.c (linux_fork_detach): Remove args parameter.
12372         * linux-fork.h (linux_fork_detach): Likewise.
12373         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
12374         * linux-thread-db.c (thread_db_detach): Likewise.
12375         * nto-procfs.c (procfs_detach): Likewise.
12376         * procfs.c (procfs_detach): Likewise.
12377         (do_detach): Remove signo parameter.
12378         * record.c (record_detach): Remove args parameter.
12379         * record.h (record_detach): Likewise.
12380         * remote-sim.c (gdbsim_detach): Likewise.
12381         * remote.c (remote_detach_1): Likewise.
12382         (remote_detach): Likewise.
12383         (extended_remote_detach): Likewise.
12384         * sol-thread.c (sol_thread_detach): Likewise.
12385         * target-delegates.c: Re-generate.
12386         * top.c (struct qt_args) <args>: Remove field.
12387         (kill_or_detach): Don't pass args.
12388         (quit_force): Don't set args.
12389         * windows-nat.c (windows_detach): Remove args parameter.
12390
12391 2018-01-19  Yao Qi  <yao.qi@linaro.org>
12392
12393         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
12394         (arm_linux_init_abi): Install it.
12395
12396 2018-01-19  Yao Qi  <yao.qi@linaro.org>
12397
12398         * osabi.c (gdb_osabi_names): Extend the regexp for
12399         arm-linux-gnueabihf.
12400
12401 2018-01-18  Yao Qi  <yao.qi@linaro.org>
12402
12403         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
12404         m_abbrevs.
12405         (abbrev_table::add_abbrev): Update.
12406         (abbrev_table::lookup_abbrev): Update.
12407
12408 2018-01-18  Yao Qi  <yao.qi@linaro.org>
12409
12410         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
12411
12412 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
12413
12414         * compile/compile.c (compile_to_object): Convert "triplet_rx"
12415         to "std::string".
12416
12417 2018-01-17  Tom Tromey  <tom@tromey.com>
12418
12419         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
12420
12421 2018-01-17  Tom Tromey  <tom@tromey.com>
12422
12423         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
12424         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
12425         (create_array_type_with_stride): Update.
12426         * dwarf2read.c (set_die_type): Update.
12427
12428 2018-01-17  Tom Tromey  <tom@tromey.com>
12429
12430         * dwarf2read.c (delayed_method_info): Remove typedef.
12431         (dwarf2_cu::method_info): Now a std::vector.
12432         (add_to_method_list): Update.
12433         (free_delayed_list): Remove.
12434         (compute_delayed_physnames): Update.
12435         (process_full_comp_unit, process_full_type_unit): Clear the method
12436         list.  Remove cleanups.
12437         (psymtab_include_file_name): Add name_holder parameter.  Use
12438         unique_xmalloc_ptr.
12439         (dwarf_decode_lines): Update.
12440
12441 2018-01-17  Tom Tromey  <tom@tromey.com>
12442             Simon Marchi  <simon.marchi@ericsson.com>
12443
12444         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
12445         (dwarf2_per_objfile::free_cached_comp_units)
12446         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
12447         (init_cutu_and_read_dies_no_follow): Update.
12448         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
12449         (dwarf2_cu::~dwarf2_cu): New.
12450         (free_heap_comp_unit, free_stack_comp_unit): Remove.
12451         (age_cached_comp_units, free_one_cached_comp_unit): Update.
12452
12453 2018-01-17  Tom Tromey  <tom@tromey.com>
12454             Simon Marchi  <simon.marchi@ericsson.com>
12455
12456         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
12457         (struct die_reader_specs) <abbrev_table>: New member.
12458         (struct abbrev_table): Add constructor.
12459         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
12460         <abbrev_obstack>: Now an auto_obstack.
12461         (abbrev_table_up): New typedef.
12462         (init_cu_die_reader): Add abbrev_table parameter.
12463         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
12464         Add result_dwo_abbrev_table.
12465         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
12466         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
12467         Update.
12468         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
12469         parameter.
12470         (skip_children): Update.
12471         (abbrev_table::alloc_abbrev): Rename from
12472         abbrev_table_alloc_abbrev.
12473         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
12474         (abbrev_table::lookup_abbrev): Rename from
12475         abbrev_table_lookup_abbrev.
12476         (abbrev_table_read_table): Return abbrev_table_up.
12477         (abbrev_table_free, abbrev_table_free_cleanup)
12478         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
12479         (load_partial_dies): Update.
12480
12481 2018-01-17  Tom Tromey  <tom@tromey.com>
12482
12483         * dwarf2read.c (dwarf2_compute_name): Update comment.
12484         (read_func_scope, read_variable): Update.
12485         (new_symbol): Remove.
12486         (new_symbol_full): Rename to new_symbol.
12487
12488 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
12489
12490         PR gdb/16577
12491         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
12492         a warning instead of throwing an error, set section size to 0 and return
12493         NULL.
12494         * gdb_bfd.h (gdb_bfd_map_section): Update description.
12495
12496 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
12497
12498         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
12499         std::string.
12500         (linux_ptrace_attach_fail_reason_string): Likewise.
12501         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
12502         Likewise.
12503         (linux_ptrace_attach_fail_reason_string): Likewise.
12504         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
12505
12506 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
12507
12508         * linux-nat.c (linux_nat_attach): Remove xstrdup.
12509
12510 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
12511
12512         PR gdb/21559
12513         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
12514         checking for fs_base/gs_base fields in struct user_regs_struct.
12515         * configure: Regenerate.
12516
12517 2018-01-17  Yao Qi  <yao.qi@linaro.org>
12518
12519         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
12520         function.
12521         (aarch64_linux_init_abi): Install it to gdbarch hook
12522         gcc_target_options.
12523
12524 2018-01-15  Pedro Alves  <palves@redhat.com>
12525
12526         * common/signals-state-save-restore.c
12527         (save_original_signals_state): Fix typos.
12528
12529 2017-01-12  Tom Tromey  <tom@tromey.com>
12530             Sergio Durigan Junior  <sergiodj@redhat.com>
12531
12532         * Makefile.in (install-only): Install gdb-add-index.
12533
12534 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
12535
12536         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
12537
12538 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12539
12540         * infrun.c (keep_going_pass_signal): Clear step-over info when
12541         insert_breakpoints fails.
12542
12543 2018-01-11  Pedro Alves  <palves@redhat.com>
12544
12545         PR gdb/22583
12546         * infrun.c (resume): Rename to ...
12547         (resume_1): ... this.
12548         (resume): Reimplement as wrapper around resume_1.
12549
12550 2018-01-11  Pedro Alves  <palves@redhat.com>
12551
12552         PR remote/22597
12553         * remote.c (remote_parse_stop_reply): Default to the last-set
12554         general thread instead of to 'magic_null_ptid'.
12555
12556 2018-01-10  Pedro Alves  <palves@redhat.com>
12557
12558         * language.h (language_get_symbol_name_matcher): Rename ...
12559         (get_symbol_name_matcher): ... this.
12560         * language.c (language_get_symbol_name_matcher): Ditto.
12561         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
12562         callers adjusted.
12563
12564 2018-01-10  Pedro Alves  <palves@redhat.com>
12565
12566         PR gdb/22670
12567         * dwarf2read.c
12568         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
12569         Adjust to use language_get_symbol_name_matcher instead of
12570         language_defn::la_get_symbol_name_matcher.
12571         * language.c (language_get_symbol_name_matcher): If in Ada mode
12572         and the lookup name is a verbatim match, return Ada's matcher.
12573         * language.h (language_get_symbol_name_matcher): Adjust comment.
12574         (ada_lookup_name_info::verbatim_p):: New method.
12575
12576 2018-01-10  Pedro Alves  <palves@redhat.com>
12577
12578         PR gdb/22670
12579         * ada-lang.c (ada_collect_symbol_completion_matches): If the
12580         minsym's language is language_auto or language_cplus, pass down
12581         language_ada instead.
12582         * symtab.c (compare_symbol_name): Don't frob symbol language here.
12583
12584 2018-01-10  Pedro Alves  <palves@redhat.com>
12585
12586         PR gdb/22670
12587         * minsyms.c (linkage_name_str): New function.
12588         (iterate_over_minimal_symbols): Use it.
12589
12590 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12591
12592         * NEWS: Document that 'info proc' now works on FreeBSD.
12593
12594 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12595
12596         * configure.ac: Check for kinfo_getfile in libutil.
12597         * configure: Regenerate.
12598         * config.in: Regenerate.
12599         * fbsd-nat.c: Include "fbsd-tdep.h".
12600         (fbsd_fetch_cmdline): New.
12601         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
12602         rather than calling error.
12603         (fbsd_info_proc): New.
12604         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
12605         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
12606         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
12607
12608 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12609
12610         * fbsd-nat.c (struct free_deleter): Remove.
12611         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
12612
12613 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12614
12615         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
12616         NULL for an empty pathname.
12617
12618 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12619
12620         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
12621         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
12622         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
12623         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
12624         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
12625         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
12626         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
12627         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
12628         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
12629         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
12630         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
12631         (fbsd_core_fetch_timeval, fbsd_print_sigset)
12632         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
12633         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
12634         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
12635
12636 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
12637
12638         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
12639         (gnu_xfer_auxv): New function.
12640         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
12641         TARGET_OBJECT_AUXV.
12642
12643 2018-01-08  Yao Qi  <yao.qi@linaro.org>
12644             Simon Marchi  <simon.marchi@ericsson.com>
12645
12646         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
12647         common/selftest.c.
12648         (COMMON_OBS): Remove selftest.o.
12649         * configure.ac: Append selftest-arch.c and common/selftest.c to
12650         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
12651         * configure: Re-generated.
12652         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
12653         GDB_SELF_TEST.
12654         (maintenance_info_selftests): Likewise.
12655
12656 2018-01-08  Xavier Roirand  <roirand@adacore.com>
12657
12658         * ada-valprint.c (val_print_packed_array_elements): Use
12659         proper number of elements when printing an array indexed
12660         by an enumeration type.
12661
12662 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12663
12664         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
12665         (dw2_get_file_names_reader): Adjust.
12666         (lookup_dwo_signatured_type): Adjust.
12667         (lookup_dwp_signatured_type): Adjust.
12668         (lookup_signatured_type): Adjust.
12669         (create_type_unit_group): Adjust.
12670         (get_type_unit_group): Adjust.
12671         (process_psymtab_comp_unit_reader): Adjust.
12672         (build_type_psymtabs_reader): Adjust.
12673         (scan_partial_symbols): Adjust.
12674         (add_partial_symbol): Adjust.
12675         (add_partial_subprogram): Adjust.
12676         (peek_die_abbrev): Adjust.
12677         (fixup_go_packaging): Adjust.
12678         (process_imported_unit_die): Adjust.
12679         (dwarf2_compute_name): Adjust.
12680         (dwarf2_physname): Adjust.
12681         (read_import_statement): Adjust.
12682         (handle_DW_AT_stmt_list): Adjust.
12683         (read_file_scope): Adjust.
12684         (read_func_scope): Adjust.
12685         (read_lexical_block_scope): Adjust.
12686         (read_call_site_scope): Adjust.
12687         (read_variable): Adjust.
12688         (dwarf2_rnglists_process): Adjust.
12689         (dwarf2_ranges_process): Adjust.
12690         (dwarf2_ranges_read): Adjust.
12691         (dwarf2_get_pc_bounds): Adjust.
12692         (dwarf2_record_block_ranges): Adjust.
12693         (dwarf2_add_field): Adjust.
12694         (dwarf2_add_member_fn): Adjust.
12695         (read_structure_type): Adjust.
12696         (process_structure_scope): Adjust.
12697         (read_enumeration_type): Adjust.
12698         (read_array_type): Adjust.
12699         (mark_common_block_symbol_computed): Adjust.
12700         (read_common_block): Adjust.
12701         (read_namespace_type): Adjust.
12702         (read_namespace): Adjust.
12703         (read_module_type): Adjust.
12704         (read_tag_pointer_type): Adjust.
12705         (read_tag_ptr_to_member_type): Adjust.
12706         (read_tag_string_type): Adjust.
12707         (read_subroutine_type): Adjust.
12708         (read_typedef): Adjust.
12709         (read_base_type): Adjust.
12710         (attr_to_dynamic_prop): Adjust.
12711         (read_subrange_type): Adjust.
12712         (read_unspecified_type): Adjust.
12713         (dwarf2_read_abbrevs): Adjust.
12714         (load_partial_dies): Adjust.
12715         (read_partial_die): Adjust.
12716         (find_partial_die): Adjust.
12717         (guess_partial_die_structure_name): Adjust.
12718         (fixup_partial_die): Adjust.
12719         (read_attribute_value): Adjust.
12720         (read_addr_index): Adjust.
12721         (read_addr_index_from_leb128): Adjust.
12722         (read_str_index): Adjust.
12723         (dwarf2_string_attr): Adjust.
12724         (get_debug_line_section): Adjust.
12725         (dwarf_decode_line_header): Adjust.
12726         (lnp_state_machine::check_line_address): Adjust.
12727         (dwarf_decode_lines_1): Adjust.
12728         (dwarf_decode_lines): Adjust.
12729         (dwarf2_start_symtab): Adjust.
12730         (var_decode_location): Adjust.
12731         (new_symbol_full): Adjust.
12732         (dwarf2_const_value_data): Adjust.
12733         (dwarf2_const_value_attr): Adjust.
12734         (dwarf2_const_value): Adjust.
12735         (die_type): Adjust.
12736         (die_containing_type): Adjust.
12737         (build_error_marker_type): Adjust.
12738         (lookup_die_type): Adjust.
12739         (guess_full_die_structure_name): Adjust.
12740         (anonymous_struct_prefix): Adjust.
12741         (determine_prefix): Adjust.
12742         (dwarf2_name): Adjust.
12743         (follow_die_ref_or_sig): Adjust.
12744         (follow_die_offset): Adjust.
12745         (follow_die_ref): Adjust.
12746         (follow_die_sig_1): Adjust.
12747         (follow_die_sig): Adjust.
12748         (get_signatured_type): Adjust.
12749         (get_DW_AT_signature_type): Adjust.
12750         (decode_locdesc): Adjust.
12751         (dwarf_decode_macros): Adjust.
12752         (cu_debug_loc_section): Adjust.
12753         (fill_in_loclist_baton): Adjust.
12754         (dwarf2_symbol_mark_computed): Adjust.
12755         (init_one_comp_unit): Don't assign
12756         dwarf2_cu::dwarf2_per_objfile.
12757         (set_die_type): Adjust.
12758
12759 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
12760
12761         * dwarf2read.c (struct mapped_debug_names): Add constructor.
12762         <dwarf2_per_objfile>: New field.
12763         (dwarf2_per_objfile): Remove global.
12764         (get_dwarf2_per_objfile): New function.
12765         (set_dwarf2_per_objfile): New function.
12766         (dwarf2_build_psymtabs_hard): Change objfile parameter to
12767         dwarf2_per_objfile.
12768         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12769         (read_abbrev_offset): Likewise.
12770         (read_indirect_string): Likewise.
12771         (read_indirect_line_string): Likewise.
12772         (read_indirect_string_at_offset): Likewise.
12773         (read_indirect_string_from_dwz): Likewise.
12774         (dwarf2_find_containing_comp_unit): Change objfile parameter to
12775         dwarf2_per_objfile.
12776         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12777         (create_all_comp_units): Change objfile parameter to
12778         dwarf2_per_objfile.
12779         (create_all_type_units): Likewise.
12780         (process_queue): Add dwarf2_per_objfile parameter.
12781         (read_and_check_comp_unit_head): Likewise.
12782         (lookup_dwo_unit_in_dwp): Likewise.
12783         (get_dwp_file): Likewise.
12784         (process_cu_includes): Likewise.
12785         (struct free_dwo_file_cleanup_data): New struct.
12786         (dwarf2_has_info): Use get_dwarf2_per_objfile and
12787         set_dwarf2_per_objfile.
12788         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
12789         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
12790         context, adjust calls.
12791         (dw2_instantiate_symtab): Likewise.
12792         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
12793         (dw2_get_cu): Likewise.
12794         (create_cu_from_index_list): Change objfile parameter to
12795         dwarf2_per_objfile.
12796         (create_cus_from_index_list): Get dwarf2_per_objfile from
12797         context, adjust calls.
12798         (create_cus_from_index): Likewise.
12799         (create_signatured_type_table_from_index): Change objfile
12800         parameter to dwarf2_per_objfile.
12801         (create_signatured_type_table_from_debug_names): Change objfile
12802         parameter to dwarf2_per_objfile.
12803         (create_addrmap_from_index): Likewise.
12804         (create_addrmap_from_aranges): Likewise.
12805         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
12806         (dw2_setup): Remove.
12807         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
12808         context.
12809         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
12810         get_dwarf2_per_objfile.
12811         (dw2_forget_cached_source_info): Likewise.
12812         (dw2_map_symtabs_matching_filename): Likewise.
12813         (struct dw2_symtab_iterator) <index>: Remove.
12814         <dwarf2_per_objfile>: New field.
12815         (dw2_symtab_iter_init): Replace index parameter with
12816         dwarf2_per_objfile.
12817         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
12818         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
12819         (dw2_print_stats): Likewise.
12820         (dw2_dump): Likewise.
12821         (dw2_expand_symtabs_for_function): Likewise.
12822         (dw2_expand_all_symtabs): Likewise.
12823         (dw2_expand_symtabs_with_fullname): Likewise.
12824         (dw2_expand_marked_cus): Replace index and objfile parameters
12825         with dwarf2_per_objfile.
12826         (dw_expand_symtabs_matching_file_matcher): Add
12827         dwarf2_per_objfile parameter and adjust calls.
12828         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
12829         adjust calls.
12830         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
12831         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
12832         adjust calls.
12833         (create_cus_from_debug_names_list): Replace objfile parameter
12834         with dwarf2_per_objfile and adjust calls.
12835         (create_cus_from_debug_names): Likewise.
12836         (dwarf2_read_debug_names): Likewise.
12837         (mapped_debug_names::namei_to_name): Adjust call.
12838         (dw2_debug_names_iterator::next): Likewise.
12839         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
12840         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
12841         (dw2_debug_names_dump): Likewise.
12842         (dw2_debug_names_expand_symtabs_for_function): Likewise.
12843         (dw2_debug_names_expand_symtabs_matching): Likewise.
12844         (dwarf2_initialize_objfile): Likewise.
12845         (dwarf2_build_psymtabs): Likewise.
12846         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
12847         this_cu.
12848         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
12849         (read_and_check_comp_unit_head): Likewise.
12850         (read_abbrev_offset): Likewise.
12851         (create_debug_type_hash_table): Likewise.
12852         (create_debug_types_hash_table): Likewise.
12853         (create_all_type_units): Replace objfile parameter with
12854         dwarf2_per_objfile.
12855         (add_type_unit): Add dwarf2_per_objfile parameter.
12856         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
12857         with dwarf2_per_objfile.
12858         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
12859         (lookup_dwp_signatured_type): Likewise.
12860         (lookup_signatured_type): Likewise.
12861         (read_cutu_die_from_dwo): Likewise.
12862         (init_tu_and_read_dwo_dies): Likewise.
12863         (init_cutu_and_read_dies): Likewise.
12864         (init_cutu_and_read_dies_no_follow): Likewise.
12865         (allocate_type_unit_groups_table): Add objfile parameter.
12866         (create_type_unit_group): Use dwarf2_per_objfile from cu.
12867         (get_type_unit_group): Likewise.
12868         (process_psymtab_comp_unit): Update call.
12869         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
12870         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
12871         (print_tu_stats): Likewise.
12872         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
12873         in void* parameter.
12874         (build_type_psymtabs): Change objfile parameter to
12875         dwarf2_per_objfile.
12876         (process_skeletonless_type_unit): Use dwarf2_per_objfile
12877         passed in void* parameter.
12878         (process_skeletonless_type_units): Change objfile parameter to
12879         dwarf2_per_objfile.
12880         (set_partial_user): Likewise.
12881         (dwarf2_build_psymtabs_hard): Likewise.
12882         (read_comp_units_from_section): Likewise.
12883         (create_all_comp_units): Likewise.
12884         (scan_partial_symbols): Update calls.
12885         (add_partial_symbol): Likewise.
12886         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
12887         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
12888         (process_queue): Add dwarf2_per_objfile parameter.
12889         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
12890         (compute_compunit_symtab_includes): Likewise.
12891         (process_cu_includes): Add dwarf2_per_objfile parameter.
12892         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
12893         (process_full_type_unit): Likewise.
12894         (process_imported_unit_die): Update call.
12895         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
12896         (read_file_scope): Likewise.
12897         (allocate_dwo_file_hash_table): Add objfile parameter.
12898         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
12899         (create_cus_hash_table): Likewise.
12900         (create_dwp_hash_table): Likewise.
12901         (create_dwo_unit_in_dwp_v1): Likewise.
12902         (create_dwp_v2_section): Likewise.
12903         (create_dwo_unit_in_dwp_v2): Likewise.
12904         (lookup_dwo_unit_in_dwp): Likewise.
12905         (try_open_dwop_file): Likewise.
12906         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
12907         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
12908         cleanup to include a reference to dwarf2_per_objfile.
12909         (open_dwp_file): Add dwarf2_per_objfile parameter.
12910         (open_and_init_dwp_file): Likewise.
12911         (get_dwp_file): Likewise.
12912         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
12913         (queue_and_load_all_dwo_tus): Update call.
12914         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
12915         data.
12916         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
12917         (dwarf2_ranges_process): Likewise.
12918         (dwarf2_get_pc_bounds): Likewise.
12919         (mark_common_block_symbol_computed): Likewise.
12920         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12921         (dwarf2_read_abbrevs): Update call.
12922         (read_partial_die): Use dwarf2_per_objfile from cu.
12923         (find_partial_die): Likewise.
12924         (fixup_partial_die): Likewise.
12925         (read_attribute_value): Likewise.
12926         (read_indirect_string_at_offset_from): Add objfile parameter.
12927         (read_indirect_string_at_offset): Add dwarf2_per_objfile
12928         parameter.
12929         (read_indirect_string_from_dwz): Add objfile parameter.
12930         (read_indirect_string): Add objfile parameter.
12931         (read_addr_index_1): Add dwarf2_per_objfile parameter.
12932         (read_addr_index): Use dwarf2_per_objfile from cu.
12933         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
12934         call dw2_setup.
12935         (read_str_index): Use dwarf2_per_objfile from cu.
12936         (get_debug_line_section): Likewise.
12937         (read_formatted_entries): Add dwarf2_per_objfile parameter.
12938         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
12939         (new_symbol_full): Use dwarf2_per_objfile from cu.
12940         (build_error_marker_type): Likewise.
12941         (lookup_die_type): Likewise.
12942         (determine_prefix): Likewise.
12943         (follow_die_offset): Likewise.
12944         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
12945         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
12946         (dwarf2_fetch_die_type_sect_off): Likewise.
12947         (dwarf2_get_die_type): Likewise.
12948         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
12949         (get_signatured_type): Likewise.
12950         (get_DW_AT_signature_type): Likewise.
12951         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
12952         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
12953         (cu_debug_loc_section): Likewise.
12954         (fill_in_loclist_baton): Likewise.
12955         (dwarf2_symbol_mark_computed): Likewise.
12956         (dwarf2_find_containing_comp_unit): Change objfile parameter to
12957         dwarf2_per_objfile.
12958         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
12959         parameter.
12960         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12961         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
12962         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
12963         (set_die_type): Use dwarf2_free_objfile from cu.
12964         (get_die_type_at_offset): Likewise.
12965         (dwarf2_per_objfile_free): Don't assign global variable.
12966         (debug_names) <constructor>: Add dwarf2_per_objfile
12967         parameter, update m_debugstrlookup construction.
12968         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
12969         parameter.
12970         <m_dwarf2_per_objfile>: New field.
12971         <lookup>: Use m_dwarf2_per_objfile.
12972         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
12973         (psyms_seen_size): Likewise.
12974         (write_gdbindex): Replace objfile parameter with
12975         dwarf2_per_objfile.
12976         (write_debug_names): Likewise.
12977         (write_psymtabs_to_index): Likewise.
12978         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
12979         calls.
12980
12981 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
12982
12983         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
12984         <dwarf2_per_objfile>: New field.
12985         (struct dwarf2_per_cu_data) <objfile>: Remove.
12986         <dwarf2_per_objfile>: New field.
12987         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
12988         of objfile.
12989         (create_signatured_type_table_from_index): Likewise.
12990         (create_debug_type_hash_table): Likewise.
12991         (fill_in_sig_entry_from_dwo_entry): Likewise.
12992         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
12993         (create_type_unit_group): Assign dwarf2_per_objfile instead of
12994         objfile.
12995         (create_partial_symtab): Access objfile through
12996         dwarf2_per_objfile.
12997         (process_psymtab_comp_unit_reader): Likewise.
12998         (read_comp_units_from_section): Likewise.
12999         (scan_partial_symbols): Likewise.
13000         (add_partial_symbol): Likewise.
13001         (add_partial_subprogram): Likewise.
13002         (peek_die_abbrev): Likewise.
13003         (fixup_go_packaging): Likewise.
13004         (process_full_comp_unit): Likewise.
13005         (process_full_type_unit): Likewise.
13006         (process_imported_unit_die): Likewise.
13007         (dwarf2_compute_name): Likewise.
13008         (dwarf2_physname): Likewise.
13009         (read_import_statement): Likewise.
13010         (create_cus_hash_table): Assign dwarf2_physname instead of
13011         objfile.
13012         (read_func_scope): Access objfile through dwarf2_per_objfile.
13013         (read_lexical_block_scope): Likewise.
13014         (read_call_site_scope): Likewise.
13015         (read_variable): Likewise.
13016         (dwarf2_rnglists_process): Likewise.
13017         (dwarf2_ranges_process): Likewise.
13018         (dwarf2_ranges_read): Likewise.
13019         (dwarf2_record_block_ranges): Likewise.
13020         (dwarf2_add_field): Likewise.
13021         (dwarf2_add_member_fn): Likewise.
13022         (read_structure_type): Likewise.
13023         (process_structure_scope): Likewise.
13024         (read_enumeration_type): Likewise.
13025         (read_array_type): Likewise.
13026         (read_common_block): Likewise.
13027         (read_namespace_type): Likewise.
13028         (read_namespace): Likewise.
13029         (read_module_type): Likewise.
13030         (read_tag_pointer_type): Likewise.
13031         (read_tag_ptr_to_member_type): Likewise.
13032         (read_tag_string_type): Likewise.
13033         (read_subroutine_type): Likewise.
13034         (read_typedef): Likewise.
13035         (read_base_type): Likewise.
13036         (attr_to_dynamic_prop): Likewise.
13037         (read_subrange_type): Likewise.
13038         (read_unspecified_type): Likewise.
13039         (load_partial_dies): Likewise.
13040         (read_partial_die): Likewise.
13041         (find_partial_die): Likewise.
13042         (guess_partial_die_structure_name): Likewise.
13043         (fixup_partial_die): Likewise.
13044         (read_attribute_value): Likewise.
13045         (read_addr_index_from_leb128): Likewise.
13046         (dwarf2_read_addr_index): Likewise.
13047         (dwarf2_string_attr): Likewise.
13048         (lnp_state_machine::check_line_address): Likewise.
13049         (dwarf_decode_lines_1): Likewise.
13050         (dwarf_decode_lines): Likewise.
13051         (dwarf2_start_symtab): Likewise.
13052         (var_decode_location): Likewise.
13053         (new_symbol_full): Likewise.
13054         (dwarf2_const_value_data): Likewise.
13055         (dwarf2_const_value_attr): Likewise.
13056         (dwarf2_const_value): Likewise.
13057         (die_type): Likewise.
13058         (die_containing_type): Likewise.
13059         (lookup_die_type): Likewise.
13060         (guess_full_die_structure_name): Likewise.
13061         (anonymous_struct_prefix): Likewise.
13062         (dwarf2_name): Likewise.
13063         (follow_die_ref_or_sig): Likewise.
13064         (follow_die_offset): Likewise.
13065         (follow_die_ref): Likewise.
13066         (dwarf2_fetch_die_loc_sect_off): Likewise.
13067         (dwarf2_fetch_constant_bytes): Likewise.
13068         (dwarf2_fetch_die_type_sect_off): Likewise.
13069         (dwarf2_get_die_type): Likewise.
13070         (follow_die_sig): Likewise.
13071         (decode_locdesc): Likewise.
13072         (dwarf2_per_cu_objfile): Likewise.
13073         (dwarf2_per_cu_text_offset): Likewise.
13074         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
13075         objfile.
13076         (set_die_type): Access objfile through
13077         dwarf2_per_objfile.
13078
13079 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
13080
13081         * valprint.c (converted_character_d): Remove typedef.
13082         (DEF_VEC_O (converted_character_d)): Remove.
13083         (count_next_character): Use std::vector.
13084         (print_converted_chars_to_obstack): Likewise.
13085         (generic_printstr): Likewise.
13086
13087 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
13088
13089         * xml-support.h (struct gdb_xml_value): Add constructor.
13090         <value>: Change type to unique_xmalloc_ptr.
13091         (gdb_xml_value_s): Remove typedef.
13092         (DEF_VEC_O (gdb_xml_value_s)): Remove.
13093         (gdb_xml_element_start_handler): Change parameter type to
13094         std::vector.
13095         (xml_find_attribute): Likewise.
13096         * xml-support.c (xml_find_attribute): Change parameter type to
13097         std::vector and adjust.
13098         (gdb_xml_values_cleanup): Remove.
13099         (gdb_xml_parser::start_element): Adjust to std::vector.
13100         (xinclude_start_include): Change paraeter type to std::vector
13101         and adjust.
13102         * btrace.c (check_xml_btrace_version): Likewise.
13103         (parse_xml_btrace_block): Likewise.
13104         (parse_xml_btrace_pt_config_cpu): Likewise.
13105         (parse_xml_btrace_pt): Likewise.
13106         (parse_xml_btrace_conf_bts): Likewise.
13107         (parse_xml_btrace_conf_pt): Likewise.
13108         * memory-map.c (memory_map_start_memory): Likewise.
13109         (memory_map_start_property): Likewise.
13110         * osdata.c (osdata_start_osdata): Likewise.
13111         (osdata_start_item): Likewise.
13112         (osdata_start_column): Likewise.
13113         * remote.c (start_thread): Likewise.
13114         * solib-aix.c (library_list_start_library): Likewise.
13115         (library_list_start_list): Likewise.
13116         * solib-svr4.c (library_list_start_library): Likewise.
13117         (svr4_library_list_start_list): Likewise.
13118         * solib-target.c (library_list_start_segment): Likewise.
13119         (library_list_start_section): Likewise.
13120         (library_list_start_library): Likewise.
13121         (library_list_start_list): Likewise.
13122         * tracepoint.c (traceframe_info_start_memory): Likewise.
13123         (traceframe_info_start_tvar): Likewise.
13124         * xml-syscall.c (syscall_start_syscall): Likewise.
13125         * xml-tdesc.c (tdesc_start_target): Likewise.
13126         (tdesc_start_feature): Likewise.
13127         (tdesc_start_reg): Likewise.
13128         (tdesc_start_union): Likewise.
13129         (tdesc_start_struct): Likewise.
13130         (tdesc_start_flags): Likewise.
13131         (tdesc_start_enum): Likewise.
13132         (tdesc_start_field): Likewise.
13133         (tdesc_start_enum_value): Likewise.
13134         (tdesc_start_vector): Likewise.
13135
13136 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
13137
13138         * extension.h (struct xmethod_worker) <clone>: Remove.
13139         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
13140         Remove.
13141         (python_xmethod_worker::clone): Remove.
13142         * valops.c (find_overload_match): Use std::move instead of
13143         clone.
13144
13145 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
13146
13147         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
13148         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
13149         <free_xmethod_worker_data>: Remove.
13150         <get_matching_xmethod_workers>: Chance VEC to std::vector.
13151         <get_xmethod_arg_types>: Remove.
13152         <get_xmethod_result_type>: Remove.
13153         <invoke_xmethod>: Remove.
13154         * extension.c (new_xmethod_worker): Remove.
13155         (clone_xmethod_worker): Remove.
13156         (get_matching_xmethod_workers): Return void, pass std::vector by
13157         pointer.
13158         (get_xmethod_arg_types): Rename to...
13159         (xmethod_worker::get_arg_types): ... this, and adjust.
13160         (get_xmethod_result_type): Rename to...
13161         (xmethod_worker::get_result_type): ... this, and adjust.
13162         (invoke_xmethod): Remove.
13163         (free_xmethod_worker): Remove.
13164         (free_xmethod_worker_vec): Remove.
13165         * extension.h (enum ext_lang_rc): Move here from
13166         extension-priv.h.
13167         (struct xmethod_worker): Add constructor and destructor.
13168         <data>: Remove.
13169         <value>: Remove.
13170         <invoke, clone, do_get_result_type, do_get_arg_types>: New
13171         virtual pure methods.
13172         <get_arg_types, get_result_type>: New methods.
13173         (xmethod_worker_ptr): Remove typedef.
13174         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
13175         (xmethod_worker_vec): Remove typedef.
13176         (xmethod_worker_up): New typedef.
13177         (invoke_xmethod): Remove.
13178         (clone_xmethod_worker): Remove.
13179         (free_xmethod_worker): Remove.
13180         (free_xmethod_worker_vec): Remove.
13181         (get_xmethod_arg_types): Remove.
13182         (get_xmethod_result_type): Remove.
13183         * valops.c (find_method_list): Use std::vector, don't use
13184         intermediate vector.
13185         (value_find_oload_method_list): Use std::vector.
13186         (find_overload_match): Use std::vector.
13187         (find_oload_champ): Use std::vector.
13188         * value.c (value_free): Use operator delete.
13189         (value_of_xmethod): Rename to...
13190         (value_from_xmethod): ... this.  Don't assign
13191         xmethod_worker::value, take rvalue-reference.
13192         (result_type_of_xmethod): Adjust.
13193         (call_xmethod): Adjust.
13194         * value.h: Include extension.h.
13195         (struct xmethod_worker): Don't forward-declare.
13196         (value_of_xmethod): Rename to...
13197         (value_from_xmethod): ... this, take rvalue-reference.
13198         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
13199         (struct python_xmethod_worker): ... this, add constructor and
13200         destructor.
13201         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
13202         (gdbpy_free_xmethod_worker_data): Rename to...
13203         (python_xmethod_worker::~python_xmethod_worker): ... this and
13204         adjust.
13205         (gdbpy_clone_xmethod_worker_data): Rename to...
13206         (python_xmethod_worker::clone): ... this and adjust.
13207         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
13208         temporary vector.
13209         (gdbpy_get_xmethod_arg_types): Rename to...
13210         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
13211         (gdbpy_get_xmethod_result_type): Rename to...
13212         (python_xmethod_worker::do_get_result_type): ... this and
13213         adjust.
13214         (gdbpy_invoke_xmethod): Rename to...
13215         (python_xmethod_worker::invoke): ... this and adjust.
13216         (new_python_xmethod_worker): Rename to...
13217         (python_xmethod_worker::python_xmethod_worker): ... this and
13218         adjust.
13219         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
13220         Remove.
13221         (gdbpy_free_xmethod_worker_data): Remove.
13222         (gdbpy_get_matching_xmethod_workers): Use std::vector.
13223         (gdbpy_get_xmethod_arg_types): Remove.
13224         (gdbpy_get_xmethod_result_type): Remove.
13225         (gdbpy_invoke_xmethod): Remove.
13226         * python/python.c (python_extension_ops): Remove obsolete
13227         callbacks.
13228
13229 2018-01-05  Pedro Alves  <palves@redhat.com>
13230
13231         PR gdb/18653
13232         * common/signals-state-save-restore.c
13233         (save_original_signals_state): New parameter 'quiet'.  Warn if we
13234         find a custom handler preinstalled, instead of internal erroring.
13235         But only warn if !quiet.
13236         * common/signals-state-save-restore.h
13237         (save_original_signals_state): New parameter 'quiet'.
13238         * main.c (captured_main_1): Move save_original_signals_state call
13239         after option handling, and pass QUIET.
13240
13241 2018-01-05  Pedro Alves  <palves@redhat.com>
13242
13243         * spu-tdep.c (spu_catch_start): Pass
13244         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
13245
13246 2018-01-05  Pedro Alves  <palves@redhat.com>
13247
13248         PR gdb/22670
13249         * ada-lang.c (literal_symbol_name_matcher): New function.
13250         (ada_get_symbol_name_matcher): Use it for
13251         symbol_name_match_type::SEARCH_NAME.
13252         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
13253         it down instead of assuming symbol_name_match_type::FULL.
13254         * block.h (block_lookup_symbol): New parameter 'match_type'.
13255         * c-valprint.c (print_unpacked_pointer): Use
13256         lookup_symbol_search_name instead of lookup_symbol.
13257         * compile/compile-object-load.c (get_out_value_type): Pass down
13258         symbol_name_match_type::SEARCH_NAME.
13259         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
13260         symbol_name_match_type::FULL.
13261         * cp-support.c (cp_get_symbol_name_matcher): Handle
13262         symbol_name_match_type::SEARCH_NAME.
13263         * infrun.c (insert_exception_resume_breakpoint): Use
13264         lookup_symbol_search_name.
13265         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
13266         * psymtab.c (maintenance_check_psymtabs): Use
13267         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
13268         * stack.c (print_frame_args): Use lookup_symbol_search_name and
13269         SYMBOL_SEARCH_NAME.
13270         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
13271         if symbol_name_match_type::SEARCH_NAME.
13272         (lookup_symbol_in_language): Pass down
13273         symbol_name_match_type::FULL.
13274         (lookup_symbol_search_name): New.
13275         (lookup_language_this): Pass down
13276         symbol_name_match_type::SEARCH_NAME.
13277         (lookup_symbol_aux, lookup_local_symbol): New parameter
13278         'match_type'.  Pass it down.
13279         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
13280         (lookup_symbol_search_name): New declaration.
13281         (lookup_symbol_in_block): New 'match_type' parameter.
13282
13283 2018-01-05  Pedro Alves  <palves@redhat.com>
13284
13285         PR gdb/22670
13286         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
13287         ada_lookup_symbol.
13288         (ada_lookup_symbol): Reimplement in terms of
13289         ada_lookup_symbol_list, bits factored out from
13290         ada_lookup_encoded_symbol.
13291
13292 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
13293
13294         * ada-exp.y (write_object_renaming): When subscripting an array
13295         using a symbol as the index, pass the block in call to
13296         ada_lookup_encoded_symbol when looking that symbol up.
13297
13298 2018-01-05  Jerome Guitton  <guitton@adacore.com>
13299
13300         * ada-lang.c (ada_array_length): Use ada_index_type instead of
13301         TYPE_INDEX_TYPE.
13302
13303 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
13304
13305         * ada-lang.c (ada_to_fixed_value_create): Add handling of
13306         the case where VALUE_LVAL (val0) is not lval_memory.
13307
13308 2018-01-05  Xavier Roirand  <roirand@adacore.com>
13309
13310         * ada-valprint.c (print_optional_low_bound): Handle
13311         character-indexed array printing like boolean-indexed array
13312         printing.
13313
13314 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
13315
13316         * NEWS: Create a new section for the next release branch.
13317         Rename the section of the current branch, now that it has
13318         been cut.
13319
13320 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
13321
13322         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
13323         * version.in: Bump version to 8.1.50.DATE-git.
13324
13325 2018-01-03  Xavier Roirand  <roirand@adacore.com>
13326
13327         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
13328         Add field.
13329         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
13330         Add field.
13331         (default_exception_support_info) <catch_handlers_sym>: Add field.
13332         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
13333         (ada_exception_name_addr_1): Add "catch handlers" handling.
13334         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
13335         Update all callers.
13336         (create_excep_cond_exprs) <ex>: Add parameter.
13337         (re_set_exception): Update create_excep_cond_exprs call.
13338         (print_it_exception, print_one_exception, print_mention_exception)
13339         (print_recreate_exception): Add "catch handler" handling.
13340         (allocate_location_catch_handlers, re_set_catch_handlers)
13341         (check_status_catch_handlers, print_it_catch_handlers)
13342         (print_one_catch_handlers, print_mention_catch_handlers)
13343         (print_recreate_catch_handlers): New function.
13344         (catch_handlers_breakpoint_ops): New variable.
13345         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
13346         Add parameter.  Add "catch handler" handling.
13347         (ada_exception_sym_name, ada_exception_breakpoint_ops):
13348         Add "catch handler" handling.
13349         (ada_exception_catchpoint_cond_string): Add "catch handler"
13350         handling.
13351         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
13352         call.
13353         (catch_ada_handlers_command): New function.
13354         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
13355         operations structure.
13356         (_initialize_ada_language): Add "catch handlers" command entry.
13357         * NEWS: Document "catch handlers" feature.
13358
13359 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
13360
13361         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
13362         account when creating the array type of the slice.
13363         (ada_value_slice): Likewise.
13364
13365 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
13366
13367         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
13368         New enum value.
13369         (create_array_type_with_stride): Add byte_stride_prop parameter.
13370         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
13371         New parameter.  Update all callers in this file.
13372         (array_type_has_dynamic_stride): New function.
13373         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
13374         of arrays with dynamic byte strides.
13375         * dwarf2read.c (read_array_type): Add support for dynamic
13376         DW_AT_byte_stride attributes.
13377
13378 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
13379
13380         * dwarf2read.c (read_unspecified_type): Treat
13381         DW_TAG_enumeration_type DIEs from Ada units as stubs.
13382
13383 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
13384
13385         Update copyright year range in all GDB files.
13386
13387 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
13388
13389         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
13390         and gdb/testsuite/gdb.base/step-line.c.
13391
13392 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
13393
13394         * copyright.py (main): Dump the contents of
13395         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
13396         even if BY_HAND is empty.
13397
13398 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
13399
13400         * top.c (print_gdb_version): Update Copyright year in version
13401         message.
13402
13403 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
13404
13405         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
13406
13407 For older changes see ChangeLog-2017.
13408 \f
13409 Local Variables:
13410 mode: change-log
13411 left-margin: 8
13412 fill-column: 74
13413 version-control: never
13414 coding: utf-8
13415 End: