Sort objects in gdb and gdbserver Makefiles
[external/binutils.git] / gdb / ChangeLog
1 2018-09-16  Simon Marchi  <simon.marchi@polymtl.ca>
2
3         * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
4
5 2018-09-16  Tom Tromey  <tom@tromey.com>
6
7         * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
8         Remove.
9
10 2018-09-16  Tom Tromey  <tom@tromey.com>
11
12         * python/python-internal.h (thread_to_thread_object): Change
13         return type.
14         * python/py-inferior.c (thread_to_thread_object): Return a new
15         reference.
16         (infpy_thread_from_thread_handle): Update.
17         * python/py-infthread.c (gdbpy_selected_thread): Update.
18         * python/py-stopevent.c (create_stop_event_object): Update.
19         * python/py-threadevent.c (py_get_event_thread): Return a new
20         reference.
21         (py_get_event_thread): Update.
22         * python/py-event.h (py_get_event_thread): Change return type.
23         * python/py-continueevent.c (create_continue_event_object):
24         Update.
25
26 2018-09-16  Tom Tromey  <tom@tromey.com>
27
28         * python/py-progspace.c (pspy_get_objfiles): Update.
29         * python/python-internal.h (objfile_to_objfile_object): Change
30         return type.
31         * python/py-newobjfileevent.c (create_new_objfile_event_object):
32         Update.
33         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
34         Update.
35         * python/python.c (gdbpy_get_current_objfile): Update.
36         (gdbpy_objfiles): Update.
37         * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
38         Update.
39         (objfile_to_objfile_object): Return a new reference.
40         * python/py-symtab.c (stpy_get_objfile): Update.
41         * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
42         Update.
43
44 2018-09-16  Tom Tromey  <tom@tromey.com>
45
46         * python/py-inferior.c (infpy_get_progspace): Update.
47         * python/python-internal.h (pspace_to_pspace_object): Change
48         return type.
49         * python/py-newobjfileevent.c
50         (create_clear_objfiles_event_object): Update.
51         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
52         Update.
53         * python/python.c (gdbpy_get_current_progspace): Update.
54         (gdbpy_progspaces): Update.
55         * python/py-progspace.c (pspace_to_pspace_object): Return a new
56         reference.
57         * python/py-objfile.c (objfpy_get_progspace): Update.
58         * python/py-prettyprint.c (find_pretty_printer_from_progspace):
59         Update.
60
61 2018-09-16  Tom Tromey  <tom@tromey.com>
62
63         * python/lib/gdb/__init__.py (current_progspace, objfiles)
64         (solib_name, block_for_pc, find_pc_line): New functions.
65         (execute_unwinders): Update.
66         * python/py-block.c (gdbpy_block_for_pc): Remove.
67         * python/py-inferior.c (infpy_get_progspace): New function.
68         (inferior_object_getset) <progspace>: Add.
69         * python/py-progspace.c (pspy_objfiles): Rewrite.
70         (pspy_solib_name, pspy_block_for_pc)
71         (pspy_find_pc_line, pspy_is_valid): New functions.
72         (progspace_object_methods): Add entries for solib_name,
73         block_for_pc, find_pc_line, is_valid.
74         * python/python-internal.h (gdbpy_block_for_pc)
75         (build_objfiles_list): Don't declare.
76         * python/python.c: Don't include solib.h.
77         (gdbpy_solib_name, gdbpy_find_pc_line)
78         (gdbpy_get_current_progspace, build_objfiles_list)
79         (gdbpy_objfiles): Remove.
80         (GdbMethods) <current_progspace, objfiles, block_for_pc,
81         solib_name, find_pc_line>: Remove entries.
82
83 2018-09-16  Tom Tromey  <tom@tromey.com>
84
85         * top.c (new_ui_command): Use GNU style for metasyntactic
86         variables.
87         * breakpoint.c (stopat_command): Use GNU style for metasyntactic
88         variables.
89         * maint.c (maintenance_translate_address): Remove "<>" around
90         text.
91         * interps.c (interpreter_exec_cmd): Use GNU style for
92         metasyntactic variables.
93         * nto-procfs.c (nto_procfs_target_info): Use GNU style for
94         metasyntactic variables.
95         * tracepoint.c (tfind_range_command): Use GNU style for
96         metasyntactic variables.
97         (tfind_outside_command): Likewise.
98         (_initialize_tracepoint): Likewise.
99         * remote.c (extended_remote_target::create_inferior): Use GNU
100         style for metasyntactic variables.
101         * sparc64-tdep.c (adi_examine_command): Use GNU style for
102         metasyntactic variables.
103         (adi_assign_command): Likewise.
104
105 2018-09-16  Tom Tromey  <tom@tromey.com>
106
107         * disasm.c (show_disassembler_options_sfunc): Use GNU style for
108         metasyntactic variables.  Print message if no disassembler options
109         are available.
110
111 2018-09-15  Tom Tromey  <tom@tromey.com>
112
113         * infcmd.c (get_inferior_args): Return const char *.
114         * inferior.h (get_inferior_args): Return type now const.
115         * linux-tdep.c (linux_fill_prpsinfo): Update.
116         * procfs.c (procfs_target::make_corefile_notes): Update.
117
118 2018-09-07  Tom Tromey  <tom@tromey.com>
119
120         * python/python.c (execute_gdb_command): Call bpstat_do_actions
121         inside the TRY.
122
123 2018-09-14  Sandra Loosemore  <sandra@codesourcery.com>
124
125         * nios2-tdep.c (nios2_type_align): New.
126         (nios2_gdb_arch_init): Install type_align hook.
127
128 2018-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
129
130         * eval.c (fake_method::fake_method): Call xzalloc directly for a
131         type that is neither object file owned, nor gdbarch owned.
132         * gdbtypes.c (get_type_gdbarch): Add an assert that returned
133         gdbarch is non-NULL.
134         (alloc_type_instance): Allocate non-objfile owned types on the
135         gdbarch obstack.
136         (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
137         using TYPE_ALLOC to ensure memory is allocated on the correct
138         obstack.
139         * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
140         obstack, or the gdbarch obstack.
141         (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
142
143 2018-09-14  Tom Tromey  <tom@tromey.com>
144
145         * infcall.c (call_function_by_hand_dummy): Remove unnecessary
146         block.
147
148 2018-09-14  Tom Tromey  <tom@tromey.com>
149
150         * nat/fork-inferior.c (get_startup_shell): Remove "static".
151
152 2018-09-13  Tom Tromey  <tom@tromey.com>
153
154         * python/py-inferior.c (infpy_thread_from_thread_handle): Now
155         static.
156
157 2018-09-13  Tom Tromey  <tom@tromey.com>
158
159         * exec.c (try_open_exec_file): Use std::string.
160
161 2018-09-13  Tom Tromey  <tom@tromey.com>
162
163         * utils.h (gdb_bfd_errmsg): Return std::string.
164         * exec.c (exec_file_attach): Update.
165         * compile/compile-object-load.c (compile_object_load): Update.
166         * utils.c (gdb_bfd_errmsg): Return std::string.
167
168 2018-09-13  Tom Tromey  <tom@tromey.com>
169
170         * procfs.c (struct procinfo_deleter): New.
171         (procinfo_up): New typedef.
172         (do_destroy_procinfo_cleanup): Remove.
173         (procfs_target::info_proc): Use procinfo_up.  Remove cleanups.
174
175 2018-09-13  Tom Tromey  <tom@tromey.com>
176
177         * source.c (add_path): Use gdb::unique_xmalloc_ptr.
178
179 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
180 2018-09-13  Tom Tromey  <tom@tromey.com>
181
182         * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
183         (pspy_get_objfiles): New function.
184         (progspace_object_methods): New.
185         (pspace_object_type): Add tp_methods callback.
186         * python/python-internal.h (build_objfiles_list): New
187         declaration.
188         * python/python.c (build_objfiles_list): New function.
189         (gdbpy_objfiles): Implement using build_objfiles_list.
190         * NEWS: Mention the Progspace.objfiles method.
191
192 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
193
194         * python/py-inferior.c (infpy_get_progspace): New function.
195         (inferior_object_getset): Add progspace property.
196         * NEWS: Mention the new property.
197
198 2018-09-13  Tom Tromey  <tom@tromey.com>
199
200         PR rust/23650:
201         * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
202
203 2018-09-13  Tom Tromey  <tom@tromey.com>
204
205         PR rust/23626:
206         * rust-lang.c (rust_enum_variant): Now static.
207         (rust_empty_enum_p): New function.
208         (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
209         Handle empty enum.
210
211 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
212
213         * python/py-inferior.c (infpy_repr): New.
214         (inferior_object_type): Register infpy_repr.
215         * python/py-objfile.c (objfpy_repr): New.
216         (objfile_object_type): Register objfpy_repr.
217
218 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
219
220         * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
221
222 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
223
224         * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
225         typo.
226
227 2018-09-12  Sergio Durigan Junior  <sergiodj@redhat.com>
228
229         * common/common-utils.c: Don't include '<sys/stat.h>'.
230         (is_regular_file): Move to...
231         * common/filestuff.c (is_regular_file): ... here.
232         * common/common-utils.h (is_regular_file): Move to...
233         * common/filestuff.h (is_regular_file): ... here.
234
235 2018-09-12  Simon Marchi  <simon.marchi@ericsson.com>
236
237         * skip.c (debug_skip): New variable.
238         (skiplist_entry::do_skip_file_p): Add debug output.
239         (skiplist_entry::do_skip_gfile_p): Likewise.
240         (skiplist_entry::skip_function_p): Likewise.
241         (_initialize_step_skip): Create debug command.
242         * NEWS: Mention set/show debug skip.
243
244 2018-09-11  Xavier Roirand  <roirand@adacore.com>
245
246         * darwin-nat.c (should_disable_startup_with_shell):
247         New function.
248         (darwin_nat_target::create_inferior): Add call.
249
250 2018-09-11  Xavier Roirand  <roirand@adacore.com>
251
252         * darwin-nat.h (struct darwin_thread_info) <gdb_port,
253         inf_port, msg_state>: Initialize.
254         (struct darwin_thread_info) <signaled, single_step>: Change
255         type and initialize.
256         (struct darwin_thread_info) <event>: Initialize.
257
258 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
259
260         PR gdb/23555
261         PR gdb/23558
262         * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
263         guesses.
264
265 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
266
267         Revert:
268         2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
269
270         PR gdb/23555
271         PR gdb/23558
272         * gnulib/aclocal.m4: Regenerate.
273         * gnulib/config.in: Regenerate.
274         * gnulib/configure: Regenerate.
275         * gnulib/import/Makefile.am: Update.
276         * gnulib/import/Makefile.in: Update.
277         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
278         * gnulib/import/_Noreturn.h: ... this.
279         * gnulib/import/alloca.in.h: Update.
280         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
281         * gnulib/import/arg-nonnull.h: ... this.
282         * gnulib/import/assure.h: Update.
283         * gnulib/import/at-func.c: Update.
284         * gnulib/import/basename-lgpl.c: Update.
285         * gnulib/import/extra/snippet/c++defs.h: Rename to...
286         * gnulib/import/c++defs.h: ... this.
287         * gnulib/import/canonicalize-lgpl.c: Update.
288         * gnulib/import/cdefs.h: Update.
289         * gnulib/import/chdir-long.c: Update.
290         * gnulib/import/chdir-long.h: Update.
291         * gnulib/import/cloexec.c: Update.
292         * gnulib/import/cloexec.h: Update.
293         * gnulib/import/close.c: Update.
294         * gnulib/import/closedir.c: Update.
295         * gnulib/import/config.charset: Update.
296         * gnulib/import/dirent-private.h: Update.
297         * gnulib/import/dirent.in.h: Update.
298         * gnulib/import/dirfd.c: Update.
299         * gnulib/import/dirname-lgpl.c: Update.
300         * gnulib/import/dirname.h: Update.
301         * gnulib/import/dosname.h: Update.
302         * gnulib/import/dup-safer-flag.c: Update.
303         * gnulib/import/dup-safer.c: Update.
304         * gnulib/import/dup.c: Update.
305         * gnulib/import/dup2.c: Update.
306         * gnulib/import/errno.in.h: Update.
307         * gnulib/import/error.c: Update.
308         * gnulib/import/error.h: Update.
309         * gnulib/import/exitfail.c: Update.
310         * gnulib/import/exitfail.h: Update.
311         * gnulib/import/extra/update-copyright: Update.
312         * gnulib/import/fchdir.c: Update.
313         * gnulib/import/fcntl.c: Update.
314         * gnulib/import/fcntl.in.h: Update.
315         * gnulib/import/fd-hook.c: Update.
316         * gnulib/import/fd-hook.h: Update.
317         * gnulib/import/fd-safer-flag.c: Update.
318         * gnulib/import/fd-safer.c: Update.
319         * gnulib/import/fdopendir.c: Update.
320         * gnulib/import/filename.h: Update.
321         * gnulib/import/filenamecat-lgpl.c: Update.
322         * gnulib/import/filenamecat.h: Update.
323         * gnulib/import/flexmember.h: Update.
324         * gnulib/import/float+.h: Update.
325         * gnulib/import/float.c: Update.
326         * gnulib/import/float.in.h: Update.
327         * gnulib/import/fnmatch.c: Update.
328         * gnulib/import/fnmatch.in.h: Update.
329         * gnulib/import/fnmatch_loop.c: Update.
330         * gnulib/import/fpucw.h: Update.
331         * gnulib/import/frexp.c: Update.
332         * gnulib/import/frexpl.c: Update.
333         * gnulib/import/fstat.c: Update.
334         * gnulib/import/fstatat.c: Update.
335         * gnulib/import/getcwd-lgpl.c: Update.
336         * gnulib/import/getcwd.c: Update.
337         * gnulib/import/getdtablesize.c: Update.
338         * gnulib/import/getlogin_r.c: Update.
339         * gnulib/import/getprogname.c: Update.
340         * gnulib/import/getprogname.h: Update.
341         * gnulib/import/gettext.h: Update.
342         * gnulib/import/gettimeofday.c: Update.
343         * gnulib/import/glob-libc.h: Update.
344         * gnulib/import/glob.c: Update.
345         * gnulib/import/glob.in.h: Update.
346         * gnulib/import/glob_internal.h: Update.
347         * gnulib/import/glob_pattern_p.c: Update.
348         * gnulib/import/globfree.c: Update.
349         * gnulib/import/hard-locale.c: Update.
350         * gnulib/import/hard-locale.h: Update.
351         * gnulib/import/intprops.h: Update.
352         * gnulib/import/inttypes.in.h: Update.
353         * gnulib/import/isnan.c: Update.
354         * gnulib/import/isnand-nolibm.h: Update.
355         * gnulib/import/isnand.c: Update.
356         * gnulib/import/isnanl-nolibm.h: Update.
357         * gnulib/import/isnanl.c: Update.
358         * gnulib/import/itold.c: Update.
359         * gnulib/import/libc-config.h: Update.
360         * gnulib/import/limits.in.h: Update.
361         * gnulib/import/localcharset.c: Update.
362         * gnulib/import/localcharset.h: Update.
363         * gnulib/import/localtime-buffer.c: Update.
364         * gnulib/import/localtime-buffer.h: Update.
365         * gnulib/import/lstat.c: Update.
366         * gnulib/import/m4/00gnulib.m4: Update.
367         * gnulib/import/m4/__inline.m4: Update.
368         * gnulib/import/m4/absolute-header.m4: Update.
369         * gnulib/import/m4/alloca.m4: Update.
370         * gnulib/import/m4/builtin-expect.m4: Update.
371         * gnulib/import/m4/canonicalize.m4: Update.
372         * gnulib/import/m4/chdir-long.m4: Update.
373         * gnulib/import/m4/close.m4: Update.
374         * gnulib/import/m4/closedir.m4: Update.
375         * gnulib/import/m4/configmake.m4: Update.
376         * gnulib/import/m4/d-ino.m4: Update.
377         * gnulib/import/m4/d-type.m4: Update.
378         * gnulib/import/m4/dirent_h.m4: Update.
379         * gnulib/import/m4/dirfd.m4: Update.
380         * gnulib/import/m4/dirname.m4: Update.
381         * gnulib/import/m4/double-slash-root.m4: Update.
382         * gnulib/import/m4/dup.m4: Update.
383         * gnulib/import/m4/dup2.m4: Update.
384         * gnulib/import/m4/eealloc.m4: Update.
385         * gnulib/import/m4/environ.m4: Update.
386         * gnulib/import/m4/errno_h.m4: Update.
387         * gnulib/import/m4/error.m4: Update.
388         * gnulib/import/m4/exponentd.m4: Update.
389         * gnulib/import/m4/exponentl.m4: Update.
390         * gnulib/import/m4/extensions.m4: Update.
391         * gnulib/import/m4/extern-inline.m4: Update.
392         * gnulib/import/m4/fchdir.m4: Update.
393         * gnulib/import/m4/fcntl-o.m4: Update.
394         * gnulib/import/m4/fcntl.m4: Update.
395         * gnulib/import/m4/fcntl_h.m4: Update.
396         * gnulib/import/m4/fdopendir.m4: Update.
397         * gnulib/import/m4/filenamecat.m4: Update.
398         * gnulib/import/m4/flexmember.m4: Update.
399         * gnulib/import/m4/float_h.m4: Update.
400         * gnulib/import/m4/fnmatch.m4: Update.
401         * gnulib/import/m4/fnmatch_h.m4: Update.
402         * gnulib/import/m4/fpieee.m4: Update.
403         * gnulib/import/m4/frexp.m4: Update.
404         * gnulib/import/m4/frexpl.m4: Update.
405         * gnulib/import/m4/fstat.m4: Update.
406         * gnulib/import/m4/fstatat.m4: Update.
407         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
408         * gnulib/import/m4/getcwd-path-max.m4: Update.
409         * gnulib/import/m4/getcwd.m4: Update.
410         * gnulib/import/m4/getdtablesize.m4: Update.
411         * gnulib/import/m4/getlogin.m4: Update.
412         * gnulib/import/m4/getlogin_r.m4: Update.
413         * gnulib/import/m4/getpagesize.m4: Update.
414         * gnulib/import/m4/getprogname.m4: Update.
415         * gnulib/import/m4/gettimeofday.m4: Update.
416         * gnulib/import/m4/glibc21.m4: Update.
417         * gnulib/import/m4/glob.m4: Update.
418         * gnulib/import/m4/glob_h.m4: Update.
419         * gnulib/import/m4/gnulib-cache.m4: Update.
420         * gnulib/import/m4/gnulib-common.m4: Update.
421         * gnulib/import/m4/gnulib-comp.m4: Update.
422         * gnulib/import/m4/gnulib-tool.m4: Update.
423         * gnulib/import/m4/hard-locale.m4: Update.
424         * gnulib/import/m4/include_next.m4: Update.
425         * gnulib/import/m4/inttypes-pri.m4: Update.
426         * gnulib/import/m4/inttypes.m4: Update.
427         * gnulib/import/m4/isnand.m4: Update.
428         * gnulib/import/m4/isnanl.m4: Update.
429         * gnulib/import/m4/largefile.m4: Update.
430         * gnulib/import/m4/limits-h.m4: Update.
431         * gnulib/import/m4/localcharset.m4: Update.
432         * gnulib/import/m4/locale-fr.m4: Update.
433         * gnulib/import/m4/locale-ja.m4: Update.
434         * gnulib/import/m4/locale-zh.m4: Update.
435         * gnulib/import/m4/localtime-buffer.m4: Update.
436         * gnulib/import/m4/longlong.m4: Update.
437         * gnulib/import/m4/lstat.m4: Update.
438         * gnulib/import/m4/malloc.m4: Update.
439         * gnulib/import/m4/malloca.m4: Update.
440         * gnulib/import/m4/math_h.m4: Update.
441         * gnulib/import/m4/mbrtowc.m4: Update.
442         * gnulib/import/m4/mbsinit.m4: Update.
443         * gnulib/import/m4/mbsrtowcs.m4: Update.
444         * gnulib/import/m4/mbstate_t.m4: Update.
445         * gnulib/import/m4/memchr.m4: Update.
446         * gnulib/import/m4/memmem.m4: Update.
447         * gnulib/import/m4/mempcpy.m4: Update.
448         * gnulib/import/m4/memrchr.m4: Update.
449         * gnulib/import/m4/mkdir.m4: Update.
450         * gnulib/import/m4/mkstemp.m4: Update.
451         * gnulib/import/m4/mmap-anon.m4: Update.
452         * gnulib/import/m4/mode_t.m4: Update.
453         * gnulib/import/m4/msvc-inval.m4: Update.
454         * gnulib/import/m4/msvc-nothrow.m4: Update.
455         * gnulib/import/m4/multiarch.m4: Update.
456         * gnulib/import/m4/nocrash.m4: Update.
457         * gnulib/import/m4/off_t.m4: Update.
458         * gnulib/import/m4/onceonly.m4: Update.
459         * gnulib/import/m4/open-cloexec.m4: Update.
460         * gnulib/import/m4/open.m4: Update.
461         * gnulib/import/m4/openat.m4: Update.
462         * gnulib/import/m4/opendir.m4: Update.
463         * gnulib/import/m4/pathmax.m4: Update.
464         * gnulib/import/m4/rawmemchr.m4: Update.
465         * gnulib/import/m4/readdir.m4: Update.
466         * gnulib/import/m4/readlink.m4: Update.
467         * gnulib/import/m4/realloc.m4: Update.
468         * gnulib/import/m4/rename.m4: Update.
469         * gnulib/import/m4/rewinddir.m4: Update.
470         * gnulib/import/m4/rmdir.m4: Update.
471         * gnulib/import/m4/save-cwd.m4: Update.
472         * gnulib/import/m4/secure_getenv.m4: Update.
473         * gnulib/import/m4/setenv.m4: Update.
474         * gnulib/import/m4/signal_h.m4: Update.
475         * gnulib/import/m4/ssize_t.m4: Update.
476         * gnulib/import/m4/stat-time.m4: Update.
477         * gnulib/import/m4/stat.m4: Update.
478         * gnulib/import/m4/std-gnu11.m4: Update.
479         * gnulib/import/m4/stdbool.m4: Update.
480         * gnulib/import/m4/stddef_h.m4: Update.
481         * gnulib/import/m4/stdint.m4: Update.
482         * gnulib/import/m4/stdio_h.m4: Update.
483         * gnulib/import/m4/stdlib_h.m4: Update.
484         * gnulib/import/m4/strchrnul.m4: Update.
485         * gnulib/import/m4/strdup.m4: Update.
486         * gnulib/import/m4/strerror.m4: Update.
487         * gnulib/import/m4/string_h.m4: Update.
488         * gnulib/import/m4/strstr.m4: Update.
489         * gnulib/import/m4/strtok_r.m4: Update.
490         * gnulib/import/m4/sys_socket_h.m4: Update.
491         * gnulib/import/m4/sys_stat_h.m4: Update.
492         * gnulib/import/m4/sys_time_h.m4: Update.
493         * gnulib/import/m4/sys_types_h.m4: Update.
494         * gnulib/import/m4/tempname.m4: Update.
495         * gnulib/import/m4/time_h.m4: Update.
496         * gnulib/import/m4/unistd-safer.m4: Update.
497         * gnulib/import/m4/unistd_h.m4: Update.
498         * gnulib/import/m4/warn-on-use.m4: Update.
499         * gnulib/import/m4/wchar_h.m4: Update.
500         * gnulib/import/m4/wchar_t.m4: Update.
501         * gnulib/import/m4/wctype_h.m4: Update.
502         * gnulib/import/m4/wint_t.m4: Update.
503         * gnulib/import/malloc.c: Update.
504         * gnulib/import/malloc/scratch_buffer.h: Update.
505         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
506         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
507         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
508         * gnulib/import/malloca.c: Update.
509         * gnulib/import/malloca.h: Update.
510         * gnulib/import/malloca.valgrind: Update.
511         * gnulib/import/math.in.h: Update.
512         * gnulib/import/mbrtowc.c: Update.
513         * gnulib/import/mbsinit.c: Update.
514         * gnulib/import/mbsrtowcs-impl.h: Update.
515         * gnulib/import/mbsrtowcs-state.c: Update.
516         * gnulib/import/mbsrtowcs.c: Update.
517         * gnulib/import/memchr.c: Update.
518         * gnulib/import/memmem.c: Update.
519         * gnulib/import/mempcpy.c: Update.
520         * gnulib/import/memrchr.c: Update.
521         * gnulib/import/mkdir.c: Update.
522         * gnulib/import/mkstemp.c: Update.
523         * gnulib/import/msvc-inval.c: Update.
524         * gnulib/import/msvc-inval.h: Update.
525         * gnulib/import/msvc-nothrow.c: Update.
526         * gnulib/import/msvc-nothrow.h: Update.
527         * gnulib/import/open.c: Update.
528         * gnulib/import/openat-die.c: Update.
529         * gnulib/import/openat-priv.h: Update.
530         * gnulib/import/openat-proc.c: Update.
531         * gnulib/import/openat.c: Update.
532         * gnulib/import/openat.h: Update.
533         * gnulib/import/opendir.c: Update.
534         * gnulib/import/pathmax.h: Update.
535         * gnulib/import/pipe-safer.c: Update.
536         * gnulib/import/rawmemchr.c: Update.
537         * gnulib/import/readdir.c: Update.
538         * gnulib/import/readlink.c: Update.
539         * gnulib/import/realloc.c: Update.
540         * gnulib/import/ref-add.sin: Update.
541         * gnulib/import/ref-del.sin: Update.
542         * gnulib/import/rename.c: Update.
543         * gnulib/import/rewinddir.c: Update.
544         * gnulib/import/rmdir.c: Update.
545         * gnulib/import/same-inode.h: Update.
546         * gnulib/import/save-cwd.c: Update.
547         * gnulib/import/save-cwd.h: Update.
548         * gnulib/import/scratch_buffer.h: Update.
549         * gnulib/import/secure_getenv.c: Update.
550         * gnulib/import/setenv.c: Update.
551         * gnulib/import/signal.in.h: Update.
552         * gnulib/import/stat-time.c: Update.
553         * gnulib/import/stat-time.h: Update.
554         * gnulib/import/stat-w32.c: Update.
555         * gnulib/import/stat-w32.h: Update.
556         * gnulib/import/stat.c: Update.
557         * gnulib/import/stdbool.in.h: Update.
558         * gnulib/import/stddef.in.h: Update.
559         * gnulib/import/stdint.in.h: Update.
560         * gnulib/import/stdio.in.h: Update.
561         * gnulib/import/stdlib.in.h: Update.
562         * gnulib/import/str-two-way.h: Update.
563         * gnulib/import/strchrnul.c: Update.
564         * gnulib/import/strdup.c: Update.
565         * gnulib/import/streq.h: Update.
566         * gnulib/import/strerror-override.c: Update.
567         * gnulib/import/strerror-override.h: Update.
568         * gnulib/import/strerror.c: Update.
569         * gnulib/import/string.in.h: Update.
570         * gnulib/import/stripslash.c: Update.
571         * gnulib/import/strnlen1.c: Update.
572         * gnulib/import/strnlen1.h: Update.
573         * gnulib/import/strstr.c: Update.
574         * gnulib/import/strtok_r.c: Update.
575         * gnulib/import/sys_stat.in.h: Update.
576         * gnulib/import/sys_time.in.h: Update.
577         * gnulib/import/sys_types.in.h: Update.
578         * gnulib/import/tempname.c: Update.
579         * gnulib/import/tempname.h: Update.
580         * gnulib/import/time.in.h: Update.
581         * gnulib/import/unistd--.h: Update.
582         * gnulib/import/unistd-safer.h: Update.
583         * gnulib/import/unistd.in.h: Update.
584         * gnulib/import/unsetenv.c: Update.
585         * gnulib/import/verify.h: Update.
586         * gnulib/import/extra/snippet/warn-on-use.h: Update.
587         * gnulib/import/wchar.in.h: Update.
588         * gnulib/import/wctype.in.h: Update.
589         * gnulib/import/xalloc-oversized.h: Update.
590         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
591         "53e2c179f26a890fa6685af4b6c1397ee370433b".
592
593 2018-09-10  Simon Marchi  <simon.marchi@ericsson.com>
594
595         * record-btrace.c (get_thread_current_frame): Remove
596         old_inferior_ptid.
597
598 2018-09-10  Jerome Guitton  <guitton@adacore.com>
599
600         * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
601         with check_tag to 1 if and only if the type is tagged and the
602         component being searched cannot been found in the current
603         view. Otherwise, always call ada_to_fixed_type with
604         check_tag to 0.
605
606 2018-09-10  Xavier Roirand  <roirand@adacore.com>
607
608         * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
609         declaration.
610         * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
611         * ada-varobj.c (ada_varobj_get_number_of_children,
612         ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
613
614 2018-09-10  Xavier Roirand  <roirand@adacore.com>
615
616         * ada-valprint.c (ada_value_print): Use type instead of
617         enclosing type.
618
619 2018-09-10  Xavier Roirand  <roirand@adacore.com>
620
621         * ada-lang.c (ada_value_subscript): Handle case when parameter is
622         an array of access to unconstrained array.
623
624 2018-09-10  Xavier Roirand  <roirand@adacore.com>
625
626         * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
627         (ada_check_typedef): Use it.
628
629 2018-09-10  Xavier Roirand  <roirand@adacore.com>
630
631         * ada-varobj.c (ada_varobj_describe_struct_child)
632         (ada_varobj_describe_child): Handle union case like struct one.
633
634 2018-09-10  Tom Tromey  <tom@tromey.com>
635
636         PR python/18380:
637         * python/python.c (_initialize_python): Make example in "python"
638         help work in Python 3.
639
640 2018-09-10  Eli Zaretskii  <eliz@gnu.org>
641
642         * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
643         INSTALL_PROGRAM to install gdb-add-index.sh.  Don't append
644         $(EXEEXT) to the script, as it is not a program.
645
646 2018-09-09  Simon Marchi  <simon.marchi@ericsson.com>
647
648         * python/py-prettyprint.c (pretty_print_one_value): Return
649         gdbpy_ref<>.
650         (print_string_repr): Adjust.
651         (apply_varobj_pretty_printer): Return gdbpy_ref<>.
652         * python/python-internal.h (apply_varobj_pretty_printer): Return
653         gdbpy_ref<>.
654         * varobj.c (varobj_value_get_print_value): Adjust.
655
656 2018-09-08  Tom Tromey  <tom@tromey.com>
657
658         PR python/16047:
659         * python/py-prettyprint.c (pretty_print_one_value): Check for
660         to_string method.
661
662 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
663
664         * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
665         replace_operator_with_call.
666
667 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
668
669         * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
670
671 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
672
673         * ada-typeprint.c (print_range): Print the bounds using TYPE
674         rather than its TYPE_TARGET_TYPE.
675
676 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
677
678         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
679         call to ada_to_fixed_value_create.
680
681 2018-09-08  Jerome Guitton  <guitton@adacore.com>
682
683         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
684
685 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
686
687         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
688         by calls to error.
689
690 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
691
692         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
693         Move update of loop variable "fi".
694
695 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
696
697         * ada-lang.c (value_assign_to_component): In the case of
698         big-endian targets, extract the bits of the given VAL
699         using an src_offset of zero if container is not a scalar.
700
701 2018-09-06  Simon Ser  <contact@emersion.fr>
702
703         PR gdb/23105
704         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
705         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
706         * fbsd-tdep.c (fbsd_make_note_desc): New.
707         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
708         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
709         * target.h (enum target_object) Add FreeBSD-specific
710         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
711
712 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
713
714         * compile/compile-c.h (generate_c_for_variable_locations):
715         Change reference to pointer.
716         * compile/compile-c-support.c (compile_program) <compute>:
717         Likewise.
718         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
719         (generate_c_for_for_one_variable): Likewise
720         (generate_c_for_variable_locations): Likewise
721         * compile/compile-c-types.c (compile_c_instance::convert_type):
722         Likewise
723         * compile/compile-cplus-symbols.c (convert_one_symbol):
724         std::move the scope passed to enter_scope.
725         * compile/compile-cplus-types.c
726         (compile_cplus_instance::enter_scope): Make parameter
727         rvalue-reference.
728         (compile_cplus_instance::new_scope): Change reference to
729         pointer.
730         (compile_cplus_instance::convert_type): Likewise
731         (compile_cplus_convert_typedef): std::move the scope passed to
732         enter_scope.
733         (compile_cplus_convert_struct_or_union): Likewise.
734         (compile_cplus_convert_enum): Likewise.
735         (compile_cplus_convert_namespace): Likewise.
736         * compile/compile-cplus.h (compile_cplus_instance)
737         <enter_scope>: Make parameter rvalue-reference.
738         * compile/compile-internal.h (compile_instance)
739         <get_cached_type>: Likewise
740         * compile/compile-loc2c.c (push): Likewise
741         (pushf): Likewise
742         (unary): Likewise
743         (binary): Likewise
744         (print_label): Likewise
745         (pushf_register_address): Likewise
746         (pushf_register): Likewise
747         (do_compile_dwarf_expr_to_c): Likewise
748         (compile_dwarf_expr_to_c): Likewise
749         (compile_dwarf_bounds_to_c): Likewise
750         * compile/compile.c (compile_instance::get_cached_type):
751         Likewise
752         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
753         (compile_dwarf_bounds_to_c): Likewise
754         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
755         (dwarf2_compile_property_to_c): Likewise
756         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
757         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
758         Likewise
759
760 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
761
762         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
763         * tui/tui-data.c (init_content_element): Don't initialize it.
764
765 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
766
767         * tui/tui-data.h (struct tui_win_info)
768         <detail::opaque>: Remove.
769         * tui/tui-data.c (init_win_info): Remove assignment.
770
771 2018-09-05  Tom Tromey  <tom@tromey.com>
772
773         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
774         -Wformat-nonliteral.
775         * target-float.c (host_float_ops<T>::to_string)
776         (host_float_ops<T>::from_string): Use
777         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
778         * configure: Rebuild.
779
780 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
781
782         * printcmd.c (printf_c_string): Use
783         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
784         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
785
786 2018-09-05  Tom Tromey  <tom@tromey.com>
787
788         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
789
790 2018-09-05  Tom de Vries  <tdevries@suse.de>
791
792         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
793         with resolve_abstract_p == true.
794         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
795         defaulting to false. Propagate resolve_abstract_p to
796         dwarf2_fetch_die_loc_sect_off.
797         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
798         parameter, defaulting to false.
799         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
800         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
801         parameter.
802         * dwarf2read.h (struct die_info): Forward-declare.
803         (die_info_ptr): New typedef.
804         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
805
806 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
807
808         GDB 8.2 released.
809
810 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
811             Pedro Alves  <palves@redhat.com>
812
813         * gnulib/Makefile.in (aclocal_m4_deps): Move to
814         "aclocal-m4-deps.mk".  Include file here.
815         $(srcdir)/aclocal.m4: Add "configure.ac".
816         * gnulib/aclocal-m4-deps.mk: New file.
817         * gnulib/update-gnulib.sh: Automatically update
818         "aclocal-m4-deps.mk".
819
820 2018-09-04  Tom Tromey  <tom@tromey.com>
821
822         * configure: Rebuild.
823         * configure.ac: Remove multi-ice code.
824
825 2018-09-04  Tom Tromey  <tom@tromey.com>
826
827         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
828         (ada-exp.o): Update.
829
830 2018-09-04  Tom Tromey  <tom@tromey.com>
831
832         * Makefile.in (printcmd.o, target-float.o): Remove.
833         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
834
835 2018-09-04  Tom Tromey  <tom@tromey.com>
836
837         * gnulib/Makefile.in: Remove obsolete comment.
838         * Makefile.in: Remove obsolete comment.
839
840 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
841
842         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
843         line with '+'.
844
845 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
846
847         * riscv-tdep.c: Add 'prologue-value.h' include.
848         (struct riscv_unwind_cache): New struct.
849         (riscv_debug_unwinder): New global.
850         (riscv_scan_prologue): Update arguments, capture register details
851         from prologue scan.
852         (riscv_skip_prologue): Reformat arguments line, move end of
853         prologue calculation into riscv_scan_prologue.
854         (riscv_frame_cache): Update return type, create
855         riscv_unwind_cache, scan the prologue, and fill in remaining cache
856         details.
857         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
858         (riscv_frame_prev_register): Use the trad_frame within the
859         riscv_unwind_cache.
860         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
861         flag.
862
863 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
864
865         * trad-frame.h (trad_frame_set_realreg): Declare.
866         (trad_frame_set_addr): Declare.
867         * trad-frame.c (trad_frame_set_realreg): Define new function.
868         (trad_frame_set_addr): Define new function.
869         (trad_frame_set_reg_realreg): Use new function.
870         (trad_frame_set_reg_addr): Use new function.
871
872 2018-09-01  Keith Seitz  <keiths@redhat.com>
873
874         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
875         pulongest instead of "%lld".
876         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
877         ATTRIBUTE_UNUSED.
878
879 2018-08-31  Tom Tromey  <tom@tromey.com>
880
881         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
882         variant part type.
883
884 2018-08-31  Pedro Alves  <palves@redhat.com>
885
886         * gdbarch.h: Regenerate.
887
888 2018-08-31  Pedro Alves  <palves@redhat.com>
889
890         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
891         * target.h (Hardware watchpoint interfaces): Describe
892         continuable/steppable/non-steppable watchpoints.
893         * gdbarch.h, gdbarch.c: Regenerate.
894
895 2018-08-31  Pedro Alves  <palves@redhat.com>
896
897         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
898         Delete.
899         * s390-linux-nat.c
900         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
901         * target.h (target_ops::have_continuable_watchpoint): Delete.
902         (target_have_continuable_watchpoint): Delete.
903         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
904         * target-delegates.c: Regenerate.
905
906 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
907
908         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
909         the files present in "gnulib/import/m4/".
910
911 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
912
913         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
914         c.sw, c.swsp, and c.sdsp.
915
916 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
917
918         * riscv-tdep.c (struct riscv_inferior_data): Delete.
919         (riscv_read_misa_reg): Don't cache value read into inferior data.
920         (riscv_new_inferior_data): Delete.
921         (riscv_inferior_data_cleanup): Delete.
922         (riscv_inferior_data): Delete.
923         (riscv_invalidate_inferior_data): Delete.
924         (_initialize_riscv_tdep): Remove initialisation of inferior data.
925
926 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
927
928         * compile/compile-cplus-types.c
929         (compile_cplus_instance::leave_scope): Take the address of scope
930         object.
931         (compile_cplus_instance::convert_qualified_base): Compare quals
932         to 0.
933
934 2018-08-30  Keith Seitz  <keiths@redhat.com>
935
936         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
937         Use "%s" and host_address_to_string instead of "%p" in printf.
938
939 2018-08-29  Keith Seitz  <keiths@redhat.com>
940
941         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
942         and compile-cplus-types.c.
943         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
944         * c-lang.c (cplus_language_defn): Set C++ compile functions.
945         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
946         Declare.
947         * compile/compile-c-support.c: Include compile-cplus.h.
948         (load_libcompile): Templatize.
949         (get_compile_context): "New" function.
950         (c_get_compile_context): Use get_compile_context.
951         (cplus_get_compile_context): New function.
952         (cplus_push_user_expression, cplus_pop_user_expression)
953         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
954         (cplus_compute_program): Define new structs/functions.
955         * compile/compile-cplus-symmbols.c: New file.
956         * compile/compile-cplus-types.c: New file.
957         * compile/compile-cplus.h: New file.
958         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
959         Declare.
960         * compile/compile-object-load.c (get_out_value_type): Use
961         strncmp_iw when comparing symbol names.
962         (compile_object_load): Add mst_bss and mst_data.
963         * compile/compile.c (_initialize_compile): Remove
964         -Wno-implicit-function-declaration from `compile_args'.
965         * compile/gcc-cp-plugin.h: New file.
966         * NEWS: Mention C++ compile support and new debug options.
967
968 2018-08-29  Keith Seitz  <keiths@redhat.com>
969
970         * linespec.c (collect_info::add_symbol): Make virtual.
971         (struct symbol_searcher_collect_info): New struct.
972         (symbol_searcher::find_all_symbols): New method.
973         * symtab.h (class symbol_searcher): New class.
974
975 2018-08-29  Keith Seitz  <keiths@redhat.com>
976
977         * linespec.c (struct linespec) <function_symbols, label_symbols>:
978         Change to vector of block_symbol.  Update all users.
979         (struct collect_info) <symbols>: Likewise.
980         (collect_info::add_symbol): Take block_symbol as argument.
981         Update all callers.
982         (decode_compound_collector) <m_symbols>: Change type to vector
983         of block_symbol.  Update all users.
984         (decode_compound_collector::operator ()): Change parameter type
985         to block_symbol.
986         (find_method, find_function_symbols, find_linespec_symbols)
987         (find_label_symbols_in_block, find_label_symbols): Change symbol
988         vectors to block_symbol vectors.
989         * symtab.h (symbol_found_callback_ftype): Change parameter type to
990         block_symbol.
991
992 2018-08-29  Keith Seitz  <keiths@redhat.com>
993
994         * linespec.c (symbolp): Remove typedef and VEC definitions.
995         (bound_minimal_symbol_d): Likewise.
996
997 2018-08-29  Keith Seitz  <keiths@redhat.com>
998
999         * linespec.c (decode_compound_collector::decode_compound_collector):
1000         Remove initialization for `m_symtabs'.
1001         (decode_compound_collector::release_symbols): Change return type
1002         to std::vector.  Update all callers.
1003         (class decode_compound_collector) <m_symbols>: Change type to
1004         std::vector.
1005         (lookup_prefix_sym): Change return type to std::vector.  Update all
1006         callers.
1007         (compare_symbols): Remove.
1008         (std_compare_symbols): Rename to `compare_symbols'.
1009         (find_method): Change `sym_classes' parameter to std::vector.
1010         Update all callers.  Use std::sort to sort sym_classes.
1011         (find_linespec_symbols): Remove cleanup.
1012
1013 2018-08-29  Keith Seitz  <keiths@redhat.com>
1014
1015         * linespec.c (struct linespec) <minimal_symbols>: Change type to
1016         std::vector.  Update all users.
1017         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
1018         (struct collect_info) <minimal_symbols>: Likewise.
1019         (compare_msymbols): Return bool.  Change parameters to const
1020         bound_minimal_symbol references.
1021         (find_method, find_function_symbols, find_linespec_symbols): Change
1022         `minsyms' parameter to std::vector.  Update all callers.
1023
1024 2018-08-29  Keith Seitz  <keiths@redhat.com>
1025
1026         * linespec.c (struct linespec) <label_symbols>: Change type to
1027         std::vector.  Update all users.
1028         (find_label_symbols_in_block): Change `result' parameter to
1029         std::vector.  Update all callers.
1030         (find_label_symbols): Return std::vector.  Update all callers.
1031
1032 2018-08-29  Keith Seitz  <keiths@redhat.com>
1033
1034         * linespec.c (struct linespec) <function_symbols>: Change type to
1035         std::vector.  Update all users.
1036         (struct collect_info) <function_symbols>: Likewise.
1037         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
1038         (std_compare_symbols): New function.
1039         (find_method, find_function_symbols, find_linespec_symbols)
1040         (find_label_symbols_in_block): Change `symbols' parameter to
1041         std::vector.  Update all callers.
1042         (find_label_symbols): Likewise for `function_symbols' and
1043         `label_funcs_ret'.
1044
1045 2018-08-29  Keith Seitz  <keiths@redhat.com>
1046
1047         * linespec.c (symtab_vector_up): Define.
1048         (struct linespec) <file_symtabs>: Change type to std::vector *.
1049         Update all uses.
1050         (struct collect_info) <file_symtabs>: Likewise.
1051         (collect_symtabs_from_filename): Return symtab_vector_up.
1052         Update all callers.
1053         (decode_objc): Remove cleanup.
1054         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
1055         (symtab_collector::release_symtabs): Return symtab_vector_up.
1056         Update all callers.
1057         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
1058         Update all users.
1059         (collect_symtabs_from_filename, symtabs_from_filename): Return
1060         symtab_vector_up.  Update all callers.
1061
1062 2018-08-29  Tom Tromey  <tom@tromey.com>
1063
1064         * csky-tdep.c (csky_analyze_prologue): Use
1065         core_addr_to_string_nz.
1066
1067 2018-08-29  Tom Tromey  <tom@tromey.com>
1068
1069         * windows-nat.c (struct xlate_exception) <them>: Change type to
1070         DWORD.
1071         (xlate): Fix formatting.  Remove last entry.
1072         (struct xlate_exception, xlate): Comment out.
1073         (windows_nat_target::resume): Use ranged for.
1074
1075 2018-08-29  Jim Wilson  <jimw@sifive.com>
1076
1077         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
1078         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
1079         of NT_PRFPREG.
1080         (riscv_linux_nat_target::store_registers): Likewise.
1081
1082 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
1083
1084         PR gdb/23555
1085         PR gdb/23558
1086         * gnulib/aclocal.m4: Regenerate.
1087         * gnulib/config.in: Regenerate.
1088         * gnulib/configure: Regenerate.
1089         * gnulib/import/Makefile.am: Update.
1090         * gnulib/import/Makefile.in: Update.
1091         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
1092         * gnulib/import/_Noreturn.h: ... this.
1093         * gnulib/import/alloca.in.h: Update.
1094         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
1095         * gnulib/import/arg-nonnull.h: ... this.
1096         * gnulib/import/assure.h: Update.
1097         * gnulib/import/at-func.c: Update.
1098         * gnulib/import/basename-lgpl.c: Update.
1099         * gnulib/import/extra/snippet/c++defs.h: Rename to...
1100         * gnulib/import/c++defs.h: ... this.
1101         * gnulib/import/canonicalize-lgpl.c: Update.
1102         * gnulib/import/cdefs.h: Update.
1103         * gnulib/import/chdir-long.c: Update.
1104         * gnulib/import/chdir-long.h: Update.
1105         * gnulib/import/cloexec.c: Update.
1106         * gnulib/import/cloexec.h: Update.
1107         * gnulib/import/close.c: Update.
1108         * gnulib/import/closedir.c: Update.
1109         * gnulib/import/config.charset: Update.
1110         * gnulib/import/dirent-private.h: Update.
1111         * gnulib/import/dirent.in.h: Update.
1112         * gnulib/import/dirfd.c: Update.
1113         * gnulib/import/dirname-lgpl.c: Update.
1114         * gnulib/import/dirname.h: Update.
1115         * gnulib/import/dosname.h: Update.
1116         * gnulib/import/dup-safer-flag.c: Update.
1117         * gnulib/import/dup-safer.c: Update.
1118         * gnulib/import/dup.c: Update.
1119         * gnulib/import/dup2.c: Update.
1120         * gnulib/import/errno.in.h: Update.
1121         * gnulib/import/error.c: Update.
1122         * gnulib/import/error.h: Update.
1123         * gnulib/import/exitfail.c: Update.
1124         * gnulib/import/exitfail.h: Update.
1125         * gnulib/import/extra/update-copyright: Update.
1126         * gnulib/import/fchdir.c: Update.
1127         * gnulib/import/fcntl.c: Update.
1128         * gnulib/import/fcntl.in.h: Update.
1129         * gnulib/import/fd-hook.c: Update.
1130         * gnulib/import/fd-hook.h: Update.
1131         * gnulib/import/fd-safer-flag.c: Update.
1132         * gnulib/import/fd-safer.c: Update.
1133         * gnulib/import/fdopendir.c: Update.
1134         * gnulib/import/filename.h: Update.
1135         * gnulib/import/filenamecat-lgpl.c: Update.
1136         * gnulib/import/filenamecat.h: Update.
1137         * gnulib/import/flexmember.h: Update.
1138         * gnulib/import/float+.h: Update.
1139         * gnulib/import/float.c: Update.
1140         * gnulib/import/float.in.h: Update.
1141         * gnulib/import/fnmatch.c: Update.
1142         * gnulib/import/fnmatch.in.h: Update.
1143         * gnulib/import/fnmatch_loop.c: Update.
1144         * gnulib/import/fpucw.h: Update.
1145         * gnulib/import/frexp.c: Update.
1146         * gnulib/import/frexpl.c: Update.
1147         * gnulib/import/fstat.c: Update.
1148         * gnulib/import/fstatat.c: Update.
1149         * gnulib/import/getcwd-lgpl.c: Update.
1150         * gnulib/import/getcwd.c: Update.
1151         * gnulib/import/getdtablesize.c: Update.
1152         * gnulib/import/getlogin_r.c: Update.
1153         * gnulib/import/getprogname.c: Update.
1154         * gnulib/import/getprogname.h: Update.
1155         * gnulib/import/gettext.h: Update.
1156         * gnulib/import/gettimeofday.c: Update.
1157         * gnulib/import/glob-libc.h: Update.
1158         * gnulib/import/glob.c: Update.
1159         * gnulib/import/glob.in.h: Update.
1160         * gnulib/import/glob_internal.h: Update.
1161         * gnulib/import/glob_pattern_p.c: Update.
1162         * gnulib/import/globfree.c: Update.
1163         * gnulib/import/hard-locale.c: Update.
1164         * gnulib/import/hard-locale.h: Update.
1165         * gnulib/import/intprops.h: Update.
1166         * gnulib/import/inttypes.in.h: Update.
1167         * gnulib/import/isnan.c: Update.
1168         * gnulib/import/isnand-nolibm.h: Update.
1169         * gnulib/import/isnand.c: Update.
1170         * gnulib/import/isnanl-nolibm.h: Update.
1171         * gnulib/import/isnanl.c: Update.
1172         * gnulib/import/itold.c: Update.
1173         * gnulib/import/libc-config.h: Update.
1174         * gnulib/import/limits.in.h: Update.
1175         * gnulib/import/localcharset.c: Update.
1176         * gnulib/import/localcharset.h: Update.
1177         * gnulib/import/localtime-buffer.c: Update.
1178         * gnulib/import/localtime-buffer.h: Update.
1179         * gnulib/import/lstat.c: Update.
1180         * gnulib/import/m4/00gnulib.m4: Update.
1181         * gnulib/import/m4/__inline.m4: Update.
1182         * gnulib/import/m4/absolute-header.m4: Update.
1183         * gnulib/import/m4/alloca.m4: Update.
1184         * gnulib/import/m4/builtin-expect.m4: Update.
1185         * gnulib/import/m4/canonicalize.m4: Update.
1186         * gnulib/import/m4/chdir-long.m4: Update.
1187         * gnulib/import/m4/close.m4: Update.
1188         * gnulib/import/m4/closedir.m4: Update.
1189         * gnulib/import/m4/configmake.m4: Update.
1190         * gnulib/import/m4/d-ino.m4: Update.
1191         * gnulib/import/m4/d-type.m4: Update.
1192         * gnulib/import/m4/dirent_h.m4: Update.
1193         * gnulib/import/m4/dirfd.m4: Update.
1194         * gnulib/import/m4/dirname.m4: Update.
1195         * gnulib/import/m4/double-slash-root.m4: Update.
1196         * gnulib/import/m4/dup.m4: Update.
1197         * gnulib/import/m4/dup2.m4: Update.
1198         * gnulib/import/m4/eealloc.m4: Update.
1199         * gnulib/import/m4/environ.m4: Update.
1200         * gnulib/import/m4/errno_h.m4: Update.
1201         * gnulib/import/m4/error.m4: Update.
1202         * gnulib/import/m4/exponentd.m4: Update.
1203         * gnulib/import/m4/exponentl.m4: Update.
1204         * gnulib/import/m4/extensions.m4: Update.
1205         * gnulib/import/m4/extern-inline.m4: Update.
1206         * gnulib/import/m4/fchdir.m4: Update.
1207         * gnulib/import/m4/fcntl-o.m4: Update.
1208         * gnulib/import/m4/fcntl.m4: Update.
1209         * gnulib/import/m4/fcntl_h.m4: Update.
1210         * gnulib/import/m4/fdopendir.m4: Update.
1211         * gnulib/import/m4/filenamecat.m4: Update.
1212         * gnulib/import/m4/flexmember.m4: Update.
1213         * gnulib/import/m4/float_h.m4: Update.
1214         * gnulib/import/m4/fnmatch.m4: Update.
1215         * gnulib/import/m4/fnmatch_h.m4: Update.
1216         * gnulib/import/m4/fpieee.m4: Update.
1217         * gnulib/import/m4/frexp.m4: Update.
1218         * gnulib/import/m4/frexpl.m4: Update.
1219         * gnulib/import/m4/fstat.m4: Update.
1220         * gnulib/import/m4/fstatat.m4: Update.
1221         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
1222         * gnulib/import/m4/getcwd-path-max.m4: Update.
1223         * gnulib/import/m4/getcwd.m4: Update.
1224         * gnulib/import/m4/getdtablesize.m4: Update.
1225         * gnulib/import/m4/getlogin.m4: Update.
1226         * gnulib/import/m4/getlogin_r.m4: Update.
1227         * gnulib/import/m4/getpagesize.m4: Update.
1228         * gnulib/import/m4/getprogname.m4: Update.
1229         * gnulib/import/m4/gettimeofday.m4: Update.
1230         * gnulib/import/m4/glibc21.m4: Update.
1231         * gnulib/import/m4/glob.m4: Update.
1232         * gnulib/import/m4/glob_h.m4: Update.
1233         * gnulib/import/m4/gnulib-cache.m4: Update.
1234         * gnulib/import/m4/gnulib-common.m4: Update.
1235         * gnulib/import/m4/gnulib-comp.m4: Update.
1236         * gnulib/import/m4/gnulib-tool.m4: Update.
1237         * gnulib/import/m4/hard-locale.m4: Update.
1238         * gnulib/import/m4/include_next.m4: Update.
1239         * gnulib/import/m4/inttypes-pri.m4: Update.
1240         * gnulib/import/m4/inttypes.m4: Update.
1241         * gnulib/import/m4/isnand.m4: Update.
1242         * gnulib/import/m4/isnanl.m4: Update.
1243         * gnulib/import/m4/largefile.m4: Update.
1244         * gnulib/import/m4/limits-h.m4: Update.
1245         * gnulib/import/m4/localcharset.m4: Update.
1246         * gnulib/import/m4/locale-fr.m4: Update.
1247         * gnulib/import/m4/locale-ja.m4: Update.
1248         * gnulib/import/m4/locale-zh.m4: Update.
1249         * gnulib/import/m4/localtime-buffer.m4: Update.
1250         * gnulib/import/m4/longlong.m4: Update.
1251         * gnulib/import/m4/lstat.m4: Update.
1252         * gnulib/import/m4/malloc.m4: Update.
1253         * gnulib/import/m4/malloca.m4: Update.
1254         * gnulib/import/m4/math_h.m4: Update.
1255         * gnulib/import/m4/mbrtowc.m4: Update.
1256         * gnulib/import/m4/mbsinit.m4: Update.
1257         * gnulib/import/m4/mbsrtowcs.m4: Update.
1258         * gnulib/import/m4/mbstate_t.m4: Update.
1259         * gnulib/import/m4/memchr.m4: Update.
1260         * gnulib/import/m4/memmem.m4: Update.
1261         * gnulib/import/m4/mempcpy.m4: Update.
1262         * gnulib/import/m4/memrchr.m4: Update.
1263         * gnulib/import/m4/mkdir.m4: Update.
1264         * gnulib/import/m4/mkstemp.m4: Update.
1265         * gnulib/import/m4/mmap-anon.m4: Update.
1266         * gnulib/import/m4/mode_t.m4: Update.
1267         * gnulib/import/m4/msvc-inval.m4: Update.
1268         * gnulib/import/m4/msvc-nothrow.m4: Update.
1269         * gnulib/import/m4/multiarch.m4: Update.
1270         * gnulib/import/m4/nocrash.m4: Update.
1271         * gnulib/import/m4/off_t.m4: Update.
1272         * gnulib/import/m4/onceonly.m4: Update.
1273         * gnulib/import/m4/open-cloexec.m4: Update.
1274         * gnulib/import/m4/open.m4: Update.
1275         * gnulib/import/m4/openat.m4: Update.
1276         * gnulib/import/m4/opendir.m4: Update.
1277         * gnulib/import/m4/pathmax.m4: Update.
1278         * gnulib/import/m4/rawmemchr.m4: Update.
1279         * gnulib/import/m4/readdir.m4: Update.
1280         * gnulib/import/m4/readlink.m4: Update.
1281         * gnulib/import/m4/realloc.m4: Update.
1282         * gnulib/import/m4/rename.m4: Update.
1283         * gnulib/import/m4/rewinddir.m4: Update.
1284         * gnulib/import/m4/rmdir.m4: Update.
1285         * gnulib/import/m4/save-cwd.m4: Update.
1286         * gnulib/import/m4/secure_getenv.m4: Update.
1287         * gnulib/import/m4/setenv.m4: Update.
1288         * gnulib/import/m4/signal_h.m4: Update.
1289         * gnulib/import/m4/ssize_t.m4: Update.
1290         * gnulib/import/m4/stat-time.m4: Update.
1291         * gnulib/import/m4/stat.m4: Update.
1292         * gnulib/import/m4/std-gnu11.m4: Update.
1293         * gnulib/import/m4/stdbool.m4: Update.
1294         * gnulib/import/m4/stddef_h.m4: Update.
1295         * gnulib/import/m4/stdint.m4: Update.
1296         * gnulib/import/m4/stdio_h.m4: Update.
1297         * gnulib/import/m4/stdlib_h.m4: Update.
1298         * gnulib/import/m4/strchrnul.m4: Update.
1299         * gnulib/import/m4/strdup.m4: Update.
1300         * gnulib/import/m4/strerror.m4: Update.
1301         * gnulib/import/m4/string_h.m4: Update.
1302         * gnulib/import/m4/strstr.m4: Update.
1303         * gnulib/import/m4/strtok_r.m4: Update.
1304         * gnulib/import/m4/sys_socket_h.m4: Update.
1305         * gnulib/import/m4/sys_stat_h.m4: Update.
1306         * gnulib/import/m4/sys_time_h.m4: Update.
1307         * gnulib/import/m4/sys_types_h.m4: Update.
1308         * gnulib/import/m4/tempname.m4: Update.
1309         * gnulib/import/m4/time_h.m4: Update.
1310         * gnulib/import/m4/unistd-safer.m4: Update.
1311         * gnulib/import/m4/unistd_h.m4: Update.
1312         * gnulib/import/m4/warn-on-use.m4: Update.
1313         * gnulib/import/m4/wchar_h.m4: Update.
1314         * gnulib/import/m4/wchar_t.m4: Update.
1315         * gnulib/import/m4/wctype_h.m4: Update.
1316         * gnulib/import/m4/wint_t.m4: Update.
1317         * gnulib/import/malloc.c: Update.
1318         * gnulib/import/malloc/scratch_buffer.h: Update.
1319         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
1320         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
1321         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
1322         * gnulib/import/malloca.c: Update.
1323         * gnulib/import/malloca.h: Update.
1324         * gnulib/import/malloca.valgrind: Update.
1325         * gnulib/import/math.in.h: Update.
1326         * gnulib/import/mbrtowc.c: Update.
1327         * gnulib/import/mbsinit.c: Update.
1328         * gnulib/import/mbsrtowcs-impl.h: Update.
1329         * gnulib/import/mbsrtowcs-state.c: Update.
1330         * gnulib/import/mbsrtowcs.c: Update.
1331         * gnulib/import/memchr.c: Update.
1332         * gnulib/import/memmem.c: Update.
1333         * gnulib/import/mempcpy.c: Update.
1334         * gnulib/import/memrchr.c: Update.
1335         * gnulib/import/mkdir.c: Update.
1336         * gnulib/import/mkstemp.c: Update.
1337         * gnulib/import/msvc-inval.c: Update.
1338         * gnulib/import/msvc-inval.h: Update.
1339         * gnulib/import/msvc-nothrow.c: Update.
1340         * gnulib/import/msvc-nothrow.h: Update.
1341         * gnulib/import/open.c: Update.
1342         * gnulib/import/openat-die.c: Update.
1343         * gnulib/import/openat-priv.h: Update.
1344         * gnulib/import/openat-proc.c: Update.
1345         * gnulib/import/openat.c: Update.
1346         * gnulib/import/openat.h: Update.
1347         * gnulib/import/opendir.c: Update.
1348         * gnulib/import/pathmax.h: Update.
1349         * gnulib/import/pipe-safer.c: Update.
1350         * gnulib/import/rawmemchr.c: Update.
1351         * gnulib/import/readdir.c: Update.
1352         * gnulib/import/readlink.c: Update.
1353         * gnulib/import/realloc.c: Update.
1354         * gnulib/import/ref-add.sin: Update.
1355         * gnulib/import/ref-del.sin: Update.
1356         * gnulib/import/rename.c: Update.
1357         * gnulib/import/rewinddir.c: Update.
1358         * gnulib/import/rmdir.c: Update.
1359         * gnulib/import/same-inode.h: Update.
1360         * gnulib/import/save-cwd.c: Update.
1361         * gnulib/import/save-cwd.h: Update.
1362         * gnulib/import/scratch_buffer.h: Update.
1363         * gnulib/import/secure_getenv.c: Update.
1364         * gnulib/import/setenv.c: Update.
1365         * gnulib/import/signal.in.h: Update.
1366         * gnulib/import/stat-time.c: Update.
1367         * gnulib/import/stat-time.h: Update.
1368         * gnulib/import/stat-w32.c: Update.
1369         * gnulib/import/stat-w32.h: Update.
1370         * gnulib/import/stat.c: Update.
1371         * gnulib/import/stdbool.in.h: Update.
1372         * gnulib/import/stddef.in.h: Update.
1373         * gnulib/import/stdint.in.h: Update.
1374         * gnulib/import/stdio.in.h: Update.
1375         * gnulib/import/stdlib.in.h: Update.
1376         * gnulib/import/str-two-way.h: Update.
1377         * gnulib/import/strchrnul.c: Update.
1378         * gnulib/import/strdup.c: Update.
1379         * gnulib/import/streq.h: Update.
1380         * gnulib/import/strerror-override.c: Update.
1381         * gnulib/import/strerror-override.h: Update.
1382         * gnulib/import/strerror.c: Update.
1383         * gnulib/import/string.in.h: Update.
1384         * gnulib/import/stripslash.c: Update.
1385         * gnulib/import/strnlen1.c: Update.
1386         * gnulib/import/strnlen1.h: Update.
1387         * gnulib/import/strstr.c: Update.
1388         * gnulib/import/strtok_r.c: Update.
1389         * gnulib/import/sys_stat.in.h: Update.
1390         * gnulib/import/sys_time.in.h: Update.
1391         * gnulib/import/sys_types.in.h: Update.
1392         * gnulib/import/tempname.c: Update.
1393         * gnulib/import/tempname.h: Update.
1394         * gnulib/import/time.in.h: Update.
1395         * gnulib/import/unistd--.h: Update.
1396         * gnulib/import/unistd-safer.h: Update.
1397         * gnulib/import/unistd.in.h: Update.
1398         * gnulib/import/unsetenv.c: Update.
1399         * gnulib/import/verify.h: Update.
1400         * gnulib/import/extra/snippet/warn-on-use.h: Update.
1401         * gnulib/import/wchar.in.h: Update.
1402         * gnulib/import/wctype.in.h: Update.
1403         * gnulib/import/xalloc-oversized.h: Update.
1404         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
1405         "53e2c179f26a890fa6685af4b6c1397ee370433b".
1406
1407 2018-08-16  Gary Benson <gbenson@redhat.com>
1408
1409         PR gdb/13000:
1410         * gdb/main.c (captured_main_1): Exit with nonzero status
1411         in batch mode if the last command to be executed failed.
1412         * NEWS: Mention the above.
1413
1414 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
1415
1416         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
1417         end of warning message.
1418
1419 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
1420
1421         PR gdb/22943:
1422         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
1423         (aarch64_extract_return_value): Use
1424         aapcs_is_vfp_call_or_return_candidate.
1425         (aarch64_return_in_memory): Likewise.
1426         (aarch64_store_return_value): Likewise.
1427
1428 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
1429
1430         * aarch64-tdep.c
1431         (aapcs_is_vfp_call_or_return_candidate): Make static
1432         (pass_in_v_or_stack): Remove function.
1433         (pass_in_v_vfp_candidate): New function.
1434         (aarch64_push_dummy_call): Check for float register candidates.
1435
1436 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
1437
1438         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
1439         (aapcs_is_vfp_call_or_return_candidate_1): New function.
1440         (aapcs_is_vfp_call_or_return_candidate): Likewise.
1441
1442 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
1443
1444         PR build/23399
1445         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
1446         (struct ipa_sym_addresses): Rename to...
1447         (struct ipa_sym_addresses_common): ... this.
1448         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
1449
1450 2018-08-28  Tom Tromey  <tom@tromey.com>
1451
1452         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1453         (token_fifo): Now a std::vector.
1454         (yylex, c_parse): Update.
1455         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1456         (token_fifo): Now a std::vector.
1457         (yylex, d_parse): Update.
1458         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1459         (token_fifo): Now a std::vector.
1460         (yylex, go_parse): Update.
1461
1462 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
1463
1464         * parser-defs.h (struct type_stack) <elements>: Change type to
1465         std::vector<union type_stack_elt>.
1466         <depth, size>: Remove.
1467         * parse.c (parse_exp_in_context_1): Adjust.
1468         (type_stack_reserve): Remove.
1469         (check_type_stack_depth): Remove.
1470         (insert_into_type_stack): Adjust to std::vector.
1471         (insert_type): Likewise.
1472         (push_type): Likewise.
1473         (push_type_int): Likewise.
1474         (insert_type_address_space): Likewise.
1475         (pop_type): Likewise.
1476         (pop_type_int): Likewise.
1477         (pop_typelist): Likewise.
1478         (pop_type_stack): Likewise.
1479         (append_type_stack): Likewise.
1480         (push_type_stack): Likewise.
1481         (get_type_stack): Likewise.
1482         (type_stack_cleanup): Likewise.
1483         (push_typelist): Likewise.
1484         (follow_types): Likewise.
1485         (_initialize_parse): Likewise.
1486
1487 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
1488
1489         * NEWS: Mention csky target.
1490
1491 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
1492             Hafiz Abid Qadeer  <abidh@codesourcery.com>
1493             Don Breazeal  <donb@codesourcery.com>
1494
1495         * csky-linux-tdep.c: New file.
1496         * csky-tdep.c: Likewise.
1497         * csky-tdep.h: Likewise.
1498         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
1499         csky-tdep.o.
1500         (HFILES_NO_SRCDIR): Add csky-tdep.h.
1501         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
1502         * configure.tgt: Add csky support.
1503
1504 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
1505
1506         * python/py-framefilter.c (py_print_frame): Print frame architecture
1507         when printing on an MI output.
1508
1509 2018-08-27  Tom Tromey  <tom@tromey.com>
1510
1511         PR build/23087:
1512         * configure: Rebuild.
1513         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
1514
1515 2018-08-27  Tom Tromey  <tom@tromey.com>
1516
1517         * aarch64-linux-tdep.c
1518         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
1519         casts to int.
1520
1521 2018-08-27  Tom Tromey  <tom@tromey.com>
1522
1523         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
1524         unsigned.
1525         (ppc64_standard_linkage1, ppc64_standard_linkage2)
1526         (ppc64_standard_linkage3, ppc64_standard_linkage4)
1527         (ppc64_standard_linkage5, ppc64_standard_linkage6)
1528         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
1529         unsigned.
1530
1531 2018-08-27  Tom Tromey  <tom@tromey.com>
1532
1533         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
1534         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
1535
1536 2018-08-27  Tom Tromey  <tom@tromey.com>
1537
1538         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
1539         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
1540         ULONGEST_MAX.
1541         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
1542         ULONGEST_MAX.
1543         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
1544         ULONGEST_MAX.
1545         * sparc-linux-tdep.c (sparc32_linux_sigframe)
1546         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
1547         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
1548         ULONGEST_MAX.
1549         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
1550         (ppc64_linux_sigaction_tramp_frame)
1551         (ppc32_linux_sighandler_tramp_frame)
1552         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
1553         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
1554         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
1555         * mn10300-linux-tdep.c (am33_linux_sigframe)
1556         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
1557         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
1558         * mips-linux-tdep.c (mips_linux_o32_sigframe)
1559         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
1560         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
1561         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
1562         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
1563         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
1564         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
1565         * microblaze-linux-tdep.c
1566         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
1567         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
1568         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
1569         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
1570         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
1571         * common/common-types.h (ULONGEST_MAX): New define.
1572         (CORE_ADDR_MAX): Fix formatting.
1573         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
1574         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
1575         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
1576         (arm_linux_rt_sigreturn_tramp_frame)
1577         (arm_eabi_linux_sigreturn_tramp_frame)
1578         (arm_eabi_linux_rt_sigreturn_tramp_frame)
1579         (thumb2_eabi_linux_sigreturn_tramp_frame)
1580         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
1581         (arm_linux_restart_syscall_tramp_frame)
1582         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
1583         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
1584         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
1585         ULONGEST_MAX.
1586         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
1587
1588 2018-08-27  Tom Tromey  <tom@tromey.com>
1589
1590         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
1591         CORE_ADDR_MAX.
1592         * mips-tdep.c (mips_deal_with_atomic_sequence)
1593         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
1594         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
1595         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
1596         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
1597         CORE_ADDR_MAX.
1598         * aarch64-tdep.c (aarch64_software_single_step): Use
1599         CORE_ADDR_MAX.
1600
1601 2018-08-27  Tom Tromey  <tom@tromey.com>
1602
1603         * linespec.c (complete_linespec_component): Add cast to "char".
1604         * completer.c (completion_tracker::build_completion_result): Add
1605         cast to "char".
1606
1607 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
1608
1609         * solist.h (struct solist, struct target_so_ops): Fix
1610         indentation.
1611
1612 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
1613
1614         * ada-tasks.c (ada_task_info_s): Remove typedef.
1615         (DEF_VEC_O(ada_task_info_s)): Remove.
1616         (struct ada_tasks_inferior_data): Initialize fields.
1617         <task_list>: Make an std::vector.
1618         (get_ada_tasks_inferior_data): Allocate with new.
1619         (ada_get_task_number): Adjust.
1620         (get_task_number_from_id): Likewise.
1621         (valid_task_id): Likewise.
1622         (ada_get_task_info_from_ptid): Likewise.
1623         (iterate_over_live_ada_tasks): Likewise.
1624         (add_ada_task): Likewise.
1625         (read_known_tasks): Likewise.
1626         (ada_build_task_list): Likewise.
1627         (print_ada_task_info): Likewise.
1628         (info_task): Likewise.
1629         (task_command_1): Likewise.
1630
1631 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
1632
1633         * ada-lang.c (add_angle_brackets): Return std::string.
1634
1635 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
1636
1637         * python/py-threadevent.c (py_get_event_thread): Initialize
1638         pythread.
1639
1640 2018-08-24  Pedro Alves  <palves@redhat.com>
1641
1642         * python/py-bpevent.c (create_breakpoint_event_object): Use
1643         copy-initialization.
1644         * python/py-continueevent.c (emit_continue_event): Use
1645         copy-initialization.
1646         * python/py-exitedevent.c (create_exited_event_object): Return a
1647         gdbpy_ref<>.
1648         (emit_exited_event): Use copy-initialization.
1649         * python/py-inferior.c (python_new_inferior)
1650         (python_inferior_deleted, add_thread_object): Use
1651         copy-initialization.
1652         * python/py-infevents.c (create_inferior_call_event_object)
1653         (create_register_changed_event_object)
1654         (create_memory_changed_event_object): Return a gdbpy_ref<>.
1655         (emit_inferior_call_event, emit_memory_changed_event)
1656         (emit_register_changed_event): Use copy-initialization.
1657         * python/py-newobjfileevent.c (create_new_objfile_event_object):
1658         Return a gdbpy_ref<>.
1659         (emit_new_objfile_event): Use copy-initialization.
1660         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
1661         (emit_clear_objfiles_event): Use copy-initialization.
1662         * python/py-signalevent.c (create_signal_event_object): Use
1663         copy-initialization.
1664         * python/py-threadevent.c (create_thread_event_object): Use
1665         copy-initialization.
1666
1667 2018-08-24  Pedro Alves  <palves@redhat.com>
1668             Simon Marchi  <simon.marchi@ericsson.com>
1669
1670         PR gdb/23379
1671         * python/py-continueevent.c: Include "gdbthread.h".
1672         (create_continue_event_object): Add intro comment.  Add 'ptid'
1673         parameter.  Use it to find thread to pass to
1674         create_thread_event_object.
1675         (emit_continue_event): Pass PTID down to
1676         create_continue_event_object.
1677         * python/py-event.h (py_get_event_thread): Declare.
1678         (create_thread_event_object): Remove default from 'thread'
1679         parameter.
1680         * python/py-stopevent.c (create_stop_event_object): Use
1681         py_get_event_thread.
1682         * python/py-threadevent.c (get_event_thread): Rename to ...
1683         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
1684         and use it to find the thread.
1685         (create_thread_event_object): Assert that THREAD isn't null.
1686         Don't find the event thread here.
1687
1688 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
1689
1690         * block.h (blockrange, blockranges): New struct declarations.
1691         (struct block): Add new field named `ranges'.
1692         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
1693         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
1694         macros for accessing ranges in struct block.
1695         (make_blockranges): New declaration.
1696         block.c (make_blockranges): New function.
1697         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
1698         for block.
1699         * symtab.h (find_pc_partial_function): Add new parameter `block'.
1700         * blockframe.c (cache_pc_function_block): New static global.
1701         (clear_pc_function_cache): Clear cache_pc_function_block.
1702         (find_pc_partial_function): Move comment to symtab.h.  Add
1703         support for non-contiguous blocks.
1704         * cli/cli-cmds.c (block.h): Include.
1705         (print_disassembly): Handle printing of non-contiguous blocks.
1706         (disassemble_current_function): Likewise.
1707         (disassemble_command): Likewise.
1708
1709         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
1710         BLOCK_START.
1711         * blockframe.c (get_pc_function_start): Likewise.
1712         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
1713         (gcc_symbol_address): Likewise.
1714         * compile/compile-object-run.c (compile_object_run): Likewise.
1715         * compile/compile.c (get_expr_block_and_pc): Likewise.
1716         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
1717         (func_addr_to_tail_call_list): Likewise.
1718         * findvar.c (default_read_var_value): Likewise.
1719         * inline-frame.c (inline_frame_this_id): Likewise.
1720         (skip-inline_frames): Likewise.
1721         * infcmd.c (until_next_command): Likewise.
1722         * linespec.c (convert_linespec_to_sals): Likewise.
1723         * parse.c (parse_exp_in_context_1): Likewise.
1724         * printcmd.c (build_address_symbolic): likewise.
1725         (info_address_command): Likewise.
1726         symtab.c (find_function_start_sal): Likewise.
1727         (skip_prologue_sal): Likewise.
1728         (find_function_alias_target): Likewise.
1729         (find_gnu_ifunc): Likewise.
1730         * stack.c (find_frame_funname): Likewise.
1731         * symtab.c (fixup_symbol_section): Likewise.
1732         (find_function_start_sal): Likewise.
1733         (skip_prologue_sal): Likewsie.
1734         (find_function_alias_target): Likewise.
1735         (find_gnu_ifunc): Likewise.
1736         * tracepoint.c (info_scope_command): Likewise.
1737         * value.c (value_fn_field): Likewise.
1738
1739         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
1740         in place of find_pc_partial_function.
1741         * blockframe.c (find_function_entry_range_from_pc): New function.
1742         * symtab.h (find_function_entry_range_from_pc): Declare and document.
1743         * objfiles.c (objfile_relocate1): Relocate start and end addresses
1744         for each range in a block.
1745
1746
1747 2018-08-23  Xavier Roirand  <roirand@adacore.com>
1748
1749         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
1750         incrementation.
1751
1752 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
1753
1754         * solib-svr4.c (read_program_headers_from_bfd): Return
1755         gdb::optional<gdb::byte_vector>.
1756         (svr4_exec_displacement): Adjust.
1757
1758 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
1759
1760         * solib-svr4.c (read_program_header): Return
1761         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
1762         (find_program_interpreter): Return
1763         gdb::optional<gdb::byte_vector>.
1764         (scan_dyntag_auxv): Adjust.
1765         (enable_break): Adjust.
1766         (svr4_exec_displacement): Adjust.
1767
1768 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
1769
1770         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
1771         * inf-child.c (inf_child_target::terminal_save_inferior): New.
1772
1773 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
1774
1775         * guile/scm-string.c (gdbscm_scm_from_printf): Use
1776         string_vprintf.
1777         * guile/scm-utils.c (gdbscm_printf): Likewise.
1778         * serial.c (serial_printf): Likewise.
1779         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
1780
1781 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
1782
1783         * stack.c (print_frame): Print frame architecture when printing on
1784         an MI output.
1785         * NEWS: Mention new "arch" attribute in frame output.
1786
1787 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
1788
1789         * arch/aarch64.h (aarch64_regnum): Update comment.
1790
1791 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
1792
1793         * NEWS: Add SVE to 8.2 section.
1794
1795 2018-08-21  Pedro Alves  <palves@redhat.com>
1796
1797         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
1798         out from gdbscm_parse_function_args.
1799         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
1800         gdbscm_parse_function_args_1.
1801
1802 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
1803
1804         PR gdb/17816
1805         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
1806         operator.
1807
1808 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
1809
1810         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
1811
1812 2018-08-19  Michael Spang  <spang@google.com>
1813
1814         PR gdb/11786
1815         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
1816         for PT_TLS segments.
1817
1818 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
1819
1820         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
1821         dwarf_variable_value.
1822         * dwarf2-frame.c (class dwarf_expr_executor):
1823         Add override for dwarf_variable_value.
1824         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
1825         (class symbol_needs_eval_context): Likewise.
1826         (indirect_synthetic_pointer): Add forward declaration.
1827         (sect_variable_value): New function.
1828         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
1829         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
1830         for DW_OP_GNU_variable_value.
1831
1832 2018-08-16  Tom Tromey  <tom@tromey.com>
1833
1834         * top.c (read_command_file): Update.
1835         (command_line_input): Remove "repeat" argument.
1836         * ada-lang.c (get_selections): Update.
1837         * linespec.c (decode_line_2): Update.
1838         * defs.h (command_line_input): Remove argument.
1839         * cli/cli-script.c (read_next_line): Update.
1840         * python/py-gdb-readline.c: Update.
1841
1842 2018-08-17  Tom Tromey  <tom@tromey.com>
1843
1844         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
1845         command_line_input.
1846
1847 2018-08-15  Tom Tromey  <tom@tromey.com>
1848
1849         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
1850
1851 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
1852
1853         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
1854         If used, use find_pc_partial_function to find address range
1855         to disassemble.
1856         * mi/mi-main.c (mi_cmd_list_features): Report
1857         "data-disassemble-a-option" feature.
1858         * NEWS: Mention new -data-disassemble option -a.
1859
1860 2018-08-13  Tom Tromey  <tom@tromey.com>
1861
1862         * common/common-defs.h (_FORTIFY_SOURCE): Define.
1863
1864 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
1865
1866         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
1867         (aarch64_linux_collect_sve_regset): Likewise.
1868         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
1869         * regcache.h (regcache_map_entry_size): New function.
1870
1871 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
1872
1873         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
1874         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
1875         (SVE_HEADER_VL_LENGTH): Likewise.
1876         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
1877         (SVE_HEADER_FLAGS_LENGTH): Likewise.
1878         (SVE_HEADER_RESERVED_LENGTH): Likewise.
1879         (SVE_HEADER_SIZE_OFFSET): Likewise.
1880         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
1881         (SVE_HEADER_VL_OFFSET): Likewise.
1882         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
1883         (SVE_HEADER_FLAGS_OFFSET): Likewise.
1884         (SVE_HEADER_RESERVED_OFFSET): Likewise.
1885         (SVE_HEADER_SIZE): Likewise.
1886         (aarch64_linux_core_read_vq): Add function.
1887         (aarch64_linux_core_read_description): Check for SVE section.
1888
1889 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
1890
1891         * aarch64-fbsd-tdep.c
1892         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
1893         collect_size.
1894         * aarch64-linux-tdep.c
1895         (aarch64_linux_iterate_over_regset_sections): Likewise.
1896         * alpha-linux-tdep.c
1897         (alpha_linux_iterate_over_regset_sections):
1898         * alpha-nbsd-tdep.c
1899         (alphanbsd_iterate_over_regset_sections): Likewise.
1900         * amd64-fbsd-tdep.c
1901         (amd64fbsd_iterate_over_regset_sections): Likewise.
1902         * amd64-linux-tdep.c
1903         (amd64_linux_iterate_over_regset_sections): Likewise.
1904         * arm-bsd-tdep.c
1905         (armbsd_iterate_over_regset_sections): Likewise.
1906         * arm-fbsd-tdep.c
1907         (arm_fbsd_iterate_over_regset_sections): Likewise.
1908         * arm-linux-tdep.c
1909         (arm_linux_iterate_over_regset_sections): Likewise.
1910         * corelow.c (get_core_registers_cb): Likewise.
1911         (core_target::fetch_registers): Likewise.
1912         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
1913         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
1914         * gdbarch.h (void): Regenerate.
1915         * gdbarch.sh: Add supply_size and collect_size.
1916         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
1917         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
1918         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
1919         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
1920         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
1921         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
1922         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
1923         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
1924         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
1925         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
1926         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
1927         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
1928         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
1929         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
1930         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
1931         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
1932         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
1933         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
1934         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
1935         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
1936         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
1937         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
1938         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
1939         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
1940         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
1941         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
1942         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
1943         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
1944         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
1945         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
1946
1947 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
1948
1949         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
1950         with string_printf.
1951
1952 2018-08-10  Keith Seitz  <keiths@redhat.com>
1953
1954         * compile/compile-c-support.c (add_code_header, add_code_footer):
1955         Move into policy class.
1956         (c_push_user_expression, pop_user_expression_nop)
1957         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
1958         (compile_program): New host class.
1959         (c_compile_program): New typedef.
1960         (c_compute_porgram): Use c_compile_program.
1961
1962 2018-08-10  Keith Seitz  <keiths@redhat.com>
1963
1964         * compile/compile-internal.h (compile_instance::~compile_instance):
1965         Remove calls to htab_delete.
1966         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
1967         * compile.c (compile_instance::compile_instance): Initialize
1968         htab unique pointers.
1969         (compile_instance::get_cached_type, compile_instance::insert_type)
1970         (compile_instance::error_symbol_once): Update for unique_ptr.
1971
1972 2018-08-10  Keith Seitz  <keiths@redhat.com>
1973
1974         * compile/compile-c-symbols.c (struct symbol_error)
1975         (hash_symbol_error, eq_symbol_error, del_symbol_error)
1976         (compile_instance::insert_symbol_error)
1977         (compile_instance::error_symbol_once): Move to ...
1978         * compile/compile.c: ... here.
1979
1980 2018-08-10  Keith Seitz  <keiths@redhat.com>
1981
1982         * compile/compile-c-support.c (c_get_compile_context): Use `new'
1983         instead of `new_compile_instance'.
1984         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
1985         Update description.
1986         If the symbol error map is not initialized, create it.
1987         (generate_c_for_for_one_symbol): Do not check/initialize
1988         the symbol error map.
1989         * compile/compile-c-types.c (compile_c_instance): Make a class.
1990         Update all callers.
1991         (compile_instance::compile_instance): Initialize the type cache.
1992         (get_cached_type): New function.
1993         (insert_type): Update description.
1994         (compile_c_instance::m_default_cflags): Define.
1995         (convert_type): Update description.  Use get_cached_type.
1996         (delete_instance): Moved to destructor.
1997         (new_compile_instance): Moved to constructor.
1998         * compile/compile-c.h (compile_c_instance): Make class inheriting
1999         from compile_instance.
2000         <base>: Remove field.
2001         <type_map, symbol_err_map>: Move to base class.
2002         <c_plugin>: Rename to `m_plugin' and remove pointer type.
2003         * compile/compile-internal.h (compile_instance): Make class.
2004         <type_map_t, symbol_err_map_t>: Define.
2005         <fe>: Rename to `m_gcc_fe'.
2006         <scope, block, gcc_target_options>: Add `m_' prefix.
2007         <m_type_map, m_symbol_err_map>: New fields, moved from
2008         compile_c_instance.
2009         <destroy>: Remove.
2010         (convert_type, new_compile_instance): Remove.
2011         * compile/compile.c (cleanup_compile_instance): Remove.
2012         (compile_to_object): Use unique_ptr to eliminate cleanups.
2013         (compile_instance::set_print_callback, compile_instance::version)
2014         (compile_instance::set_verbose)
2015         (compile_instance::set_driver_filename)
2016         (compile_instance::set_triplet_regexp)
2017         (compile_instance::set_arguments)
2018         (compile_instance::set_source_file)
2019         (compile_instance::compile): Define.
2020
2021 2018-08-10  Keith Seitz  <keiths@redhat.com>
2022
2023         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
2024         * compile/compile-c-types.c: Define GCC_METHODN macros and include
2025         gcc-c-fe.def to define C plugin.
2026         (delete_instance): Delete `c_plugin'.
2027         (new_compile_instance): Initialize `c_plugin'.
2028         * compile/compile-c.h: Include gcc_c_plugin.h.
2029         (struct compile_c_instance) <c_plugin>: New member.
2030         * gcc-c-plugin.h: New file.
2031         Update all callers with API change.
2032
2033 2018-08-10  Keith Seitz  <keiths@redhat.com>
2034
2035         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
2036         (HFILES_NO_SRCDIR): ... to here.
2037         Add compile-internal.h and compile-c.h.
2038         * compile/compile-c-support.c: Include compile-c.h.
2039         * compile/compile-c-symbols.c: Include compile-c.h.
2040         (generate_c_for_variable_locations): Update comment.
2041         * compile/compile-c-types.c: Include compile-c.h.
2042         * compile/compile-c.h: New file -- moved C language declarations
2043         from other files here.
2044         * compile/compile-internal.h: Do not include hashtab.h or
2045         common/enum-flags.h.
2046         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
2047         (gcc_convert_symbol, gcc_symbol_address)
2048         (generate_c_for_variable_locations, c_get_mode_for_size)
2049         (c_get_range_decl_name): Definitions moved to compile-c.h.
2050         * compile/compile-loc2c.c: Include compile-c.h.
2051
2052 2018-08-10  Keith Seitz  <keiths@redhat.com>
2053
2054         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
2055         (c_symbol_substitution_name): ... this.
2056         Update all callers.
2057
2058 2018-08-10  Keith Seitz  <keiths@redhat.com>
2059
2060         * compile/compile-c-support.c (c_compute_program): Use
2061         unique_xmalloc_ptr to eliminate cleanup.
2062         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
2063         Return a unique_xmalloc_ptr and eliminate cleanup.
2064         * compile/compile-internal.h (generate_c_for_variable_locations):
2065         Return unique_xmalloc_ptr and update description.
2066
2067 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
2068
2069         * corelow.c (core_target::get_core_register_section): Rename
2070         min_size to section_min_size.
2071
2072 2018-08-09  Jim Wilson  <jimw@sifive.com>
2073
2074         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
2075         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
2076         * NEWS: Mention new GNU/Linux RISC-V target.
2077         * configure.host: Add riscv*-*-linux*.
2078         * configure.nat: Add riscv*.
2079         * configure.tgt: Add riscv*-*-linux*.
2080         * riscv-linux-nat.c: New file.
2081         * riscv-linux-tdep.c: New file.
2082
2083 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
2084
2085         * infrun.c (resume): Make static, add forward declaration.
2086         (proceed): Update header comment.
2087         * infrun.h (resume): Delete declaration.
2088
2089 2018-08-09  Tom Tromey  <tom@tromey.com>
2090
2091         * riscv-tdep.h: Minor formatting fixes.
2092
2093 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
2094
2095         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
2096         * dwarf-index-cache.c (create_dir_and_check): Likewise.
2097         (test_mkdir_recursive): Likewise.
2098         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
2099
2100 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
2101
2102         * valarith.c (value_subscripted_rvalue): If an array is not in
2103         memory, and we don't know the upper bound, then we can't know that
2104         the requested element exists or not.
2105
2106 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
2107
2108         * target.c (str_comma_list_concat_elem): Fix typo in comment.
2109         (target_options_to_string): Add comment.
2110
2111 2018-08-08  Tom Tromey  <tom@tromey.com>
2112
2113         * unittests/scoped_mmap-selftests.c: Check result of "write".
2114
2115 2018-08-08  Jim Wilson  <jimw@sifive.com>
2116
2117         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
2118         (decode_register_index_short): New.
2119         (decode_j_type_insn, decode_cj_type_insn): New.
2120         (decode_b_type_insn, decode_cb_type_insn): New.
2121         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
2122         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
2123         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
2124         is_c_sw_insn instead of is_sw_insn.
2125         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
2126         (riscv_software_single_step): New.
2127         * riscv-tdep.h (riscv_software_single_step): Declare.
2128
2129         * riscv-tdep.c (riscv_isa_xlen): Drop static.
2130         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
2131
2132 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
2133
2134         PR gdb/18050:
2135         * target.c (dispose_inferior): Don't dispose of inferiors that are
2136         already killed.
2137
2138 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
2139
2140         * remote.c (remote_target::download_tracepoint): Change char* to
2141         const char*.
2142
2143 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
2144
2145         * target.h (target_options_to_string): Return an std::string.
2146         * target.c (str_comma_list_concat_elem): Return void, use
2147         std::string.
2148         (do_option): Likewise.
2149         (target_options_to_string): Return an std::string.
2150         * linux-nat.c (linux_nat_target::wait): Adjust.
2151         * target-debug.h (target_debug_print_options): Adjust.
2152
2153 2018-08-07  Tom Tromey  <tom@tromey.com>
2154
2155         * Makefile.in (CPPFLAGS): New variable.
2156         (INTERNAL_CPPFLAGS): Use it.
2157
2158 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2159
2160         * NEWS: Mention the index cache.
2161
2162 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2163
2164         * common/pathstuff.h (get_standard_cache_dir): New.
2165         * common/pathstuff.c (get_standard_cache_dir): New.
2166         * build-id.h (build_id_to_string): New.
2167         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
2168         DEBUG_STR_SUFFIX): Move to here.
2169         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
2170         DEBUG_STR_SUFFIX): Move from there.
2171         (write_psymtabs_to_index): Make non-static, add basename
2172         parameter.  Write to temporary files, rename when done.
2173         (save_gdb_index_command): Adjust call to
2174         write_psymtabs_to_index.
2175         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
2176         field.
2177         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
2178         (get_gdb_index_contents_from_cache): New.
2179         (get_gdb_index_contents_from_cache_dwz): New.
2180         (dwarf2_initialize_objfile): Read index from cache.
2181         (dwarf2_build_psymtabs): Save to index.
2182         * dwarf-index-cache.h: New file.
2183         * dwarf-index-cache.c: New file.
2184         * dwarf-index-write.h: New file.
2185
2186 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2187
2188         * gnulib/aclocal.m4: Re-generate.
2189         * gnulib/config.in: Re-generate.
2190         * gnulib/configure: Re-generate.
2191         * gnulib/import/Makefile.am: Re-generate.
2192         * gnulib/import/Makefile.in: Re-generate.
2193         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
2194         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2195         * gnulib/import/m4/mkdir.m4: New file.
2196         * gnulib/import/mkdir.c: New file.
2197         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
2198         module.
2199
2200 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2201
2202         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
2203         * common/scoped_mmap.c: New file.
2204         * common/scoped_mmap.h (destroy): New method.
2205         (~scoped_mmap, reset): Use destroy.
2206         (scoped_mmap): New move constructor.
2207         (mmap_file): New declaration.
2208         * unittests/scoped_mmap-selftests.c (test_normal,
2209         test_invalid_filename, run_tests): New functions.
2210         (_initialize_scoped_mmap_selftests): Register selftest.
2211
2212 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2213
2214         * dwarf2read.c (read_gdb_index_from_section): Rename to...
2215         (read_gdb_index_from_buffer): ... this.  Remove section
2216         parameter, add buffer parameter.
2217         (get_gdb_index_contents_ftype,
2218         get_gdb_index_contents_dwz_ftype): New typedefs.
2219         (dwarf2_read_gdb_index): Add callback parameters to get the
2220         index contents.
2221         (get_gdb_index_contents_from_section): New.
2222         (dwarf2_initialize_objfile): Update call to
2223         dwarf2_read_gdb_index.
2224
2225 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2226
2227         * common/filestuff.h (gdb_fopen_cloexec): New overload.
2228         (gdb_open_cloexec): Likewise.
2229         * nat/linux-osdata.c (command_from_pid): Use string_printf.
2230         (commandline_from_pid): Likewise.
2231         (linux_xfer_osdata_threads): Likewise.
2232         (linux_xfer_osdata_fds): Likewise.
2233         * ada-lang.c (is_package_name): Likewise.
2234         * auxv.c (procfs_xfer_auxv): Likewise.
2235         * breakpoint.c (print_one_breakpoint_location): Use
2236         uiout::field_fmt.
2237         (print_one_catch_solib): Use string_printf.
2238         * coff-pe-read.c (add_pe_exported_sym): Likewise.
2239         (add_pe_forwarded_sym): Likewise.
2240         * dwarf2read.c (create_type_unit_group): Likewise.
2241         (build_error_marker_type): Likewise.
2242         * infcall.c (get_function_name): Likewise.
2243         * valprint.c (print_converted_chars_to_obstack): Likewise.
2244         * xtensa-tdep.c (xtensa_register_type): Likewise.
2245
2246 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
2247
2248         * remote.c (remote_target::download_tracepoint): Fix format
2249         string errors.
2250
2251 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2252
2253         * tracefile.c: Include common/byte-vector.h.
2254         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
2255         with trace_regblock_size if needed.  Update uses of buf.
2256
2257 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2258
2259         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
2260         std::vector<unsigned char>.
2261         * tracepoint.c (collection_list::collection_list): Remove
2262         m_regs_mask initializer from initializer list.  Resize
2263         m_regs_mask using the largest remote register number.
2264         (collection_list::add_remote_register): Remove size check on
2265         m_regs_mask.  Use at to access element.
2266         (collection_list::stringify): Change type of temp_buf to
2267         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
2268         stringify the register mask.  Use pack_hex_byte for the register
2269         mask.
2270
2271 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2272
2273         * tracepoint.h (class collection_list) <add_register>: Remove.
2274         <add_remote_register, add_ax_registers, add_local_register>:
2275         Declare.
2276         <add_memrange>: Add scope parameter.
2277         * tracepoint.c (encode_actions_1): Likewise.
2278         (collection_list::add_register): Rename to ...
2279         (collection_list::add_remote_register): ... this.  Update
2280         comment.
2281         (collection_list::add_ax_registers, add_local_register): New
2282         methods.
2283         (collection_list::add_memrange): Add scope parameter.  Call
2284         add_local_register instead of add_register.
2285         (finalize_tracepoint_aexpr): New function.
2286         (collection_list::collect_symbol): Update calls to add_memrange.
2287         Call add_local_register instead of add_register.  Call
2288         add_ax_registers.  Call finalize_tracepoint_aexpr.
2289         (encode_actions_1): Get remote regnos for $reg action.  Call
2290         add_remote_register, add_ax_registers, and add_local_register.
2291         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
2292         (validate_actionline): Call finalize_tracepoint_aexpr.
2293
2294 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2295
2296         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
2297         Replace array buf with gdb::char_vector buf, of size
2298         get_remote_packet_size ().  Replace references to buf and
2299         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
2300         and xsnprintf with snprintf.  Raise errors if the buffer is too
2301         small.
2302
2303 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2304
2305         * remote.c (remote_target::download_tracepoint): Fix the has_more
2306         predicate in the QTDP action list iteration.
2307
2308 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2309
2310         * remote.c (remote_target::download_tracepoint): Fix indentation
2311         in for block.
2312
2313 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2314
2315         * proc-api.c (_initialize_proc_api): Remove c, unused.
2316         * procfs.c (procfs_init_inferior): Remove signals, unused.
2317         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
2318         unused.
2319
2320 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
2321             Andrew Burgess  <andrew.burgess@embecosm.com>
2322
2323         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
2324         'W_STOPCODE (0)' as this could be ambiguous.
2325
2326 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
2327
2328         * ser-tcp.c (net_open): Fix thinko when deciding whether to
2329         disable TCP's Nagle algorithm (use "ai_protocol" instead of
2330         "ai_socktype").
2331
2332 2018-08-02  Tom Tromey  <tom@tromey.com>
2333
2334         PR symtab/16842.
2335         * dwarf2read.c (read_func_scope): Set symtab on template parameter
2336         symbols.
2337         (process_structure_scope): Likewise.
2338
2339 2018-08-02  Xavier Roirand  <roirand@adacore.com>
2340
2341         PR gdb/22629:
2342         * darwin-nat.c (darwin_kill_inferior): Fix handling of
2343         kill inferior.
2344
2345 2018-08-02  Tom Tromey  <tom@tromey.com>
2346
2347         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
2348         (darwin_suspend_inferior, darwin_resume_inferior)
2349         (darwin_decode_notify_message, darwin_resume_inferior_threads)
2350         (darwin_check_new_threads): Check result of get_darwin_inferior.
2351
2352 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
2353
2354         GDB 8.1.1 released.
2355
2356 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
2357
2358         * varobj.c (varobj_get_path_expr_parent): Report an error if
2359         parent is a dynamic varobj.
2360
2361 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
2362
2363         * gnulib/aclocal.m4: Re-generate.
2364         * gnulib/config.in: Re-generate.
2365         * gnulib/configure: Re-generate.
2366         * gnulib/import/Makefile.in: Re-generate.
2367         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2368         * gnulib/import/m4/onceonly.m4: Re-generate.
2369
2370 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
2371
2372         * target-descriptions.c (struct xml_test_tdesc): New.
2373         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
2374         (record_xml_tdesc): Update.
2375         (maintenance_check_xml_descriptions): Update.
2376         * target-descriptions.h (record_xml_tdesc): Update comment.
2377
2378 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
2379
2380         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
2381         checking array bounds are defined.
2382
2383 2018-07-30  Tom Tromey  <tom@tromey.com>
2384
2385         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
2386         irreflexivity violation.
2387
2388 2018-07-30  Tom Tromey  <tom@tromey.com>
2389
2390         * cli/cli-decode.c (lookup_cmd): Remove lint code.
2391         * value.c (unpack_long): Remove lint code.
2392         * valops.c (value_ind): Remove lint code.
2393         * valarith.c (value_x_binop, value_x_unop, value_equal)
2394         (value_pos): Remove lint code.
2395
2396 2018-07-28  Tom de Vries  <tdevries@suse.de>
2397
2398         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
2399         with undefined upper bound as <optimized out>.
2400
2401 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
2402
2403         * gcore.in: Rename variable "name" to "prefix".  Expand
2404         "usage" text.
2405
2406 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
2407
2408         * windows-nat.c (windows_nat_target::create_inferior): Update to
2409         call close() in global namespace.
2410
2411 2018-07-26  Tom Tromey  <tom@tromey.com>
2412
2413         * dwarf-index-write.c (add_address_entry): Don't add objfile
2414         offsets.
2415         * dbxread.c (find_stab_function): Rename from
2416         find_stab_function_addr.  Return a bound_minimal_symbol.
2417         (read_dbx_symtab): Use raw_text_low, raw_text_high.
2418         Don't add objfile offsets.
2419         (end_psymtab): Use raw_text_low, raw_text_high,
2420         MSYMBOL_VALUE_RAW_ADDRESS.
2421         (read_ofile_symtab): Update.
2422         (process_one_symbol): Update.
2423         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
2424         offsets.
2425         (dw2_relocate): Remove.
2426         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
2427         searching addrmap.
2428         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
2429         Update.
2430         (process_psymtab_comp_unit_reader, add_partial_symbol)
2431         (add_partial_subprogram, dwarf2_ranges_read): Update.
2432         (load_partial_dies): Update.
2433         (add_address_entry): Don't add objfile offsets.
2434         (dwarf2_build_include_psymtabs): Update.
2435         (create_addrmap_from_aranges): Don't add objfile offsets.
2436         (dw2_find_pc_sect_compunit_symtab): Update.
2437         * mdebugread.c (parse_symbol): Don't add objfile offsets.
2438         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
2439         Update.
2440         (parse_partial_symbols): Don't add objfile offsets.  Use
2441         raw_text_low, raw_text_high.  Update.
2442         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
2443         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
2444         or call 'relocate' quick function.  Clear psymbol_map.
2445         * psympriv.h (struct partial_symbol) <address>: Add section
2446         offset.
2447         <set_unrelocated_address>: Rename from set_address.
2448         <raw_text_low, raw_text_high>: New methods.
2449         <text_low, text_high>: Add objfile parameter.
2450         (add_psymbol_to_bcache): Add 'section' parameter.  Call
2451         set_unrelocated_address.
2452         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2453         (find_pc_psymbol): Update.
2454         (fixup_psymbol_section, relocate_psymtabs): Remove.
2455         (dump_psymtab, psym_functions): Update.
2456         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
2457         parameter.
2458         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
2459         (start_psymtab_common): Update.
2460         * symfile-debug.c (debug_qf_relocate): Remove.
2461         (debug_sym_quick_functions): Update.
2462         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
2463         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
2464         Update.
2465
2466 2018-07-26  Tom Tromey  <tromey@redhat.com>
2467
2468         * dbxread.c (end_psymtab): Use text_high_valid and
2469         text_low_valid.
2470         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
2471         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
2472         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
2473         Update comment.
2474         <text_low_valid, text_high_valid>: New fields.
2475         <set_text_low, set_text_high>: Update.
2476         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
2477
2478 2018-07-26  Tom Tromey  <tom@tromey.com>
2479
2480         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
2481         Update.
2482         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
2483         textlow and texthigh fields.
2484         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
2485         Update.
2486         * mdebugread.c (parse_lines, parse_partial_symbols)
2487         (psymtab_to_symtab_1): Update.
2488         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
2489         Rename fields.  Update comment.  Now private.
2490         <text_low, text_high, set_text_low, set_text_high>: New methods.
2491         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2492         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
2493         (start_psymtab_common, maintenance_info_psymtabs)
2494         (maintenance_check_psymtabs): Update.
2495         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
2496         texthigh fields.
2497         (scan_xcoff_symtab): Update.
2498
2499 2018-07-26  Tom Tromey  <tromey@redhat.com>
2500
2501         * psympriv.h (struct partial_symbol) <unrelocated_address,
2502         address, set_address>: New methods.
2503         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
2504         (fixup_psymbol_section, relocate_psymtabs): Update.
2505         (print_partial_symbols): Add 'objfile' parameter.  Update.
2506         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
2507         Update.
2508
2509 2018-07-26  Tom Tromey  <tom@tromey.com>
2510
2511         * dwarf-index-write.c (write_psymbols, debug_names::insert)
2512         (debug_names::write_psymbols): Update.
2513         * psympriv.h (struct partial_symbol): Derive from
2514         general_symbol_info.
2515         <obj_section>: New method.
2516         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
2517         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2518         (find_pc_sect_psymbol, fixup_psymbol_section)
2519         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
2520         (print_partial_symbols, recursively_search_psymtabs)
2521         (compare_psymbols, psymbol_hash, psymbol_compare)
2522         (add_psymbol_to_bcache, maintenance_check_psymtabs)
2523         (psymbol_name_matches, psym_fill_psymbol_map): Update.
2524
2525 2018-07-26  Tom Tromey  <tromey@redhat.com>
2526
2527         * dbxread.c (end_psymtab): Remove dead code.
2528
2529 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
2530
2531         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
2532         DWARF unwinders are disabled.
2533         * dwarf2-frame.c: Add dwarf2read.h include.
2534         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
2535         disabled.
2536         (dwarf2_frame_unwinders_enabled_p): Define.
2537         (show_dwarf_unwinders_enabled_p): New function.
2538         (_initialize_dwarf2_frame): Register switch to control DWARF
2539         unwinder use.
2540         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
2541         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
2542         (show_dwarf_cmdlist): Remove static keyword.
2543         * dwarf2read.h (set_dwarf_cmdlist): Declare.
2544         (show_dwarf_cmdlist): Declare.
2545         * NEWS: Document new feature.
2546
2547 2018-07-26  Tom de Vries  <tdevries@suse.de>
2548
2549         PR breakpoints/23366
2550         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
2551
2552 2018-07-26  Tom de Vries  <tdevries@suse.de>
2553
2554         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
2555         DW_AT_count can't be translated to a dynamic prop.
2556
2557 2018-07-25  Tom de Vries  <tdevries@suse.de>
2558
2559         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
2560         try/catch.
2561
2562 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
2563
2564         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
2565
2566 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
2567
2568         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
2569
2570 2018-07-24  Keith Seitz  <keiths@redhat.comt
2571
2572         PR symtab/23010
2573         * dwarf2read.c (dw2_add_symbol_to_list): New function.
2574         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
2575         instead of add_symbol_to_list.
2576         (read_file_scope): Call prepare_one_comp_unit before reading
2577         any other DIEs.
2578
2579 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
2580
2581         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
2582
2583 2018-07-24  Tom Tromey  <tom@tromey.com>
2584
2585         * utils.c (malloc, realloc, free): Don't declare.
2586         * configure, config.in: Rebuild.
2587         * configure.ac: Don't check for declarations of free, malloc, or
2588         realloc.
2589
2590 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
2591
2592         * aarch64-linux-nat.c
2593         (aarch64_linux_nat_target::stopped_data_address): Remove unused
2594         variable.
2595         * arm-linux-nat.c (fetch_regs): Likewise.
2596         (store_regs): Likewise.
2597         (fetch_vfp_regs): Likewise.
2598         (store_vfp_regs): Likewise.
2599         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
2600         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
2601         (arm_linux_nat_target::insert_watchpoint): Likewise.
2602         (arm_linux_nat_target::remove_watchpoint): Likewise.
2603         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
2604         Likewise.
2605         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
2606         Likewise.
2607         * ppc-linux-nat.c (fetch_register): Likewise.
2608         (fetch_all_gp_regs): Likewise.
2609         (fetch_ppc_registers): Likewise.
2610         (store_all_gp_regs): Likewise.
2611         (store_ppc_registers): Likewise.
2612         (hwdebug_insert_point): Likewise.
2613         (can_use_watchpoint_cond_accel): Likewise.
2614         * remote-sim.c (gdb_os_write_stdout): Likewise.
2615
2616 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
2617             Tom Tromey  <tom@tromey.com>
2618
2619         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
2620         test for it.
2621         * configure: Rebuild.
2622
2623 2018-07-22  Tom Tromey  <tom@tromey.com>
2624
2625         * regformats/regdat.sh: Define xmltarget_${name} inside
2626         #ifndef IN_PROCESS_AGENT.
2627
2628 2018-07-22  Tom Tromey  <tom@tromey.com>
2629
2630         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
2631
2632 2018-07-22  Tom Tromey  <tom@tromey.com>
2633
2634         * symfile.c (reread_symbols): Notify iter, not objfile.
2635
2636 2018-07-22  Tom Tromey  <tom@tromey.com>
2637
2638         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
2639         Use arch_ops.
2640         (ravenscar_thread_target::prepare_to_store): Likewise.
2641
2642 2018-07-22  Tom Tromey  <tom@tromey.com>
2643
2644         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
2645         unused variable.  Call value_fetch_lazy when needed.
2646         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
2647         Remove unused variable.  Call value_fetch_lazy when needed.
2648
2649 2018-07-22  Tom Tromey  <tom@tromey.com>
2650
2651         * m32c-tdep.c (mark_dma): Return void.
2652         (make_regs): Remove unused declarations.
2653
2654 2018-07-22  Tom Tromey  <tom@tromey.com>
2655
2656         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
2657         cmdscm_get_valid_command_smob_arg_unsafe for effect.
2658         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
2659         bkscm_get_valid_block_smob_arg_unsafe for effect.
2660
2661 2018-07-22  Tom Tromey  <tom@tromey.com>
2662
2663         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
2664         value_type.
2665
2666 2018-07-22  Tom Tromey  <tom@tromey.com>
2667
2668         * windows-nat.c (saved_context): Conditionally define.
2669         * remote.c (remote_target::remote_btrace_maybe_reopen):
2670         Conditionally declare "warned".
2671         * inflow.c (sigquit_ours): Conditionally define.
2672         (new_tty): Move "tty" declaration inside #if.
2673         * guile/guile.c (guile_datadir): Conditionally define.
2674         * charset.c (set_be_le_names): Move some declarations inside #if.
2675         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
2676         #if.
2677         (parse_xml_btrace_conf): Likewise.
2678
2679 2018-07-22  Tom Tromey  <tom@tromey.com>
2680
2681         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
2682
2683 2018-07-22  Tom Tromey  <tom@tromey.com>
2684
2685         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
2686         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
2687         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
2688         * buildsym-legacy.c (get_macro_table): Remove unused variable.
2689         * stack.c (frame_apply_level_command): Remove unused variable.
2690         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
2691         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
2692         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
2693         unused variable.
2694         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
2695         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
2696         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
2697         variable.
2698         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
2699         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
2700         variable.
2701         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
2702         Remove unused variable.
2703         * cli/cli-script.c (recurse_read_control_structure): Remove unused
2704         variable.
2705         * common/tdesc.c (print_xml_feature::visit): Remove unused
2706         variable.
2707         * compile/compile-object-load.c (store_regs): Remove unused
2708         variables.
2709         * complaints.c (clear_complaints): Remove unused variable.
2710         * corelow.c (core_target_open): Remove unused variable.
2711         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
2712         variable.
2713         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
2714         variable.
2715         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
2716         variable.
2717         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
2718         variable.
2719         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
2720         variable.
2721         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
2722         variable.
2723         * ia64-tdep.c (examine_prologue): Remove unused variable.
2724         * infcall.c (run_inferior_call): Remove unused variable.
2725         * inferior.c (exit_inferior): Remove unused variable.
2726         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
2727         * linespec.c (decode_line_2): Remove unused variable.
2728         * linux-nat.c (super_close): Remove.
2729         * linux-tdep.c (linux_info_proc): Remove unused variable.
2730         * mi/mi-main.c (mi_execute_command): Remove unused variable.
2731         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
2732         Remove unused variable.
2733         * parse.c (find_minsym_type_and_address): Remove unused variable.
2734         * printcmd.c (info_symbol_command, printf_floating): Remove unused
2735         variable.
2736         * python/py-breakpoint.c (bppy_set_commands): Remove unused
2737         variable.
2738         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
2739         variables.
2740         * record-btrace.c (record_btrace_target::store_registers): Remove
2741         unused variable.
2742         (cmd_show_record_btrace_cpu): Remove unused variable.
2743         * riscv-tdep.c (riscv_register_reggroup_p)
2744         (riscv_push_dummy_call, riscv_return_value): Remove unused
2745         variable.
2746         * rust-exp.y (literal): Remove unused variable.
2747         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
2748         unused variable.
2749         <STRUCTOP_ANONYMOUS>: Likewise.
2750         * s390-linux-tdep.c (s390_linux_init_abi_31)
2751         (s390_linux_init_abi_64): Remove unused variable.
2752         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
2753         (file_select_thread, net_windows_open, _initialize_ser_windows):
2754         Remove unused variables.
2755         * symtab.c (find_pc_sect_line): Remove unused variable.
2756         * target-memory.c (compute_garbled_blocks): Remove unused
2757         variable.
2758         (target_write_memory_blocks): Remove unused variable.
2759         * target.c (target_stack::unpush): Remove unused variables.
2760         * tracepoint.c (start_tracing, all_tracepoint_actions)
2761         (merge_uploaded_trace_state_variables)
2762         (print_one_static_tracepoint_marker): Remove unused variable.
2763         * unittests/basic_string_view/element_access/char/1.cc (test01):
2764         Remove unused variable.
2765         * windows-nat.c (windows_continue, windows_add_all_dlls)
2766         (do_initial_windows_stuff, windows_nat_target::create_inferior):
2767         Remove unused variables.
2768
2769 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
2770
2771         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
2772         attr_profile in HAVE_ELF.
2773         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
2774         HAVE_ELF.
2775
2776 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
2777
2778         * frame.c (frame_register_unwind): Change parameter name.
2779         (frame_unwind_register): Likewise.
2780         (frame_unwind_register_value): Likewise.
2781         (frame_unwind_register_signed): Likewise.
2782         (frame_unwind_register_unsigned): Likewise.
2783         * frame.h (frame_register_unwind): Likewise.
2784         (frame_unwind_register): Likewise.
2785         (frame_unwind_register_value): Likewise.
2786         (frame_unwind_register_signed): Likewise.
2787         (frame_unwind_register_unsigned): Likewise.
2788         (frame_unwind_arch): Likewise.
2789
2790 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
2791
2792         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
2793         ISA maintenance.
2794
2795 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
2796
2797         * mips-linux-nat.c (mips_linux_nat_target::read_description):
2798         Call `get_ptrace_pid' rather than extracting the ptrace PID by
2799         hand.
2800
2801 2018-07-20  Keith Seitz  <keiths@redhat.com>
2802
2803         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
2804         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
2805         m_compunit_symtab, m_language>: Add "m_" prefix.
2806         Update all uses.
2807         * buildsym.c: Update all uses.
2808
2809 2018-07-20  Tom Tromey  <tom@tromey.com>
2810
2811         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
2812         * buildsym.h (record_line_ftype): Remove typedef.
2813
2814 2018-07-20  Tom Tromey  <tom@tromey.com>
2815
2816         * buildsym-legacy.h (augment_type_symtab): Don't declare.
2817         (end_expandable_symtab): Likewise.
2818         (end_symtab_get_static_block): Likewise.
2819         (end_symtab_from_static_block): Likewise.
2820         * buildsym-legacy.c (augment_type_symtab): Remove.
2821         (end_expandable_symtab): Remove.
2822         (end_symtab_get_static_block): Remove.
2823         (end_symtab_from_static_block): Remove.
2824
2825 2018-07-20  Tom Tromey  <tom@tromey.com>
2826
2827         * dwarf2read.c: Include buildsym.h.
2828         (struct dwarf2_cu) <builder>: New method.
2829         (fixup_go_packaging): Update.
2830         (process_full_comp_unit, process_full_type_unit): Update.  Don't
2831         use scoped_free_pendings.
2832         (using_directives): Add "cu" parameter, remove "language".
2833         (read_import_statement, setup_type_unit_groups, )
2834         (read_func_scope, read_lexical_block_scope)
2835         (dwarf2_record_block_ranges, read_namespace): Update.
2836         (lnp_state_machine::lnp_state_machine): Add cu parameter.
2837         (lnp_state_machine::handle_end_sequence): Update.
2838         (class lnp_state_machine) <m_cu>: New member.
2839         <m_record_line_callback>: Remove.
2840         <m_currently_recording_lines>: New member.
2841         (lnp_state_machine::handle_set_file): Update.
2842         (noop_record_line): Remove.
2843         (dwarf_record_line_p): Add cu parameter.
2844         (dwarf_record_line_1, dwarf_finish_line): Likewise.
2845         (lnp_state_machine::record_line)
2846         (lnp_state_machine::lnp_state_machine)
2847         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
2848         (dwarf_decode_lines): Update.
2849         (dwarf2_start_subfile): Add cu parameter.
2850         (dwarf2_start_symtab, new_symbol): Update.
2851         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
2852         Remove dwarf2_per_objfile parameter.
2853         (dwarf_decode_macros): Update.
2854
2855 2018-07-20  Tom Tromey  <tom@tromey.com>
2856
2857         * stabsread.c (define_symbol): Update.
2858         * buildsym-legacy.h (get_buildsym_compunit): Declare.
2859         * dwarf2read.c (new_symbol): Update.
2860         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
2861         * cp-namespace.c: Include buildsym.h.
2862         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
2863         * buildsym-legacy.c (get_buildsym_compunit): New function.
2864
2865 2018-07-20  Tom Tromey  <tom@tromey.com>
2866
2867         * xcoffread.c: Include buildsym-legacy.h.
2868         * windows-nat.c: Include buildsym-legacy.h.
2869         * stabsread.c: Include buildsym-legacy.h.
2870         * mdebugread.c: Include buildsym-legacy.h.
2871         * buildsym-legacy.h: New file.
2872         * buildsym-legacy.c: New file, from buildsym.c.
2873         * go32-nat.c: Include buildsym-legacy.h.
2874         * dwarf2read.c: Include buildsym-legacy.h.
2875         * dbxread.c: Include buildsym-legacy.h.
2876         * cp-namespace.c: Include buildsym-legacy.h.
2877         * coffread.c: Include buildsym-legacy.h.
2878         * buildsym.h: Move some contents to buildsym-legacy.h.
2879         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
2880         buildsym-legacy.c.
2881         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
2882
2883 2018-07-20  Tom Tromey  <tom@tromey.com>
2884
2885         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
2886         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
2887         (buildsym_compunit::buildsym_compunit)
2888         (buildsym_compunit::~buildsym_compunit)
2889         (buildsym_compunit::get_macro_table): Define.
2890
2891 2018-07-20  Tom Tromey  <tom@tromey.com>
2892
2893         * buildsym.c (reset_symtab_globals): Remove.
2894         (buildsym_compunit::end_symtab_from_static_block): Update.
2895         (buildsym_compunit::augment_type_symtab): Update.
2896         (end_symtab_from_static_block): Call free_buildsym_compunit.
2897         (augment_type_symtab, end_symtab, end_expandable_symtab):
2898         Likewise.
2899
2900 2018-07-20  Tom Tromey  <tom@tromey.com>
2901
2902         * arch-utils.c: Do not include buildsym.h.
2903         * mipsread.c: Do not include buildsym.h.
2904         * machoread.c: Do not include buildsym.h.
2905         * elfread.c: Do not include buildsym.h.
2906
2907 2018-07-20  Tom Tromey  <tom@tromey.com>
2908
2909         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
2910         initialization.
2911         (buildsym_compunit): Add new constructor.
2912         (struct buildsym_compunit) <get_last_source_file, finish_block,
2913         record_block_range, start_subfile, patch_subfile_names,
2914         push_subfile, pop_subfile, record_line, get_compunit_symtab,
2915         set_last_source_start_addr, get_last_source_start_addr,
2916         get_local_using_directives, set_local_using_directives,
2917         get_global_using_directives, outermost_context_p,
2918         get_current_context_stack, get_context_stack_depth,
2919         get_current_subfile, get_local_symbols, get_file_symbols,
2920         get_global_symbols, record_debugformat, record_producer,
2921         push_context, pop_context, end_symtab_get_static_block,
2922         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
2923         New public methods.
2924         <record_pending_block, finish_block_internal, make_blockvector,
2925         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
2926         private methods.
2927         Update all users.
2928
2929 2018-05-22  Tom Tromey  <tom@tromey.com>
2930
2931         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
2932         parameter.
2933         (finish_block_internal): Update.
2934
2935 2018-07-20  Tom Tromey  <tom@tromey.com>
2936
2937         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
2938         parameter.
2939         (finish_block_internal): Update.
2940
2941 2018-07-20  Tom Tromey  <tom@tromey.com>
2942
2943         * buildsym.h (EXTERN): Don't define or undef.
2944         * buildsym.c (EXTERN): Don't define.
2945
2946 2018-07-20  Tom Tromey  <tom@tromey.com>
2947
2948         * buildsym.c: Remove TODO comment.
2949
2950 2018-07-20  Tom Tromey  <tom@tromey.com>
2951
2952         * coffread.c (coff_symtab_read): Update.
2953         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
2954         (xcoff_new_init): Update.
2955         * mipsread.c (mipscoff_new_init): Update.
2956         * mdebugread.c (mdebug_build_psymtabs): Update.
2957         * elfread.c (elf_new_init): Update.
2958         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
2959         Update.
2960         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
2961         (coffstab_build_psymtabs, elfstab_build_psymtabs)
2962         (stabsect_build_psymtabs): Update.
2963         * buildsym.h (buildsym_init): Don't declare.
2964         * buildsym.c: Update comment.
2965         (prepare_for_building): Remove.
2966         (start_symtab, restart_symtab): Update.
2967         (reset_symtab_globals): Update comment.
2968         (buildsym_init): Remove.
2969
2970 2018-07-20  Tom Tromey  <tom@tromey.com>
2971
2972         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
2973         * stabsread.c (patch_block_stabs, define_symbol, read_type)
2974         (read_enum_type, common_block_start, common_block_end)
2975         (cleanup_undefined_types_1, finish_global_stabs): Update.
2976         * mdebugread.c (psymtab_to_symtab_1): Update.
2977         * dwarf2read.c (fixup_go_packaging, read_func_scope)
2978         (read_lexical_block_scope, new_symbol): Update.
2979         * dbxread.c (process_one_symbol): Update.
2980         * coffread.c (coff_symtab_read, process_coff_symbol)
2981         (coff_read_enum_type): Update.
2982         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
2983         declare.
2984         (get_local_symbols, get_file_symbols, get_global_symbols): New
2985         functions.
2986         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
2987         m_global_symbols.
2988         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
2989         (~scoped_free_pendings): Update.
2990         (finish_block, prepare_for_building, reset_symtab_globals)
2991         (end_symtab_get_static_block, end_symtab_with_blockvector)
2992         (augment_type_symtab, push_context): Update.
2993         (get_local_symbols, get_file_symbols, get_global_symbols): New
2994         functions.
2995         (buildsym_init): Update.
2996
2997 2018-07-20  Tom Tromey  <tom@tromey.com>
2998
2999         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
3000         (process_full_type_unit): Likewise.
3001         (dwarf2_start_symtab): Set list_in_scope.
3002
3003 2018-07-20  Tom Tromey  <tom@tromey.com>
3004
3005         * dwarf2read.c (process_psymtab_comp_unit_reader)
3006         (build_type_psymtabs_reader): Do not set list_in_scope.
3007
3008 2018-07-20  Tom Tromey  <tom@tromey.com>
3009
3010         * buildsym.c (free_pendings): Remove.
3011         (add_symbol_to_list, scoped_free_pendings)
3012         (finish_block_internal, buildsym_init): Update.
3013
3014 2018-07-20  Tom Tromey  <tom@tromey.com>
3015
3016         * xcoffread.c (read_xcoff_symtab): Update.
3017         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
3018         Update.
3019         * dbxread.c (process_one_symbol): Update.
3020         * coffread.c (coff_symtab_read): Update.
3021         * buildsym.h (finish_block): Update.
3022         * buildsym.c (finish_block): Remove "listhead" argument.
3023         (end_symtab_get_static_block): Update.
3024
3025 2018-07-20  Tom Tromey  <tom@tromey.com>
3026
3027         * buildsym.h (class scoped_free_pendings): Remove constructor.
3028         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
3029         method.
3030         <m_pending_block_obstack, m_pending_blocks>: New members.
3031         (pending_block_obstack, pending_blocks): Remove.
3032         (scoped_free_pendings::scoped_free_pendings): Default.
3033         (~scoped_free_pendings): Update.
3034         (free_pending_blocks): Remove.
3035         (finish_block_internal, record_pending_block, make_blockvector)
3036         (end_symtab_get_static_block, augment_type_symtab, push_context)
3037         (buildsym_init): Update.
3038
3039 2018-07-20  Tom Tromey  <tom@tromey.com>
3040
3041         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
3042         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
3043         members.
3044         (pending_addrmap, pending_addrmap_obstack)
3045         (pending_addrmap_interesting): Remove.
3046         (scoped_free_pendings, record_block_range, make_blockvector)
3047         (prepare_for_building, reset_symtab_globals, buildsym_init):
3048         Update.
3049
3050 2018-07-20  Tom Tromey  <tom@tromey.com>
3051
3052         * xcoffread.c (process_linenos): Update.
3053         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
3054         * mdebugread.c (psymtab_to_symtab_1): Update.
3055         * dwarf2read.c (setup_type_unit_groups)
3056         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
3057         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
3058         * dbxread.c (process_one_symbol): Update.
3059         * coffread.c (coff_symtab_read, enter_linenos)
3060         (process_coff_symbol): Update.
3061         * buildsym.h (current_subfile): Don't declare.
3062         (get_current_subfile): Declare.
3063         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
3064         member.
3065         (start_subfile, free_buildsym_compunit, push_subfile)
3066         (prepare_for_building, start_symtab): Update.
3067         (get_current_subfile): New function.
3068
3069 2018-07-20  Tom Tromey  <tom@tromey.com>
3070
3071         * coffread.c (coff_symtab_read): Update.
3072         * xcoffread.c (read_xcoff_symtab): Update.
3073         * dwarf2read.c (new_symbol): Update.
3074         (read_func_scope, read_lexical_block_scope): Update.
3075         * dbxread.c (process_one_symbol): Update.
3076         * buildsym.h (context_stack, context_stack_depth): Don't declare.
3077         (outermost_context_p): Remove macro.
3078         (outermost_context_p, get_current_context_stack)
3079         (get_context_stack_depth): Declare.
3080         (pop_context): Return struct context_stack.
3081         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
3082         member.
3083         (context_stack_size): Remove.
3084         (INITIAL_CONTEXT_STACK_SIZE): Remove.
3085         (prepare_for_building, end_symtab_get_static_block)
3086         (augment_type_symtab, push_context): Update.
3087         (pop_context): Return struct context_stack.
3088         (outermost_context_p, get_current_context_stack)
3089         (get_context_stack_depth): New functions.
3090         (buildsym_init): Update.
3091
3092 2018-07-20  Tom Tromey  <tom@tromey.com>
3093
3094         * rust-exp.y: Now a pure parser.  Update all rules.
3095         (%union): Move earlier.
3096         (current_parser, work_obstack): Remove globals.
3097         (rust_parser, ~rust_parser): Update.
3098         (class rust_parser) <copy_name, concat3, crate_name, super_name,
3099         lex_character, lex_number, lex_string, lex_identifier,
3100         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
3101         convert_name, convert_params_to_expression,
3102         convert_ast_to_expression, ast_basic_type, ast_operation,
3103         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
3104         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
3105         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
3106         ast_array_type, ast_slice_type, ast_reference_type,
3107         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
3108         (rust_parse): Update.
3109         (rustyyerror, rustyylex): Add parser parameter.
3110         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
3111         (rust_lex_stringish_test, rust_lex_test_sequence)
3112         (rust_lex_test_trailing_dot, rust_lex_test_completion)
3113         (rust_lex_test_push_back, rust_lex_tests): Update.
3114
3115 2018-07-19  Pedro Alves  <palves@redhat.com>
3116
3117         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
3118         gdb::unique_xmalloc_ptr.
3119         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
3120         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
3121         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
3122         copy-initialization.
3123         * guile/scm-pretty-print.c (ppscm_print_children): Use
3124         gdb::unique_xmalloc_ptr instead of cleanups.
3125         (gdbscm_apply_val_pretty_printer): Remove cleanups.
3126         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
3127         gdb::unique_xmalloc_ptr.
3128         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
3129         Adjust to use gdb::unique_xmalloc_ptr.
3130         * guile/scm-utils.c (extract_arg): Adjust.
3131         * guile/scm-value.c (gdbscm_value_field): Adjust to use
3132         gdb::unique_xmalloc_ptr instead of a cleanup.
3133
3134 2018-07-19  Tom Tromey  <tom@tromey.com>
3135
3136         * utils.c (do_value_free_to_mark)
3137         (make_cleanup_value_free_to_mark): Remove.
3138         * utils.h (make_cleanup_value_free_to_mark): Remove.
3139
3140 2018-07-19  Pedro Alves  <palves@redhat.com>
3141
3142         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
3143         forwarding reference.
3144
3145 2018-07-18  Pedro Alves  <palves@redhat.com>
3146
3147         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
3148         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
3149         cleanup.
3150
3151 2018-07-18  Pedro Alves  <palves@redhat.com>
3152
3153         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
3154         exceptions.
3155         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
3156         (gdbscm_wrap): New.
3157         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
3158         directly instead of a cleanup.
3159         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
3160         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
3161         (vlscm_binop_gdbthrow): New, factored out from ...
3162         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
3163         (vlscm_rich_compare): Use gdbscm_wrap.
3164         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
3165         instead of a cleanup.
3166         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
3167         cleanup.
3168         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
3169         Use xfree directly instead of a cleanup.
3170         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
3171         Adjust to use gdbscm_wrap and scoped_value_mark.
3172         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
3173         (gdbscm_value_address, gdbscm_value_dereference)
3174         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
3175         scoped_value_mark.
3176         (gdbscm_value_dynamic_type): Use scoped_value_mark.
3177         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
3178         scoped_value_mark.
3179         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
3180         gdbscm_wrap and scoped_value_mark.
3181         (gdbscm_value_to_string): Use xfree directly instead of a
3182         cleanup.  Move 'buffer' unique_ptr to TRY scope.
3183         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
3184         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
3185         scoped_value_mark.
3186         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
3187         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
3188         scoped_value_mark.
3189         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
3190         gdbscm_wrap.
3191
3192 2018-07-18  Tom de Vries  <tdevries@suse.de>
3193
3194         * findvar.c (default_read_var_value): Also resolve dynamic type for
3195         LOC_OPTIMIZED_OUT vars.
3196
3197 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
3198
3199         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
3200         decoding.
3201
3202 2018-07-17  Tom Tromey  <tom@tromey.com>
3203
3204         * guile/scm-param.c (pascm_set_func, pascm_show_func)
3205         (compute_enum_list, pascm_set_param_value_x)
3206         (gdbscm_parameter_value): Update.
3207         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
3208         (gdbscm_scm_to_host_string): Update.
3209         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
3210         Update.
3211         * guile/scm-cmd.c (cmdscm_add_completion): Update.
3212         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
3213         * guile/scm-string.c (gdbscm_scm_to_string): Return
3214         unique_xmalloc_ptr.
3215         (gdbscm_scm_to_host_string): Likewise.
3216
3217 2018-07-17  Tom Tromey  <tom@tromey.com>
3218
3219         * guile/guile.c (gdbscm_eval_from_control_command): Update.
3220         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
3221         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
3222         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
3223         unique_xmalloc_ptr.
3224
3225 2018-07-17  Tom Tromey  <tom@tromey.com>
3226
3227         * guile/scm-param.c (pascm_signal_setshow_error): Update.
3228         * guile/guile-internal.h (gdbscm_exception_message_to_string):
3229         Update.
3230         * guile/scm-cmd.c (cmdscm_function): Update.
3231         * guile/scm-pretty-print.c
3232         (ppscm_print_exception_unless_memory_error): Update.
3233         * guile/scm-exception.c (gdbscm_exception_message_to_string):
3234         Return unique_xmalloc_ptr.
3235
3236 2018-07-17  Tom Tromey  <tom@tromey.com>
3237
3238         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
3239         Use string_printf.
3240
3241 2018-07-17  Jim Wilson  <jimw@sifive.com>
3242
3243         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
3244         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
3245         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
3246         unecessary braces after EF_RISCV_RVC test.  Delete call to
3247         set_gdbarch_decr_pc_after_break.
3248
3249         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
3250         RISCV_LAST_FP_REGNUM + 1.
3251         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
3252
3253 2018-07-17  Tom Tromey  <tom@tromey.com>
3254
3255         * configure.ac: Remove --disable-gdbcli.
3256         * configure: Rebuild.
3257         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
3258         (SUBDIR_CLI_CFLAGS): Remove.
3259         (SFILES): Use SUBDIR_CLI_SRCS.
3260         (COMMON_OBS): Use SUBDIR_CLI_OBS.
3261
3262 2018-07-17  Tom Tromey  <tom@tromey.com>
3263
3264         PR gdb/18624:
3265         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
3266
3267 2018-07-16  Jim Wilson  <jimw@sifive.com>
3268
3269         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
3270
3271 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
3272
3273         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
3274         variable.
3275         (libunwind_frame_sniffer): Likewise.
3276         (libunwind_frame_prev_register): Likewise.
3277         (libunwind_sigtramp_frame_sniffer): Likewise.
3278         * ia64-tdep.c (ia64_access_reg): Likewise.
3279         (ia64_access_rse_reg): Likewise.
3280         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
3281         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
3282
3283 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
3284
3285         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
3286
3287 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
3288
3289         * remote-sim.c (gdbsim_target::close,
3290         gdbsim_target::mourn_inferior): Remove unused variables.
3291
3292 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
3293
3294         * ia64-tdep.c (ktab_buf): New global.
3295         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
3296         (get_kernel_table): Adjust.
3297
3298 2018-07-16  Tom Tromey  <tom@tromey.com>
3299
3300         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
3301         * dwarf2read.c (using_directives, new_symbol): Use
3302         outermost_context_p.
3303         * dbxread.c (process_one_symbol): Use outermost_context_p.
3304         * coffread.c (coff_symtab_read): Use outermost_context_p.
3305
3306 2018-07-16  Tom Tromey  <tom@tromey.com>
3307
3308         * dwarf2read.c (using_directives, read_func_scope)
3309         (read_lexical_block_scope): Update.
3310         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
3311         * buildsym.h (local_using_directives, global_using_directives):
3312         Don't declare.
3313         (get_local_using_directives, set_local_using_directives)
3314         (get_global_using_directives): Declare.
3315         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
3316         m_global_using_directives>: New members.
3317         (finish_block_internal, prepare_for_building)
3318         (reset_symtab_globals, end_symtab_get_static_block)
3319         (push_context): Update.
3320         (get_local_using_directives, set_local_using_directives)
3321         (get_global_using_directives): New functions.
3322         (buildsym_init): Update.
3323
3324 2018-07-16  Tom Tromey  <tom@tromey.com>
3325
3326         * xcoffread.c (xcoff_initial_scan): Don't call
3327         free_pending_blocks.
3328         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
3329         * buildsym.h (class scoped_free_pendings): Add constructor.
3330         (free_pending_blocks): Don't declare.
3331         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
3332         (free_pending_blocks): Now static.
3333
3334 2018-07-16  Tom Tromey  <tom@tromey.com>
3335
3336         * buildsym.h (push_subfile, pop_subfile): Update declarations.
3337         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
3338         member.
3339         (struct subfile_stack): Remove.
3340         (subfile_stack): Remove.
3341         (push_subfile, pop_subfile, buildsym_init): Update.
3342
3343 2018-07-16  Tom Tromey  <tom@tromey.com>
3344
3345         * buildsym.c (push_subfile): Use gdb_assert.
3346         (pop_subfile): Use gdb_assert.
3347
3348 2018-07-16  Tom Tromey  <tom@tromey.com>
3349
3350         * buildsym.h (merge_symbol_lists): Remove.
3351         * buildsym.c (merge_symbol_lists): Remove.
3352
3353 2018-07-16  Tom Tromey  <tom@tromey.com>
3354
3355         * stabsread.c (scan_file_globals): Update comment.
3356         * stabsread.h (scan_file_globals): Move from buildsym.h.
3357         * buildsym.h (scan_file_globals): Move to stabsread.h.
3358
3359 2018-07-16  Tom Tromey  <tom@tromey.com>
3360
3361         * xcoffread.c (xcoff_new_init): Update.
3362         * mipsread.c (mipscoff_new_init): Update.
3363         * mdebugread.c (mdebug_build_psymtabs): Update.
3364         * elfread.c (elf_new_init): Update.
3365         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
3366         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
3367         * buildsym.h (buildsym_new_init): Don't declare.
3368         * buildsym.c (buildsym_new_init): Remove.
3369
3370 2018-07-16  Tom Tromey  <tom@tromey.com>
3371
3372         * stabsread.h (within_function): Move from buildsym.h.
3373         * stabsread.c (start_stabs): Clear within_function.
3374         * coffread.c (coff_start_symtab): Clear within_function.
3375         * buildsym.h (within_function): Move to stabsread.h.
3376         * buildsym.c (prepare_for_building): Update.
3377
3378 2018-07-16  Tom Tromey  <tom@tromey.com>
3379
3380         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
3381         * dwarf2read.c (dwarf2_start_symtab): Don't set
3382         processing_gcc_compilation.
3383         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
3384
3385 2018-07-16  Tom Tromey  <tom@tromey.com>
3386
3387         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
3388         (next_symbol_text_func): Move from buildsym.h.
3389         * stabsread.c (hashname): Move from buildsym.c.
3390         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
3391         (next_symbol_text_func, hashname): Move to stabsread.h.
3392         * buildsym.c: Don't include bcache.h
3393         (hashname): Move to stasbread.c.
3394
3395 2018-07-16  Tom Tromey  <tom@tromey.com>
3396
3397         * buildsym.h (context_stack_size): Don't declare.
3398         * buildsym.c (context_stack_size): New global.
3399
3400 2018-07-16  Tom Tromey  <tom@tromey.com>
3401
3402         * dbxread.c (processing_acc_compilation): New global.
3403         * buildsym.h (processing_acc_compilation): Don't declare.
3404
3405 2018-07-16  Tom Tromey  <tom@tromey.com>
3406
3407         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
3408         * dbxread.c (read_ofile_symtab): Update.
3409         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
3410         * buildsym.h (last_source_start_addr): Remove.
3411         (set_last_source_start_addr, get_last_source_start_addr):
3412         Declare.
3413         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
3414         parameter.
3415         (struct buildsym_compunit) <m_last_source_start_addr>: New
3416         member.
3417         (prepare_for_building): Remove start_addr parameter.
3418         (start_symtab, restart_symtab, end_symtab_get_static_block)
3419         (end_symtab_with_blockvector): Update.
3420         (set_last_source_start_addr, get_last_source_start_addr): New
3421         functions.
3422
3423 2018-07-16  Tom Tromey  <tom@tromey.com>
3424
3425         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
3426         member.
3427         (have_line_numbers): Remove.
3428         (record_line, prepare_for_building, end_symtab_get_static_block)
3429         (augment_type_symtab): Update.
3430
3431 2018-07-16  Tom Tromey  <tom@tromey.com>
3432
3433         * buildsym.c (~buildsym_compunit): Free the macro table.
3434         (struct buildsym_compunit) <get_macro_table, release_macros>: New
3435         methods.
3436         <m_pending_macros>: New member.
3437         (pending_macros): Remove.
3438         (~scoped_free_pendings, get_macro_table, prepare_for_building)
3439         (reset_symtab_globals, end_symtab_get_static_block)
3440         (end_symtab_with_blockvector, augment_type_symtab)
3441         (buildsym_init): Update.
3442
3443 2018-07-16  Tom Tromey  <tom@tromey.com>
3444
3445         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
3446         parameter.
3447         (buildsym_compunit::set_last_source_file): New method.
3448         <m_last_source_file>: New member.
3449         (prepare_for_building): Remove "name" parameter.
3450         (start_symtab, restart_symtab, reset_symtab_globals): Update.
3451         (last_source_file): Remove.
3452         (set_last_source_file, get_last_source_file): Update.
3453
3454 2018-07-16  Tom Tromey  <tom@tromey.com>
3455
3456         * buildsym.c (prepare_for_building): Add assert.
3457
3458 2018-07-16  Tom Tromey  <tom@tromey.com>
3459
3460         * buildsym.c (~buildsym_compunit): Update.
3461         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
3462         (start_subfile, patch_subfile_names)
3463         (end_symtab_with_blockvector): Update.
3464
3465 2018-07-16  Tom Tromey  <tom@tromey.com>
3466
3467         * buildsym.c (struct buildsym_compunit): Add constructor,
3468         destructor, initializers.
3469         (start_buildsym_compunit): Remove.
3470         (free_buildsym_compunit): Use "delete".
3471         (start_symtab, restart_symtab): Use "new".
3472
3473 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
3474
3475         * symfile.c (set_objfile_default_section_offset): Remove struct
3476         keyword.
3477
3478 2018-07-14  Stafford Horne  <shorne@gmail.com>
3479
3480         * (Responsible Maintainers): Add myself as or1k maintainer.
3481
3482 2018-07-13  Tom Tromey  <tom@tromey.com>
3483
3484         * symfile.c (set_objfile_default_section_offset): Use extra braces
3485         around initializer.
3486
3487 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3488
3489         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
3490         non-branching basr.
3491
3492 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3493
3494         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3495         unittests/cli-utils-selftests.c
3496         * unittests/cli-utils-selftests.c: New file.
3497
3498 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3499
3500         * NEWS: Mention new commands. Mention change to 'thread apply'.
3501
3502 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3503
3504         * thread.c (thr_try_catch_cmd): New function.
3505         (thread_apply_all_command): Handle qcs flags.
3506         (thread_apply_command): Handle qcs flags.
3507         (taas_command): New function.
3508         (tfaas_command): New function.
3509         (_initialize_thread): Update to setup the new commands 'taas
3510         and 'tfaas'. Change doc string for 'thread apply'.
3511
3512 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3513
3514         * stack.c: (trailing_outermost_frame): New function, mostly
3515         extracted from backtrace_command_1.
3516         (leading_innermost_frame): New function.
3517         (backtrace_command_1): Update to call trailing_outermost_frame.
3518         (frame_apply_command_count): New function.
3519         (frame_apply_level_command): New function.
3520         (frame_apply_all_command): New function.
3521         (frame_apply_command): New function.
3522         (faas_command): New function.
3523         (frame_cmd_list): New variable.
3524         (_initialize_stack): Update to setup the new commands 'frame apply'
3525         and 'faas'.
3526
3527 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3528
3529         * cli-utils.c (number_or_range_parser::get_number): Only handle
3530         numbers or convenience var as numbers.
3531         (parse_flags): New function.
3532         (parse_flags_qcs): New function.
3533         (number_or_range_parser::finished): Ensure parsing end is detected
3534         before end of string.
3535         * cli-utils.h (parse_flags): New function.
3536         (parse_flags_qcs): New function.
3537         (number_or_range_parser): Remove m_finished bool.
3538         (number_or_range_parser::skip_range): Set m_in_range to false.
3539
3540 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
3541
3542         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
3543         on Windows.
3544
3545 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
3546             Jan Kratochvil  <jan.kratochvil@redhat.com>
3547             Paul Fertser  <fercerpav@gmail.com>
3548             Tsutomu Seki  <sekiriki@gmail.com>
3549             Pedro Alves  <palves@redhat.com>
3550
3551         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3552         'unittests/parse-connection-spec-selftests.c'.
3553         (COMMON_SFILES): Add 'common/netstuff.c'.
3554         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
3555         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
3556         * common/netstuff.c: New file.
3557         * common/netstuff.h: New file.
3558         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
3559         (wait_for_connect): Update comment.  New parameter
3560         'gdb::optional<int> sock' instead of 'struct serial *scb'.
3561         Use 'sock' directly instead of 'scb->fd'.
3562         (try_connect): New function, with code from 'net_open'.
3563         (net_open): Rewrite main loop to deal with multiple
3564         sockets/addresses.  Handle IPv6-style hostnames; implement
3565         support for IPv6 connections.
3566         * unittests/parse-connection-spec-selftests.c: New file.
3567
3568 2018-07-11  Pedro Alves  <palves@redhat.com>
3569
3570         PR gdb/23377
3571         * remote.c (remote_target::remote_detach_pid): Call
3572         set_current_process.
3573
3574 2018-07-11  Pedro Alves  <palves@redhat.com>
3575
3576         * h8300-tdep.c (h8300_gdbarch_init): Remove
3577         set_gdbarch_ecoff_reg_to_regnum calls.
3578
3579 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
3580
3581         PR c++/23373
3582         * c-typeprint.c (c_type_print_base_struct_union): Don't print
3583         offsets/sizes for static members of a class/struct.
3584
3585 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
3586
3587         * target-descriptions.c (tdesc_register_bitsize): Rename.
3588         * target-descriptions.h (tdesc_register_bitsize): Likewise.
3589         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
3590         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
3591
3592 2018-07-10  Tom Tromey  <tom@tromey.com>
3593
3594         * breakpoint.c (moribund_locations): Now static and a
3595         std::vector.
3596         (breakpoint_init_inferior, moribund_breakpoint_here_p)
3597         (build_bpstat_chain, update_global_location_list)
3598         (breakpoint_retire_moribund): Update.
3599         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
3600         VEC.
3601
3602 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
3603
3604         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
3605         (riscv_register_reggroup_p): Use new function, remove unneeded
3606         parenthesis.
3607         (riscv_push_dummy_call): Extend assert to compare against xlen or
3608         flen based on register type.
3609
3610 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
3611
3612         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
3613
3614 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
3615
3616         * remote.c (show_hardware_watchpoint_limit): New function.
3617         (show_hardware_watchpoint_length_limit): New function.
3618         (show_hardware_breakpoint_limit): New function.
3619         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
3620         where appropriate, update help text.
3621
3622 2018-07-09  Tom Tromey  <tom@tromey.com>
3623
3624         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
3625         (CLIBS): Don't mention NAT_CLIBS.
3626
3627 2018-07-09  Tom Tromey  <tom@tromey.com>
3628
3629         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
3630         (LIBGDB_OBS, clean mostlyclean): Update.
3631         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
3632
3633 2018-07-09  Tom Tromey  <tom@tromey.com>
3634
3635         * Makefile.in (%.c: %.y): Use ECHO_YACC.
3636         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
3637         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
3638
3639 2018-07-09  Tom Tromey  <tom@tromey.com>
3640
3641         * Makefile.in (ALLDEPFILES): Remove exec.c.
3642         (COMMON_OBS): Remove exec.o.
3643         (COMMON_SFILES): Add exec.c.
3644
3645 2018-07-09  Tom Tromey  <tom@tromey.com>
3646
3647         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
3648
3649 2018-07-09  Tom Tromey  <tom@tromey.com>
3650
3651         * Makefile.in (clean mostlyclean): Remove stamp-version.
3652         (version.c): Depend on stamp-version.
3653         (stamp-version): New rule, from version.c rule.
3654
3655 2018-07-09  Tom Tromey  <tom@tromey.com>
3656
3657         * Makefile.in (init.c): Depend on stamp-init.
3658         (stamp-init): New rule, from init.c rule.
3659         (clean mostlyclean): Remove stamp-init.
3660
3661 2018-07-09  Tom Tromey  <tom@tromey.com>
3662
3663         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
3664         SUBDIR_GCC_COMPILE_SRCS.
3665
3666 2018-07-09  Tom Tromey  <tom@tromey.com>
3667
3668         * Makefile.in (init.c): Remove some unused sed rules.
3669
3670 2018-07-09  Tom Tromey  <tom@tromey.com>
3671
3672         * Makefile.in (TSOBS): Remove.
3673         (INIT_FILES): Update.
3674         (LIBGDB_OBS): Update.
3675         (COMMON_SFILES): Add inflow.c.
3676         (SFILES): Remove inflow.c.
3677
3678 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
3679
3680         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
3681
3682 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
3683
3684         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
3685         get_saveloc_name, is_signal_frame_name, step_name,
3686         init_remote_name, create_addr_space_name,
3687         destroy_addr_space_name, search_unwind_table_name,
3688         find_dyn_list_name): Constify.
3689
3690 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
3691
3692         * darwin-nat.c (darwin_pthread_kill): New function.
3693         (darwin_resume_thread): Use darwin_pthread_kill.
3694
3695 2018-07-05  Tom de Vries  <tdevries@suse.de>
3696
3697         * macroexp.c (macro_buffer) <operator=>: New member function.
3698
3699 2018-07-04  Tom Tromey  <tom@tromey.com>
3700
3701         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
3702
3703 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
3704
3705         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
3706         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
3707         * maint.c: Likewise.
3708         * top.c: Likewise.
3709
3710 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
3711
3712         * NEWS: Create a new section for the next release branch.
3713         Rename the section of the current branch, now that it has
3714         been cut.
3715
3716 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
3717
3718         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
3719         * version.in: Bump version to 8.2.50.DATE-git.
3720
3721 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
3722             Pedro Alves  <palves@redhat.com>
3723
3724         * linux-nat.c (linux_init_ptrace): Rename to ...
3725         (linux_init_ptrace_procfs): ... this.  Call
3726         linux_proc_init_warnings.
3727         (linux_nat_target::post_attach)
3728         (linux_nat_target::post_startup_inferior): Adjust.
3729         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
3730         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
3731
3732 2018-07-04  Tom de Vries  <tdevries@suse.de>
3733
3734         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
3735         check ...
3736         (read_comp_unit_head): ... here.
3737
3738 2018-07-03  Tom Tromey  <tom@tromey.com>
3739
3740         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
3741         (stop_tracing, tstatus_command)
3742         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
3743         (print_one_static_tracepoint_marker): Update.
3744         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
3745         std::vector.
3746         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
3747         VEC.
3748         (all_tracepoints, static_tracepoints_here): Return std::vector.
3749
3750 2018-07-03  Tom Tromey  <tom@tromey.com>
3751
3752         * common/ptid.c (ptid_equal): Remove.
3753         * common/ptid.h (ptid_equal): Don't declare.
3754         * ada-tasks.c: Update.
3755         * breakpoint.c: Update.
3756         * common/agent.c: Update.
3757         * corelow.c: Update.
3758         * darwin-nat-info.c: Update.
3759         * darwin-nat.c: Update.
3760         * dcache.c: Update.
3761         * dtrace-probe.c: Update.
3762         * dummy-frame.c: Update.
3763         * fbsd-nat.c: Update.
3764         * frame.c: Update.
3765         * gdbthread.h: Update.
3766         * gnu-nat.c: Update.
3767         * go32-nat.c: Update.
3768         * inf-loop.c: Update.
3769         * inf-ptrace.c: Update.
3770         * infcall.c: Update.
3771         * infcmd.c: Update.
3772         * inflow.c: Update.
3773         * infrun.c: Update.
3774         * linux-fork.c: Update.
3775         * linux-nat.c: Update.
3776         * linux-thread-db.c: Update.
3777         * mi/mi-cmd-var.c: Update.
3778         * mi/mi-interp.c: Update.
3779         * mi/mi-main.c: Update.
3780         * nto-procfs.c: Update.
3781         * ppc-linux-tdep.c: Update.
3782         * procfs.c: Update.
3783         * python/py-inferior.c: Update.
3784         * python/py-record-btrace.c: Update.
3785         * python/py-record.c: Update.
3786         * ravenscar-thread.c: Update.
3787         * regcache.c: Update.
3788         * remote-sim.c: Update.
3789         * remote.c: Update.
3790         * sol-thread.c: Update.
3791         * solib.c: Update.
3792         * target.c: Update.
3793         * tui/tui-stack.c: Update.
3794         * varobj.c: Update.
3795         * windows-nat.c: Update.
3796         * windows-tdep.c: Update.
3797
3798 2018-07-03  Tom Tromey  <tom@tromey.com>
3799
3800         * common/ptid.c (ptid_match): Remove.
3801         * common/ptid.h (ptid_match): Don't declare.
3802         * fbsd-nat.c: Update.
3803         * infcmd.c: Update.
3804         * infrun.c: Update.
3805         * linux-nat.c: Update.
3806         * record-btrace.c: Update.
3807         * regcache.c: Update.
3808         * remote.c: Update.
3809
3810 2018-07-03  Tom Tromey  <tom@tromey.com>
3811
3812         * common/ptid.c (ptid_tid_p): Remove.
3813         * common/ptid.h (ptid_tid_p): Don't declare.
3814         * sol-thread.c: Update.
3815
3816 2018-07-03  Tom Tromey  <tom@tromey.com>
3817
3818         * common/ptid.c (ptid_lwp_p): Remove.
3819         * common/ptid.h (ptid_lwp_p): Don't declare.
3820         * fbsd-nat.c: Update.
3821         * linux-nat.c: Update.
3822         * nat/linux-procfs.c: Update.
3823         * nat/x86-linux-dregs.c: Update.
3824         * sol-thread.c: Update.
3825
3826 2018-07-03  Tom Tromey  <tom@tromey.com>
3827
3828         * common/ptid.c (ptid_is_pid): Remove.
3829         * common/ptid.h (ptid_is_pid): Don't declare.
3830         * infrun.c: Update.
3831         * linux-nat.c: Update.
3832         * mi/mi-interp.c: Update.
3833         * remote.c: Update.
3834         * thread.c: Update.
3835
3836 2018-07-03  Tom Tromey  <tom@tromey.com>
3837
3838         * common/ptid.c (ptid_get_tid): Remove.
3839         * common/ptid.h (ptid_get_tid): Don't declare.
3840         * ada-tasks.c: Update.
3841         * aix-thread.c: Update.
3842         * bsd-uthread.c: Update.
3843         * darwin-nat.c: Update.
3844         * fbsd-nat.c: Update.
3845         * i386-darwin-nat.c: Update.
3846         * infrun.c: Update.
3847         * linux-tdep.c: Update.
3848         * nto-procfs.c: Update.
3849         * ppc-ravenscar-thread.c: Update.
3850         * python/py-infthread.c: Update.
3851         * ravenscar-thread.c: Update.
3852         * sol-thread.c: Update.
3853         * sparc-ravenscar-thread.c: Update.
3854         * windows-nat.c: Update.
3855
3856 2018-07-03  Tom Tromey  <tom@tromey.com>
3857
3858         * common/ptid.c (ptid_get_lwp): Remove.
3859         * common/ptid.h (ptid_get_lwp): Don't declare.
3860         * aarch64-linux-nat.c: Update.
3861         * ada-tasks.c: Update.
3862         * aix-thread.c: Update.
3863         * amd64-linux-nat.c: Update.
3864         * arm-linux-nat.c: Update.
3865         * corelow.c: Update.
3866         * fbsd-nat.c: Update.
3867         * fbsd-tdep.c: Update.
3868         * gnu-nat.c: Update.
3869         * i386-cygwin-tdep.c: Update.
3870         * i386-gnu-nat.c: Update.
3871         * i386-linux-nat.c: Update.
3872         * ia64-linux-nat.c: Update.
3873         * inf-ptrace.c: Update.
3874         * infrun.c: Update.
3875         * linux-fork.c: Update.
3876         * linux-nat.c: Update.
3877         * linux-tdep.c: Update.
3878         * linux-thread-db.c: Update.
3879         * mips-linux-nat.c: Update.
3880         * nat/aarch64-linux-hw-point.c: Update.
3881         * nat/aarch64-linux.c: Update.
3882         * nat/linux-btrace.c: Update.
3883         * nat/linux-osdata.c: Update.
3884         * nat/linux-procfs.c: Update.
3885         * nat/x86-linux-dregs.c: Update.
3886         * obsd-nat.c: Update.
3887         * ppc-fbsd-nat.c: Update.
3888         * ppc-linux-nat.c: Update.
3889         * procfs.c: Update.
3890         * python/py-infthread.c: Update.
3891         * ravenscar-thread.c: Update.
3892         * remote.c: Update.
3893         * s390-linux-nat.c: Update.
3894         * sol-thread.c: Update.
3895         * sol2-tdep.c: Update.
3896         * spu-linux-nat.c: Update.
3897         * x86-linux-nat.c: Update.
3898         * xtensa-linux-nat.c: Update.
3899
3900 2018-07-03  Tom Tromey  <tom@tromey.com>
3901
3902         * common/ptid.c (ptid_get_pid): Remove.
3903         * common/ptid.h (ptid_get_pid): Don't declare.
3904         * aarch64-linux-nat.c: Update.
3905         * ada-lang.c: Update.
3906         * aix-thread.c: Update.
3907         * alpha-bsd-nat.c: Update.
3908         * amd64-fbsd-nat.c: Update.
3909         * amd64-linux-nat.c: Update.
3910         * arm-linux-nat.c: Update.
3911         * arm-nbsd-nat.c: Update.
3912         * auxv.c: Update.
3913         * break-catch-syscall.c: Update.
3914         * breakpoint.c: Update.
3915         * bsd-uthread.c: Update.
3916         * corelow.c: Update.
3917         * ctf.c: Update.
3918         * darwin-nat.c: Update.
3919         * fbsd-nat.c: Update.
3920         * fbsd-tdep.c: Update.
3921         * gcore.c: Update.
3922         * gnu-nat.c: Update.
3923         * hppa-nbsd-nat.c: Update.
3924         * hppa-obsd-nat.c: Update.
3925         * i386-fbsd-nat.c: Update.
3926         * ia64-linux-nat.c: Update.
3927         * inf-ptrace.c: Update.
3928         * infcmd.c: Update.
3929         * inferior.c: Update.
3930         * inferior.h: Update.
3931         * inflow.c: Update.
3932         * infrun.c: Update.
3933         * linux-fork.c: Update.
3934         * linux-nat.c: Update.
3935         * linux-tdep.c: Update.
3936         * linux-thread-db.c: Update.
3937         * m68k-bsd-nat.c: Update.
3938         * mi/mi-interp.c: Update.
3939         * mi/mi-main.c: Update.
3940         * mips-linux-nat.c: Update.
3941         * mips-nbsd-nat.c: Update.
3942         * mips64-obsd-nat.c: Update.
3943         * nat/aarch64-linux-hw-point.c: Update.
3944         * nat/aarch64-linux.c: Update.
3945         * nat/linux-btrace.c: Update.
3946         * nat/linux-osdata.c: Update.
3947         * nat/linux-procfs.c: Update.
3948         * nat/x86-linux-dregs.c: Update.
3949         * nto-procfs.c: Update.
3950         * obsd-nat.c: Update.
3951         * ppc-linux-nat.c: Update.
3952         * ppc-nbsd-nat.c: Update.
3953         * ppc-obsd-nat.c: Update.
3954         * proc-service.c: Update.
3955         * procfs.c: Update.
3956         * python/py-inferior.c: Update.
3957         * python/py-infthread.c: Update.
3958         * ravenscar-thread.c: Update.
3959         * record.c: Update.
3960         * remote-sim.c: Update.
3961         * remote.c: Update.
3962         * rs6000-nat.c: Update.
3963         * s390-linux-nat.c: Update.
3964         * sh-nbsd-nat.c: Update.
3965         * sol-thread.c: Update.
3966         * sparc-nat.c: Update.
3967         * sparc64-tdep.c: Update.
3968         * spu-linux-nat.c: Update.
3969         * spu-tdep.c: Update.
3970         * target-debug.h: Update.
3971         * target.c: Update.
3972         * thread.c: Update.
3973         * tid-parse.c: Update.
3974         * tracefile-tfile.c: Update.
3975         * vax-bsd-nat.c: Update.
3976         * windows-nat.c: Update.
3977         * x86-linux-nat.c: Update.
3978         * x86-nat.c: Update.
3979
3980 2018-07-03  Tom Tromey  <tom@tromey.com>
3981
3982         * common/ptid.c (pid_to_ptid): Remove.
3983         * common/ptid.h (pid_to_ptid): Don't declare.
3984         * aix-thread.c: Update.
3985         * arm-linux-nat.c: Update.
3986         * common/ptid.c: Update.
3987         * common/ptid.h: Update.
3988         * corelow.c: Update.
3989         * ctf.c: Update.
3990         * darwin-nat.c: Update.
3991         * fbsd-nat.c: Update.
3992         * fork-child.c: Update.
3993         * gnu-nat.c: Update.
3994         * go32-nat.c: Update.
3995         * inf-ptrace.c: Update.
3996         * infcmd.c: Update.
3997         * inferior.c: Update.
3998         * infrun.c: Update.
3999         * linux-fork.c: Update.
4000         * linux-nat.c: Update.
4001         * nat/aarch64-linux-hw-point.c: Update.
4002         * nat/fork-inferior.c: Update.
4003         * nat/x86-linux-dregs.c: Update.
4004         * nto-procfs.c: Update.
4005         * obsd-nat.c: Update.
4006         * procfs.c: Update.
4007         * progspace.c: Update.
4008         * remote.c: Update.
4009         * rs6000-nat.c: Update.
4010         * s390-linux-nat.c: Update.
4011         * sol-thread.c: Update.
4012         * spu-linux-nat.c: Update.
4013         * target.c: Update.
4014         * top.c: Update.
4015         * tracefile-tfile.c: Update.
4016         * windows-nat.c: Update.
4017
4018 2018-07-03  Tom Tromey  <tom@tromey.com>
4019
4020         * common/ptid.h (ptid_build): Don't declare.
4021         * common/ptid.c (ptid_build): Remove.
4022         * aix-thread.c: Update.
4023         * bsd-kvm.c: Update.
4024         * bsd-uthread.c: Update.
4025         * common/agent.c: Update.
4026         * common/ptid.c: Update.
4027         * common/ptid.h: Update.
4028         * corelow.c: Update.
4029         * darwin-nat.c: Update.
4030         * fbsd-nat.c: Update.
4031         * gnu-nat.c: Update.
4032         * linux-fork.c: Update.
4033         * linux-nat.c: Update.
4034         * linux-thread-db.c: Update.
4035         * nat/linux-osdata.c: Update.
4036         * nat/linux-procfs.c: Update.
4037         * nto-procfs.c: Update.
4038         * obsd-nat.c: Update.
4039         * proc-service.c: Update.
4040         * procfs.c: Update.
4041         * ravenscar-thread.c: Update.
4042         * remote-sim.c: Update.
4043         * remote.c: Update.
4044         * sol-thread.c: Update.
4045         * target.c: Update.
4046         * windows-nat.c: Update.
4047
4048 2018-07-03  Tom Tromey  <tom@tromey.com>
4049
4050         * infrun.c (follow_exec): Use exit_inferior_silent.
4051         * inferior.c (exit_inferior_num_silent): Remove.
4052         * inferior.h (exit_inferior_num_silent): Don't declare.
4053
4054 2018-07-03  Tom Tromey  <tom@tromey.com>
4055
4056         PR cli/23340:
4057         * darwin-nat.c (darwin_attach_pid): Reset inferior and
4058         inferior_ptid on error.
4059
4060 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
4061             Simon Marchi  <simon.marchi@polymtl.ca>
4062
4063         PR tdep/8282
4064         * disasm.h (gdb_disassembler): Add
4065         `m_disassembler_options_holder'. member
4066         * disasm.c (get_all_disassembler_options): New function.
4067         (gdb_disassembler::gdb_disassembler): Use it.
4068         (gdb_buffered_insn_length_init_dis): Likewise.
4069         (gdb_buffered_insn_length): Adjust accordingly.
4070         (set_disassembler_options): Handle options with arguments.
4071         (show_disassembler_options_sfunc): Likewise.  Add a leading new
4072         line if showing options with descriptions.
4073         (disassembler_options_completer): Adapt to using the
4074         `disasm_options_and_args_t' structure.
4075         * mips-tdep.c (mips_disassembler_options): New variable.
4076         (mips_disassembler_options_o32): Likewise.
4077         (mips_disassembler_options_n32): Likewise.
4078         (mips_disassembler_options_n64): Likewise.
4079         (gdb_print_insn_mips): Don't set `disassembler_options'.
4080         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
4081         functions.
4082         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
4083         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
4084         `gdbarch_disassembler_options_implicit' and
4085         `gdbarch_valid_disassembler_options'.
4086         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
4087         `disasm_options_and_args_t' structure.
4088         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
4089         method.
4090         (valid_disassembler_options): Switch from `disasm_options_t' to
4091         the `disasm_options_and_args_t' structure.
4092         * NEWS: Document `set disassembler-options' support for the MIPS
4093         target.
4094         * gdbarch.h: Regenerate.
4095         * gdbarch.c: Regenerate.
4096
4097 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
4098
4099         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
4100
4101 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
4102
4103         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
4104         parameter in call to amd64_target_description.
4105         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
4106         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
4107         (amd64fbsd_init_abi): Likewise.
4108         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
4109         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
4110         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
4111         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
4112
4113 2018-06-29  Pedro Alves  <palves@redhat.com>
4114
4115         * gdb/amd64-tdep.h (amd64_create_target_description): Add
4116         "segments" parameter.
4117         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
4118         (_initialize_amd64_tdep): Update call to
4119         amd64_create_target_description.
4120         (amd64_target_description): Add "segments" parameter.  Adjust
4121         the implementation to use it.
4122         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
4123         call to amd64_create_target_description.
4124         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
4125         * gdb/arch/amd64.h (amd64_create_target_description): Add
4126         "segments" register.
4127         * gdb/arch/amd64.c (amd64_create_target_description): Add
4128         "segments" parameter.  Call create_feature_i386_64bit_segments
4129         only if SEGMENTS is true.
4130         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
4131         call to amd64_create_target_description.
4132
4133 2018-06-29  Pedro Alves  <palves@redhat.com>
4134
4135         * thread.c (thread_target_id_str): New, factored out from ...
4136         (print_thread_info_1): ... here.  Use it to compute the max
4137         "Target Id" column width.
4138
4139 2018-06-29  Pedro Alves  <palves@redhat.com>
4140
4141         * remote.c (remote_target::extra_thread_info): Delete
4142         'display_buf' and 'n' locals.  from the cache, regardless of
4143         packet mechanims is in use.  Use cache for qThreadExtra and qP
4144         methods too.
4145
4146 2018-06-29  Pedro Alves  <palves@redhat.com>
4147
4148         * blockframe.c (find_pc_sect_containing_function): New function.
4149         * breakpoint.c (print_breakpoint_location): Don't call
4150         find_pc_sect_function.
4151         * linespec.c (create_sals_line_offset): Record the location's
4152         symbol in the sal.
4153         * linespec.c (convert_address_location_to_sals): Fill in sal's
4154         symbol with find_pc_sect_containing_function.
4155         * symtab.c (find_function_start_sal): Rename to ...
4156         (find_function_start_sal_1): ... this.
4157         (find_function_start_sal): Reimplement as wrapper around
4158         find_function_start_sal_1, and use
4159         find_pc_sect_containing_function to fill in the sal's symbol.
4160         (find_function_start_sal(symbol*, bool)): Adjust.
4161         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
4162         comments.
4163         (find_pc_sect_containing_function): Declare.
4164
4165 2018-06-29  Pedro Alves  <palves@redhat.com>
4166
4167         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
4168         true if the the location has no symbol.
4169
4170 2018-06-28  Tom Tromey  <tom@tromey.com>
4171
4172         * NEWS: Mention --enable-codesign.
4173         * silent-rules.mk (ECHO_SIGN): New variable.
4174         * configure.ac: Add --enable-codesign.
4175         * configure: Rebuild.
4176         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
4177         (gdb$(EXEEXT)): Optionally invoke codesign.
4178
4179 2018-06-28  Pedro Alves  <palves@redhat.com>
4180
4181         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
4182         comments.
4183         (switch_to_thread_no_regs): Adjust comment.
4184         * infcmd.c (stop_pc): Delete.
4185         (post_create_inferior, info_program_command): Replace references
4186         to stop_pc with references to thread_info->suspend.stop_pc.
4187         * inferior.h (stop_pc): Delete declaration.
4188         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
4189         (handle_inferior_event_1, handle_signal_stop)
4190         (process_event_stop_test, keep_going_stepped_thread)
4191         (handle_step_into_function, handle_step_into_function_backward)
4192         (print_stop_location): Replace references to stop_pc with
4193         references to thread_info->suspend.stop_pc.
4194         (struct infcall_suspend_state) <stop_pc>: Delete field.
4195         (save_infcall_suspend_state, restore_infcall_suspend_state):
4196         Remove references to inf_stat->stop_pc.
4197         * linux-fork.c (fork_load_infrun_state): Likewise.
4198         * record-btrace.c (record_btrace_set_replay): Likewise.
4199         * record-full.c (record_full_goto_entry): Likewise.
4200         * remote.c (print_one_stopped_thread): Likewise.
4201         * target.c (target_resume): Extend comment.
4202         * thread.c (set_executing_thread): New.
4203         (set_executing): Use it.
4204         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
4205         Remove references to stop_pc.
4206
4207 2018-06-28  Pedro Alves  <palves@redhat.com>
4208
4209         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
4210         Moving fetching stop_pc until after ecs->event_thread is refreshed.
4211
4212 2018-06-28  Tom Tromey  <tom@tromey.com>
4213
4214         * coffread.c (coff_symfile_finish): Update.
4215         * xcoffread.c (xcoff_symfile_finish): Update.
4216         * elfread.c (elf_symfile_finish): Update.
4217         * symfile.h (dwarf2_free_objfile): Don't declare.
4218         * dwarf2read.c (_initialize_dwarf2_read): Use
4219         register_objfile_data_with_cleanup.
4220         (dwarf2_free_objfile): Now static.  Change signature.
4221
4222 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4223
4224         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
4225         option "-o" to add-symbol-file-load to add an offset to each
4226         section's load address.
4227         * symfile.c (set_objfile_default_section_offset): New function.
4228
4229 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4230
4231         * symfile.c (add_symbol_file_command): Make sure that sections
4232         with the same name are sorted in the same order.
4233
4234 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4235
4236         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
4237         require the second argument.  If omitted, load sections at the
4238         addresses specified in the file.
4239
4240 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4241
4242         * symfile.c (symbol_file_command, symbol_file_add_main_1)
4243         (_initialize_symfile): Add option "-o" to symbol-file to add an
4244         offset to each section of the symbol file.
4245
4246 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4247
4248         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
4249
4250 2018-06-27  Tom Tromey  <tom@tromey.com>
4251
4252         * stack.c (_initialize_stack): Update "func" help text.
4253
4254 2018-06-27  Tom Tromey  <tom@tromey.com>
4255
4256         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
4257         std::vector.
4258         (unwind_infopy_str, pyuw_create_unwind_info)
4259         (unwind_infopy_add_saved_register, pyuw_sniffer)
4260         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
4261         Update.
4262         (struct saved_reg): Add constructor.
4263         <value>: Now a gdbpy_ref<>.
4264
4265 2018-06-27  Tom Tromey  <tom@tromey.com>
4266
4267         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
4268
4269 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4270
4271         * gdb-gdb.py.in: Format using autopep8.
4272
4273 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4274
4275         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
4276         (type_lookup_function): Recognize CORE_ADDR values.
4277
4278 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4279
4280         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
4281         print tag_name.
4282
4283 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4284
4285         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
4286         <__lt__>: Add.
4287
4288 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4289
4290         * gdb-gdb.py: Move to...
4291         * gdb-gdb.py.in: ... here.
4292         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
4293         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
4294         dependencies.
4295         (distclean): Remove gdb-gdb.py when cleaning.
4296         (gdb-gdb.py, gdb-gdb.gdb): New rules.
4297         * configure: Re-generate.
4298
4299 2018-06-27  Pedro Alves  <palves@redhat.com>
4300
4301         * proc-service.c (get_ps_regcache): New.
4302         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4303         (ps_lsetfpregs): Use it.
4304
4305 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
4306
4307         PR gdb/21695
4308         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
4309         (dwarf_decode_lines_1): Adjust.
4310
4311 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4312
4313         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
4314         override.
4315         <info_proc>: Likewise.
4316
4317 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
4318
4319         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
4320         to windows_fetch_one_register, and only handle the case of
4321         fetching one register.  Move the code that reloads the context
4322         and iterates over all registers if R is negative to...
4323         (windows_nat_target::fetch_registers): ... here.
4324         (do_windows_store_inferior_registers): Rename to
4325         windows_store_one_register, and only handle the case of storing
4326         one register.  Move the code that handles the case where r is
4327         negative to...
4328         (windows_nat_target::store_registers) ... here.
4329
4330 2018-06-26  Tom Tromey  <tom@tromey.com>
4331
4332         PR rust/22574:
4333         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
4334         * rust-lang.c (rust_print_struct_def): Add podata parameter.
4335         Update.
4336         (rust_internal_print_type): Add podata parameter.
4337         (rust_print_type): Update.
4338
4339 2018-06-26  Tom Tromey  <tom@tromey.com>
4340
4341         * typeprint.h (struct print_offset_data) <update, finish,
4342         maybe_print_hole>: New methods.
4343         <indentation>: New constant.
4344         * typeprint.c (print_offset_data::indentation): Define.
4345         (print_offset_data::maybe_print_hole, print_offset_data::update)
4346         (print_offset_data::finish): Move from c-typeprint.c and rename.
4347         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
4348         (print_spaces_filtered_with_print_options): Update.
4349         (c_print_type_union_field_offset, maybe_print_hole)
4350         (c_print_type_struct_field_offset): Move to typeprint.c and
4351         rename.
4352         (c_type_print_base_struct_union): Update.
4353
4354 2018-06-25  Pedro Alves  <palves@redhat.com>
4355
4356         * gdbthread.h (thread_info_ref, delete_thread)
4357         (delete_thread_silent, first_thread_of_inferior)
4358         (any_thread_of_inferior, switch_to_thread)
4359         (enable_thread_stack_temporaries)
4360         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4361         (get_last_thread_stack_temporary)
4362         (value_in_thread_stack_temporaries, can_access_registers_thread):
4363         Spell out "struct thread_info" instead of just "thread_info".
4364         * inferior.h (notice_new_inferior): Likewise.
4365
4366 2018-06-25  Pedro Alves  <palves@redhat.com>
4367
4368         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
4369         pass thread_info pointer to delete_thread.
4370         (windows_nat_target::detach): Pass inferior pointer to
4371         detach_inferior.
4372         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
4373         delete_thread.
4374         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
4375         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
4376         and pass a thread_info pointer to delete_thread.
4377         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
4378         pass thread_info pointer to delete_thread.
4379         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
4380         delete_thread_silent call.
4381         * procfs.c (procfs_target::detach): Pass inferior pointer to
4382         detach_inferior.
4383         (procfs_target::wait): Pass thread_info pointer to delete_thread.
4384         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
4385         delete_thread_silent call.
4386         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
4387         pass thread_info pointer to delete_thread.
4388         (windows_nat_target::detach): Pass inferior pointer to
4389         delete_inferior.
4390
4391 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
4392
4393         * regcache.c (readable_regcache::read_part): Fix asserts.
4394         (reg_buffer::raw_collect_part): New function.
4395         (regcache::write_part): Fix asserts.
4396         (reg_buffer::raw_supply_part): New function.
4397         (regcache::transfer_regset_register): New helper function.
4398         (regcache::transfer_regset): Call new functions.
4399         (regcache_supply_regset): Use gdb_byte*.
4400         (regcache::supply_regset): Likewise.
4401         (regcache_collect_regset): Likewise.
4402         (regcache::collect_regset): Likewise.
4403         * regcache.h (reg_buffer::raw_collect_part): New declaration.
4404         (reg_buffer::raw_supply_part): Likewise.
4405         (regcache::transfer_regset_register): Likewise.
4406         (regcache::transfer_regset): Use gdb_byte*.
4407
4408 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
4409
4410         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
4411
4412 2018-06-21  Pedro Alves  <palves@redhat.com>
4413
4414         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
4415         instead of a ptid_t.  All callers adjusted.
4416         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
4417         adjusted.
4418         (print_ada_task_info, display_current_task_id, task_command_1):
4419         Adjust.
4420         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
4421         inferior_thread.
4422         (breakpoint_kind): Adjust.
4423         (remove_breakpoints_pid): Rename to ...
4424         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
4425         pointer.  All callers adjusted.
4426         (bpstat_clear_actions): Use inferior_thread.
4427         (get_bpstat_thread): New.
4428         (bpstat_do_actions): Use it.
4429         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
4430         to take a thread_info pointer.  All callers adjusted.
4431         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
4432         (breakpoint_re_set_thread): Use inferior_thread.
4433         * breakpoint.h (struct inferior): Forward declare.
4434         (bpstat_stop_status): Update.
4435         (remove_breakpoints_pid): Delete.
4436         (remove_breakpoints_inf): New.
4437         * bsd-uthread.c (bsd_uthread_target::wait)
4438         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
4439         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
4440         (maint_btrace_packet_history_cmd)
4441         (maint_btrace_clear_packet_history_cmd): Adjust.
4442         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
4443         inferior_thread.
4444         * cli/cli-interp.c: Include "inferior.h".
4445         * common/refcounted-object.h (struct
4446         refcounted_object_ref_policy): New.
4447         * compile/compile-object-load.c: Include gdbthread.h.
4448         (store_regs): Use inferior_thread.
4449         * corelow.c (core_target::close): Use current_inferior.
4450         (core_target_open): Adjust to use first_thread_of_inferior and use
4451         the current inferior.
4452         * ctf.c (ctf_target::close): Adjust to use current_inferior.
4453         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
4454         <thread>: ... this new field.  All references adjusted.
4455         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
4456         Take a thread_info pointer instead of a ptid_t.
4457         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
4458         (dummy_frame_discard, register_dummy_frame_dtor): Take a
4459         thread_info pointer instead of a ptid_t.
4460         * elfread.c: Include "inferior.h".
4461         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
4462         Use inferior_thread.
4463         * eval.c (evaluate_subexp): Likewise.
4464         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
4465         inferior_thread.
4466         * gdb_proc_service.h (struct thread_info): Forward declare.
4467         (struct ps_prochandle) <ptid>: Delete, replaced by ...
4468         <thread>: ... this new field.  All references adjusted.
4469         * gdbarch.h, gdbarch.c: Regenerate.
4470         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
4471         'thread' parameter.  All implementations and callers adjusted.
4472         * gdbthread.h (thread_info) <set_running>: New method.
4473         (delete_thread, delete_thread_silent): Take a thread_info pointer
4474         instead of a ptid.
4475         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
4476         (first_thread_of_process): Delete, replaced by ...
4477         (first_thread_of_inferior): ... this new function.  All callers
4478         adjusted.
4479         (any_live_thread_of_process): Delete, replaced by ...
4480         (any_live_thread_of_inferior): ... this new function.  All callers
4481         adjusted.
4482         (switch_to_thread, switch_to_no_thread): Declare.
4483         (is_executing): Delete.
4484         (enable_thread_stack_temporaries): Update comment.
4485         <enable_thread_stack_temporaries>: Take a thread_info pointer
4486         instead of a ptid_t.  Incref the thread.
4487         <~enable_thread_stack_temporaries>: Decref the thread.
4488         <m_ptid>: Delete
4489         <m_thr>: New.
4490         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4491         (get_last_thread_stack_temporary)
4492         (value_in_thread_stack_temporaries, can_access_registers_thread):
4493         Take a thread_info pointer instead of a ptid_t.  All callers
4494         adjusted.
4495         * infcall.c (get_call_return_value): Use inferior_thread.
4496         (run_inferior_call): Work with thread pointers instead of ptid_t.
4497         (call_function_by_hand_dummy): Work with thread pointers instead
4498         of ptid_t.  Use thread_info_ref.
4499         * infcmd.c (proceed_thread_callback): Access thread's state
4500         directly.
4501         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
4502         access thread's state directly.
4503         (continue_command): Use inferior_thread.
4504         (info_program_command): Use find_thread_ptid and access thread
4505         state directly.
4506         (proceed_after_attach_callback): Use thread state directly.
4507         (notice_new_inferior): Take a thread_info pointer instead of a
4508         ptid_t.  All callers adjusted.
4509         (exit_inferior): Take an inferior pointer instead of a pid.  All
4510         callers adjusted.
4511         (exit_inferior_silent): New.
4512         (detach_inferior): Delete.
4513         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
4514         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
4515         (detach_inferior_command, kill_inferior_command): Use
4516         find_inferior_id instead of valid_gdb_inferior_id and
4517         gdb_inferior_id_to_pid.
4518         (inferior_command): Use inferior and thread pointers.
4519         * inferior.h (struct thread_info): Forward declare.
4520         (notice_new_inferior): Take a thread_info pointer instead of a
4521         ptid_t.  All callers adjusted.
4522         (detach_inferior): Delete declaration.
4523         (exit_inferior, exit_inferior_silent): Take an inferior pointer
4524         instead of a pid.  All callers adjusted.
4525         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
4526         (valid_gdb_inferior_id): Delete.
4527         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
4528         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
4529         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
4530         ...
4531         <inf>: ... this new field.
4532         <step_ptid>: Delete, replaced by ...
4533         <step_thread>: ... this new field.
4534         (get_displaced_stepping_state): Take an inferior pointer instead
4535         of a pid.  All callers adjusted.
4536         (displaced_step_in_progress_any_inferior): Adjust.
4537         (displaced_step_in_progress_thread): Take a thread pointer instead
4538         of a ptid_t.  All callers adjusted.
4539         (displaced_step_in_progress, add_displaced_stepping_state): Take
4540         an inferior pointer instead of a pid.  All callers adjusted.
4541         (get_displaced_step_closure_by_addr): Adjust.
4542         (remove_displaced_stepping_state): Take an inferior pointer
4543         instead of a pid.  All callers adjusted.
4544         (displaced_step_prepare_throw, displaced_step_prepare)
4545         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
4546         All callers adjusted.
4547         (start_step_over): Adjust.
4548         (infrun_thread_ptid_changed): Remove bit updating ptids in the
4549         displaced step queue.
4550         (do_target_resume): Adjust.
4551         (fetch_inferior_event): Use inferior_thread.
4552         (context_switch, get_inferior_stop_soon): Take an
4553         execution_control_state pointer instead of a ptid_t.  All callers
4554         adjusted.
4555         (switch_to_thread_cleanup): Delete.
4556         (stop_all_threads): Use scoped_restore_current_thread.
4557         * inline-frame.c: Include "gdbthread.h".
4558         (inline_state) <inline_state>: Take a thread pointer instead of a
4559         ptid_t.  All callers adjusted.
4560         <ptid>: Delete, replaced by ...
4561         <thread>: ... this new field.
4562         (find_inline_frame_state): Take a thread pointer instead of a
4563         ptid_t.  All callers adjusted.
4564         (skip_inline_frames, step_into_inline_frame)
4565         (inline_skipped_frames, inline_skipped_symbol): Take a thread
4566         pointer instead of a ptid_t.  All callers adjusted.
4567         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
4568         (inline_skipped_frames, inline_skipped_symbol): Likewise.
4569         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
4570         pointers directly.
4571         * linux-nat.c (get_detach_signal): Likewise.
4572         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
4573         (thread_db_notice_clone): Adjust.
4574         (thread_db_find_new_threads_silently)
4575         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
4576         a thread pointer instead of a ptid_t.  All callers adjusted.
4577         * mi/mi-cmd-var.c: Include "inferior.h".
4578         (mi_cmd_var_update_iter): Update to use thread pointers.
4579         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
4580         inferior directly.
4581         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
4582         out to ...
4583         (mi_output_running): ... this new function.
4584         (mi_on_resume_1): Adjust to use it.
4585         (mi_user_selected_context_changed): Adjust to use inferior_thread.
4586         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
4587         directly.
4588         (interrupt_thread_callback): : Adjust to use thread and inferior
4589         pointers.
4590         * proc-service.c: Include "gdbthread.h".
4591         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
4592         * progspace-and-thread.c: Include "inferior.h".
4593         * progspace.c: Include "inferior.h".
4594         * python/py-exitedevent.c (create_exited_event_object): Adjust to
4595         hold a reference to an inferior_object.
4596         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
4597         inferior_thread.
4598         * python/py-inferior.c (struct inferior_object): Give the type a
4599         tag name instead of a typedef.
4600         (python_on_normal_stop): No need to check if the current thread is
4601         listed.
4602         (inferior_to_inferior_object): Change return type to
4603         inferior_object.  All callers adjusted.
4604         (find_thread_object): Delete, bits factored out to ...
4605         (thread_to_thread_object): ... this new function.
4606         * python/py-infthread.c (create_thread_object): Use
4607         inferior_to_inferior_object.
4608         (thpy_is_stopped): Use thread pointer directly.
4609         (gdbpy_selected_thread): Use inferior_thread.
4610         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
4611         field, replaced with ...
4612         <thread>: ... this new field.  All users adjusted.
4613         (btpy_insn_or_gap_new): Drop const.
4614         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
4615         callers adjusted.
4616         * python/py-record.c: Include "gdbthread.h".
4617         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
4618         a ptid_t.  All callers adjusted.
4619         (gdbpy_current_recording): Use inferior_thread.
4620         * python/py-record.h (recpy_record_object) <ptid>: Delete
4621         field, replaced with ...
4622         <thread>: ... this new field.  All users adjusted.
4623         (recpy_element_object) <ptid>: Delete
4624         field, replaced with ...
4625         <thread>: ... this new field.  All users adjusted.
4626         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
4627         a ptid_t.  All callers adjusted.
4628         * python/py-threadevent.c: Include "gdbthread.h".
4629         (get_event_thread): Use thread_to_thread_object.
4630         * python/python-internal.h (struct inferior_object): Forward
4631         declare.
4632         (find_thread_object, find_inferior_object): Delete declarations.
4633         (thread_to_thread_object, inferior_to_inferior_object): New
4634         declarations.
4635         * record-btrace.c: Include "inferior.h".
4636         (require_btrace_thread): Use inferior_thread.
4637         (record_btrace_frame_sniffer)
4638         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
4639         (get_thread_current_frame): Use scoped_restore_current_thread and
4640         switch_to_thread.
4641         (get_thread_current_frame): Use thread pointer directly.
4642         (record_btrace_replay_at_breakpoint): Use thread's inferior
4643         pointer directly.
4644         * record-full.c: Include "inferior.h".
4645         * regcache.c: Include "gdbthread.h".
4646         (get_thread_arch_regcache): Use the inferior's address space
4647         directly.
4648         (get_thread_regcache, registers_changed_thread): New.
4649         * regcache.h (get_thread_regcache(thread_info *thread)): New
4650         overload.
4651         (registers_changed_thread): New.
4652         (remote_target) <remote_detach_1>: Swap order of parameters.
4653         (remote_add_thread): <remote_add_thread>: Return the new thread.
4654         (get_remote_thread_info(ptid_t)): New overload.
4655         (remote_target::remote_notice_new_inferior): Use thread pointers
4656         directly.
4657         (remote_target::process_initial_stop_replies): Use
4658         thread_info::set_running.
4659         (remote_target::remote_detach_1, remote_target::detach)
4660         (extended_remote_target::detach): Adjust.
4661         * stack.c (frame_show_address): Use inferior_thread.
4662         * target-debug.h (target_debug_print_thread_info_pp): New.
4663         * target-delegates.c: Regenerate.
4664         * target.c (default_thread_address_space): Delete.
4665         (memory_xfer_partial_1): Use current_inferior.
4666         (target_detach): Use current_inferior.
4667         (target_thread_address_space): Delete.
4668         (generic_mourn_inferior): Use current_inferior.
4669         * target.h (struct target_ops) <thread_address_space>: Delete.
4670         (target_thread_address_space): Delete.
4671         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
4672         pointers directly.
4673         (delete_thread_1, delete_thread, delete_thread_silent): Take a
4674         thread pointer instead of a ptid_t.  Adjust all callers.
4675         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
4676         (first_thread_of_process): Delete, replaced by ...
4677         (first_thread_of_inferior): ... this new function.  All callers
4678         adjusted.
4679         (any_thread_of_process): Rename to ...
4680         (any_thread_of_inferior): ... this, and take an inferior pointer.
4681         (any_live_thread_of_process): Rename to ...
4682         (any_live_thread_of_inferior): ... this, and take an inferior
4683         pointer.
4684         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4685         (value_in_thread_stack_temporaries)
4686         (get_last_thread_stack_temporary): Take a thread pointer instead
4687         of a ptid_t.  Adjust all callers.
4688         (thread_info::set_running): New.
4689         (validate_registers_access): Use inferior_thread.
4690         (can_access_registers_ptid): Rename to ...
4691         (can_access_registers_thread): ... this, and take a thread
4692         pointer.
4693         (print_thread_info_1): Adjust to compare thread pointers instead
4694         of ptids.
4695         (switch_to_no_thread, switch_to_thread): Make extern.
4696         (scoped_restore_current_thread::~scoped_restore_current_thread):
4697         Use m_thread pointer directly.
4698         (scoped_restore_current_thread::scoped_restore_current_thread):
4699         Use inferior_thread.
4700         (thread_command): Use thread pointer directly.
4701         (thread_num_make_value_helper): Use inferior_thread.
4702         * top.c (execute_command): Use inferior_thread.
4703         * tui/tui-interp.c: Include "inferior.h".
4704         * varobj.c (varobj_create): Use inferior_thread.
4705         (value_of_root_1): Use find_thread_global_id instead of
4706         global_thread_id_to_ptid.
4707
4708 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
4709
4710         * regcache.c (readable_regcache::read_part): Avoid memcpy when
4711         possible.
4712         (regcache::write_part): Likewise.
4713         (readable_regcache::cooked_read_part): Update comment.
4714         (readable_regcache::cooked_write_part): Likewise.
4715         * regcache.h: (readable_regcache::read_part): Likewise.
4716         (regcache::write_part): Likewise.
4717
4718 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
4719             Dirk Schubert  <dirk.schubert@arm.com>
4720
4721         * aarch64-linux-nat.c (post_attach): New.
4722         (aarch64_linux_nat_target::post_attach): Override post_attach to
4723         record the number of hardware debug registers.
4724
4725 2018-06-20  Tom Tromey  <tom@tromey.com>
4726
4727         * python/py-param.c (add_setshow_generic): Make parameters const.
4728         (parmpy_init): Update.
4729
4730 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
4731
4732         * regcache.h (regcache_cooked_read_ftype): Rename to...
4733         (register_read_ftype): ...this, change type to function_view.
4734         (class reg_buffer) <save>: Remove src parameter.
4735         (readonly_detached_regcache) <readonly_detached_regcache>: Make
4736         parameter non-const in first overload.  Remove src parameter in
4737         second overload.
4738         * regcache.c (do_cooked_read): Remove.
4739         (readonly_detached_regcache::readonly_detached_regcache): Make
4740         parameter non-const, adjust call to other constructor.
4741         (reg_buffer::save): Remove src parameter.
4742         * frame.c (do_frame_register_read): Remove.
4743         (frame_save_as_regcache): Use lambda function.
4744         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
4745         parameter to ppu2spu_data *.
4746         (ppu2spu_sniffer): Use lambda function.
4747
4748 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
4749
4750         * record-full.c (record_full_target::insert_breakpoint): Remove
4751         "struct" keyword, add const.
4752
4753 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
4754
4755         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
4756         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
4757         * configure.ac: Remove AC_PREREQ, add missing quoting.
4758         * gnulib/configure.ac: Modernize usage of
4759         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
4760         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
4761         (AUTOMAKE_VERSION): Bump to 1.15.1.
4762         * configure: Re-generate.
4763         * config.in: Re-generate.
4764         * aclocal.m4: Re-generate.
4765         * gnulib/aclocal.m4: Re-generate.
4766         * gnulib/config.in: Re-generate.
4767         * gnulib/configure: Re-generate.
4768         * gnulib/import/Makefile.in: Re-generate.
4769
4770 2018-06-19  Pedro Alves  <palves@redhat.com>
4771
4772         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
4773         (lookup_minimal_symbol_by_pc_section): ... here with
4774         gdb_assert_not_reached added.
4775
4776 2018-06-19  Pedro Alves  <palves@redhat.com>
4777
4778         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
4779         parameter with a block parameter.  Compare location's block symbol
4780         with the frame's block instead of addresses.
4781         (skip_inline_frames): Pass the current block instead of the
4782         frame's address.  Break out as soon as we determine the frame
4783         should not be skipped.
4784
4785 2018-06-18  Tom Tromey  <tom@tromey.com>
4786
4787         * solib-aix.c (solib_aix_get_section_offsets): Return
4788         unique_xmalloc_ptr.
4789         (solib_aix_solib_create_inferior_hook): Update.
4790
4791 2018-06-18  Tom Tromey  <tom@tromey.com>
4792
4793         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
4794
4795 2018-06-18  Tom Tromey  <tom@tromey.com>
4796
4797         * solib-frv.c (frv_relocate_main_executable): Use
4798         unique_xmalloc_ptr.
4799         * solib-dsbt.c (dsbt_relocate_main_executable): Use
4800         unique_xmalloc_ptr.
4801
4802 2018-06-18  Tom Tromey  <tom@tromey.com>
4803
4804         * objfiles.h (inhibit_section_map_updates): Update.
4805         (resume_section_map_updates, resume_section_map_updates_cleanup):
4806         Remove.
4807         * solib-svr4.c (svr4_handle_solib_event): Update.
4808         * objfiles.c (inhibit_section_map_updates): Return
4809         scoped_restore_tmpl<int>.
4810         (resume_section_map_updates, resume_section_map_updates_cleanup):
4811         Remove.
4812
4813 2018-06-18  Tom Tromey  <tom@tromey.com>
4814
4815         * valprint.h (read_string): Update.
4816         * valprint.c (read_string): Change type of "buffer".
4817         (val_print_string): Update.
4818         * python/py-value.c (valpy_string): Update.
4819         * language.h (struct language_defn) <la_get_string>: Change
4820         type of "buffer".
4821         (default_get_string, c_get_string): Update.
4822         * language.c (default_get_string): Change type of "buffer".
4823         * guile/scm-value.c (gdbscm_value_to_string): Update.
4824         * c-lang.c (c_get_string): Change type of "buffer".
4825
4826 2018-06-18  Tom Tromey  <tom@tromey.com>
4827
4828         * ser-mingw.c (struct pipe_state_destroyer): New.
4829         (pipe_state_up): New typedef.
4830         (cleanup_pipe_state): Remove.
4831         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
4832
4833 2018-06-18  Tom Tromey  <tom@tromey.com>
4834
4835         * rust-lang.h (rust_yyerror): Don't declare.
4836         * rust-lang.c (rust_language_defn): Update.
4837         * rust-exp.y (yyerror): Now static.
4838         * parse.c (parse_exp_in_context_1): Update.
4839         * p-lang.h (p_yyerror): Don't declare.
4840         * p-lang.c (p_language_defn): Update.
4841         * p-exp.y (yyerror): Now static.
4842         * opencl-lang.c (opencl_language_defn): Update.
4843         * objc-lang.c (objc_language_defn): Update.
4844         * m2-lang.h (m2_yyerror): Don't declare.
4845         * m2-lang.c (m2_language_defn): Update.
4846         * m2-exp.y (yyerror): Now static.
4847         * language.h (struct language_defn) <la_error>: Remove.
4848         * language.c (unk_lang_error): Remove.
4849         (unknown_language_defn, auto_language_defn): Remove.
4850         * go-lang.h (go_yyerror): Don't declare.
4851         * go-lang.c (go_language_defn): Update.
4852         * go-exp.y (yyerror): Now static.
4853         * f-lang.h (f_yyerror): Don't declare.
4854         * f-lang.c (f_language_defn): Update.
4855         * f-exp.y (yyerror): Now static.
4856         * d-lang.h (d_yyerror): Don't declare.
4857         * d-lang.c (d_language_defn): Update.
4858         * d-exp.y (yyerror): Now static.
4859         * c-lang.h (c_yyerror): Don't declare.
4860         * c-lang.c (c_language_defn, cplus_language_defn)
4861         (asm_language_defn, minimal_language_defn): Update.
4862         * c-exp.y (yyerror): Now static.
4863         * ada-lang.h (ada_yyerror): Don't declare.
4864         * ada-lang.c (ada_language_defn): Update.
4865         * ada-exp.y (yyerror): Now static.
4866
4867 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
4868
4869         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
4870         (store_sveregs_to_thread): Likewise.
4871         (aarch64_linux_fetch_inferior_registers): Check for SVE.
4872         (aarch64_linux_store_inferior_registers): Likewise.
4873         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
4874         function.
4875         (aarch64_sve_regs_copy_to_regcache): Likewise.
4876         (aarch64_sve_regs_copy_from_regcache): Likewise.
4877         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
4878         declaration.
4879         (aarch64_sve_regs_copy_to_regcache): Likewise.
4880         (aarch64_sve_regs_copy_from_regcache): Likewise.
4881         (sve_context): Structure from Linux headers.
4882         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
4883         (SVE_SIG_ZREG_SIZE): Likewise.
4884         (SVE_SIG_PREG_SIZE): Likewise.
4885         (SVE_SIG_FFR_SIZE): Likewise.
4886         (SVE_SIG_REGS_OFFSET): Likewise.
4887         (SVE_SIG_ZREGS_OFFSET): Likewise.
4888         (SVE_SIG_ZREG_OFFSET): Likewise.
4889         (SVE_SIG_ZREGS_SIZE): Likewise.
4890         (SVE_SIG_PREGS_OFFSET): Likewise.
4891         (SVE_SIG_PREG_OFFSET): Likewise.
4892         (SVE_SIG_PREGS_SIZE): Likewise.
4893         (SVE_SIG_FFR_OFFSET): Likewise.
4894         (SVE_SIG_REGS_SIZE): Likewise.
4895         (SVE_SIG_CONTEXT_SIZE): Likewise.
4896         (SVE_PT_REGS_MASK): Likewise.
4897         (SVE_PT_REGS_FPSIMD): Likewise.
4898         (SVE_PT_REGS_SVE): Likewise.
4899         (SVE_PT_VL_INHERIT): Likewise.
4900         (SVE_PT_VL_ONEXEC): Likewise.
4901         (SVE_PT_REGS_OFFSET): Likewise.
4902         (SVE_PT_FPSIMD_OFFSET): Likewise.
4903         (SVE_PT_FPSIMD_SIZE): Likewise.
4904         (SVE_PT_SVE_ZREG_SIZE): Likewise.
4905         (SVE_PT_SVE_PREG_SIZE): Likewise.
4906         (SVE_PT_SVE_FFR_SIZE): Likewise.
4907         (SVE_PT_SVE_FPSR_SIZE): Likewise.
4908         (SVE_PT_SVE_FPCR_SIZE): Likewise.
4909         (__SVE_SIG_TO_PT): Likewise.
4910         (SVE_PT_SVE_OFFSET): Likewise.
4911         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
4912         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
4913         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
4914         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
4915         (SVE_PT_SVE_PREG_OFFSET): Likewise.
4916         (SVE_PT_SVE_PREGS_SIZE): Likewise.
4917         (SVE_PT_SVE_FFR_OFFSET): Likewise.
4918         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
4919         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
4920         (SVE_PT_SVE_SIZE): Likewise.
4921         (SVE_PT_SIZE): Likewise.
4922         (HAS_SVE_STATE): New define.
4923
4924 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
4925
4926         * nat/aarch64-sve-linux-sigcontext.h: New file.
4927         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
4928         new files.
4929         (SVE_VQ_MIN): Likewise.
4930         (SVE_VQ_MAX): Likewise.
4931         (SVE_VL_MIN): Likewise.
4932         (SVE_VL_MAX): Likewise.
4933         (SVE_NUM_ZREGS): Likewise.
4934         (SVE_NUM_PREGS): Likewise.
4935         (sve_vl_valid): Likewise.
4936         (struct user_sve_header): Likewise.
4937
4938 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
4939             Richard Bunt <Richard.Bunt@arm.com>
4940
4941         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
4942         was requested by GDB.
4943
4944 2018-06-15  Tom de Vries  <tdevries@suse.de>
4945
4946         * MAINTAINERS (Write After Approval): Add Tom de Vries.
4947
4948 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
4949
4950         * gnulib/update-gnulib.sh: Print expected versions of
4951         autoconf/aclocal.
4952
4953 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
4954
4955         * arch-utils.c (default_type_align): Use type_length_units.
4956         * gdbtypes.c (type_align): Use type_length_units.
4957
4958 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4959
4960         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
4961         of 'define' command.
4962
4963 2018-06-14  Tom de Vries  <tdevries@suse.de>
4964
4965         PR cli/22573
4966         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
4967         get_no_prettyformat_print_options.
4968
4969 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
4970
4971         * sparc-nat.h: Include target.h.
4972         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
4973         <fetch_registers>: Remove this argument in function call.
4974         <store_registers>: Remove this argument in function call, remove
4975         extra semicolon.
4976         <low_forget_process>: Call sparc64_forget_process instead of
4977         sparc_forget_process.
4978
4979 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4980
4981         * procfs.c (_initialize_procfs): Use add_inf_child_target.
4982         (procfs_target::make_corefile_notes): Adjust to new
4983         target_read_alloc return type.
4984
4985 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
4986             Stephen Roberts  <stephen.roberts@arm.com>
4987
4988         PR gdb/22882
4989         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
4990         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
4991         Move should_notify_stop local into more inner scope.
4992
4993 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
4994             Stephen Roberts  <stephen.roberts@arm.com>
4995
4996         PR gdb/22882
4997         * infrun.c (resume_1): Add call to mark_async_event_handler.
4998
4999 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
5000
5001         * infrun.c (do_target_wait): Change old version of $pc printed.
5002
5003 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
5004
5005         * dwarf2read.c (read_index_from_section): Rename to...
5006         (read_gdb_index_from_section): ... this, update all callers.
5007         (dwarf2_read_index): Rename to...
5008         (dwarf2_read_gdb_index): ... this, update all callers.
5009
5010 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
5011
5012         * gdb/hppa-linux-nat.c
5013         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
5014         hppa_linux_nat_target::fetch_registers.
5015
5016 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
5017
5018         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
5019         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
5020         (AARCH64_DWARF_SVE_FFR): Likewise.
5021         (AARCH64_DWARF_SVE_P0): Likewise.
5022         (AARCH64_DWARF_SVE_Z0): Likewise.
5023
5024 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
5025
5026         * common/common-regcache.h (raw_compare): New function.
5027         * regcache.c (regcache::raw_compare): Likewise.
5028         * regcache.h (regcache::raw_compare): New declaration.
5029
5030 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
5031
5032         * common/common-regcache.h (reg_buffer_common): New structure.
5033         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
5034         (reg_buffer::raw_supply): Likewise.
5035         (reg_buffer::raw_supply_integer): Likewise.
5036         (reg_buffer::raw_supply_zeroed): Likewise.
5037         (reg_buffer::raw_collect): Likewise.
5038         (reg_buffer::raw_collect_integer): Likewise.
5039         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
5040         (reg_buffer::raw_supply): Likewise.
5041         (reg_buffer::raw_supply_integer): Likewise.
5042         (reg_buffer::raw_supply_zeroed): Likewise.
5043         (reg_buffer::raw_collect): Likewise.
5044         (reg_buffer::raw_collect_integer): Likewise.
5045
5046 2018-06-10  Tom Tromey  <tom@tromey.com>
5047
5048         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
5049         (class remote_state) <stop_reply_queue>: Now std::vector.
5050         (remote_state::~remote_state)
5051         (remote_target::stop_reply_queue_length): Update.
5052         (struct queue_iter_param, remove_child_of_pending_fork)
5053         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
5054         (check_pending_event_prevents_wildcard_vcont_callback)
5055         (remove_stop_reply_for_inferior)
5056         (remove_stop_reply_of_remote_state)
5057         (remote_notif_remove_once_on_match)
5058         (stop_reply_match_ptid_and_ws)
5059         (remote_kill_child_of_pending_fork): Remove.
5060         (remote_target::remove_new_fork_children)
5061         (remote_target::check_pending_events_prevent_wildcard_vcont)
5062         (remote_target::discard_pending_stop_replies)
5063         (remote_target::discard_pending_stop_replies_in_queue)
5064         (remote_target::remote_notif_remove_queued_reply)
5065         (remote_target::queued_stop_reply)
5066         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
5067         (remote_target::wait, remote_target::kill_new_fork_children)
5068         (remote_target::async): Update.
5069
5070 2018-06-10  Tom Tromey  <tom@tromey.com>
5071
5072         * record-full.c (record_full_arch_list_cleanups): Remove.
5073         (record_full_message): Use try/catch.
5074         (record_full_wait_cleanups): Remove.
5075         (record_full_wait_1): Use try/catch.
5076         (record_full_restore): Likewise.
5077
5078 2018-06-10  Tom Tromey  <tom@tromey.com>
5079
5080         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
5081         declare VEC.  Add constructor.
5082         <in_target_beneath>: Now bool.
5083         (record_full_breakpoints): Now a std::vector, static.
5084         (record_full_sync_record_breakpoints)
5085         (record_full_init_record_breakpoints)
5086         (record_full_target::insert_breakpoint)
5087         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
5088
5089 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
5090
5091         * dwarf2read.c (process_cu_includes): Remove struct keyword.
5092         * serial.c (serial_interface_lookup): Remove struct keyword.
5093
5094 2018-06-10  Tom Tromey  <tom@tromey.com>
5095
5096         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
5097         method.
5098         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
5099         a method.
5100         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
5101         method.
5102         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
5103         "beneath" as a method.
5104         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
5105         Use "beneath" as a method.
5106
5107 2018-06-10  Tom Tromey  <tom@tromey.com>
5108
5109         * tracefile.c (struct trace_file_writer_deleter): New.
5110         <operator()>: Rename from trace_file_writer_xfree.
5111         (trace_file_writer_up): New typedef.
5112         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
5113
5114 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
5115
5116         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
5117         <m_registers, m_register_status>: Change type to
5118         std::unique_ptr.
5119         * regcache.c (reg_buffer::reg_buffer): Use new instead of
5120         XCNEWVEC.
5121
5122 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
5123
5124         * common/common-regcache.h (enum register_status): Add
5125         underlying type "signed char".
5126         * regcache.h (reg_buffer) <m_register_status>: Change type to
5127         register_status *.
5128         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
5129         register_status instead of signed char.
5130         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
5131         (reg_buffer::get_register_status): Remove cast.
5132         (readable_regcache::raw_read): Remove cast.
5133         (readable_regcache::cooked_read): Remove cast.
5134
5135 2018-06-09  Tom Tromey  <tom@tromey.com>
5136
5137         * source.c (reverse_search_command, forward_search_command): Use
5138         scoped_fd.
5139
5140 2018-06-09  Tom Tromey  <tom@tromey.com>
5141
5142         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
5143         (serial_ops_list): Now static, std::vector.
5144         (serial_interface_lookup, serial_add_interface): Update.
5145
5146 2018-06-09  Tom Tromey  <tom@tromey.com>
5147
5148         * dwarf2read.c (process_cu_includes): Update.
5149         (process_full_comp_unit): Update.
5150         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
5151         std::vector.
5152
5153 2018-06-08  Paul Koning  <paul_koning@dell.com>
5154
5155         PR gdb/23252
5156
5157         * python/python.c (do_start_initialization):
5158         Avoid call to internal Python API.
5159         (init__gdb_module): New function.
5160
5161 2018-06-08  Gary Benson <gbenson@redhat.com>
5162
5163         * linux-thread-db.c (valprint.h): New include.
5164         (struct check_thread_db_info): New structure.
5165         (check_thread_db_on_load, tdb_testinfo): New static globals.
5166         (check_thread_db, check_thread_db_callback): New functions.
5167         (try_thread_db_load_1): Run integrity checks if requested.
5168         (maintenance_check_libthread_db): New function.
5169         (_initialize_thread_db): Register "maint check libthread-db"
5170         and "maint set/show check-libthread-db".
5171         * NEWS: Mention the above new commands.
5172
5173 2018-06-08  Tom Tromey  <tom@tromey.com>
5174
5175         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
5176         now a method.
5177
5178 2018-06-08  Tom Tromey  <tom@tromey.com>
5179
5180         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
5181
5182 2018-06-08  Tom Tromey  <tom@tromey.com>
5183
5184         * common/btrace-common.h (struct btrace_data): Add constructor,
5185         destructor, move assignment operator.
5186         <empty, clear, fini>: New methods.
5187         <format>: Initialize.
5188         (btrace_data_init, btrace_data_fini, btrace_data_clear)
5189         (btrace_data_empty): Don't declare.
5190         * common/btrace-common.c (btrace_data_init): Remove.
5191         (btrace_data::fini): Rename from btrace_data_fini.
5192         (btrace_data::empty): Rename from btrace_data_empty.
5193         (btrace_data::clear): Rename from btrace_data_clear.  Return
5194         bool.
5195         * btrace.h (make_cleanup_btrace_data): Don't declare.
5196         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
5197         (parse_xml_btrace): Update.
5198         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
5199         (maint_btrace_clear_packet_history_cmd): Update.
5200
5201 2018-06-07  Pedro Alves  <palves@redhat.com>
5202
5203         * target.h (target_ops) <beneath>: Now a method.  All references
5204         updated.
5205         (class target_stack): New.
5206         * target.c (g_target_stack): New.
5207         (g_current_top_target): Delete.
5208         (current_top_target): Get the top target out of g_target_stack.
5209         (target_stack::push, target_stack::unpush): New.
5210         (push_target, unpush_target): Reimplement.
5211         (target_is_pushed): Reimplement in terms of g_target_stack.
5212         (target_ops::beneath, target_stack::find_beneath): New.
5213
5214 2018-06-07  Pedro Alves  <palves@redhat.com>
5215
5216         * target.h (find_target_beneath): Delete declaration.
5217         * target.c (find_target_beneath): Delete definition.
5218         * aix-thread.c: All callers of find_target_beneath adjusted to
5219         call target_ops::beneath instead.
5220         * bsd-uthread.c: Likewise.
5221         * linux-thread-db.c: Likewise.
5222         * ravenscar-thread.c: Likewise.
5223         * sol-thread.c: Likewise.
5224         * spu-multiarch.c: Likewise.
5225
5226 2018-06-07  Pedro Alves  <palves@redhat.com>
5227
5228         * target.h (target_ops) <beneath>: Now a method.  All references
5229         updated.
5230         (target_ops) <m_beneath>: New.
5231         * target.c (target_ops::beneath): New.
5232         * corelow.c: Adjust all references to target_ops::beneath.
5233         * linux-thread-db.c: Likewise.
5234         * make-target-delegates: Likewise.
5235         * record-btrace.c: Likewise.
5236         * record-full.c: Likewise.
5237         * remote.c: Likewise.
5238         * target.c: Likewise.
5239         * target-delegates.c: Regenerate.
5240
5241 2018-06-07  Pedro Alves  <palves@redhat.com>
5242
5243         * target.h (target_stack): Delete.
5244         (current_top_target): Declare function.
5245         * target.c (target_stack): Delete.
5246         (g_current_top_target): New.
5247         (current_top_target): New function.
5248         * auxv.c: Use current_top_target instead of target_stack
5249         throughout.
5250         * avr-tdep.c: Likewise.
5251         * breakpoint.c: Likewise.
5252         * corefile.c: Likewise.
5253         * elfread.c: Likewise.
5254         * eval.c: Likewise.
5255         * exceptions.c: Likewise.
5256         * frame.c: Likewise.
5257         * gdbarch-selftests.c: Likewise.
5258         * gnu-v3-abi.c: Likewise.
5259         * ia64-tdep.c: Likewise.
5260         * ia64-vms-tdep.c: Likewise.
5261         * infcall.c: Likewise.
5262         * infcmd.c: Likewise.
5263         * infrun.c: Likewise.
5264         * linespec.c: Likewise.
5265         * linux-tdep.c: Likewise.
5266         * minsyms.c: Likewise.
5267         * ppc-linux-nat.c: Likewise.
5268         * ppc-linux-tdep.c: Likewise.
5269         * procfs.c: Likewise.
5270         * regcache.c: Likewise.
5271         * remote.c: Likewise.
5272         * rs6000-tdep.c: Likewise.
5273         * s390-linux-nat.c: Likewise.
5274         * s390-tdep.c: Likewise.
5275         * solib-aix.c: Likewise.
5276         * solib-darwin.c: Likewise.
5277         * solib-dsbt.c: Likewise.
5278         * solib-spu.c: Likewise.
5279         * solib-svr4.c: Likewise.
5280         * solib-target.c: Likewise.
5281         * sparc-tdep.c: Likewise.
5282         * sparc64-tdep.c: Likewise.
5283         * spu-tdep.c: Likewise.
5284         * symfile.c: Likewise.
5285         * symtab.c: Likewise.
5286         * target-descriptions.c: Likewise.
5287         * target-memory.c: Likewise.
5288         * target.c: Likewise.
5289         * target.h: Likewise.
5290         * tracefile-tfile.c: Likewise.
5291         * tracepoint.c: Likewise.
5292         * valops.c: Likewise.
5293         * valprint.c: Likewise.
5294         * value.c: Likewise.
5295         * windows-tdep.c: Likewise.
5296         * mi/mi-main.c: Likewise.
5297
5298 2018-06-07  Tom Tromey  <tom@tromey.com>
5299
5300         * valprint.h (build_address_symbolic): Declare.
5301         * printcmd.c (print_address_symbolic): Update.
5302         (build_address_symbolic): Change "name" and "filename" to
5303         std::string.
5304         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
5305         Update.
5306         * defs.h (build_address_symbolic): Remove declaration.
5307
5308 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
5309
5310         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
5311         (aarch64_vnv_type): Add function.
5312         (aarch64_pseudo_register_name): Add V regs for SVE.
5313         (aarch64_pseudo_register_type): Likewise.
5314         (aarch64_pseudo_register_reggroup_p): Likewise.
5315         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
5316         (aarch64_pseudo_read_value): Add V regs for SVE.
5317         (aarch64_pseudo_write_2): Use V0 offset for SVE
5318         (aarch64_pseudo_write): Add V regs for SVE.
5319         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
5320
5321 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
5322
5323         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
5324         (sve_vl_from_vq): Likewise.
5325
5326 2018-06-05  Tom Tromey  <tom@tromey.com>
5327
5328         * cli/cli-cmds.c (show_version): Update.
5329         * top.c (print_gdb_version): Add "interactive" parameter.
5330         Update.
5331         * main.c (captured_main_1): Update.
5332         * top.h (print_gdb_version): Add "interactive" parameter and a
5333         comment.
5334
5335 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
5336
5337         * common/enum-flags.h: Add trailing semicolon to example in
5338         comment.
5339
5340 2018-06-05  Tom Tromey  <tom@tromey.com>
5341
5342         PR cli/12326:
5343         * NEWS: Add entry about pager.
5344         * utils.c (pagination_disabled_for_command): New global.
5345         (prompt_for_continue): Allow "c" response to prompt.
5346         (reinitialize_more_filter): Clear
5347         pagination_disabled_for_command.
5348         (fputs_maybe_filtered): Check pagination_disabled_for_command.
5349
5350 2018-06-04  Tom Tromey  <tom@tromey.com>
5351
5352         * ada-lang.h (ada_lookup_symbol_list): Update.
5353         * ada-lang.c (resolve_subexp): Update.
5354         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
5355         parameter.
5356         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
5357         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
5358         results parameter to std::vector.
5359         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
5360         Update.
5361         * ada-exp.y (block_lookup): Update.
5362         (select_possible_type_sym): Change type of syms.  Remove nsyms
5363         parameter.
5364         (write_var_or_type, write_name_assoc): Update.
5365
5366 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
5367
5368         * windows-nat.c (windows_nat_target::xfer_partial): Return
5369         TARGET_XFER_E_IO if we need to delegate to the target beneath
5370         but BENEATH is NULL.
5371
5372 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
5373
5374         * Makefile.in (config.status): Add configure.nat as a
5375         dependency.
5376
5377 2018-06-04  Tom Tromey  <tom@tromey.com>
5378
5379         * cp-name-parser.y (cpname_state): Add method declarations.
5380         (HANDLE_QUAL): Update.
5381         (cpname_state::d_grab, cpname_state::fill_comp)
5382         (cpname_state::make_operator, cpname_state::make_dtor)
5383         (cpname_state::make_builtin_type, cpname_state::make_name)
5384         (cpname_state::d_qualify, cpname_state::d_int_type)
5385         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
5386         (%union): Move earlier.
5387
5388 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5389
5390         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
5391
5392 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5393
5394         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
5395         (aarch64_pseudo_write_1): Likewise.
5396         (aarch64_pseudo_read_value): Use helper.
5397         (aarch64_pseudo_write): Likewise.
5398
5399 2018-06-04  Pedro Alves  <palves@redhat.com>
5400
5401         * darwin-nat.c (darwin_ops): Delete.
5402         (darwin_attach_pid): Use get_native_target.
5403
5404 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5405
5406         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
5407         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
5408
5409 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5410
5411         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
5412         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
5413         (aarch64_gdbarch_init): Check for SVE.
5414         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
5415
5416 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5417
5418         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
5419         * aarch64-tdep.h (aarch64_read_description): Likewise.
5420         * arch/aarch64.c (aarch64_create_target_description): Likewise.
5421         * arch/aarch64.h (aarch64_create_target_description): Likewise.
5422         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
5423         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
5424         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
5425
5426 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
5427
5428         * value.c (value_fetch_lazy_bitfield): New.
5429         (value_fetch_lazy_memory): New.
5430         (value_fetch_lazy_register): New.
5431         (value_fetch_lazy): Factor out to smaller functions.
5432
5433 2018-06-01  Tom Tromey  <tom@tromey.com>
5434
5435         * cp-name-parser.y (backslashable, represented): Now const.
5436
5437 2018-06-01  Tom Tromey  <tom@tromey.com>
5438
5439         * cp-name-parser.y: Include parser-defs.h.
5440         (parser_fprintf): Remove declaration.
5441
5442 2018-06-01  Tom Tromey  <tom@tromey.com>
5443
5444         * cp-name-parser.y: Use %pure-parser, %lex-param, and
5445         %parse-param.
5446         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
5447         (global_result): Remove globals.
5448         (struct cpname_state): New.
5449         (yyparse): Don't declare.
5450         (yylex, yyerror): Move declarations after %union.
5451         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
5452         (make_name): Add state parameter.
5453         Update all callers.
5454         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
5455         parameter.
5456         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
5457         Update.
5458         (yylex): Add lvalp, state parameters.
5459         (yyerror): Add state parameter.
5460         (cp_demangled_name_to_comp): Update.
5461
5462 2018-06-01  Tom Tromey  <tom@tromey.com>
5463
5464         * cp-name-parser.y (parser_fprintf): Declare.
5465         (GDB_YY_REMAP_PREFIX): Define.
5466         Include yy-remap.h.  Don't redefine yy* identifiers.
5467
5468 2018-06-01  Tom Tromey  <tom@tromey.com>
5469
5470         * python/py-type.c (typy_legacy_template_argument): Update.
5471         * cp-support.h (cp_demangled_name_to_comp): Update.
5472         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
5473         parameter to be a "std::string *".
5474         (main): Update.
5475
5476 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
5477
5478         * ada-lex.l: Include "diagnostics.h" instead of
5479         "common/diagnostics.h".
5480         * unittests/environ-selftests.c: Likewise.
5481         * common/diagnostics.h: Moved to ../include.
5482
5483 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
5484
5485         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
5486         to language_mode_manual while calling breakpoint_re_set_one.
5487
5488 2018-06-01  Tom Tromey  <tom@tromey.com>
5489
5490         * valops.c (value_cast_structs, destructor_name_p): Update.
5491         * symtab.c (gdb_mangle_name): Update.
5492         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
5493         Update.
5494         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
5495         (pascal_object_print_value_fields, pascal_object_print_value):
5496         Update.
5497         * p-typeprint.c (pascal_type_print_derivation_info): Update.
5498         * linespec.c (find_methods): Update.
5499         * gdbtypes.h (type_name_no_tag): Remove.
5500         (type_name_or_error): Rename from type_name_no_tag_or_error.
5501         * gdbtypes.c (type_name_no_tag): Remove.
5502         (type_name_or_error): Rename from type_name_no_tag_or_error.
5503         (lookup_struct_elt_type, check_typedef): Update.
5504         * expprint.c (print_subexp_standard): Update.
5505         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
5506         * d-namespace.c (d_lookup_nested_symbol): Update.
5507         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
5508         (cp_print_class_member): Update.
5509         * cp-namespace.c (cp_lookup_nested_symbol): Update.
5510         * completer.c (add_struct_fields): Update.
5511         * c-typeprint.c (cp_type_print_derivation_info)
5512         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
5513         Update.
5514         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
5515         (ada_prefer_type, ada_is_exception_sym): Update.
5516
5517 2018-06-01  Tom Tromey  <tom@tromey.com>
5518
5519         * valops.c (enum_constant_from_type, value_namespace_elt)
5520         (value_maybe_namespace_elt): Update.
5521         * valarith.c (find_size_for_pointer_math): Update.
5522         * target-descriptions.c (make_gdb_type): Update.
5523         * symmisc.c (print_symbol): Update.
5524         * stabsread.c (define_symbol, read_type)
5525         (complain_about_struct_wipeout, add_undefined_type)
5526         (cleanup_undefined_types_1): Update.
5527         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
5528         (rust_range_type_p, val_print_struct, rust_print_struct_def)
5529         (rust_internal_print_type, rust_composite_type)
5530         (rust_evaluate_funcall, rust_evaluate_subexp)
5531         (rust_inclusive_range_type_p): Update.
5532         * python/py-type.c (typy_get_tag): Update.
5533         * p-typeprint.c (pascal_type_print_base): Update.
5534         * mdebugread.c (parse_symbol, parse_type): Update.
5535         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
5536         Update.
5537         * guile/scm-type.c (gdbscm_type_tag): Update.
5538         * go-lang.c (sixg_string_p): Update.
5539         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
5540         Update.
5541         * gdbtypes.h (struct main_type) <tag_name>: Remove.
5542         (TYPE_TAG_NAME): Remove.
5543         * gdbtypes.c (type_name_no_tag): Simplify.
5544         (check_typedef, check_types_equal, recursive_dump_type)
5545         (copy_type_recursive, arch_composite_type): Update.
5546         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
5547         in summary mode when needed.
5548         * eval.c (evaluate_funcall): Update.
5549         * dwarf2read.c (fixup_go_packaging, read_structure_type)
5550         (process_structure_scope, read_enumeration_type)
5551         (read_namespace_type, read_module_type, determine_prefix): Update.
5552         * cp-support.c (inspect_type): Update.
5553         * coffread.c (process_coff_symbol, decode_base_type): Update.
5554         * c-varobj.c (c_is_path_expr_parent): Update.
5555         * c-typeprint.c (c_type_print_base_struct_union): Update.
5556         (c_type_print_base_1): Update.  Print struct/class/union/enum in
5557         summary when using C language.
5558         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
5559         (gen_maybe_namespace_elt): Update.
5560         * ada-lang.c (ada_type_name): Simplify.
5561         (empty_record, ada_template_to_fixed_record_type_1)
5562         (template_to_static_fixed_type)
5563         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
5564
5565 2018-06-01  Tom Tromey  <tom@tromey.com>
5566
5567         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
5568         c_print_type.
5569         * c-typeprint.c (c_print_type_1): Add "language" parameter.
5570         (c_print_type): Update.
5571         (c_print_type): New overload.
5572         (c_type_print_varspec_prefix, c_type_print_args)
5573         (c_type_print_varspec_suffix, c_print_type_no_offsets)
5574         (c_type_print_base_struct_union, c_type_print_base_1)
5575         (cp_type_print_method_args): Add "language" parameter.
5576         (c_type_print_base): Update.
5577         * c-lang.h (c_print_type): Add new overload.
5578
5579 2018-06-01  Tom Tromey  <tom@tromey.com>
5580
5581         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
5582         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
5583
5584 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
5585
5586         * aarch64-tdep.c (aarch64_sve_register_names): New const
5587         var.
5588         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
5589         (AARCH64_SVE_Z_REGS_NUM): New define.
5590         (AARCH64_SVE_P_REGS_NUM): Likewise.
5591         (AARCH64_SVE_NUM_REGS): Likewise.
5592
5593 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
5594
5595         * nat/linux-ptrace.h [__alpha__]
5596         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
5597         definitions.
5598
5599 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
5600
5601         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
5602         the endianness selected.
5603         * NEWS: Document `set endian auto' mode operation update.
5604
5605 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
5606
5607         * Makefile.in: Add new header.
5608         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
5609         (sve_vl_from_vg): Likewise.
5610         (sve_vq_from_vl): Likewise.
5611         (sve_vl_from_vq): Likewise.
5612         (sve_vq_from_vg): Likewise.
5613         (sve_vg_from_vq): Likewise.
5614         * configure.nat: Add new c file.
5615         * nat/aarch64-sve-linux-ptrace.c: New file.
5616         * nat/aarch64-sve-linux-ptrace.h: New file.
5617
5618 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
5619
5620         * aarch64-linux-nat.c (aarch64_linux_read_description):
5621         Add parmeter zero.
5622         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
5623         Likewise.
5624         * aarch64-tdep.c (tdesc_aarch64_list): Add.
5625         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
5626         (aarch64_gdbarch_init): Add parmeter zero.
5627         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
5628         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
5629         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
5630         parmeter.
5631         * doc/gdb.texinfo: Describe SVE feature
5632         * features/aarch64-sve.c: New file.
5633
5634 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
5635
5636         PR gdb/23210
5637         * gdbarch.sh (significant_addr_bit): Default to zero when
5638         not set by target architecture.
5639         * gdbarch.c: Re-generated.
5640         * utils.c (address_significant): Update.
5641
5642 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
5643
5644         * stack.c (func_command): Remove trailing newline in call to error.
5645
5646 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5647
5648         * regcache.h (regcache_raw_collect): Remove, update callers to
5649         use regcache::raw_collect.
5650         * regcache.c (regcache_raw_collect): Remove.
5651
5652 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5653
5654         * regcache.h (regcache_raw_supply): Remove, update callers to
5655         use detached_regcache::raw_supply.
5656         * regcache.c (regcache_raw_supply): Remove.
5657
5658 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5659
5660         * regcache.h (regcache_cooked_write_part): Remove, update
5661         callers to use regcache::cooked_write_part.
5662         * regcache.c (regcache_cooked_write_part): Remove.
5663
5664 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5665
5666         * regcache.h (regcache_cooked_read_part): Remove, update callers
5667         to use readable_regcache::cooked_read_part.
5668         * regcache.c (regcache_cooked_read_part): Remove.
5669
5670 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5671
5672         * regcache.h (regcache_cooked_read_value): Remove, update
5673         callers to use readable_regcache::cooked_read_value.
5674         * regcache.c (regcache_cooked_read_value): Remove.
5675
5676 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5677
5678         * regcache.h (regcache_cooked_write): Remove, update callers to
5679         use regcache::cooked_write.
5680         * regcache.c (regcache_cooked_write): Remove.
5681
5682 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5683
5684         * regcache.h (regcache_invalidate): Remove, update callers to
5685         use detached_regcache::invalidate instead.
5686         * regcache.c (regcache_invalidate): Remove.
5687
5688 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5689
5690         * regcache.h (regcache_raw_write_part): Remove, update callers
5691         to use regcache::raw_write_part instead.
5692         * regcache.c (regcache_raw_write_part): Remove.
5693
5694 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5695
5696         * regcache.h (regcache_raw_read_part): Remove, update callers to
5697         use readable_regcache::raw_read_part instead.
5698         * regcache.c (regcache_raw_read_part): Remove.
5699
5700 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5701
5702         * regcache.h (regcache_cooked_read): Remove, update callers to
5703         use readable_regcache::cooked_read instead.
5704         * regcache.c (regcache_cooked_read): Remove.
5705
5706 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5707
5708         * regcache.h (regcache_raw_write): Remove, update callers to use
5709         regcache::raw_write instead.
5710         * regcache.c (regcache_raw_write): Remove.
5711
5712 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5713
5714         * regcache.h (regcache_raw_read): Remove, update callers to use
5715         readable_regcache::raw_read instead.
5716         * regcache.c (regcache_raw_read): Remove.
5717
5718 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5719
5720         * regcache.h (regcache_raw_update): Remove, update callers to
5721         use readable_regcache::raw_update instead.
5722         * regcache.c (regcache_raw_update): Remove.
5723
5724 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5725
5726         * regcache.h (regcache_register_status): Remove, update callers
5727         to use reg_buffer::get_register_status directly instead.
5728         * regcache.c (regcache_register_status): Remove.
5729
5730 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5731
5732         * regcache.h (regcache_get_ptid): Remove, update all callers to
5733         call regcache::ptid instead.
5734         * regcache.c (regcache_get_ptid): Remove.
5735
5736 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5737
5738         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
5739
5740 2018-05-30  Pedro Alves  <palves@redhat.com>
5741
5742         * common/common-exceptions.h (exception_rethrow): Use
5743         ATTRIBUTE_NORETURN.
5744
5745 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
5746
5747         * breakpoint.c (print_solib_event, check_status_catch_solib):
5748         Remove struct keyword in range-based for loops.
5749         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
5750         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
5751         Likewise.
5752         * linespec.c (find_superclass_methods, search_minsyms_for_name):
5753         Likewise.
5754         * symfile.c (addr_info_make_relative): Likewise.
5755         * thread.c (value_in_thread_stack_temporaries): Likewise.
5756
5757 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
5758
5759         PR gdb/16841
5760         * valops.c (value_struct_elt_for_reference): Call check_typedef on
5761         aggregate type to get its real type before accessing it.
5762
5763 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
5764
5765         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
5766         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
5767         * coff-pe-read.c (add_pe_forwarded_sym): Replace
5768         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
5769         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
5770         * jit.c (jit_breakpoint_re_set_internal): Likewise.
5771         * printcmd.c (info_address_command): Likewise.
5772
5773 2018-05-29  Tom Tromey  <tom@tromey.com>
5774
5775         * windows-nat.c (handle_exception): Update fall-through comment.
5776
5777 2018-05-29  Tom Tromey  <tom@tromey.com>
5778
5779         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
5780         (struct program_space) <added_solibs>: Now a std::vector.
5781         * breakpoint.c (print_solib_event): Update.
5782         (check_status_catch_solib): Update.
5783         * progspace.c (clear_program_space_solib_cache): Update.
5784         * solib.c (update_solib_list): Update.
5785
5786 2018-05-29  Tom Tromey  <tom@tromey.com>
5787
5788         * python/py-type.c (typy_richcompare): Update.
5789         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
5790         * gdbtypes.h (types_deeply_equal): Return bool.
5791         (types_equal): Likewise.
5792         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
5793         declare VEC.
5794         (check_types_equal): Change worklist to std::vector.  Return
5795         bool.
5796         (struct type_equality_entry): Add constructor.
5797         (compare_maybe_null_strings): Return bool.
5798         (check_types_worklist): Return bool.  Change worklist to
5799         std::vector.
5800         (types_deeply_equal): Use std::vector.
5801         (types_equal): Return bool.
5802         (compare_maybe_null_strings): Simplify.
5803
5804 2018-05-29  Tom Tromey  <tom@tromey.com>
5805
5806         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
5807
5808 2018-05-29  Tom Tromey  <tom@tromey.com>
5809
5810         * objc-lang.h: Don't include cp-support.h.
5811         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
5812         declare VEC.
5813
5814 2018-05-27  Tom Tromey  <tom@tromey.com>
5815
5816         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
5817
5818 2018-05-25  Tom Tromey  <tom@tromey.com>
5819
5820         * value.c (value::location): Initialize.
5821
5822 2018-05-25  Tom Tromey  <tom@tromey.com>
5823
5824         * dbxread.c (init_bincl_list): Remove.
5825         (bincl_list): Now a std::vector.
5826         (bincls_allocated, next_bincl): Remove.
5827         (free_bincl_list, do_free_bincl_list_cleanup)
5828         (make_cleanup_free_bincl_list): Remove.
5829         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
5830         unique_xmalloc_ptr.
5831         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
5832         (struct header_file_location): Add constructor.
5833         (add_bincl_to_list): Remove.
5834
5835 2018-05-25  Tom Tromey  <tom@tromey.com>
5836
5837         * tui/tui.c (tui_enable): Update.
5838         * mi/mi-interp.c (mi_interp::init): Update.
5839         * interps.h (class interp) <name>: New method.
5840         <m_name>: Rename from name.
5841         (~scoped_restore_interp): Update.
5842         * interps.c (interp::interp): Update.
5843         (interp_add, interp_set, interp_lookup_existing)
5844         (current_interp_named_p): Update.
5845
5846 2018-05-25  Tom Tromey  <tom@tromey.com>
5847
5848         * interps.c (interp_name): Remove.
5849         * mi/mi-interp.c (mi_interp::init): Update.
5850         * interps.h (interp_name): Remove.
5851         (~scoped_restore_interp): Update.
5852         * tui/tui.c (tui_enable): Update.
5853
5854 2018-05-25  Tom Tromey  <tom@tromey.com>
5855
5856         * utils.c (fputs_maybe_filtered): Update.
5857         * linespec.c (decode_line_full): Update.
5858         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
5859         (mi_print_breakpoint_for_event, mi_solib_loaded)
5860         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
5861         (mi_user_selected_context_changed): Update.
5862         * mi/mi-main.c (mi_execute_command): Update.
5863         * cli/cli-script.c (execute_control_command): Update.
5864         * python/python.c (execute_gdb_command): Update.
5865         * solib.c (info_sharedlibrary_command): Update.
5866         * interps.c (interp_ui_out): Remove.
5867         * interps.h (interp_ui_out): Remove.
5868
5869 2018-05-25  Tom Tromey  <tom@tromey.com>
5870
5871         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
5872         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
5873         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
5874
5875 2018-05-25  Tom Tromey  <tom@tromey.com>
5876
5877         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
5878         * interps.c (interp_exec): Use scoped_restore.
5879
5880 2018-05-25  Tom Tromey  <tom@tromey.com>
5881
5882         * remote.c (remote_target::remote_file_get): Use
5883         gdb::byte_vector.
5884         (remote_target::remote_file_put): Likewise.
5885
5886 2018-05-25  Tom Tromey  <tom@tromey.com>
5887
5888         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
5889         a std::string.
5890         (get_pe_section_index, add_pe_exported_sym): Update.
5891         (read_pe_exported_syms): Use gdb::def_vector.
5892
5893 2018-05-25  Tom Tromey  <tom@tromey.com>
5894
5895         * frame.c (remove_prev_frame): Remove.
5896         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
5897
5898 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
5899
5900         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
5901         Remove prototypes.
5902         * mips-linux-nat.c (supply_fpregset): Always call
5903         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
5904         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
5905         `mips_fill_fpregset'.
5906         * mips-linux-tdep.c (mips_supply_fpregset)
5907         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
5908         (mips_fill_fpregset_wrapper): Remove functions.
5909         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
5910         (mips_linux_fpregset): Remove variable.
5911         (mips_linux_iterate_over_regset_sections): Use
5912         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
5913         (mips_linux_o32_sigframe_init): Remove comment.
5914
5915 2018-05-25  Pedro Alves  <palves@redhat.com>
5916
5917         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
5918         (struct readahead_cache, struct packet_reg, struct
5919         remote_arch_state, class remote_state): Move higher up in the
5920         file.
5921         (remote_target::m_remote_state): Now an object instead of a pointer.
5922         (remote_target::get_remote_state): Adjust.
5923
5924 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
5925
5926         * stack.c (select_and_print_frame): Delete.
5927         (struct function_bounds): Move struct within function.
5928         (func_command): Most content moved into new function
5929         find_frame_for_function, use new function, print result, add
5930         function comment.
5931         (find_frame_for_function): New function, now returns a result.
5932
5933 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5934
5935         * stack.c (iterate_over_block_arg_vars): Fix comment.
5936         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
5937
5938 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
5939
5940         PR gdb/23203
5941         * frame.c
5942         (scoped_restore_selected_frame::scoped_restore_selected_frame):
5943         Define.
5944         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
5945         Define.
5946         * frame.h (class scoped_restore_selected_frame): New class.
5947         * stack.c (print_frame_local_vars): Remove catching and rethrowing
5948         of any exception, use scoped_restore_selected_frame to restore the
5949         frame instead.
5950
5951 2018-05-24  Pedro Alves  <palves@redhat.com>
5952
5953         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
5954         override.
5955
5956 2018-05-23  Tom Tromey  <tom@tromey.com>
5957
5958         * complaints.c (struct complaints): Remove.
5959         (symfile_complaint_book): Remove.
5960         (series): New global.
5961         (complaint_internal): Update.
5962         (clear_complaints): Update.
5963
5964 2018-05-23  Tom Tromey  <tom@tromey.com>
5965
5966         * complaints.c (counters): New global.
5967         (struct complain): Remove.
5968         (struct complaints) <root>: Remove.
5969         (complaint_sentinel): Remove.
5970         (symfile_complaint_book): Update.
5971         (find_complaint) Remove.
5972         (complaint_internal, clear_complaints): Update.
5973
5974 2018-05-23  Tom Tromey  <tom@tromey.com>
5975
5976         * complaints.c (struct complain) <file, line>: Remove.
5977         (find_complaint): Remove file, line parameters.
5978         (complaint_internal): Update.
5979
5980 2018-05-23  Tom Tromey  <tom@tromey.com>
5981
5982         * complaints.c (vcomplaint): Remove.
5983         (complaint_internal) Merge in contents of vcomplaint.
5984
5985 2018-05-23  Tom Tromey  <tom@tromey.com>
5986
5987         * complaints.c (struct complaints) <explanation>: Remove.
5988         (symfile_explanations): Remove.
5989         (symfile_complaint_book): Update.
5990         (vcomplaint): Update.
5991         (struct explanation): Remove.
5992
5993 2018-05-23  Tom Tromey  <tom@tromey.com>
5994
5995         * complaints.c (symfile_complaints): Remove.
5996         (complaint_internal): Remove "complaints" parameter.
5997         (clear_complaints, vcomplaint): Remove "c" parameter.
5998         (get_complaints): Remove.
5999         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
6000         (dwarf2_debug_line_missing_file_complaint)
6001         (dwarf2_debug_line_missing_end_sequence_complaint)
6002         (dwarf2_complex_location_expr_complaint)
6003         (dwarf2_const_value_length_mismatch_complaint)
6004         (dwarf2_section_buffer_overflow_complaint)
6005         (dwarf2_macro_malformed_definition_complaint)
6006         (dwarf2_invalid_attrib_class_complaint)
6007         (create_addrmap_from_index, dw2_symtab_iter_next)
6008         (dw2_expand_marked_cus)
6009         (dw2_debug_names_iterator::find_vec_in_debug_names)
6010         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
6011         (create_debug_type_hash_table, init_cutu_and_read_dies)
6012         (partial_die_parent_scope, add_partial_enumeration)
6013         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
6014         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
6015         (read_import_statement, read_file_scope, create_dwo_cu_reader)
6016         (create_cus_hash_table, create_dwp_hash_table)
6017         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
6018         (dwarf2_rnglists_process, dwarf2_ranges_process)
6019         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
6020         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
6021         (handle_struct_member_die, process_structure_scope)
6022         (read_array_type, read_common_block, read_module_type)
6023         (read_tag_pointer_type, read_typedef, read_base_type)
6024         (read_subrange_type, load_partial_dies, partial_die_info::read)
6025         (partial_die_info::read, partial_die_info::read)
6026         (partial_die_info::read, read_checked_initial_length_and_offset)
6027         (dwarf2_string_attr, read_formatted_entries)
6028         (dwarf_decode_line_header)
6029         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
6030         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
6031         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
6032         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6033         (get_signatured_type, get_DW_AT_signature_type)
6034         (decode_locdesc, file_file_name, consume_improper_spaces)
6035         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
6036         (dwarf_decode_macro_bytes, dwarf_decode_macros)
6037         (dwarf2_symbol_mark_computed, set_die_type)
6038         (read_attribute_value): Update.
6039         * stap-probe.c (handle_stap_probe, get_stap_base_address):
6040         Update.
6041         * dbxread.c (unknown_symtype_complaint)
6042         (lbrac_mismatch_complaint, repeated_header_complaint)
6043         (set_namestring, function_outside_compilation_unit_complaint)
6044         (read_dbx_symtab, process_one_symbol): Update.
6045         * gdbtypes.c (stub_noname_complaint): Update.
6046         * windows-nat.c (handle_unload_dll): Update.
6047         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
6048         (decode_base_type): Update.
6049         * xcoffread.c (bf_notfound_complaint, ef_complaint)
6050         (eb_complaint, record_include_begin, record_include_end)
6051         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
6052         (process_xcoff_symbol, read_symbol)
6053         (function_outside_compilation_unit_complaint)
6054         (scan_xcoff_symtab): Update.
6055         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
6056         * buildsym.c (finish_block_internal, make_blockvector)
6057         (end_symtab_get_static_block, augment_type_symtab): Update.
6058         * dtrace-probe.c (dtrace_process_dof)
6059         (dtrace_static_probe_ops::get_probes): Update.
6060         * complaints.h (struct complaint): Don't declare.
6061         (symfile_complaints): Remove.
6062         (complaint_internal): Remove "complaints" parameter.
6063         (complaint): Likewise.
6064         (clear_complaints): Likewise.
6065         * symfile.c (syms_from_objfile_1, finish_new_objfile)
6066         (reread_symbols): Update.
6067         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
6068         (dwarf2_frame_cache, decode_frame_entry): Update.
6069         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
6070         * objc-lang.c (lookup_objc_class, lookup_child_selector)
6071         (info_selectors_command): Update.
6072         * macrotab.c (macro_include, check_for_redefinition)
6073         (macro_undef): Update.
6074         * objfiles.c (filter_overlapping_sections): Update.
6075         * stabsread.c (invalid_cpp_abbrev_complaint)
6076         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
6077         (define_symbol, error_type, read_type, rs6000_builtin_type)
6078         (stabs_method_name_from_physname, read_member_functions)
6079         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
6080         (attach_fields_to_type, complain_about_struct_wipeout)
6081         (read_range_type, read_args, common_block_start)
6082         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
6083         Update.
6084         * mdebugread.c (index_complaint, unknown_ext_complaint)
6085         (basic_type_complaint, bad_tag_guess_complaint)
6086         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
6087         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
6088         (parse_procedure, parse_lines)
6089         (function_outside_compilation_unit_complaint)
6090         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
6091         (bad_tag_guess_complaint, reg_value_complaint): Update.
6092         * cp-support.c (demangled_name_complaint): Update.
6093         * macroscope.c (sal_macro_scope): Update.
6094         * dwarf-index-write.c (class debug_names): Update.
6095
6096 2018-05-23  Tom Tromey  <tom@tromey.com>
6097
6098         * complaints.c (clear_complaints): Remove "noisy" parameter.
6099         * complaints.h (clear_complaints): Update.
6100         * symfile.c (syms_from_objfile_1, finish_new_objfile)
6101         (reread_symbols): Update.
6102
6103 2018-05-23  Tom Tromey  <tom@tromey.com>
6104
6105         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
6106         SUBSEQUENT_MESSAGE.
6107         (vcomplaint, clear_complaints): Update.
6108         (symfile_explanations): Remove some messages.
6109
6110 2018-05-23  Tom Tromey  <tom@tromey.com>
6111
6112         * complaints.c (internal_complaint): Remove.
6113         * complaints.h (internal_complaint): Remove.
6114
6115 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
6116
6117         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
6118
6119 2018-05-22  Pedro Alves  <palves@redhat.com>
6120
6121         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
6122         (remote_fileio_badfd, remote_fileio_return_errno)
6123         (remote_fileio_return_success, remote_fileio_func_open)
6124         (remote_fileio_func_open, remote_fileio_func_close)
6125         (remote_fileio_func_read, remote_fileio_func_write)
6126         (remote_fileio_func_lseek, remote_fileio_func_rename)
6127         (remote_fileio_func_unlink, remote_fileio_func_stat)
6128         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
6129         (remote_fileio_func_isatty, remote_fileio_func_system): Add
6130         remote_target parameter.
6131         (remote_fio_func_map) <func>: Add remote_target parameter.
6132         (do_remote_fileio_request, remote_fileio_request):
6133         * remote-fileio.h (remote_fileio_request):
6134         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
6135         remote_target parameter.
6136         (remote_notif_process, handle_notification): Adjust to pass down
6137         the remote.
6138         (remote_notif_state_allocate): Add remote_target parameter.  Save
6139         it.
6140         * remote-notif.h (struct remote_target): Forward declare.
6141         (struct notif_client) <parse, ack, can_get_pending_events>: Add
6142         remote_target parameter.
6143         (struct remote_notif_state) <remote>: New field.
6144         (remote_notif_ack, remote_notif_parse): Add remote_target
6145         parameter.
6146         (remote_notif_state_allocate, remote_notif_state_allocate): Add
6147         remote_target parameter.
6148         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
6149         (threads_listing_context, rmt_thread_action, protocol_feature)
6150         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
6151         (packet_result, struct threads_listing_context, remote_state):
6152         Move definitions and declarations higher up.
6153         (remote_target) <~remote_target>: Declare.
6154         (remote_download_command_source, remote_file_put, remote_file_get)
6155         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
6156         (remote_hostio_pread_vFile, remote_hostio_send_command)
6157         (remote_hostio_set_filesystem, remote_hostio_open)
6158         (remote_hostio_close, remote_hostio_unlink, remote_state)
6159         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
6160         (get_memory_write_packet_size, get_memory_read_packet_size)
6161         (append_pending_thread_resumptions, remote_detach_1)
6162         (append_resumption, remote_resume_with_vcont)
6163         (add_current_inferior_and_thread, wait_ns, wait_as)
6164         (process_stop_reply, remote_notice_new_inferior)
6165         (process_initial_stop_replies, remote_add_thread)
6166         (btrace_sync_conf, remote_btrace_maybe_reopen)
6167         (remove_new_fork_children, kill_new_fork_children)
6168         (discard_pending_stop_replies, stop_reply_queue_length)
6169         (check_pending_events_prevent_wildcard_vcont)
6170         (discard_pending_stop_replies_in_queue, stop_reply)
6171         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
6172         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
6173         (remote_interrupt_as, remote_interrupt_ns)
6174         (remote_get_noisy_reply, remote_query_attached)
6175         (remote_add_inferior, remote_current_thread, get_current_thread)
6176         (set_thread, set_general_thread, set_continue_thread)
6177         (set_general_process, write_ptid)
6178         (remote_unpack_thread_info_response, remote_get_threadinfo)
6179         (parse_threadlist_response, remote_get_threadlist)
6180         (remote_threadlist_iterator, remote_get_threads_with_ql)
6181         (remote_get_threads_with_qxfer)
6182         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
6183         (get_offsets, remote_check_symbols, remote_supported_packet)
6184         (remote_query_supported, remote_packet_size)
6185         (remote_serial_quit_handler, remote_detach_pid)
6186         (remote_vcont_probe, remote_resume_with_hc)
6187         (send_interrupt_sequence, interrupt_query)
6188         (remote_notif_get_pending_events, fetch_register_using_p)
6189         (send_g_packet, process_g_packet, fetch_registers_using_g)
6190         (store_register_using_P, store_registers_using_G)
6191         (set_remote_traceframe, check_binary_download)
6192         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
6193         (remote_xfer_live_readonly_partial, remote_read_bytes)
6194         (remote_send_printf, remote_flash_write, readchar)
6195         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
6196         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
6197         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
6198         (extended_remote_disable_randomization, extended_remote_run)
6199         (send_environment_packet, extended_remote_environment_support)
6200         (extended_remote_set_inferior_cwd, remote_write_qxfer)
6201         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
6202         (packet_command): Now methods of ...
6203         (remote_target): ... this class.
6204         (m_remote_state) <remote_target>: New field.
6205         (struct remote_state) <stop_reply_queue,
6206         remote_async_inferior_event_token, wait_forever_enabled_p>: New
6207         fields.
6208         (remote_state::remote_state): Allocate stop_reply_queue.
6209         (remote_state): Delete global.
6210         (get_remote_state_raw): Delete.
6211         (remote_target::get_remote_state): Allocate m_remote_state on
6212         demand.
6213         (get_current_remote_target): New.
6214         (remote_ops, extended_remote_ops): Delete.
6215         (wait_forever_enabled_p, remote_async_inferior_event_token):
6216         Delete, moved to struct remote_state.
6217         (remote_target::close): Delete self.  Destruction bits split to
6218         ...
6219         (remote_target::~remote_target): ... this.
6220         (show_memory_packet_size): Adjust to use
6221         get_current_remote_target.
6222         (struct protocol_feature) <func>: Add remote_target parameter.
6223         All callers adjusted.
6224         (curr_quit_handler_target): New.
6225         (remote_serial_quit_handler): Reimplement.
6226         (remote_target::open_1): Adjust to use get_current_remote_target.
6227         Heap-allocate remote_target/extended_remote_target instances.
6228         (vcont_builder::vcont_builder): Add remote_target parameter, and
6229         save it in m_remote.  All callers adjusted.
6230         (vcont_builder::m_remote): New field.
6231         (vcont_builder::restart, vcont_builder::flush)
6232         (vcont_builder::push_action): Use it.
6233         (remote_target::commit_resume): Use it.
6234         (struct queue_iter_param) <remote>: New field.
6235         (remote_target::remove_new_fork_children): Fill in 'remote' field.
6236         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
6237         (check_pending_event_prevents_wildcard_vcont_callback)
6238         (remote_target::check_pending_events_prevent_wildcard_vcont)
6239         (remote_target::discard_pending_stop_replies)
6240         (remote_target::discard_pending_stop_replies_in_queue)
6241         (remote_target::remote_notif_remove_queued_reply): Fill in
6242         'remote' field.
6243         (remote_notif_get_pending_events): New.
6244         (remote_target::readchar, remote_target::remote_serial_write):
6245         Save/restore curr_quit_handler_target.
6246         (putpkt): New.
6247         (kill_new_fork_children): Fill in 'remote' field.
6248         (packet_command): Use get_current_remote_target, defer to
6249         remote_target method of same name.
6250         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
6251         parameter, and save it in m_remote.  All callers adjusted.
6252         (scoped_remote_fd::release): Use m_remote.
6253         (scoped_remote_fd::m_remote): New field.
6254         (remote_file_put, remote_file_get, remote_file_delete): Use
6255         get_current_remote_target, defer to remote_target method of same
6256         name.
6257         (remote_btrace_reset): Add remote_state paremeter.  Update all
6258         callers.
6259         (remote_async_inferior_event_handler). Pass down 'data'.
6260         (remote_new_objfile): Use get_current_remote_target.
6261         (remote_target::vcont_r_supported): New.
6262         (set_range_stepping): Use get_current_remote_target and
6263         remote_target::vcont_r_supported.
6264         (_initialize_remote): Don't allocate 'remote_state' and
6265         'stop_reply_queue' globals.
6266         * remote.h (struct remote_target): Forward declare.
6267         (getpkt, putpkt, remote_notif_get_pending_events): Add
6268         'remote_target' parameter.
6269
6270 2018-05-22  Pedro Alves  <palves@redhat.com>
6271
6272         * remote.c (vcont_builder): Now a class.  Make all data members
6273         private.
6274         (vcont_builder) <vcont_builder, restart, flush, push_action>:
6275         Declare methods.
6276         (vcont_builder_restart): Rename to ...
6277         (vcont_builder::restart): ... this.
6278         (vcont_builder_flush): Rename to ...
6279         (vcont_builder::flush): ... this.
6280         (vcont_builder_push_action): Rename to ...
6281         (vcont_builder::push_action): ... this.
6282         (remote_target::commit_resume): Adjust.
6283
6284 2018-05-22  Pedro Alves  <palves@redhat.com>
6285
6286         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
6287         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
6288         (get_fixed_memory_packet_size): New.
6289         (get_memory_packet_size): Use it.
6290         (set_memory_packet_size): Don't override the config size with
6291         DEFAULT_MAX_MEMORY_PACKET_SIZE.
6292         (show_memory_packet_size): Use get_fixed_memory_packet_size.
6293         Don't refer to get_memory_packet_size if not connected to a remote
6294         target.  Show "(default)" if configured size is 0.
6295
6296 2018-05-22  Pedro Alves  <palves@redhat.com>
6297
6298         * remote.c (remote_target::mourn_inferior): Move
6299         discard_pending_stop_replies call here from ...
6300         (_initialize_remote): ... here.
6301
6302 2018-05-22  Pedro Alves  <palves@redhat.com>
6303
6304         * remote.c (compare_section_command): Remove set_general_process
6305         call.
6306
6307 2018-05-22  Pedro Alves  <palves@redhat.com>
6308
6309         * remote.c (struct packet_reg, struct remote_arch_state):
6310         Move higher up in the file.
6311         (remote_state) <m_arch_states>: Store remote_arch_state values
6312         instead of remote_arch_state pointers.
6313         (remote_state::get_remote_arch_state): Adjust.
6314
6315 2018-05-22  Pedro Alves  <palves@redhat.com>
6316
6317         * remote.c: Include <unordered_map>.
6318         (remote_state): Now a class.
6319         (remote_state) <get_remote_arch_state>: Declare method.
6320         <get_remote_arch_state>: New field.
6321         (remote_arch_state) <remote_arch_state>: Declare ctor.
6322         <regs>: Now a unique_ptr.
6323         (remote_gdbarch_data_handle): Delete.
6324         (get_remote_arch_state): Delete.
6325         (remote_state::get_remote_arch_state): New.
6326         (get_remote_state): Adjust to call remote_state's
6327         get_remote_arch_state method.
6328         (init_remote_state): Delete, bits factored out to ...
6329         (remote_arch_state::remote_arch_state): ... this new method.
6330         (get_remote_packet_size, get_memory_packet_size)
6331         (process_g_packet, remote_target::fetch_registers)
6332         (remote_target::prepare_to_store, store_registers_using_G)
6333         (remote_target::store_registers, remote_target::get_trace_status):
6334         Adjust to call remote_state's method.
6335         (_initialize_remote): Remove reference to
6336         remote_gdbarch_data_handle.
6337
6338 2018-05-22  Pedro Alves  <palves@redhat.com>
6339
6340         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
6341         pread>: New method declarations.
6342         (remote_target::open_1): Adjust.
6343         (readahead_cache_invalidate): Rename to ...
6344         (readahead_cache::invalidate): ... this, and adjust to be a class
6345         method.
6346         (readahead_cache_invalidate_fd): Rename to ...
6347         (readahead_cache::invalidate_fd): ... this, and adjust to be a
6348         class method.
6349         (remote_hostio_pwrite): Adjust.
6350         (remote_hostio_pread_from_cache): Rename to ...
6351         (readahead_cache::pread): ... this, and adjust to be a class
6352         method.
6353         (remote_hostio_close): Adjust.
6354
6355 2018-05-22  Pedro Alves  <palves@redhat.com>
6356
6357         * remote.c (remote_hostio_close_cleanup): Delete.
6358         (class scoped_remote_fd): New.
6359         (remote_file_put, remote_file_get): Use it.
6360
6361 2018-05-22  Pedro Alves  <palves@redhat.com>
6362
6363         (struct vCont_action_support): Use bool and initialize all fields.
6364         (struct readahead_cache): Initialize all fields.
6365         (remote_state): Use bool and initialize all fields.
6366         (remote_state::remote_state, remote_state::~remote_state): New.
6367         (new_remote_state): Delete.
6368         (_initialize_remote): Use new to allocate remote_state.
6369
6370 2018-05-22  Pedro Alves  <palves@redhat.com>
6371             張俊芝  <zjz@zjz.name>
6372
6373         PR gdb/22973
6374         * c-exp.y: Include "c-support.h".
6375         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
6376         of tolower.  Use c_ident_is_alpha to scan names.
6377         * c-lang.c: Include "c-support.h".
6378         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
6379         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
6380         * c-support.h: New file, with bits factored out from ...
6381         * cp-name-parser.y: ... this file.
6382         Include "c-support.h".
6383         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
6384         c-support.h and renamed.
6385         (symbol_end, yylex): Adjust.
6386
6387 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6388
6389         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
6390         parameter type to CORE_ADDR.
6391         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
6392         parameter type in declaration to CORE_ADDR.
6393         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
6394         target_auxv_search to get AT_HWCAP and use the result to get the
6395         target description.
6396         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
6397         to CORE_ADDR. Remove the cast of the return value to unsigned
6398         long. Fix error predicate of target_auxv_search.
6399         (ppc_linux_nat_target::read_description): Change the type of the
6400         hwcap variable to CORE_ADDR.
6401
6402 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6403
6404         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
6405         if the size of fpscr is larger than 32 bits.
6406
6407 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6408
6409         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
6410         (ppc32_linux_vsxregmap): New global.
6411         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
6412         regcache_supply_regset, and regcache_collect_regset.
6413         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
6414         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
6415         (fetch_vsx_register, store_vsx_register): Remove.
6416         (fetch_vsx_registers): Add regno parameter. Get regset using
6417         ppc_linux_vsxregset. Use regset to supply registers.
6418         (store_vsx_registers): Add regno parameter. Get regset using
6419         ppc_linux_vsxregset. Use regset to collect registers.
6420         (fetch_register): Call fetch_vsx_registers instead of
6421         fetch_vsx_register.
6422         (store_register): Call store_vsx_registers instead of
6423         store_vsx_register.
6424         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
6425         new regno parameter.
6426         (store_ppc_registers): Call store_vsx_registers with -1 for the
6427         new regno parameter.
6428         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
6429         (ppc_collect_vsxregset): Remove.
6430
6431 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6432
6433         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
6434         offset fields.
6435         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
6436         for vector register offset fields.
6437         (ppc64_fbsd_reg_offsets): Likewise.
6438         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
6439         to vector register offset fields.
6440         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
6441         to vector register offset fields.
6442         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
6443         vector register offset fields.
6444         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
6445         initializers for vector register offset fields.
6446         (rs6000_aix64_reg_offsets): Likewise.
6447         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
6448         (ppc_supply_vrregset): Remove.
6449         (ppc_collect_vrregset): Remove.
6450         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
6451         (ppc_linux_vrregset) : New function.
6452         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
6453         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
6454         (ppc32_linux_vrregset): Remove.
6455         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
6456         and use result instead of ppc32_linux_vrregset.
6457         (ppc32_linux_reg_offsets): Remove initializers for vector register
6458         offset fields.
6459         (ppc64_linux_reg_offsets): Likewise.
6460         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
6461         * ppc-linux-nat.c: Include regset.h.
6462         (gdb_vrregset_t): Adjust comment to account for little-endian
6463         mode.
6464         (supply_vrregset, fill_vrregset): Remove.
6465         (fetch_altivec_register, store_altivec_register): Remove.
6466         (fetch_altivec_registers): Add regno parameter. Get regset using
6467         ppc_linux_vrregset. Use regset to supply registers.
6468         (store_altivec_registers): Add regno parameter. Get regset using
6469         ppc_linux_vrregset. Use regset to collect registers.
6470         (fetch_register): Call fetch_altivec_registers instead of
6471         fetch_altivec_register.
6472         (store_register): Call store_altivec_registers instead of
6473         store_altivec_register.
6474         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
6475         the new regno parameter.
6476         (store_ppc_registers): Call store_altivec_registers with -1 for
6477         the new regno parameter.
6478
6479 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6480
6481         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
6482         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
6483         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
6484         (gdb_vrregset_t): Change array type size to
6485         PPC_LINUX_SIZEOF_VRREGSET.
6486         (gdb_vsxregset_t): Change array type size to
6487         PPC_LINUX_SIZEOF_VSXREGSET.
6488         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
6489         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
6490         PPC_LINUX_SIZEOF_VSXREGSET.
6491
6492 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6493
6494         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
6495         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
6496         nat/ppc-linux.c.
6497         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
6498         ppc_linux_target_wordsize with tid.
6499         (ppc_linux_nat_target::read_description): Call ppc_linux_target
6500         wordsize with tid.
6501         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
6502         (ppc64_64bit_inferior_p): Add static and inline specifiers.
6503         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
6504         tid parameter. Remove static specifier.
6505         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
6506         (ppc_linux_target_wordsize): New declaration.
6507
6508 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6509
6510         * arch/ppc-linux-common.c: New file.
6511         * arch/ppc-linux-common.h: New file.
6512         * arch/ppc-linux-tdesc.h: New file.
6513         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
6514         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
6515         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
6516         arch/ppc-linux-tdesc.h.
6517         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
6518         arch/ppc-linux-tdesc.h.
6519         (ppc_linux_nat_target::read_description): Remove target
6520         description matching code. Fill a ppc_linux_features struct and
6521         call ppc_linux_match_description with it. Move comment about ISA
6522         2.05 to ppc-linux-common.c.
6523         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
6524         arch/ppc-linux-tdesc.h.
6525         (ppc_linux_core_read_description): Remove target description
6526         matching code. Fill a ppc_linux_features struct and call
6527         ppc_linux_match_description with it.
6528         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
6529         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
6530         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
6531         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
6532         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
6533         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
6534         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
6535         (tdesc_powerpc_e500l): Remove.
6536
6537 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
6538
6539         * ada-lang.c (catch_assert_command): Pass empty string instead
6540         of NULL for excep_string argument.
6541
6542 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
6543
6544         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
6545         the width of the requested register exceeds the width of the
6546         `ptrace' data type.
6547
6548 2018-05-21  Tom Tromey  <tom@tromey.com>
6549
6550         * printcmd.c (output_command): Remove.
6551         (output_command_const): Rename to output_command.
6552         * valprint.h (output_command): Rename from output_command_const.
6553         * tracepoint.c (trace_dump_actions): Call output_command.
6554
6555 2018-05-21  Tom Tromey  <tom@tromey.com>
6556
6557         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
6558         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
6559         * ada-lang.h (create_ada_exception_catchpoint): Update.
6560         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
6561         std::string.
6562         (create_excep_cond_exprs, ~ada_catchpoint)
6563         (should_stop_exception, print_one_exception)
6564         (print_mention_exception, print_recreate_exception): Update.
6565         (ada_get_next_arg): Remove.
6566         (catch_ada_exception_command_split): Use std::string.  Change type
6567         of "excep_string", "cond_string".
6568         (catch_ada_exception_command): Update.
6569         (create_ada_exception_catchpoint): Change type of excep_string.
6570         (ada_exception_sal): Remove excep_string parameter.
6571         (~ada_catchpoint): Remove.
6572
6573 2018-05-21  Tom Tromey  <tom@tromey.com>
6574
6575         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
6576         cleanup.
6577
6578 2018-05-21  Tom Tromey  <tom@tromey.com>
6579
6580         * ada-lang.c (ada_exception_message_1, ada_exception_message):
6581         Return unique_xmalloc_ptr.
6582         (print_it_exception): Update.
6583
6584 2018-05-21  Tom Tromey  <tom@tromey.com>
6585
6586         * tracepoint.c (trace_dump_actions): Use std::string.
6587
6588 2018-05-21  Tom Tromey  <tom@tromey.com>
6589
6590         * symfile.c (reread_symbols): Use std::string for original_name.
6591
6592 2018-05-21  Tom Tromey  <tom@tromey.com>
6593
6594         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
6595         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
6596         constructor.
6597
6598 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
6599
6600         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
6601         instance to...
6602         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
6603         * objfiles.c (get_objfile_bfd_data): Allocate
6604         objfile_per_bfd_storage with obstack_new when allocating on
6605         obstack.
6606
6607 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
6608
6609         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
6610         OBSTACK_ZALLOC.
6611         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
6612         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
6613         * mdebugread.c (mdebug_build_psymtabs): Likewise.
6614         (add_pending): Likewise.
6615         (parse_symbol): Likewise.
6616         (parse_partial_symbols): Likewise.
6617         (psymtab_to_symtab_1): Likewise.
6618         (new_psymtab): Likewise.
6619         (elfmdebug_build_psymtabs): Likewise.
6620         * minsyms.c (terminate_minimal_symbol_table): Likewise.
6621         * objfiles.c (get_objfile_bfd_data): Likewise.
6622         (objfile_register_static_link): Likewise.
6623         * psymtab.c (allocate_psymtab): Likewise.
6624         * stabsread.c (read_member_functions): Likewise.
6625         * xcoffread.c (xcoff_end_psymtab): Likewise.
6626
6627 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
6628
6629         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
6630         compiler supports std::is_trivially_constructible.
6631         * common/poison.h: Include obstack.h.
6632         (IsMallocable): Define to is_trivially_constructible if the
6633         compiler supports it, define to true_type otherwise.
6634         (xobnew): New.
6635         (XOBNEW): Redefine.
6636         (xobnewvec): New.
6637         (XOBNEWVEC): Redefine.
6638         * gdb_obstack.h (obstack_zalloc): New.
6639         (OBSTACK_ZALLOC): Redefine.
6640         (obstack_calloc): New.
6641         (OBSTACK_CALLOC): Redefine.
6642         (obstack_new): New.
6643         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
6644         (gdbarch_obstack): New declaration in gdbarch.h, definition in
6645         gdbarch.c.
6646         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
6647         obstack_calloc/obstack_zalloc.
6648         (gdbarch_obstack_zalloc): Remove.
6649         * target-descriptions.c (tdesc_data_init): Use obstack_new.
6650
6651 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6652
6653         * stack.c (backtrace_command_1): Remove useless variable int i.
6654
6655 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6656
6657         * stack.c (print_frame_info): Fix comment.
6658
6659 2018-05-18  Tom Tromey  <tom@tromey.com>
6660
6661         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
6662         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
6663         (~dwarf2_per_objfile): Update
6664         (dwarf2_get_dwz_file): Use new.
6665         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
6666         unique_ptr.
6667
6668 2018-05-18  Tom Tromey  <tom@tromey.com>
6669
6670         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
6671         unique_ptr.
6672         * dwarf2read.c (struct dwp_file): Add constructor and
6673         initializers.
6674         (open_and_init_dwp_file): Return a unique_ptr.
6675         (dwarf2_per_objfile, create_dwp_hash_table)
6676         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
6677         (lookup_dwo_unit_in_dwp): Update.
6678         (open_and_init_dwp_file, get_dwp_file): Update.
6679
6680 2018-05-18  Tom Tromey  <tom@tromey.com>
6681
6682         * dwarf2read.c (dwarf2_per_objfile): Update.
6683         (struct mapped_index): Add initializers.
6684         (dwarf2_read_index): Use new.
6685         (dw2_symtab_iter_init): Update.
6686         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
6687         unique_ptr.
6688
6689 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
6690
6691         * dwarf2read.c (mapped_index) <total_size>: Remove.
6692
6693 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
6694
6695         * unittests/format_pieces-selftests.c (test_format_specifier):
6696         Add ARI comments.
6697
6698 2018-05-18  Tom Tromey  <tom@tromey.com>
6699
6700         * c-typeprint.c (maybe_print_hole): New function.
6701         (c_print_type_struct_field_offset): Update.
6702         (c_type_print_base_struct_union): Call maybe_print_hole.
6703
6704 2018-05-17  Keith Seitz  <keiths@redhat.com>
6705
6706         * breakpoint.c (build_bpstat_chain): New function, moved from
6707         bpstat_stop_status.
6708         (bpstat_stop_status): Add optional parameter, `stop_chain'.
6709         If no stop chain is passed, call build_bpstat_chain to build it.
6710         * breakpoint.h (build_bpstat_chain): Declare.
6711         (bpstat_stop_status): Move documentation here from breakpoint.c.
6712         * infrun.c (handle_signal_stop): Before eliding inlined frames,
6713         build the stop chain and pass it to skip_inline_frames.
6714         Pass this stop chain to bpstat_stop_status.
6715         * inline-frame.c: Include breakpoint.h.
6716         (stopped_by_user_bp_inline_frame): New function.
6717         (skip_inline_frames): Add parameter `stop_chain'.
6718         Move documention to inline-frame.h.
6719         If non-NULL, use stopped_by_user_bp_inline_frame to determine
6720         whether the frame should be elided.
6721         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
6722         Add moved documentation and update for new parameter.
6723
6724 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
6725
6726         PR cli/14975
6727         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6728         unittests/format_pieces-selftests.c.
6729         * common/format.h (format_piece) <operator==>: New.
6730         (format_pieces) <operator[]>: Remove.
6731         * common/format.c (format_pieces::format_pieces): Handle \e.
6732         * unittests/format_pieces-selftests.c: New.
6733
6734 2018-05-17  Tom Tromey  <tom@tromey.com>
6735
6736         PR symtab/23010:
6737         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
6738         (dw2_instantiate_symtab): Add skip_partial parameter.
6739         (dw2_find_last_source_symtab, dw2_map_expand_apply)
6740         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
6741         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
6742         (dw2_expand_symtabs_matching_one)
6743         (dw2_find_pc_sect_compunit_symtab)
6744         (dw2_debug_names_lookup_symbol)
6745         (dw2_debug_names_expand_symtabs_for_function): Update.
6746         (init_cutu_and_read_dies): Add skip_partial parameter.
6747         (process_psymtab_comp_unit, build_type_psymtabs_1)
6748         (process_skeletonless_type_unit, load_partial_comp_unit)
6749         (psymtab_to_symtab_1): Update.
6750         (load_full_comp_unit): Add skip_partial parameter.
6751         (process_imported_unit_die, dwarf2_read_addr_index)
6752         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
6753         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
6754         (read_signatured_type): Update.
6755
6756 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
6757
6758         * value.c (release_value): Remove unused variable.
6759         (record_latest_value): Likewise.
6760         (access_value_history): Likewise.
6761         (preserve_values): Likewise.
6762
6763 2018-05-17  Tom Tromey  <tom@tromey.com>
6764
6765         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
6766         Initialize.
6767
6768 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
6769
6770         PR gdb/22286
6771         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
6772         Also handle registers whose width is not a multiple of
6773         PTRACE_TYPE_RET.
6774         (linux_nat_trad_target::store_register): Likewise.
6775
6776 2018-05-16  Tom Tromey  <tom@tromey.com>
6777
6778         * gdbcore.h (core_bfd): Redefine.
6779         * corelow.c (core_target::close): Update.
6780         (core_target_open): Update.
6781         * progspace.h (struct program_space) <cbfd>: Now a
6782         gdb_bfd_ref_ptr.
6783
6784 2018-05-16  Tom Tromey  <tom@tromey.com>
6785
6786         PR cli/19551:
6787         * symfile-add-flags.h (enum symfile_add_flags)
6788         <SYMFILE_NOT_FILENAME>: New constant.
6789         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
6790         objfile name from BFD.
6791         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
6792         * minidebug.c (find_separate_debug_file_in_section): Put
6793         ".gnu_debugdata" into BFD's file name.
6794
6795 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
6796
6797         * regcache.c (regcache_read_ftype, regcache_write_ftype):
6798         Remove.
6799
6800 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
6801
6802         PR binutils/21446
6803         * aarch64-tdep.c (aarch64_analyze_prologue,
6804         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
6805         Indicate not interested in errors.
6806
6807 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
6808
6809         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
6810         Supply the MIPS_ZERO_REGNUM register.
6811
6812 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
6813
6814         * mips-tdep.c (mask_address_var): Make variable static.
6815
6816 2018-05-14  Tom Tromey  <tom@tromey.com>
6817
6818         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
6819
6820 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
6821
6822         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
6823         FXSAVE_ADDR for the mxcsr register.
6824
6825 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
6826
6827         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
6828
6829 2018-05-11  Pedro Alves  <palves@redhat.com>
6830
6831         * corelow.c (core_target) <core_target>: No longer inline.
6832         Initialize m_core_gdbarch, m_core_vec and build the section table
6833         here.
6834         <~core_target>: New.
6835         <core_gdbarch, get_core_register_section>: New methods.
6836         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
6837         factored out from ...
6838         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
6839         (core_ops): Delete.
6840         (sniff_core_bfd): Add gdbarch parameter.
6841         (core_close): Delete, merged into ...
6842         (core_target::close): ... here.  Delete self.
6843         (core_close_cleanup): Delete.
6844         (core_target_open): Allocate a core_target on the heap.  Use a
6845         unique_ptr instead of a cleanup.  Bits moved into the core_target
6846         ctor.  Adjust to use core_target methods instead of globals.
6847         (get_core_register_section): Rename to ...
6848         (core_target::get_core_register_section): ... this and adjust.
6849         (struct get_core_registers_cb_data): New.
6850         (get_core_registers_cb): Use it.  Use bool.
6851         (core_target::fetch_registers, core_target::files_info)
6852         (core_target::xfer_partial, core_target::read_description)
6853         (core_target::pid_to, core_target::thread_name): Adjust to
6854         reference class fields instead of globals.
6855         * target.h (struct target_ops_deleter, target_ops_up): New.
6856
6857 2018-05-11  Pedro Alves  <palves@redhat.com>
6858
6859         * corefile.c (core_file_command): Move to corelow.c.
6860         * corelow.c (the_core_target): Delete.
6861         (core_file_command): Moved from corefile.c.  Check exec_bfd
6862         instead of the_core_target.  Use target_detach instead of calling
6863         into the_core_target directly.
6864         (maybe_say_no_core_file_now): New.
6865         (core_target::detach): Use it.
6866         (_initialize_corelow): Remove references to the_core_target.
6867         * gdbcore.h (the_core_target): Delete.
6868
6869 2018-05-11  Tom Tromey  <tromey@redhat.com>
6870             Pedro Alves  <palves@redhat.com>
6871
6872         * corefile.c (core_bfd): Remove.
6873         * gdbcore.h (core_bfd): Now a macro.
6874         * progspace.h (struct program_space) <cbfd>: New field.
6875
6876 2018-05-11  Tom Tromey  <tom@tromey.com>
6877
6878         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
6879         gdb::def_vector.
6880
6881 2018-05-10  Tom Tromey  <tom@tromey.com>
6882
6883         * configure: Rebuild.
6884         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
6885
6886 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
6887
6888         PR server/23158:
6889         * regformats/regdat.sh: Adjust script, following the addition
6890         of the new expedite_regs parameter to init_target_desc.
6891
6892 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
6893     
6894         PR gdb/23127
6895         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
6896         set_gdbarch_significant_addr_bit.
6897         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
6898         set_gdbarch_significant_addr_bit.
6899         * utils.c (address_significant): Update to sign extend addr.
6900
6901 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
6902
6903         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
6904         (xtensa_linux_init_abi): Limit tdep->num_regs by
6905         tdep->num_nopriv_regs.
6906         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
6907         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
6908         not initialized.
6909
6910 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
6911
6912         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
6913
6914 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
6915
6916         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
6917         (I387_MXCSR_INIT_VAL): New constant.
6918         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
6919         buffer if it was supplied by the inferior.
6920         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
6921         (i387_xsave_get_clear_bv): New function.
6922         (i387_supply_xsave): Only read x87 control registers from the
6923         xsave buffer if the feature is enabled, and the state will have
6924         been written, otherwise, provide a suitable default.
6925         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
6926         including x87 control registers.  Update control registers if they
6927         have changed from the default value, and mark features as enabled
6928         as required.
6929         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
6930
6931 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
6932
6933         * spu-tdep.c (info_spu_event_command): Fix output formatting.
6934
6935 2018-05-07  Tom Tromey  <tom@tromey.com>
6936
6937         * configure: Rebuild.
6938         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
6939
6940 2018-05-07  Tom Tromey  <tom@tromey.com>
6941
6942         PR tdep/20362:
6943         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
6944         bit.  Use correct value for VDIV.
6945
6946 2018-05-04  Tom Tromey  <tom@tromey.com>
6947
6948         * configure: Rebuild.
6949         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
6950
6951 2018-05-04  Tom Tromey  <tom@tromey.com>
6952
6953         * linux-record.c (record_linux_system_call) <case
6954         RECORD_SYS_RECVFROM>: Add "break".
6955
6956 2018-05-04  Tom Tromey  <tom@tromey.com>
6957
6958         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
6959         Add missing "break".
6960         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
6961         Add missing "break".
6962
6963 2018-05-04  Tom Tromey  <tom@tromey.com>
6964
6965         * rs6000-tdep.c (ppc_process_record_op4)
6966         (ppc_process_record_op63): Add fall-through comment.
6967
6968 2018-05-04  Tom Tromey  <tom@tromey.com>
6969
6970         * i386-tdep.c (i386_process_record): Add fall-through comment.
6971
6972 2018-05-04  Tom Tromey  <tom@tromey.com>
6973
6974         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
6975         comment.
6976
6977 2018-05-04  Tom Tromey  <tom@tromey.com>
6978
6979         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
6980         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
6981         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
6982         comment.
6983         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
6984         comment.
6985         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
6986         comment.
6987
6988 2018-05-04  Tom Tromey  <tom@tromey.com>
6989
6990         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
6991
6992 2018-05-04  Tom Tromey  <tom@tromey.com>
6993
6994         * s390-tdep.c (s390_process_record): Fix fall-through comments.
6995         * xcoffread.c (scan_xcoff_symtab): Move comment later.
6996         * symfile.c (section_is_mapped): Fix fall-through comment.
6997         * stabsread.c (define_symbol, read_member_functions): Fix
6998         fall-through comment.
6999         * s390-linux-tdep.c (s390_process_record): Fix fall-through
7000         comment.
7001         * remote.c (remote_wait_as): Fix fall-through comment.
7002         * p-exp.y (yylex): Fix fall-through comment.
7003         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
7004         comment.
7005         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
7006         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
7007         * jv-exp.y (yylex): Fix fall-through comment.
7008         * go-exp.y (lex_one_token): Fix fall-through comment.
7009         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
7010         fall-through comment.
7011         * f-exp.y (yylex): Fix fall-through comment.
7012         * dwarf2read.c (process_die): Fix fall-through comments.
7013         * dbxread.c (process_one_symbol): Fix fall-through comment.
7014         * d-exp.y (lex_one_token): Fix fall-through comment.
7015         * cp-name-parser.y (yylex): Fix fall-through comment.
7016         * coffread.c (coff_symtab_read): Fix fall-through comment.
7017         * c-exp.y (lex_one_token): Fix fall-through comment.
7018         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
7019         comment.
7020         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
7021         comment.
7022
7023 2018-05-04  Tom Tromey  <tom@tromey.com>
7024
7025         PR python/22730:
7026         * NEWS: Mention gdb.execute change.
7027         * gdbcmd.h (execute_control_command): Don't declare.
7028         * python/python.c (execute_gdb_command): Use read_command_lines_1,
7029         execute_control_commands, execute_control_commands_to_string.
7030         * cli/cli-script.h (execute_control_commands)
7031         (execute_control_commands_to_string): Declare.
7032         (execute_control_command): Add from_tty parameter.
7033         * cli/cli-script.c (execute_control_commands)
7034         (execute_control_commands_to_string): New functions.
7035         (execute_user_command): Use execute_control_commands.
7036         (execute_control_command_1): Add "from_tty" parameter.  Update.
7037         (execute_control_command): Likewise.
7038
7039 2018-05-04  Tom Tromey  <tom@tromey.com>
7040
7041         PR python/22731:
7042         * NEWS: Mention that breakpoint commands are writable.
7043         * python/py-breakpoint.c (bppy_set_commands): New function.
7044         (breakpoint_object_getset) <"commands">: Use it.
7045
7046 2018-05-04  Tom Tromey  <tom@tromey.com>
7047
7048         * tracepoint.c (actions_command): Update.
7049         * mi/mi-cmd-break.c (mi_command_line_array)
7050         (mi_command_line_array_cnt, mi_command_line_array_ptr)
7051         (mi_read_next_line): Remove.
7052         (mi_cmd_break_commands): Update.
7053         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
7054         function_view.
7055         * cli/cli-script.c (get_command_line): Update.
7056         (process_next_line): Use function_view.  Constify.
7057         (recurse_read_control_structure, read_command_lines)
7058         (read_command_lines_1): Change argument types to function_view.
7059         (do_define_command, document_command): Update.
7060         * breakpoint.h (check_tracepoint_command): Don't declare.
7061         * breakpoint.c (check_tracepoint_command): Remove.
7062         (commands_command_1, create_tracepoint_from_upload): Update.
7063
7064 2018-05-04  Tom Tromey  <tom@tromey.com>
7065
7066         PR gdb/11750:
7067         * cli/cli-script.h (enum command_control_type) <define_control>:
7068         New constant.
7069         * cli/cli-script.c (multi_line_command_p): Handle define_control.
7070         (build_command_line, execute_control_command_1)
7071         (process_next_line): Likewise.
7072         (do_define_command): New function, extracted from define_command.
7073         (define_command): Use it.
7074
7075 2018-05-04  Tom Tromey  <tom@tromey.com>
7076
7077         * tracepoint.c (actions_command): Update.
7078         * cli/cli-script.h (read_command_lines): Update.
7079         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
7080         (MAX_TMPBUF): Remove define.
7081         (define_command): Use string_printf.
7082         (document_command): Likewise.
7083         * breakpoint.c (commands_command_1): Update.
7084
7085 2018-05-04  Tom Tromey  <tom@tromey.com>
7086
7087         * top.c (execute_command): Update.
7088         * cli/cli-script.h (print_command_lines): Now varargs.
7089         * cli/cli-script.c (print_command_lines): Now varargs.
7090         (execute_control_command_1) <case while_control, case if_control>:
7091         Update.
7092
7093 2018-05-04  Tom Tromey  <tom@tromey.com>
7094
7095         * tracepoint.c (all_tracepoint_actions): Rename from
7096         all_tracepoint_actions_and_cleanup.  Change return type.
7097         (actions_command, encode_actions_1, encode_actions)
7098         (trace_dump_actions, tdump_command): Update.
7099         * remote.c (remote_download_command_source): Update.
7100         * python/python.c (gdbpy_eval_from_control_command)
7101         (python_command, python_interactive_command): Update.
7102         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
7103         * guile/guile.c (guile_command)
7104         (gdbscm_eval_from_control_command, guile_command): Update.
7105         * compile/compile.c (compile_code_command)
7106         (compile_print_command, compile_to_object): Update.
7107         * cli/cli-script.h (struct command_lines_deleter): New.
7108         (counted_command_line): New typedef.
7109         (struct command_line): Add constructor, destructor.
7110         <body_list>: Remove.
7111         <body_list_0, body_list_1>: New members.
7112         (command_line_up): Remove typedef.
7113         (read_command_lines, read_command_lines_1, get_command_line):
7114         Update.
7115         (copy_command_lines): Don't declare.
7116         * cli/cli-script.c (build_command_line): Use "new".
7117         (get_command_line): Return counted_command_line.
7118         (print_command_lines, execute_user_command)
7119         (execute_control_command_1, while_command, if_command): Update.
7120         (realloc_body_list): Remove.
7121         (process_next_line, recurse_read_control_structure): Update.
7122         (read_command_lines, read_command_lines_1): Return counted_command_line.
7123         (free_command_lines): Use "delete".
7124         (copy_command_lines): Remove.
7125         (define_command, document_command, show_user_1): Update.
7126         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
7127         a counted_command_line.
7128         * breakpoint.h (counted_command_line): Remove typedef.
7129         (breakpoint_set_commands): Update.
7130         * breakpoint.c (check_no_tracepoint_commands)
7131         (validate_commands_for_breakpoint): Update.
7132         (breakpoint_set_commands): Change commands to be a
7133         counted_command_line.
7134         (commands_command_1, update_dprintf_command_list)
7135         (create_tracepoint_from_upload): Update.
7136
7137 2018-05-04  Tom Tromey  <tom@tromey.com>
7138
7139         * cli/cli-decode.h (cmd_list_element): New constructor.
7140         (~cmd_list_element): New destructor.
7141         (struct cmd_list_element): Add initializers.
7142         * cli/cli-decode.c (do_add_cmd): Use "new".
7143         (delete_cmd): Use "delete".
7144
7145 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
7146             Pedro Alves <palves@redhat.com>
7147
7148         PR breakpoints/19806 and support for PR external/20207.
7149         * NEWS: Mention Aarch64 watchpoint improvements.
7150         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
7151         watchpoints and PR external/20207 watchpoints.
7152         * nat/aarch64-linux-hw-point.c
7153         (kernel_supports_any_contiguous_range): New.
7154         (aarch64_watchpoint_offset): New.
7155         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
7156         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
7157         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
7158         (aarch64_align_watchpoint): New parameters aligned_offset_p and
7159         next_addr_orig_p.  Support PR external/20207 watchpoints.
7160         (aarch64_downgrade_regs): New.
7161         (aarch64_dr_state_insert_one_point): New parameters offset and
7162         addr_orig.
7163         (aarch64_dr_state_remove_one_point): Likewise.
7164         (aarch64_handle_breakpoint): Update caller.
7165         (aarch64_handle_aligned_watchpoint): Likewise.
7166         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
7167         aligned_offset.
7168         (aarch64_linux_set_debug_regs): Remove const from state.  Call
7169         aarch64_downgrade_regs.
7170         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
7171         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
7172         (DR_CONTROL_MASK): ... this.
7173         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
7174         (unsigned int aarch64_watchpoint_offset): New prototype.
7175         (aarch64_linux_set_debug_regs): Remove const from state.
7176         * utils.c (align_up, align_down): Move to ...
7177         * common/common-utils.c (align_up, align_down): ... here.
7178         * utils.h (align_up, align_down): Move to ...
7179         * common/common-utils.h (align_up, align_down): ... here.
7180
7181 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
7182
7183         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
7184         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
7185         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
7186         Re-implement to match the ABI as summarized in GCC's
7187         gcc/config/sparc/sparc.c.  All callers updated.
7188         (sparc32_store_arguments): Remove assertion.
7189
7190 2018-05-04  Tom Tromey  <tom@tromey.com>
7191
7192         * printcmd.c: Don't include tui.h.
7193         (decode_format): Use skip_spaces.
7194
7195 2018-05-04  Tom Tromey  <tom@tromey.com>
7196
7197         PR gdb/22619:
7198         * printcmd.c (last_count): New global.
7199         (x_command): Use saved count when repeating.
7200
7201 2018-05-04  Tom Tromey  <tom@tromey.com>
7202
7203         * nto-procfs.c (do_closedir_cleanup): Remove.
7204         (procfs_pidlist): Use gdb_dir_up.
7205         * procfs.c (do_closedir_cleanup): Remove.
7206         (proc_update_threads): Use gdb_dir_up.
7207         * common/filestuff.h (struct gdb_dir_deleter): New.
7208         (gdb_dir_up): New typedef.
7209
7210 2018-05-04  Tom Tromey  <tom@tromey.com>
7211
7212         * ada-lang.c (print_mention_exception): Use std::string.
7213
7214 2018-05-04  Tom Tromey  <tom@tromey.com>
7215
7216         * ada-lang.c (create_excep_cond_exprs): Update.
7217         (ada_exception_catchpoint_cond_string): Use std::string.
7218
7219 2018-05-04  Tom Tromey  <tom@tromey.com>
7220
7221         * ada-lang.c (xget_renaming_scope): Return std::string.
7222         (old_renaming_is_invisible): Update.
7223
7224 2018-05-04  Tom Tromey  <tom@tromey.com>
7225
7226         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
7227         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
7228
7229 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
7230
7231         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
7232
7233 2018-05-04  Tom Tromey  <tom@tromey.com>
7234
7235         * remote.c (remote_query_supported_append): Change type.
7236         (remote_check_symbols): Update.
7237
7238 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
7239
7240         PR gdb/11420
7241         * configure.ac: Prepend libpython.
7242         * python/python-config.py: Likewise.
7243         * configure: Regenerate.
7244
7245 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
7246
7247         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
7248
7249 2018-05-03  Pedro Alves  <palves@redhat.com>
7250
7251         * s390-linux-nat.c
7252         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
7253         override.  Write 'true' instead of '1'.
7254         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
7255         declaration.
7256
7257 2018-05-02  Pedro Alves  <palves@redhat.com>
7258
7259         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
7260         add_inf_child_target.
7261         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
7262         add_inf_child_target.
7263         * aix-thread.c (aix_thread_target_info): New.
7264         (aix_thread_target) <shortname, longname, doc>: Delete.
7265         <info>: New.
7266         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
7267         add_inf_child_target.
7268         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
7269         add_inf_child_target.
7270         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
7271         add_inf_child_target.
7272         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
7273         add_inf_child_target.
7274         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
7275         add_inf_child_target.
7276         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
7277         add_inf_child_target.
7278         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
7279         add_inf_child_target.
7280         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
7281         add_inf_child_target.
7282         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
7283         add_inf_child_target.
7284         * bfd-target.c (target_bfd_target_info): New.
7285         (target_bfd) <shortname, longname, doc>: Delete.
7286         <info>: New.
7287         * bsd-kvm.c (bsd_kvm_target_info): New.
7288         (bsd_kvm_target) <shortname, longname, doc>: Delete.
7289         <info>: New.
7290         (bsd_kvm_target::open): Rename to ...
7291         (bsd_kvm_target_open): ... this.  Adjust.
7292         * bsd-uthread.c (bsd_uthread_target_info): New.
7293         (bsd_uthread_target) <shortname, longname, doc>: Delete.
7294         <info>: New.
7295         * corefile.c (core_file_command): Adjust.
7296         * corelow.c (core_target_info): New.
7297         (core_target) <shortname, longname, doc>: Delete.
7298         <info>: New.
7299         (core_target::open): Rename to ...
7300         (core_target_open): ... this.  Adjust.
7301         * ctf.c (ctf_target_info): New.
7302         (ctf_target) <shortname, longname, doc>: Delete.
7303         <info>: New.
7304         (ctf_target::open): Rename to ...
7305         (ctf_target_open): ... this.
7306         (_initialize_ctf): Adjust.
7307         * exec.c (exec_target_info): New.
7308         (exec_target) <shortname, longname, doc>: Delete.
7309         <info>: New.
7310         (exec_target::open): Rename to ...
7311         (exec_target_open): ... this.
7312         * gdbcore.h (core_target_open): Declare.
7313         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
7314         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
7315         add_inf_child_target.
7316         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
7317         add_inf_child_target.
7318         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
7319         add_inf_child_target.
7320         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
7321         add_inf_child_target.
7322         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
7323         add_inf_child_target.
7324         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
7325         add_inf_child_target.
7326         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
7327         add_inf_child_target.
7328         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
7329         add_inf_child_target.
7330         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
7331         add_inf_child_target.
7332         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
7333         add_inf_child_target.
7334         * inf-child.c (inf_child_target_info): New.
7335         (inf_child_target::info): New.
7336         (inf_child_open_target): Remove 'target' parameter.  Use
7337         get_native_target instead.
7338         (inf_child_target::open): Delete.
7339         (add_inf_child_target): New.
7340         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
7341         Delete.
7342         <info>: New.
7343         (add_inf_child_target): Declare.
7344         (inf_child_open_target): Declare.
7345         * linux-thread-db.c (thread_db_target_info): New.
7346         (thread_db_target) <shortname, longname, doc>: Delete.
7347         <info>: New.
7348         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
7349         add_inf_child_target.
7350         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
7351         add_inf_child_target.
7352         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
7353         add_inf_child_target.
7354         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
7355         add_inf_child_target.
7356         * make-target-delegates (print_class): Adjust.
7357         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
7358         add_inf_child_target.
7359         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
7360         add_inf_child_target.
7361         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
7362         add_inf_child_target.
7363         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
7364         add_inf_child_target.
7365         * nto-procfs.c (nto_native_target_info): New.
7366         (nto_procfs_target_native) <shortname, longname, doc>:
7367         Delete.
7368         <info>: New.
7369         (nto_procfs_target_info): New.
7370         (nto_procfs_target_procfs) <shortname, longname, doc>:
7371         Delete.
7372         <info>: New.
7373         (init_procfs_targets): Adjust.
7374         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
7375         add_inf_child_target.
7376         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
7377         add_inf_child_target.
7378         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
7379         add_inf_child_target.
7380         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
7381         add_inf_child_target.
7382         * ravenscar-thread.c (ravenscar_target_info): New.
7383         (ravenscar_thread_target) <shortname, longname, doc>:
7384         Delete.
7385         <info>: New.
7386         * record-btrace.c (record_btrace_target_info):
7387         (record_btrace_target) <shortname, longname, doc>: Delete.
7388         <info>: New.
7389         (record_btrace_target::open): Rename to ...
7390         (record_btrace_target_open): ... this.  Adjust.
7391         * record-full.c (record_longname, record_doc): New.
7392         (record_full_base_target) <shortname, longname, doc>: Delete.
7393         <info>: New.
7394         (record_full_target_info): New.
7395         (record_full_target): <shortname>: Delete.
7396         <info>: New.
7397         (record_full_core_open_1, record_full_open_1): Update comments.
7398         (record_full_base_target::open): Rename to ...
7399         (record_full_open): ... this.
7400         (cmd_record_full_restore): Update.
7401         (_initialize_record_full): Update.
7402         * remote-sim.c (remote_sim_target_info): New.
7403         (gdbsim_target) <shortname, longname, doc>: Delete.
7404         <info>: New.
7405         (gdbsim_target::open): Rename to ...
7406         (gdbsim_target_open): ... this.
7407         (_initialize_remote_sim): Adjust.
7408         * remote.c (remote_doc): New.
7409         (remote_target_info): New.
7410         (remote_target) <shortname, longname, doc>: Delete.
7411         <info>: New.
7412         (extended_remote_target_info): New.
7413         (extended_remote_target) <shortname, longname, doc>: Delete.
7414         <info>: New.
7415         (remote_target::open_1): Make static.  Adjust.
7416         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
7417         * s390-linux-nat.c (_initialize_s390_nat): Use
7418         add_inf_child_target.
7419         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
7420         add_inf_child_target.
7421         * sol-thread.c (thread_db_target_info): New.
7422         (sol_thread_target) <shortname, longname, doc>: Delete.
7423         <info>: New.
7424         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
7425         add_inf_child_target.
7426         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
7427         add_inf_child_target.
7428         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
7429         add_inf_child_target.
7430         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
7431         add_inf_child_target.
7432         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
7433         add_inf_child_target.
7434         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
7435         add_inf_child_target.
7436         * spu-linux-nat.c (_initialize_spu_nat): Use
7437         add_inf_child_target.
7438         * spu-multiarch.c (spu_multiarch_target_info): New.
7439         (spu_multiarch_target) <shortname, longname, doc>: Delete.
7440         <info>: New.
7441         * target-delegates.c: Regenerate.
7442         * target.c: Include <unordered_map>.
7443         (target_ops_p): Delete.
7444         (DEF_VEC_P(target_ops_p)): Delete.
7445         (target_factories): New.
7446         (test_target_info): New.
7447         (test_target_ops::info): New.
7448         (open_target): Adjust to use target_factories.
7449         (add_target_with_completer): Rename to ...
7450         (add_target): ... this.  Change prototype.  Register target_info
7451         and open callback in target_factories.  Register target_info in
7452         command context instead of target_ops.
7453         (add_target): Delete old implementation.
7454         (add_deprecated_target_alias): Change prototype.  Adjust.
7455         (the_native_target): New.
7456         (set_native_target, get_native_target): New.
7457         (find_default_run_target): Use the_native_target.
7458         (find_attach_target, find_run_target): Simplify.
7459         (target_ops::open): Delete.
7460         (dummy_target_info): New.
7461         (dummy_target::shortname, dummy_target::longname)
7462         (dummy_target::doc): Delete.
7463         (dummy_target::info): New.
7464         (debug_target::shortname, debug_target::longname)
7465         (debug_target::doc): Delete.
7466         (debug_target::info): New.
7467         * target.h (struct target_info): New.
7468         (target_ops::~target_ops): Add comment.
7469         (target_ops::info): New.
7470         (target_ops::shortname, target_ops::longname, target_ops::doc): No
7471         longer virtual.  Implement in terms of target_info.
7472         (set_native_target, get_native_target): Declare.
7473         (target_open_ftype): New.
7474         (add_target, add_target_with_completer)
7475         (add_deprecated_target_alias): Change prototype.
7476         (test_target) <shortname, longname, doc>: Delete.
7477         <info>: New.
7478         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
7479         add_inf_child_target.
7480         * tracefile-tfile.c (tfile_target_info): New.
7481         (tfile_target) <shortname, longname, doc>: Delete.
7482         <info>: New.
7483         (tfile_target::open): Rename to ...
7484         (tfile_target_open): ... this.
7485         (_initialize_tracefile_tfile): Adjust.
7486         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
7487         add_inf_child_target.
7488         * windows-nat.c (_initialize_windows_nat): Use
7489         add_inf_child_target.
7490         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
7491         add_inf_child_target.
7492
7493 2018-05-02  Pedro Alves  <palves@redhat.com>
7494
7495         * linux-nat.h (linux_nat_target) <low_new_thread,
7496         low_delete_thread, low_new_fork, low_forget_process,
7497         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
7498         New virtual methods.
7499         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
7500         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
7501         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
7502         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
7503         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
7504         Delete.
7505         * linux-fork.c (delete_fork): Adjust to call low method.
7506         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
7507         (linux_nat_new_fork, linux_nat_forget_process_hook)
7508         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
7509         (linux_nat_status_is_event):
7510         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
7511         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
7512         to call low method.
7513         (sigtrap_is_event): Rename to ...
7514         (linux_nat_target::low_status_is_event): ... this.
7515         (linux_nat_set_status_is_event): Delete.
7516         (save_stop_reason, linux_nat_wait_1)
7517         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
7518         low methods.
7519         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
7520         (linux_nat_set_new_fork, linux_nat_set_forget_process)
7521         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
7522         (linux_nat_set_prepare_to_resume): Delete.
7523         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
7524         low virtual methods.
7525         * amd64-linux-nat.c: Likewise.
7526         * arm-linux-nat.c: Likewise.
7527         * i386-linux-nat.c: Likewise.
7528         * ia64-linux-nat.c: Likewise.
7529         * mips-linux-nat.c: Likewise.
7530         * ppc-linux-nat.c: Likewise.
7531         * s390-linux-nat.c: Likewise.
7532         * sparc64-linux-nat.c: Likewise.
7533         * x86-linux-nat.c: Likewise.
7534         * x86-linux-nat.h: Include "nat/x86-linux.h".
7535         (x86_linux_nat_target) <low_new_fork, low_forget_process,
7536         low_prepare_to_resume, low_new_thread, low_delete_thread>:
7537         Override methods.
7538
7539 2018-05-02  Pedro Alves  <palves@redhat.com>
7540
7541         * target.h (target_ops)
7542         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
7543         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
7544         stopped_by_watchpoint, have_continuable_watchpoint,
7545         stopped_data_address, watchpoint_addr_within_range,
7546         can_accel_watchpoint_condition, can_run, thread_alive,
7547         has_all_memory, has_memory, has_stack, has_registers,
7548         has_execution, can_async_p, is_async_p, supports_non_stop,
7549         always_non_stop_p, can_execute_reverse, supports_multi_process,
7550         supports_enable_disable_tracepoint,
7551         supports_disable_randomization, supports_string_tracing,
7552         supports_evaluation_of_breakpoint_conditions,
7553         can_run_breakpoint_commands, filesystem_is_local,
7554         can_download_tracepoint, get_trace_state_variable_value,
7555         set_trace_notes, get_tib_address, use_agent, can_use_agent,
7556         record_is_replaying, record_will_replay,
7557         augmented_libraries_svr4_read>: Adjust to return bool.
7558         * aarch64-linux-nat.c: All implementations adjusted.
7559         * aix-thread.c: All implementations adjusted.
7560         * arm-linux-nat.c: All implementations adjusted.
7561         * breakpoint.c: All implementations adjusted.
7562         * bsd-kvm.c: All implementations adjusted.
7563         * bsd-uthread.c: All implementations adjusted.
7564         * corelow.c: All implementations adjusted.
7565         * ctf.c: All implementations adjusted.
7566         * darwin-nat.c: All implementations adjusted.
7567         * darwin-nat.h: All implementations adjusted.
7568         * exec.c: All implementations adjusted.
7569         * fbsd-nat.c: All implementations adjusted.
7570         * fbsd-nat.h: All implementations adjusted.
7571         * gnu-nat.c: All implementations adjusted.
7572         * gnu-nat.h: All implementations adjusted.
7573         * go32-nat.c: All implementations adjusted.
7574         * ia64-linux-nat.c: All implementations adjusted.
7575         * inf-child.c: All implementations adjusted.
7576         * inf-child.h: All implementations adjusted.
7577         * inf-ptrace.c: All implementations adjusted.
7578         * inf-ptrace.h: All implementations adjusted.
7579         * linux-nat.c: All implementations adjusted.
7580         * linux-nat.h: All implementations adjusted.
7581         * mips-linux-nat.c: All implementations adjusted.
7582         * nto-procfs.c: All implementations adjusted.
7583         * ppc-linux-nat.c: All implementations adjusted.
7584         * procfs.c: All implementations adjusted.
7585         * ravenscar-thread.c: All implementations adjusted.
7586         * record-btrace.c: All implementations adjusted.
7587         * record-full.c: All implementations adjusted.
7588         * remote-sim.c: All implementations adjusted.
7589         * remote.c: All implementations adjusted.
7590         * s390-linux-nat.c: All implementations adjusted.
7591         * sol-thread.c: All implementations adjusted.
7592         * spu-multiarch.c: All implementations adjusted.
7593         * target-delegates.c: All implementations adjusted.
7594         * target.c: All implementations adjusted.
7595         * target.h: All implementations adjusted.
7596         * tracefile-tfile.c: All implementations adjusted.
7597         * tracefile.c: All implementations adjusted.
7598         * tracefile.h: All implementations adjusted.
7599         * windows-nat.c: All implementations adjusted.
7600         * x86-linux-nat.h: All implementations adjusted.
7601         * x86-nat.h: All implementations adjusted.
7602
7603 2018-05-02  Pedro Alves  <palves@redhat.com>
7604
7605         * make-target-delegates (scan_target_h): Don't trim lines here.
7606         Replace sequences of tabs and/or whitespace with a single
7607         whitespace.
7608         (top level, parsing methods): Trim each line before processing it
7609         here.
7610
7611 2018-05-02  Pedro Alves  <palves@redhat.com>
7612             John Baldwin  <jhb@freebsd.org>
7613
7614         * target.h (enum strata) <debug_stratum>: New.
7615         (struct target_ops) <all delegation methods>: Replace by C++
7616         virtual methods, and drop "to_" prefix.  All references updated
7617         throughout.
7618         <to_shortname, to_longname, to_doc, to_data,
7619         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
7620         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
7621         virtual methods.  All references updated throughout.
7622         <can_attach, supports_terminal_ours, can_create_inferior,
7623         get_thread_control_capabilities, attach_no_wait>: New
7624         virtual methods.
7625         <insert_breakpoint, remove_breakpoint>: Now
7626         TARGET_DEFAULT_NORETURN methods.
7627         <info_proc>: Now returns bool.
7628         <to_magic>: Delete.
7629         (OPS_MAGIC): Delete.
7630         (current_target): Delete.  All references replaced by references
7631         to ...
7632         (target_stack): ... this.  New.
7633         (target_shortname, target_longname): Adjust.
7634         (target_can_run): Now a function declaration.
7635         (default_child_has_all_memory, default_child_has_memory)
7636         (default_child_has_stack, default_child_has_registers)
7637         (default_child_has_execution): Remove target_ops parameter.
7638         (complete_target_initialization): Delete.
7639         (memory_breakpoint_target): New template class.
7640         (test_target_ops): Refactor as a C++ class with virtual methods.
7641         * make-target-delegates (NAME_PART): Tighten.
7642         (POINTER_PART, CP_SYMBOL): New.
7643         (SIMPLE_RETURN_PART): Reimplement.
7644         (VEC_RETURN_PART): Expect less.
7645         (RETURN_PART, VIRTUAL_PART): New.
7646         (METHOD): Adjust to C++ virtual methods.
7647         (scan_target_h): Remove reference to C99.
7648         (dname): Output "target_ops::" prefix.
7649         (write_function_header): Adjust to output a C++ class method.
7650         (write_declaration): New.
7651         (write_delegator): Adjust to output a C++ class method.
7652         (tdname): Output "dummy_target::" prefix.
7653         (write_tdefault, write_debugmethod): Adjust to output a C++ class
7654         method.
7655         (tdefault_names, debug_names): Delete.
7656         (return_types, tdefaults, styles, argtypes_array): New.
7657         (top level): All methods are delegators.
7658         (print_class): New.
7659         (top level): Print dummy_target and debug_target classes.
7660         * target-delegates.c: Regenerate.
7661         * target-debug.h (target_debug_print_enum_info_proc_what)
7662         (target_debug_print_thread_control_capabilities)
7663         (target_debug_print_thread_info_p): New.
7664         * target.c (dummy_target): Delete.
7665         (the_dummy_target, the_debug_target): New.
7666         (target_stack): Now extern.
7667         (set_targetdebug): Push/unpush debug target.
7668         (default_child_has_all_memory, default_child_has_memory)
7669         (default_child_has_stack, default_child_has_registers)
7670         (default_child_has_execution): Remove target_ops parameter.
7671         (complete_target_initialization): Delete.
7672         (add_target_with_completer): No longer call
7673         complete_target_initialization.
7674         (target_supports_terminal_ours): Use regular delegation.
7675         (update_current_target): Delete.
7676         (push_target): No longer check magic number.  Don't call
7677         update_current_target.
7678         (unpush_target): Don't call update_current_target.
7679         (target_is_pushed): No longer check magic number.
7680         (target_require_runnable): Skip for all stratums over
7681         process_stratum.
7682         (target_ops::info_proc): New.
7683         (target_info_proc): Use find_target_at and
7684         find_default_run_target.
7685         (target_supports_disable_randomization): Use regular delegation.
7686         (target_get_osdata): Use find_target_at.
7687         (target_ops::open, target_ops::close, target_ops::can_attach)
7688         (target_ops::attach, target_ops::can_create_inferior)
7689         (target_ops::create_inferior, target_ops::can_run)
7690         (target_can_run): New.
7691         (default_fileio_target): Use regular delegation.
7692         (target_ops::fileio_open, target_ops::fileio_pwrite)
7693         (target_ops::fileio_pread, target_ops::fileio_fstat)
7694         (target_ops::fileio_close, target_ops::fileio_unlink)
7695         (target_ops::fileio_readlink): New.
7696         (target_fileio_open_1, target_fileio_unlink)
7697         (target_fileio_readlink): Always call the target method.  Handle
7698         FILEIO_ENOSYS.
7699         (return_zero, return_zero_has_execution): Delete.
7700         (init_dummy_target): Delete.
7701         (dummy_target::dummy_target, dummy_target::shortname)
7702         (dummy_target::longname, dummy_target::doc)
7703         (debug_target::debug_target, debug_target::shortname)
7704         (debug_target::longname, debug_target::doc): New.
7705         (target_supports_delete_record): Use regular delegation.
7706         (setup_target_debug): Delete.
7707         (maintenance_print_target_stack): Skip debug_stratum.
7708         (initialize_targets): Instantiate the_dummy_target and
7709         the_debug_target.
7710         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
7711         use target_stack.
7712         (target_auxv_search, fprint_target_auxv): Adjust.
7713         (info_auxv_command): Adjust to use target_stack.
7714         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
7715         * exceptions.c (print_flush): Handle a NULL target_stack.
7716         * regcache.c (target_ops_no_register): Refactor as class with
7717         virtual methods.
7718
7719         * exec.c (exec_target): New class.
7720         (exec_ops): Now an exec_target.
7721         (exec_open, exec_close_1, exec_get_section_table)
7722         (exec_xfer_partial, exec_files_info, exec_has_memory)
7723         (exec_make_note_section): Refactor as exec_target methods.
7724         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
7725         Delete.
7726         (exec_target::find_memory_regions): New.
7727         (_initialize_exec): Don't call init_exec_ops.
7728         * gdbcore.h (exec_file_clear): Delete.
7729
7730         * corefile.c (core_target): Delete.
7731         (core_file_command): Adjust.
7732         * corelow.c (core_target): New class.
7733         (the_core_target): New.
7734         (core_close): Remove target_ops parameter.
7735         (core_close_cleanup): Adjust.
7736         (core_target::close): New.
7737         (core_open, core_detach, get_core_registers, core_files_info)
7738         (core_xfer_partial, core_thread_alive, core_read_description)
7739         (core_pid_to_str, core_thread_name, core_has_memory)
7740         (core_has_stack, core_has_registers, core_info_proc): Rework as
7741         core_target methods.
7742         (ignore, core_remove_breakpoint, init_core_ops): Delete.
7743         (_initialize_corelow): Initialize the_core_target.
7744         * gdbcore.h (core_target): Delete.
7745         (the_core_target): New.
7746
7747         * ctf.c: (ctf_target): New class.
7748         (ctf_ops): Now a ctf_target.
7749         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
7750         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
7751         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
7752         methods.
7753         (init_ctf_ops): Delete.
7754         (_initialize_ctf): Don't call it.
7755         * tracefile-tfile.c (tfile_target): New class.
7756         (tfile_ops): Now a tfile_target.
7757         (tfile_open, tfile_close, tfile_files_info)
7758         (tfile_get_tracepoint_status, tfile_trace_find)
7759         (tfile_fetch_registers, tfile_xfer_partial)
7760         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
7761         Refactor as tfile_target methods.
7762         (tfile_xfer_partial_features): Remove target_ops parameter.
7763         (init_tfile_ops): Delete.
7764         (_initialize_tracefile_tfile): Don't call it.
7765         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
7766         (tracefile_has_stack, tracefile_has_registers)
7767         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
7768         tracefile_target methods.
7769         (init_tracefile_ops): Delete.
7770         (tracefile_target::tracefile_target): New.
7771         * tracefile.h: Include "target.h".
7772         (tracefile_target): New class.
7773         (init_tracefile_ops): Delete.
7774
7775         * spu-multiarch.c (spu_multiarch_target): New class.
7776         (spu_ops): Now a spu_multiarch_target.
7777         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
7778         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
7779         (spu_search_memory, spu_mourn_inferior): Refactor as
7780         spu_multiarch_target methods.
7781         (init_spu_ops): Delete.
7782         (_initialize_spu_multiarch): Remove references to init_spu_ops,
7783         complete_target_initialization.
7784
7785         * ravenscar-thread.c (ravenscar_thread_target): New class.
7786         (ravenscar_ops): Now a ravenscar_thread_target.
7787         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
7788         (ravenscar_thread_alive, ravenscar_pid_to_str)
7789         (ravenscar_fetch_registers, ravenscar_store_registers)
7790         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
7791         (ravenscar_stopped_by_hw_breakpoint)
7792         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
7793         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
7794         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
7795         methods.
7796         (init_ravenscar_thread_ops): Delete.
7797         (_initialize_ravenscar): Remove references to
7798         init_ravenscar_thread_ops and complete_target_initialization.
7799
7800         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
7801         (bsd_uthread_target): New class.
7802         (bsd_uthread_ops): Now a bsd_uthread_target.
7803         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
7804         (bsd_uthread_close, bsd_uthread_mourn_inferior)
7805         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
7806         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
7807         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
7808         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
7809         (bsd_uthread_target): Delete function.
7810         (_initialize_bsd_uthread): Remove reference to
7811         complete_target_initialization.
7812
7813         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
7814         (target_bfd): ... this new class.
7815         (target_bfd_xfer_partial, target_bfd_get_section_table)
7816         (target_bfd_close): Refactor as target_bfd methods.
7817         (target_bfd::~target_bfd): New.
7818         (target_bfd_reopen): Adjust.
7819         (target_bfd::close): New.
7820
7821         * record-btrace.c (record_btrace_target): New class.
7822         (record_btrace_ops): Now a record_btrace_target.
7823         (record_btrace_open, record_btrace_stop_recording)
7824         (record_btrace_disconnect, record_btrace_close)
7825         (record_btrace_async, record_btrace_info)
7826         (record_btrace_insn_history, record_btrace_insn_history_range)
7827         (record_btrace_insn_history_from, record_btrace_call_history)
7828         (record_btrace_call_history_range)
7829         (record_btrace_call_history_from, record_btrace_record_method)
7830         (record_btrace_is_replaying, record_btrace_will_replay)
7831         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
7832         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
7833         (record_btrace_store_registers, record_btrace_prepare_to_store)
7834         (record_btrace_to_get_unwinder)
7835         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
7836         (record_btrace_commit_resume, record_btrace_wait)
7837         (record_btrace_stop, record_btrace_can_execute_reverse)
7838         (record_btrace_stopped_by_sw_breakpoint)
7839         (record_btrace_supports_stopped_by_sw_breakpoint)
7840         (record_btrace_stopped_by_hw_breakpoint)
7841         (record_btrace_supports_stopped_by_hw_breakpoint)
7842         (record_btrace_update_thread_list, record_btrace_thread_alive)
7843         (record_btrace_goto_begin, record_btrace_goto_end)
7844         (record_btrace_goto, record_btrace_stop_replaying_all)
7845         (record_btrace_execution_direction)
7846         (record_btrace_prepare_to_generate_core)
7847         (record_btrace_done_generating_core): Refactor as
7848         record_btrace_target methods.
7849         (init_record_btrace_ops): Delete.
7850         (_initialize_record_btrace): Remove reference to
7851         init_record_btrace_ops.
7852         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
7853         the execution_direction global.
7854         (record_full_base_target, record_full_target)
7855         (record_full_core_target): New classes.
7856         (record_full_ops): Now a record_full_target.
7857         (record_full_core_ops): Now a record_full_core_target.
7858         (record_full_target::detach, record_full_target::disconnect)
7859         (record_full_core_target::disconnect)
7860         (record_full_target::mourn_inferior, record_full_target::kill):
7861         New.
7862         (record_full_open, record_full_close, record_full_async): Refactor
7863         as methods of the record_full_base_target class.
7864         (record_full_resume, record_full_commit_resume): Refactor
7865         as methods of the record_full_target class.
7866         (record_full_wait, record_full_stopped_by_watchpoint)
7867         (record_full_stopped_data_address)
7868         (record_full_stopped_by_sw_breakpoint)
7869         (record_full_supports_stopped_by_sw_breakpoint)
7870         (record_full_stopped_by_hw_breakpoint)
7871         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
7872         methods of the record_full_base_target class.
7873         (record_full_store_registers, record_full_xfer_partial)
7874         (record_full_insert_breakpoint, record_full_remove_breakpoint):
7875         Refactor as methods of the record_full_target class.
7876         (record_full_can_execute_reverse, record_full_get_bookmark)
7877         (record_full_goto_bookmark, record_full_execution_direction)
7878         (record_full_record_method, record_full_info, record_full_delete)
7879         (record_full_is_replaying, record_full_will_replay)
7880         (record_full_goto_begin, record_full_goto_end, record_full_goto)
7881         (record_full_stop_replaying): Refactor as methods of the
7882         record_full_base_target class.
7883         (record_full_core_resume, record_full_core_kill)
7884         (record_full_core_fetch_registers)
7885         (record_full_core_prepare_to_store)
7886         (record_full_core_store_registers, record_full_core_xfer_partial)
7887         (record_full_core_insert_breakpoint)
7888         (record_full_core_remove_breakpoint)
7889         (record_full_core_has_execution): Refactor
7890         as methods of the record_full_core_target class.
7891         (record_full_base_target::supports_delete_record): New.
7892         (init_record_full_ops): Delete.
7893         (init_record_full_core_ops): Delete.
7894         (record_full_save): Refactor as method of the
7895         record_full_base_target class.
7896         (_initialize_record_full): Remove references to
7897         init_record_full_ops and init_record_full_core_ops.
7898
7899         * remote.c (remote_target, extended_remote_target): New classes.
7900         (remote_ops): Now a remote_target.
7901         (extended_remote_ops): Now an extended_remote_target.
7902         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
7903         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
7904         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
7905         (remote_pass_signals, remote_set_syscall_catchpoint)
7906         (remote_program_signals, )
7907         (remote_thread_always_alive): Remove target_ops parameter.
7908         (remote_thread_alive, remote_thread_name)
7909         (remote_update_thread_list, remote_threads_extra_info)
7910         (remote_static_tracepoint_marker_at)
7911         (remote_static_tracepoint_markers_by_strid)
7912         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
7913         (remote_open): Refactor as methods of remote_target.
7914         (extended_remote_open, extended_remote_detach)
7915         (extended_remote_attach, extended_remote_post_attach):
7916         (extended_remote_supports_disable_randomization)
7917         (extended_remote_create_inferior): : Refactor as method of
7918         extended_remote_target.
7919         (remote_set_permissions, remote_open_1, remote_detach)
7920         (remote_follow_fork, remote_follow_exec, remote_disconnect)
7921         (remote_resume, remote_commit_resume, remote_stop)
7922         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
7923         (remote_terminal_ours, remote_wait, remote_fetch_registers)
7924         (remote_prepare_to_store, remote_store_registers)
7925         (remote_flash_erase, remote_flash_done, remote_files_info)
7926         (remote_kill, remote_mourn, remote_insert_breakpoint)
7927         (remote_remove_breakpoint, remote_insert_watchpoint)
7928         (remote_watchpoint_addr_within_range)
7929         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
7930         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
7931         (remote_supports_stopped_by_sw_breakpoint)
7932         (remote_stopped_by_hw_breakpoint)
7933         (remote_supports_stopped_by_hw_breakpoint)
7934         (remote_stopped_by_watchpoint, remote_stopped_data_address)
7935         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
7936         (remote_verify_memory): Refactor as methods of remote_target.
7937         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
7938         parameter.
7939         (remote_xfer_partial, remote_get_memory_xfer_limit)
7940         (remote_search_memory, remote_rcmd, remote_memory_map)
7941         (remote_pid_to_str, remote_get_thread_local_address)
7942         (remote_get_tib_address, remote_read_description): Refactor as
7943         methods of remote_target.
7944         (remote_target::fileio_open, remote_target::fileio_pwrite)
7945         (remote_target::fileio_pread, remote_target::fileio_close): New.
7946         (remote_hostio_readlink, remote_hostio_fstat)
7947         (remote_filesystem_is_local, remote_can_execute_reverse)
7948         (remote_supports_non_stop, remote_supports_disable_randomization)
7949         (remote_supports_multi_process, remote_supports_cond_breakpoints)
7950         (remote_supports_enable_disable_tracepoint)
7951         (remote_supports_string_tracing)
7952         (remote_can_run_breakpoint_commands, remote_trace_init)
7953         (remote_download_tracepoint, remote_can_download_tracepoint)
7954         (remote_download_trace_state_variable, remote_enable_tracepoint)
7955         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
7956         (remote_trace_start, remote_get_trace_status)
7957         (remote_get_tracepoint_status, remote_trace_stop)
7958         (remote_trace_find, remote_get_trace_state_variable_value)
7959         (remote_save_trace_data, remote_get_raw_trace_data)
7960         (remote_set_disconnected_tracing, remote_core_of_thread)
7961         (remote_set_circular_trace_buffer, remote_traceframe_info)
7962         (remote_get_min_fast_tracepoint_insn_len)
7963         (remote_set_trace_buffer_size, remote_set_trace_notes)
7964         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
7965         (remote_disable_btrace, remote_teardown_btrace)
7966         (remote_read_btrace, remote_btrace_conf)
7967         (remote_augmented_libraries_svr4_read, remote_load)
7968         (remote_pid_to_exec_file, remote_can_do_single_step)
7969         (remote_execution_direction, remote_thread_handle_to_thread_info):
7970         Refactor as methods of remote_target.
7971         (init_remote_ops, init_extended_remote_ops): Delete.
7972         (remote_can_async_p, remote_is_async_p, remote_async)
7973         (remote_thread_events, remote_upload_tracepoints)
7974         (remote_upload_trace_state_variables): Refactor as methods of
7975         remote_target.
7976         (_initialize_remote): Remove references to init_remote_ops and
7977         init_extended_remote_ops.
7978
7979         * remote-sim.c (gdbsim_target): New class.
7980         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
7981         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
7982         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
7983         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
7984         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
7985         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
7986         Refactor as methods of gdbsim_target.
7987         (gdbsim_ops): Now a gdbsim_target.
7988         (init_gdbsim_ops): Delete.
7989         (gdbsim_cntrl_c): Adjust.
7990         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
7991
7992         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
7993         (the_amd64_linux_nat_target): New.
7994         (amd64_linux_fetch_inferior_registers)
7995         (amd64_linux_store_inferior_registers): Refactor as methods of
7996         amd64_linux_nat_target.
7997         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
7998         * i386-linux-nat.c: Don't include "linux-nat.h".
7999         (i386_linux_nat_target): New class.
8000         (the_i386_linux_nat_target): New.
8001         (i386_linux_fetch_inferior_registers)
8002         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
8003         as methods of i386_linux_nat_target.
8004         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
8005         * inf-child.c (inf_child_ops): Delete.
8006         (inf_child_fetch_inferior_registers)
8007         (inf_child_store_inferior_registers): Delete.
8008         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
8009         methods of inf_child_target.
8010         (inf_child_target::supports_terminal_ours)
8011         (inf_child_target::terminal_init)
8012         (inf_child_target::terminal_inferior)
8013         (inf_child_target::terminal_ours_for_output)
8014         (inf_child_target::terminal_ours, inf_child_target::interrupt)
8015         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
8016         New.
8017         (inf_child_open, inf_child_disconnect, inf_child_close)
8018         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
8019         (inf_child_post_startup_inferior, inf_child_can_run)
8020         (inf_child_pid_to_exec_file): Refactor as methods of
8021         inf_child_target.
8022         (inf_child_follow_fork): Delete.
8023         (inf_child_target::can_create_inferior)
8024         (inf_child_target::can_attach): New.
8025         (inf_child_target::has_all_memory, inf_child_target::has_memory)
8026         (inf_child_target::has_stack, inf_child_target::has_registers)
8027         (inf_child_target::has_execution): New.
8028         (inf_child_fileio_open, inf_child_fileio_pwrite)
8029         (inf_child_fileio_pread, inf_child_fileio_fstat)
8030         (inf_child_fileio_close, inf_child_fileio_unlink)
8031         (inf_child_fileio_readlink, inf_child_use_agent)
8032         (inf_child_can_use_agent): Refactor as methods of
8033         inf_child_target.
8034         (return_zero, inf_child_target): Delete.
8035         (inf_child_target::inf_child_target): New.
8036         * inf-child.h: Include "target.h".
8037         (inf_child_target): Delete function prototype.
8038         (inf_child_target): New class.
8039         (inf_child_open_target, inf_child_mourn_inferior)
8040         (inf_child_maybe_unpush_target): Delete.
8041         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
8042         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
8043         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
8044         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
8045         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
8046         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
8047         (inf_ptrace_wait, inf_ptrace_xfer_partial)
8048         (inf_ptrace_thread_alive, inf_ptrace_files_info)
8049         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
8050         methods of inf_ptrace_target.
8051         (inf_ptrace_target): Delete function.
8052         * inf-ptrace.h: Include "inf-child.h".
8053         (inf_ptrace_target): Delete function declaration.
8054         (inf_ptrace_target): New class.
8055         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
8056         * linux-nat.c (linux_target): New.
8057         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
8058         (linux_nat_target::~linux_nat_target): New.
8059         (linux_child_post_attach, linux_child_post_startup_inferior)
8060         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
8061         (linux_child_remove_fork_catchpoint)
8062         (linux_child_insert_vfork_catchpoint)
8063         (linux_child_remove_vfork_catchpoint)
8064         (linux_child_insert_exec_catchpoint)
8065         (linux_child_remove_exec_catchpoint)
8066         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
8067         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
8068         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
8069         (linux_nat_stopped_data_address)
8070         (linux_nat_stopped_by_sw_breakpoint)
8071         (linux_nat_supports_stopped_by_sw_breakpoint)
8072         (linux_nat_stopped_by_hw_breakpoint)
8073         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
8074         (linux_nat_kill, linux_nat_mourn_inferior)
8075         (linux_nat_xfer_partial, linux_nat_thread_alive)
8076         (linux_nat_update_thread_list, linux_nat_pid_to_str)
8077         (linux_nat_thread_name, linux_child_pid_to_exec_file)
8078         (linux_child_static_tracepoint_markers_by_strid)
8079         (linux_nat_is_async_p, linux_nat_can_async_p)
8080         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
8081         (linux_nat_supports_multi_process)
8082         (linux_nat_supports_disable_randomization, linux_nat_async)
8083         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
8084         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
8085         (linux_nat_fileio_open, linux_nat_fileio_readlink)
8086         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
8087         methods of linux_nat_target.
8088         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
8089         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
8090         parameter.
8091         (check_stopped_by_watchpoint): Adjust.
8092         (linux_xfer_partial): Delete.
8093         (linux_target_install_ops, linux_target, linux_nat_add_target):
8094         Delete.
8095         (linux_nat_target::linux_nat_target): New.
8096         * linux-nat.h: Include "inf-ptrace.h".
8097         (linux_nat_target): New.
8098         (linux_target, linux_target_install_ops, linux_nat_add_target):
8099         Delete function declarations.
8100         (linux_target): Declare global.
8101         * linux-thread-db.c (thread_db_target): New.
8102         (thread_db_target::thread_db_target): New.
8103         (thread_db_ops): Delete.
8104         (the_thread_db_target): New.
8105         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
8106         (thread_db_update_thread_list, thread_db_pid_to_str)
8107         (thread_db_extra_thread_info)
8108         (thread_db_thread_handle_to_thread_info)
8109         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
8110         (thread_db_resume): Refactor as methods of thread_db_target.
8111         (init_thread_db_ops): Delete.
8112         (_initialize_thread_db): Remove reference to init_thread_db_ops.
8113         * x86-linux-nat.c: Don't include "linux-nat.h".
8114         (super_post_startup_inferior): Delete.
8115         (x86_linux_nat_target::~x86_linux_nat_target): New.
8116         (x86_linux_child_post_startup_inferior)
8117         (x86_linux_read_description, x86_linux_enable_btrace)
8118         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
8119         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
8120         methods of x86_linux_nat_target.
8121         (x86_linux_create_target): Delete.  Bits folded ...
8122         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
8123         pointer.
8124         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
8125         (x86_linux_nat_target): New class.
8126         (x86_linux_create_target): Delete.
8127         (x86_linux_add_target): Now takes a linux_nat_target pointer.
8128         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
8129         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
8130         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
8131         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
8132         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
8133         make extern.
8134         (x86_use_watchpoints): Delete.
8135         * x86-nat.h: Include "breakpoint.h" and "target.h".
8136         (x86_use_watchpoints): Delete.
8137         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
8138         (x86_stopped_by_watchpoint, x86_stopped_data_address)
8139         (x86_insert_watchpoint, x86_remove_watchpoint)
8140         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
8141         (x86_stopped_by_hw_breakpoint): New declarations.
8142         (x86_nat_target): New template class.
8143
8144         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
8145         (the_ppc_linux_nat_target): New.
8146         (ppc_linux_fetch_inferior_registers)
8147         (ppc_linux_can_use_hw_breakpoint)
8148         (ppc_linux_region_ok_for_hw_watchpoint)
8149         (ppc_linux_ranged_break_num_registers)
8150         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
8151         (ppc_linux_insert_mask_watchpoint)
8152         (ppc_linux_remove_mask_watchpoint)
8153         (ppc_linux_can_accel_watchpoint_condition)
8154         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
8155         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
8156         (ppc_linux_watchpoint_addr_within_range)
8157         (ppc_linux_masked_watch_num_registers)
8158         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
8159         (ppc_linux_read_description): Refactor as methods of
8160         ppc_linux_nat_target.
8161         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
8162
8163         * procfs.c (procfs_xfer_partial): Delete forward declaration.
8164         (procfs_target): New class.
8165         (the_procfs_target): New.
8166         (procfs_target): Delete function.
8167         (procfs_auxv_parse, procfs_attach, procfs_detach)
8168         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
8169         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
8170         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
8171         (procfs_create_inferior, procfs_update_thread_list)
8172         (procfs_thread_alive, procfs_pid_to_str)
8173         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
8174         (procfs_stopped_data_address, procfs_insert_watchpoint)
8175         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
8176         (proc_find_memory_regions, procfs_info_proc)
8177         (procfs_make_note_section): Refactor as methods of procfs_target.
8178         (_initialize_procfs): Adjust.
8179         * sol-thread.c (sol_thread_target): New class.
8180         (sol_thread_ops): Now a sol_thread_target.
8181         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
8182         (sol_thread_fetch_registers, sol_thread_store_registers)
8183         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
8184         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
8185         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
8186         (init_sol_thread_ops): Delete.
8187         (_initialize_sol_thread): Adjust.  Remove references to
8188         init_sol_thread_ops and complete_target_initialization.
8189
8190         * windows-nat.c (windows_nat_target): New class.
8191         (windows_fetch_inferior_registers)
8192         (windows_store_inferior_registers, windows_resume, windows_wait)
8193         (windows_attach, windows_detach, windows_pid_to_exec_file)
8194         (windows_files_info, windows_create_inferior)
8195         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
8196         (windows_close, windows_pid_to_str, windows_xfer_partial)
8197         (windows_get_tib_address, windows_get_ada_task_ptid)
8198         (windows_thread_name, windows_thread_alive): Refactor as
8199         windows_nat_target methods.
8200         (do_initial_windows_stuff): Adjust.
8201         (windows_target): Delete function.
8202         (_initialize_windows_nat): Adjust.
8203
8204         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
8205         (darwin_mourn_inferior, darwin_kill_inferior)
8206         (darwin_create_inferior, darwin_attach, darwin_detach)
8207         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
8208         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
8209         (darwin_supports_multi_process): Refactor as darwin_nat_target
8210         methods.
8211         (darwin_resume_to, darwin_files_info): Delete.
8212         (_initialize_darwin_inferior): Rename to ...
8213         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
8214         * darwin-nat.h: Include "inf-child.h".
8215         (darwin_nat_target): New class.
8216         (darwin_complete_target): Delete.
8217         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
8218         (darwin_target): New.
8219         (i386_darwin_fetch_inferior_registers)
8220         (i386_darwin_store_inferior_registers): Refactor as methods of
8221         darwin_nat_target.
8222         (darwin_complete_target): Delete, with ...
8223         (_initialize_i386_darwin_nat): ... bits factored out here.
8224
8225         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
8226         (the_alpha_linux_nat_target): New.
8227         (alpha_linux_register_u_offset): Refactor as
8228         alpha_linux_nat_target method.
8229         (_initialize_alpha_linux_nat): Adjust.
8230         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
8231         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
8232         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
8233         methods of linux_nat_trad_target.
8234         (linux_trad_target): Delete.
8235         * linux-nat-trad.h (linux_trad_target): Delete function.
8236         (linux_nat_trad_target): New class.
8237         * mips-linux-nat.c (mips_linux_nat_target): New class.
8238         (super_fetch_registers, super_store_registers, super_close):
8239         Delete.
8240         (the_mips_linux_nat_target): New.
8241         (mips64_linux_regsets_fetch_registers)
8242         (mips64_linux_regsets_store_registers)
8243         (mips64_linux_fetch_registers, mips64_linux_store_registers)
8244         (mips_linux_register_u_offset, mips_linux_read_description)
8245         (mips_linux_can_use_hw_breakpoint)
8246         (mips_linux_stopped_by_watchpoint)
8247         (mips_linux_stopped_data_address)
8248         (mips_linux_region_ok_for_hw_watchpoint)
8249         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
8250         (mips_linux_close): Refactor as methods of mips_linux_nat.
8251         (_initialize_mips_linux_nat): Adjust to C++ification.
8252
8253         * aix-thread.c (aix_thread_target): New class.
8254         (aix_thread_ops): Now an aix_thread_target.
8255         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
8256         (aix_thread_fetch_registers, aix_thread_store_registers)
8257         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
8258         (aix_thread_thread_alive, aix_thread_pid_to_str)
8259         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
8260         Refactor as methods of aix_thread_target.
8261         (init_aix_thread_ops): Delete.
8262         (_initialize_aix_thread): Remove references to init_aix_thread_ops
8263         and complete_target_initialization.
8264         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
8265         (rs6000_nat_target): New class.
8266         (the_rs6000_nat_target): New.
8267         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
8268         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
8269         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
8270         (super_create_inferior): Delete.
8271         (_initialize_rs6000_nat): Adjust to C++ification.
8272
8273         * arm-linux-nat.c (arm_linux_nat_target): New class.
8274         (the_arm_linux_nat_target): New.
8275         (arm_linux_fetch_inferior_registers)
8276         (arm_linux_store_inferior_registers, arm_linux_read_description)
8277         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
8278         (arm_linux_remove_hw_breakpoint)
8279         (arm_linux_region_ok_for_hw_watchpoint)
8280         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
8281         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
8282         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
8283         arm_linux_nat_target.
8284         (_initialize_arm_linux_nat): Adjust to C++ification.
8285
8286         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
8287         (the_aarch64_linux_nat_target): New.
8288         (aarch64_linux_fetch_inferior_registers)
8289         (aarch64_linux_store_inferior_registers)
8290         (aarch64_linux_child_post_startup_inferior)
8291         (aarch64_linux_read_description)
8292         (aarch64_linux_can_use_hw_breakpoint)
8293         (aarch64_linux_insert_hw_breakpoint)
8294         (aarch64_linux_remove_hw_breakpoint)
8295         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
8296         (aarch64_linux_region_ok_for_hw_watchpoint)
8297         (aarch64_linux_stopped_data_address)
8298         (aarch64_linux_stopped_by_watchpoint)
8299         (aarch64_linux_watchpoint_addr_within_range)
8300         (aarch64_linux_can_do_single_step): Refactor as methods of
8301         aarch64_linux_nat_target.
8302         (super_post_startup_inferior): Delete.
8303         (_initialize_aarch64_linux_nat): Adjust to C++ification.
8304
8305         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
8306         (the_hppa_linux_nat_target): New.
8307         (hppa_linux_fetch_inferior_registers)
8308         (hppa_linux_store_inferior_registers): Refactor as methods of
8309         hppa_linux_nat_target.
8310         (_initialize_hppa_linux_nat): Adjust to C++ification.
8311
8312         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
8313         (the_ia64_linux_nat_target): New.
8314         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
8315         (ia64_linux_stopped_data_address)
8316         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
8317         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
8318         ia64_linux_nat_target methods.
8319         (super_xfer_partial): Delete.
8320         (_initialize_ia64_linux_nat): Adjust to C++ification.
8321
8322         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
8323         (the_m32r_linux_nat_target): New.
8324         (m32r_linux_fetch_inferior_registers)
8325         (m32r_linux_store_inferior_registers): Refactor as
8326         m32r_linux_nat_target methods.
8327         (_initialize_m32r_linux_nat): Adjust to C++ification.
8328
8329         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
8330         (the_m68k_linux_nat_target): New.
8331         (m68k_linux_fetch_inferior_registers)
8332         (m68k_linux_store_inferior_registers): Refactor as
8333         m68k_linux_nat_target methods.
8334         (_initialize_m68k_linux_nat): Adjust to C++ification.
8335
8336         * s390-linux-nat.c (s390_linux_nat_target): New class.
8337         (the_s390_linux_nat_target): New.
8338         (s390_linux_fetch_inferior_registers)
8339         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
8340         (s390_insert_watchpoint, s390_remove_watchpoint)
8341         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
8342         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
8343         (s390_auxv_parse, s390_read_description): Refactor as methods of
8344         s390_linux_nat_target.
8345         (_initialize_s390_nat): Adjust to C++ification.
8346
8347         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
8348         (the_sparc_linux_nat_target): New.
8349         (_initialize_sparc_linux_nat): Adjust to C++ification.
8350         * sparc-nat.c (sparc_fetch_inferior_registers)
8351         (sparc_store_inferior_registers): Remove target_ops parameter.
8352         * sparc-nat.h (sparc_fetch_inferior_registers)
8353         (sparc_store_inferior_registers): Remove target_ops parameter.
8354         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
8355         (the_sparc64_linux_nat_target): New.
8356         (_initialize_sparc64_linux_nat): Adjust to C++ification.
8357
8358         * spu-linux-nat.c (spu_linux_nat_target): New class.
8359         (the_spu_linux_nat_target): New.
8360         (spu_child_post_startup_inferior, spu_child_post_attach)
8361         (spu_child_wait, spu_fetch_inferior_registers)
8362         (spu_store_inferior_registers, spu_xfer_partial)
8363         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
8364         methods.
8365         (_initialize_spu_nat): Adjust to C++ification.
8366
8367         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
8368         (the_tilegx_linux_nat_target): New.
8369         (fetch_inferior_registers, store_inferior_registers):
8370         Refactor as methods.
8371         (_initialize_tile_linux_nat): Adjust to C++ification.
8372
8373         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
8374         (the_xtensa_linux_nat_target): New.
8375         (xtensa_linux_fetch_inferior_registers)
8376         (xtensa_linux_store_inferior_registers): Refactor as
8377         xtensa_linux_nat_target methods.
8378         (_initialize_xtensa_linux_nat): Adjust to C++ification.
8379
8380         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
8381         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
8382         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
8383         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
8384         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
8385         (fbsd_stopped_by_sw_breakpoint)
8386         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
8387         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
8388         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
8389         (fbsd_post_startup_inferior, fbsd_post_attach)
8390         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
8391         (fbsd_set_syscall_catchpoint)
8392         (super_xfer_partial, super_resume, super_wait)
8393         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
8394         (fbsd_handle_debug_trap): Remove target_ops parameter.
8395         (fbsd_nat_add_target): Delete.
8396         * fbsd-nat.h: Include "inf-ptrace.h".
8397         (fbsd_nat_add_target): Delete.
8398         (USE_SIGTRAP_SIGINFO): Define.
8399         (fbsd_nat_target): New class.
8400
8401         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
8402         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
8403         (amd64bsd_target): Delete.
8404         * amd64-bsd-nat.h: New file.
8405         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
8406         "x86-bsd-nat.h".
8407         (amd64_fbsd_nat_target): New class.
8408         (the_amd64_fbsd_nat_target): New.
8409         (amd64fbsd_read_description): Refactor as method of
8410         amd64_fbsd_nat_target.
8411         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
8412         (_initialize_amd64fbsd_nat): Adjust to C++ification.
8413         * amd64-nat.h (amd64bsd_target): Delete function declaration.
8414         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
8415         (i386bsd_store_inferior_registers): Remove target_ops parameter.
8416         (i386bsd_target): Delete.
8417         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
8418         (i386bsd_fetch_inferior_registers)
8419         (i386bsd_store_inferior_registers): Declare.
8420         (i386_bsd_nat_target): New class.
8421         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
8422         (the_i386_fbsd_nat_target): New.
8423         (i386fbsd_resume, i386fbsd_read_description): Refactor as
8424         i386_fbsd_nat_target methods.
8425         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
8426         (_initialize_i386fbsd_nat): Adjust to C++ification.
8427         * x86-bsd-nat.c (super_mourn_inferior): Delete.
8428         (x86bsd_mourn_inferior, x86bsd_target): Delete.
8429         (_initialize_x86_bsd_nat): Adjust to C++ification.
8430         * x86-bsd-nat.h: Include "x86-nat.h".
8431         (x86bsd_target): Delete declaration.
8432         (x86bsd_nat_target): New class.
8433
8434         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
8435         (the_aarch64_fbsd_nat_target): New.
8436         (aarch64_fbsd_fetch_inferior_registers)
8437         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
8438         aarch64_fbsd_nat_target.
8439         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
8440         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
8441         (the_alpha_bsd_nat_target): New.
8442         (alphabsd_fetch_inferior_registers)
8443         (alphabsd_store_inferior_registers): Refactor as
8444         alpha_bsd_nat_target methods.
8445         (_initialize_alphabsd_nat): Refactor as methods of
8446         alpha_bsd_nat_target.
8447         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
8448         (the_amd64_nbsd_nat_target): New.
8449         (_initialize_amd64nbsd_nat): Adjust to C++ification.
8450         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
8451         (the_amd64_obsd_nat_target): New.
8452         (_initialize_amd64obsd_nat): Adjust to C++ification.
8453         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
8454         (the_arm_fbsd_nat_target): New.
8455         (arm_fbsd_fetch_inferior_registers)
8456         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
8457         (_initialize_arm_fbsd_nat): Refactor as methods of
8458         arm_fbsd_nat_target.
8459         (_initialize_arm_fbsd_nat): Adjust to C++ification.
8460         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
8461         (the_arm_netbsd_nat_target): New.
8462         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
8463         arm_netbsd_nat_target.
8464         (_initialize_arm_netbsd_nat): Adjust to C++ification.
8465         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
8466         (the_hppa_nbsd_nat_target): New.
8467         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
8468         hppa_nbsd_nat_target methods.
8469         (_initialize_hppanbsd_nat): Adjust to C++ification.
8470         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
8471         (the_hppa_obsd_nat_target): New.
8472         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
8473         methods of hppa_obsd_nat_target.
8474         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
8475         add_target.
8476         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
8477         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
8478         add_target.
8479         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
8480         (_initialize_i386obsd_nat): Use add_target.
8481         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
8482         (the_m68k_bsd_nat_target): New.
8483         (m68kbsd_fetch_inferior_registers)
8484         (m68kbsd_store_inferior_registers): Refactor as methods of
8485         m68k_bsd_nat_target.
8486         (_initialize_m68kbsd_nat): Adjust to C++ification.
8487         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
8488         (the_mips_fbsd_nat_target): New.
8489         (mips_fbsd_fetch_inferior_registers)
8490         (mips_fbsd_store_inferior_registers): Refactor as methods of
8491         mips_fbsd_nat_target.
8492         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
8493         add_target.
8494         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
8495         (the_mips_nbsd_nat_target): New.
8496         (mipsnbsd_fetch_inferior_registers)
8497         (mipsnbsd_store_inferior_registers): Refactor as methods of
8498         mips_nbsd_nat_target.
8499         (_initialize_mipsnbsd_nat): Adjust to C++ification.
8500         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
8501         (the_mips64_obsd_nat_target): New.
8502         (mips64obsd_fetch_inferior_registers)
8503         (mips64obsd_store_inferior_registers): Refactor as methods of
8504         mips64_obsd_nat_target.
8505         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
8506         add_target.
8507         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
8508         nbsd_nat_target.
8509         * nbsd-nat.h: Include "inf-ptrace.h".
8510         (nbsd_nat_target): New class.
8511         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
8512         (obsd_wait): Refactor as methods of obsd_nat_target.
8513         (obsd_add_target): Delete.
8514         * obsd-nat.h: Include "inf-ptrace.h".
8515         (obsd_nat_target): New class.
8516         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
8517         (the_ppc_fbsd_nat_target): New.
8518         (ppcfbsd_fetch_inferior_registers)
8519         (ppcfbsd_store_inferior_registers): Refactor as methods of
8520         ppc_fbsd_nat_target.
8521         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
8522         add_target.
8523         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
8524         (the_ppc_nbsd_nat_target): New.
8525         (ppcnbsd_fetch_inferior_registers)
8526         (ppcnbsd_store_inferior_registers): Refactor as methods of
8527         ppc_nbsd_nat_target.
8528         (_initialize_ppcnbsd_nat): Adjust to C++ification.
8529         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
8530         (the_ppc_obsd_nat_target): New.
8531         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
8532         methods of ppc_obsd_nat_target.
8533         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
8534         add_target.
8535         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
8536         (the_sh_nbsd_nat_target): New.
8537         (shnbsd_fetch_inferior_registers)
8538         (shnbsd_store_inferior_registers): Refactor as methods of
8539         sh_nbsd_nat_target.
8540         (_initialize_shnbsd_nat): Adjust to C++ification.
8541         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
8542         (inf_ptrace_xfer_partial): Delete.
8543         (sparc_xfer_partial, sparc_target): Delete.
8544         * sparc-nat.h (sparc_fetch_inferior_registers)
8545         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
8546         (sparc_target): Delete function declaration.
8547         (sparc_target): New template class.
8548         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
8549         (_initialize_sparcnbsd_nat): Adjust to C++ification.
8550         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
8551         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
8552         add_target.
8553         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
8554         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
8555         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
8556         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
8557         add_target.
8558         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
8559         (the_vax_bsd_nat_target): New.
8560         (vaxbsd_fetch_inferior_registers)
8561         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
8562         methods.
8563         (_initialize_vaxbsd_nat): Adjust to C++ification.
8564
8565         * bsd-kvm.c (bsd_kvm_target): New class.
8566         (bsd_kvm_ops): Now a bsd_kvm_target.
8567         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
8568         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
8569         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
8570         bsd_kvm_target.
8571         (bsd_kvm_return_one): Delete.
8572         (bsd_kvm_add_target): Adjust to C++ification.
8573
8574         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
8575         (nto_procfs_target_procfs): New classes.
8576         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
8577         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
8578         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
8579         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
8580         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
8581         (procfs_remove_hw_breakpoint, procfs_resume)
8582         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
8583         (procfs_kill_inferior, procfs_store_registers)
8584         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
8585         as methods of nto_procfs_target.
8586         (nto_procfs_ops): Now an nto_procfs_target_procfs.
8587         (nto_native_ops): Delete.
8588         (procfs_open, procfs_native_open): Delete.
8589         (nto_native_ops): Now an nto_procfs_target_native.
8590         (init_procfs_targets): Adjust to C++ification.
8591         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
8592         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
8593         Refactor as methods of nto_procfs_target.
8594
8595         * go32-nat.c (go32_nat_target): New class.
8596         (the_go32_nat_target): New.
8597         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
8598         (go32_store_registers, go32_xfer_partial, go32_files_info)
8599         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
8600         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
8601         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
8602         (go32_pid_to_str): Refactor as methods of go32_nat_target.
8603         (go32_target): Delete.
8604         (_initialize_go32_nat): Adjust to C++ification.
8605
8606         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
8607         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
8608         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
8609         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
8610         gnu_nat_target.
8611         (gnu_target): Delete.
8612         * gnu-nat.h (gnu_target): Delete.
8613         (gnu_nat_target): New class.
8614         * i386-gnu-nat.c (gnu_base_target): New.
8615         (i386_gnu_nat_target): New class.
8616         (the_i386_gnu_nat_target): New.
8617         (_initialize_i386gnu_nat): Adjust to C++ification.
8618
8619 2018-05-02  Pedro Alves  <palves@redhat.com>
8620
8621         * bfd-target.c (target_bfd_xclose): Rename to ...
8622         (target_bfd_close): ... this.
8623         (target_bfd_reopen): Adjust.
8624         * target.c (target_close): Remove references to to_xclose.
8625         * target.h (target_ops::to_xclose): Delete.
8626         (target_ops::to_close): Update comments.
8627
8628 2018-05-02  Pedro Alves  <palves@redhat.com>
8629
8630         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
8631         "linux-nat.h".
8632         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
8633         * inf-ptrace.c (inf_ptrace_register_u_offset)
8634         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
8635         (inf_ptrace_store_register, inf_ptrace_store_registers)
8636         (inf_ptrace_trad_target): Move to ...
8637         * linux-nat-trad.c: ... this new file.
8638         * linux-nat-trad.h: New file.
8639         * linux-nat.c (linux_target_install_ops): Make extern.
8640         (linux_trad_target): Delete.
8641         * linux-nat.h (linux_trad_target): Delete declaration.
8642         (linux_target_install_ops): Declare.
8643         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
8644         "linux-nat.h".
8645
8646 2018-05-02  Pedro Alves  <palves@redhat.com>
8647
8648         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
8649         procfs_target/add_target here.
8650         * procfs.c (procfs_target): Make static.
8651         (_initialize_procfs): Call add_target here.
8652         * procfs.h (struct target_ops): Remove forward declaration.
8653         (procfs_target): Remove declaration.
8654         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
8655
8656 2018-05-02  Pedro Alves  <palves@redhat.com>
8657
8658         * procfs.c (procfs_stopped_by_watchpoint)
8659         (procfs_insert_watchpoint, procfs_remove_watchpoint)
8660         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
8661         Forward declare.
8662         (procfs_use_watchpoints): Delete, move contents...
8663         (procfs_target): ... here.
8664         * procfs.h (procfs_use_watchpoints): Delete declaration.
8665         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
8666         procfs_use_watchpoints.
8667         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
8668         procfs_use_watchpoints.
8669
8670 2018-05-02  Tom Tromey  <tom@tromey.com>
8671
8672         PR python/20084:
8673         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
8674         and var_zuinteger_unlimited.
8675         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
8676         and PARAM_ZUINTEGER_UNLIMITED.
8677         (set_parameter_value): Handle var_zuinteger and
8678         var_zuinteger_unlimited.
8679         (add_setshow_generic): Likewise.
8680         (parmpy_init): Likewise.
8681
8682 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
8683
8684         PR rust/23124
8685         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
8686         pointer is not null before dereferencing it.
8687
8688 2018-04-30  Tom Tromey  <tom@tromey.com>
8689
8690         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
8691         is_mi_like_p.
8692
8693 2018-04-30  Tom Tromey  <tom@tromey.com>
8694
8695         * breakpoint.c (mention): Remove use of is_mi_like_p.
8696         (print_mention_ranged_breakpoint): Likewise.
8697         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
8698         of is_mi_like_p.
8699
8700 2018-04-30  Tom Tromey  <tom@tromey.com>
8701
8702         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
8703
8704 2018-04-30  Tom Tromey  <tom@tromey.com>
8705
8706         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
8707         (info_spu_event_command): Remove some uses of is_mi_like_p.
8708
8709 2018-04-30  Tom Tromey  <tom@tromey.com>
8710
8711         * python/py-framefilter.c (py_print_single_arg)
8712         (enumerate_locals, py_print_args, py_print_frame): Remove some
8713         uses of is_mi_like_p.
8714
8715 2018-04-30  Tom Tromey  <tom@tromey.com>
8716
8717         * ui-out.c: Update.
8718         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
8719         * ui-out.h (ui_out::is_mi_like_p): Now const.
8720         (ui_out::do_is_mi_like_p): Now const.
8721         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
8722
8723 2018-04-30  Tom Tromey  <tom@tromey.com>
8724
8725         * varobj.c (varobj_set_visualizer): Use new_reference.
8726         * python/python.c (gdbpy_decode_line): Use new_reference.
8727         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
8728         new_reference.
8729
8730 2018-04-30  Tom Tromey  <tom@tromey.com>
8731
8732         * varobj.c (install_new_value): Use new_reference.
8733         * value.h (value_incref): Return void.  Swap intro comment with
8734         value_decref.
8735         * value.c (set_value_parent): Use new_reference.
8736         (value_incref): Return void.  Update intro comment.
8737         (release_value): Use new_reference.
8738         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
8739
8740 2018-04-30  Tom Tromey  <tom@tromey.com>
8741
8742         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
8743         * gdb_bfd.h (new_bfd_ref): Remove.
8744         (gdb_bfd_open): Update comment.
8745         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
8746         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
8747         (gdb_bfd_fdopenr): Use new_reference.
8748         * exec.c (exec_file_attach): Use new_reference.
8749
8750 2018-04-30  Tom Tromey  <tom@tromey.com>
8751
8752         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
8753         method.
8754
8755 2018-04-30  Tom Tromey  <tom@tromey.com>
8756
8757         * jit.c (jit_read_code_entry): Use type_align.
8758         * i386-tdep.c (i386_gdbarch_init): Don't call
8759         set_gdbarch_long_long_align_bit.
8760         * gdbarch.sh: Remove long_long_align_bit.
8761         * gdbarch.c, gdbarch.h: Rebuild.
8762         * arc-tdep.c (arc_type_align): New function.
8763         (arc_gdbarch_init): Use arc_type_align.  Don't call
8764         set_gdbarch_long_long_align_bit.
8765
8766 2018-04-30  Tom Tromey  <tom@tromey.com>
8767
8768         * rust-lang.c (rust_type_alignment): Remove.
8769         (rust_composite_type): Use type_align.
8770
8771 2018-04-30  Tom Tromey  <tom@tromey.com>
8772
8773         * NEWS: Mention Type.align.
8774         * python/py-type.c (typy_get_alignof): New function.
8775         (type_object_getset): Add "alignof".
8776
8777 2018-04-30  Tom Tromey  <tom@tromey.com>
8778
8779         PR exp/17095:
8780         * NEWS: Update.
8781         * std-operator.def (UNOP_ALIGNOF): New operator.
8782         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
8783         New.
8784         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
8785         * c-lang.c (c_op_print_tab): Add alignof.
8786         * c-exp.y (ALIGNOF): New token.
8787         (exp): Add "ALIGNOF" production.
8788         (ident_tokens): Add _Alignof and alignof.
8789
8790 2018-04-30  Tom Tromey  <tom@tromey.com>
8791
8792         * i386-tdep.c (i386_type_align): New function.
8793         (i386_gdbarch_init): Update.
8794         * gdbarch.sh (type_align): New method.
8795         * gdbarch.c, gdbarch.h: Rebuild.
8796         * arch-utils.h (default_type_align): Declare.
8797         * arch-utils.c (default_type_align): New function.
8798         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
8799         (struct type) <align_log2>: New field.
8800         <instance_flags>: Now a bitfield.
8801         (TYPE_RAW_ALIGN): New macro.
8802         (type_align, type_raw_align, set_type_align): Declare.
8803         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
8804         functions.
8805         * dwarf2read.c (quirk_rust_enum): Set type alignment.
8806         (get_alignment, maybe_set_alignment): New functions.
8807         (read_structure_type, read_enumeration_type, read_array_type)
8808         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
8809         (read_subrange_type, read_base_type): Set type alignment.
8810
8811 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
8812
8813         * dwarf2read.c (read_index_from_section): Use bool.
8814
8815 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
8816
8817         PR gdb/22950
8818         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
8819         with #ifdef.
8820
8821 2018-04-29  John Reiser  <jreiser@BitWagon.com>
8822
8823         PR build/22873
8824         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
8825         last step, and do it atomically.
8826
8827 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
8828
8829         * compile/compile-c-types.c (convert_int, convert_float):
8830         Update for C FE v1.
8831
8832 2018-04-27  Tom Tromey  <tom@tromey.com>
8833
8834         PR rust/22545:
8835         * rust-lang.c (rust_inclusive_range_type_p): New function.
8836         (rust_range): Handle inclusive ranges.
8837         (rust_compute_range): Likewise.
8838         * rust-exp.y (struct rust_op) <inclusive>: New field.
8839         (DOTDOTEQ): New constant.
8840         (range_expr): Add "..=" productions.
8841         (operator_tokens): Add "..=" token.
8842         (ast_range): Add "inclusive" parameter.
8843         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
8844         ranges.
8845         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
8846         bounds values.
8847         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
8848         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
8849         Update comments.
8850         * expprint.c (print_subexp_standard): Handle new bounds values.
8851         (dump_subexp_body_standard): Likewise.
8852
8853 2018-04-27  Tom Tromey  <tom@tromey.com>
8854
8855         * configure: Rebuild.
8856         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
8857         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
8858         "OVERRIDE".
8859         (class symbol_needs_eval_context): Likewise.
8860         * dwarf2read.c (mock_mapped_index::symbol_name_count)
8861         (mock_mapped_index::symbol_name_at): Use "override".  Remove
8862         "virtual".
8863         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
8864         "override".
8865         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
8866         * aarch64-tdep.c (instruction_reader::read): Use "override".
8867         (instruction_reader_test::read): Likewise.
8868         * arm-tdep.c (instruction_reader::read): Use "override".
8869         (instruction_reader_thumb::read): Likewise.
8870
8871 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
8872
8873         PR remote/9665
8874         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
8875         instead of remote_send.
8876         (remote_send): Remove.
8877
8878 2018-04-26  Pedro Alves  <palves@redhat.com>
8879
8880         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
8881         find_function_start_sal instead of find_pc_line.
8882
8883 2018-04-26  Pedro Alves  <palves@redhat.com>
8884
8885         * breakpoint.c (set_breakpoint_location_function): Handle
8886         mst_data_gnu_ifunc.
8887         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
8888         * elfread.c (elf_symtab_read): Give data symbols with
8889         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
8890         (elf_rel_plt_read): Update comment.
8891         * linespec.c (convert_linespec_to_sals): Handle
8892         mst_data_gnu_ifunc.
8893         (minsym_found): Handle mst_data_gnu_ifunc.
8894         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
8895         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
8896         * parse.c (find_minsym_type_and_address): Handle
8897         mst_data_gnu_ifunc.
8898         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
8899         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
8900         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
8901         comment.
8902         <mst_data_gnu_ifunc>: New enumerator.
8903
8904 2018-04-26  Pedro Alves  <palves@redhat.com>
8905
8906         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
8907         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
8908         'want_trampoline' parameter by a lookup_msym_prefer parameter.
8909         Handle it.
8910         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
8911         (lookup_minimal_symbol_by_pc): Adjust.
8912         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
8913         (lookup_solib_trampoline_symbol_by_pc): Adjust.
8914         * minsyms.h (lookup_msym_prefer): New enum.
8915         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8916         parameter by a lookup_msym_prefer parameter.
8917
8918 2018-04-26  Pedro Alves  <palves@redhat.com>
8919
8920         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
8921         ends in "@plt" instead of looking at the symbol's section.
8922
8923 2018-04-26  Pedro Alves  <palves@redhat.com>
8924
8925         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
8926         all references.
8927         (find_pc_partial_function_gnu_ifunc): Rename to ...
8928         (find_pc_partial_function): ... this, and remove references to
8929         'is_gnu_ifunc_p'.
8930         (find_pc_partial_function): Delete old implementation.
8931         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
8932
8933 2018-04-26  Pedro Alves  <palves@redhat.com>
8934
8935         * linespec.c (struct bound_minimal_symbol_search_key): New.
8936         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
8937         skip first line if we found a GNU ifunc minimal symbol by name.
8938         (compare_msymbols): Change parameters to work with a destructured
8939         lhs minsym.
8940         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
8941         functions.
8942
8943 2018-04-26  Pedro Alves  <palves@redhat.com>
8944
8945         * breakpoint.c (set_breakpoint_location_function): Don't resolve
8946         ifunc targets here.  Instead, if we have an ifunc minsym, use its
8947         address/name.
8948         (add_location_to_breakpoint): Store the minsym and the objfile in
8949         the breakpoint location.
8950         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
8951         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
8952         Record the minsym in the sal.
8953         * symtab.h (symtab_and_line) <msymbol>: New field.
8954
8955 2018-04-26  Pedro Alves  <palves@redhat.com>
8956
8957         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
8958         unless we actually resolved the ifunc.
8959
8960 2018-04-26  Pedro Alves  <palves@redhat.com>
8961
8962         * c-exp.y (variable production): Prefer ifunc minsyms over
8963         regular function symbols.
8964         * symtab.c (find_gnu_ifunc): New function.
8965         * minsyms.h (lookup_msym_prefer): New enum.
8966         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8967         parameter by a lookup_msym_prefer parameter.
8968         * symtab.h (find_gnu_ifunc): New declaration.
8969
8970 2018-04-26  Pedro Alves  <palves@redhat.com>
8971
8972         * blockframe.c (find_gnu_ifunc_target_type): New function.
8973         (find_function_type): New.
8974         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
8975         return a value with a memory address.
8976         (eval_call): For calls to GNU ifunc functions, try to find the
8977         type of the target function from the type that the resolver
8978         returns.
8979         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
8980         symbols.
8981         * infcall.c (find_function_return_type): Delete.
8982         (find_function_addr): Add 'function_type' parameter.  For calls to
8983         GNU ifunc functions, try to find the type of the target function
8984         from the type that the resolver returns, and return it via
8985         FUNCTION_TYPE.
8986         (call_function_by_hand_dummy): Adjust to use the function type
8987         returned by find_function_addr.
8988         (find_function_addr): Add 'function_type' parameter and move
8989         description here.
8990         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
8991         declarations.
8992
8993 2018-04-26  Pedro Alves  <palves@redhat.com>
8994
8995         * c-exp.y (variable production): Skip finding an alias for ifunc
8996         symbols.
8997
8998 2018-04-26  Pedro Alves  <palves@redhat.com>
8999
9000         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
9001
9002 2018-04-25  Pedro Alves  <palves@redhat.com>
9003
9004         * infcmd.c (kill_command): Print the pid as string, not the whole
9005         thread's ptid.  Add comment.  s/has been killed/killed/ in output
9006         message.
9007         * remote.c (remote_detach_1): Print the pid as string, not the
9008         whole thread's ptid.
9009
9010 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
9011             Sergio Durigan Junior  <sergiodj@redhat.com>
9012             Pedro Alves  <palves@redhat.com>
9013
9014         * infcmd.c (kill_command): Print message when inferior has
9015         been killed.
9016         * inferior.c (print_inferior_events): Remove 'static'.  Set as
9017         '1'.
9018         (add_inferior): Improve message printed when
9019         'print_inferior_events' is on.
9020         (exit_inferior): Remove message printed when
9021         'print_inferior_events' is on.
9022         (detach_inferior): Improve message printed when
9023         'print_inferior_events' is on.
9024         (initialize_inferiors): Use 'add_inferior_silent' to set
9025         'current_inferior_'.
9026         * inferior.h (print_inferior_events): Declare here as
9027         'extern'.
9028         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
9029         '[Detaching...]' messages when 'print_inferior_events' is on.
9030         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
9031         as prefix/suffix for messages.  Remove periods.  Fix erroneous
9032         'Detaching after fork from child...', replace it by '... from
9033         parent...'.
9034         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
9035         prefix/suffix when printing 'Detaching...' messages.  Print
9036         them when 'print_inferior_events' is on.
9037         * remote.c (remote_detach_1): Print message when detaching
9038         from inferior and '!is_fork_parent'.
9039
9040 2018-04-24  Tom Tromey  <tom@tromey.com>
9041
9042         * cli-out.h: Reindent.
9043
9044 2018-04-24  Tom Tromey  <tom@tromey.com>
9045
9046         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
9047         (cli_ui_out::do_field_string): Use fputs_filtered.
9048         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
9049
9050 2018-04-23  Tom Tromey  <tom@tromey.com>
9051
9052         * guile/scm-frame.c (gdbscm_frame_read_var): Use
9053         gdb::unique_xmalloc_ptr.
9054
9055 2018-04-23  Tom Tromey  <tom@tromey.com>
9056
9057         * configure: Rebuild.
9058
9059 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
9060
9061         PR gdb/23095
9062         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
9063         prepare_for_testing.  Set normal_bp to r_debug_state if target
9064         is bsd.
9065
9066 2018-04-21  Pedro Alves  <palves@redhat.com>
9067             Rajendra SY  <rajendra.sy@gmail.com>
9068
9069         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
9070         * remote.c (extended_remote_attach): In all-stop mode, mark the
9071         thread as executing.
9072
9073 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
9074
9075         * thread.c (thread_apply_all_command): Fix comment.
9076         (thread_command): Fix comment.
9077
9078 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
9079
9080         * common/tdesc.h (tdesc_create_feature): Remove xml filename
9081         parameter.
9082         * features/aarch64-core.c (create_feature_aarch64_core):
9083         Regenerate.
9084         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
9085         Likewise.
9086         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
9087         Likewise.
9088         * features/i386/32bit-avx512.c
9089         (create_feature_i386_32bit_avx512): Likewise.
9090         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
9091         Likewise.
9092         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
9093         Likewise.
9094         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
9095         Likewise.
9096         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
9097         Likewise.
9098         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
9099         Likewise.
9100         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
9101         Likewise.
9102         * features/i386/64bit-avx512.c
9103         (create_feature_i386_64bit_avx512): Likewise.
9104         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
9105         Likewise.
9106         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
9107         Likewise.
9108         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
9109         Likewise.
9110         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
9111         Likewise.
9112         * features/i386/64bit-segments.c
9113         (create_feature_i386_64bit_segments): Likewise.
9114         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
9115         Likewise.
9116         * features/i386/x32-core.c
9117         (create_feature_i386_x32_core): Likewise.
9118         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
9119         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
9120         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
9121         * target-descriptions.c: In generated code, don't pass xml
9122         filename.
9123
9124 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9125
9126         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
9127         (print_xml_feature::visit_post): Likewise.
9128         (print_xml_feature::visit): Likewise.
9129         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
9130         (print_xml_feature): Add new class.
9131         * regformats/regdat.sh: Null xmltarget on feature targets.
9132         * target-descriptions.c (struct target_desc): Add xmltarget.
9133         (maintenance_check_tdesc_xml_convert): Add unittest function.
9134         (tdesc_get_features_xml): Add function to get xml.
9135         (maintenance_check_xml_descriptions): Test xml generation.
9136         * xml-tdesc.c (string_read_description_xml): Add function.
9137         * xml-tdesc.h (string_read_description_xml): Add declaration.
9138
9139 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9140
9141         * features/Makefile: Add feature marker to targets with new style
9142         target descriptions.
9143         * regformats/aarch64.dat: Regenerate.
9144         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
9145         * regformats/i386/amd64-avx-linux.dat: Likewise.
9146         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
9147         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
9148         * regformats/i386/amd64-linux.dat: Likewise.
9149         * regformats/i386/amd64-mpx-linux.dat: Likewise.
9150         * regformats/i386/amd64.dat: Likewise.
9151         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
9152         * regformats/i386/i386-avx-linux.dat: Likewise.
9153         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
9154         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
9155         * regformats/i386/i386-linux.dat: Likewise.
9156         * regformats/i386/i386-mmx-linux.dat: Likewise.
9157         * regformats/i386/i386-mpx-linux.dat: Likewise.
9158         * regformats/i386/i386.dat: Likewise.
9159         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
9160         * regformats/i386/x32-avx-linux.dat: Likewise.
9161         * regformats/i386/x32-linux.dat: Likewise.
9162         * regformats/tic6x-c62x-linux.dat: Likewise.
9163         * regformats/tic6x-c64x-linux.dat: Likewise.
9164         * regformats/tic6x-c64xp-linux.dat: Likewise.
9165         * regformats/regdat.sh: Parse feature marker.
9166
9167 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9168
9169         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
9170         (tdesc_osabi_name): Likewise.
9171         * target-descriptions.c (tdesc_architecture_name): Add new
9172         function.
9173         (tdesc_osabi_name): Likewise.
9174
9175 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9176
9177         * common/tdesc.c (tdesc_predefined_type): Move to here.
9178         (tdesc_named_type): Likewise.
9179         (tdesc_create_vector): Likewise.
9180         (tdesc_create_struct): Likewise.
9181         (tdesc_set_struct_size): Likewise.
9182         (tdesc_create_union): Likewise.
9183         (tdesc_create_flags): Likewise.
9184         (tdesc_create_enum): Likewise.
9185         (tdesc_add_field): Likewise.
9186         (tdesc_add_typed_bitfield): Likewise.
9187         (tdesc_add_bitfield): Likewise.
9188         (tdesc_add_flag): Likewise.
9189         (tdesc_add_enum_value): Likewise.
9190         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
9191         (struct tdesc_type_vector): Likewise.
9192         (struct tdesc_type_field): Likewise.
9193         (struct tdesc_type_with_fields): Likewise.
9194         (tdesc_create_enum): Add declaration.
9195         (tdesc_add_typed_bitfield): Likewise.
9196         (tdesc_add_enum_value): Likewise.
9197         * target-descriptions.c (tdesc_type_field): Move from here.
9198         (tdesc_type_builtin): Likewise.
9199         (tdesc_type_vector): Likewise.
9200         (tdesc_type_with_fields): Likewise.
9201         (tdesc_predefined_types): Likewise.
9202         (tdesc_named_type): Likewise.
9203         (tdesc_create_vector): Likewise.
9204         (tdesc_create_struct): Likewise.
9205         (tdesc_set_struct_size): Likewise.
9206         (tdesc_create_union): Likewise.
9207         (tdesc_create_flags): Likewise.
9208         (tdesc_create_enum): Likewise.
9209         (tdesc_add_field): Likewise.
9210         (tdesc_add_typed_bitfield): Likewise.
9211         (tdesc_add_bitfield): Likewise.
9212         (tdesc_add_flag): Likewise.
9213         (tdesc_add_enum_value): Likewise.
9214         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
9215         (tdesc_add_typed_bitfield): Likewise.
9216         (tdesc_add_enum_value): Likewise.
9217
9218 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9219
9220         * common/tdesc.c (tdesc_feature::accept): Move to here.
9221         (tdesc_feature::operator==): Likewise.
9222         (tdesc_create_reg): Likewise.
9223         * common/tdesc.h (tdesc_type_kind): Likewise.
9224         (struct tdesc_type): Likewise.
9225         (struct tdesc_feature): Likewise.
9226         * regformats/regdat.sh: Create a feature.
9227         * target-descriptions.c (tdesc_type_kind): Move from here.
9228         (tdesc_type): Likewise.
9229         (tdesc_type_up): Likewise.
9230         (tdesc_feature): Likewise.
9231         (tdesc_create_reg): Likewise.
9232
9233 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9234
9235         * Makefile.in: Add arch/tdesc.c
9236         * common/tdesc.c: New file.
9237         * common/tdesc.h (tdesc_element_visitor): Move to here.
9238         (tdesc_element): Likewise.
9239         (tdesc_reg): Likewise.
9240         (tdesc_reg_up): Likewise.
9241         * regformats/regdef.h (reg): Add offset to constructors.
9242         * target-descriptions.c (tdesc_element_visitor): Move from here.
9243         (tdesc_element): Likewise.
9244         (tdesc_reg): Likewise.
9245         (tdesc_reg_up): Likewise.
9246
9247 2018-04-17  Tom Tromey  <tom@tromey.com>
9248
9249         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
9250         discriminant field.
9251
9252 2018-04-17  Tom Tromey  <tom@tromey.com>
9253
9254         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
9255
9256 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9257
9258         * symtab.c (print_symbol_info): Skip printing filename and line
9259         number when `last' is NULL.
9260         (symtab_symbol_info): Use empty string instead of NULL for first
9261         invocation of print_symbol_info.
9262         (rbreak_command): Pass NULL to `last' parameter of
9263         print_symbol_info.
9264
9265 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
9266
9267         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
9268         instead of nullptr.
9269
9270 2018-04-16  Pedro Alves  <palves@redhat.com>
9271
9272         * MAINTAINERS (sh): Remove.
9273         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
9274         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
9275         (ALLDEPFILES): Remove sh64-tdep.c.
9276         * NEWS: Mentions that support for SH-5/SH64 is removed.
9277         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
9278         (sh*-*-openbsd*): Ditto.
9279         (sh64-*-elf*): Remove.
9280         (sh*): Remove.
9281         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
9282         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
9283         * sh-tdep.c: No longer include "sh64-tdep.h".
9284         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
9285         * sh64-tdep.c, sh64-tdep.h: Remove files.
9286
9287 2018-04-16  Pedro Alves  <palves@redhat.com>
9288
9289         * MAINTAINERS: Remove m88k.
9290         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
9291         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
9292         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
9293         * NEWS: Mention that support for m88k was removed.
9294         * configure.host (m88*-*-*): Remove support.
9295         * configure.nat (m88k-*-*): Remove support.
9296         * configure.tgt (m88*-*-openbsd*): Remove.
9297         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
9298
9299 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
9300
9301         * configure.tgt (x86_tobjs): New variable.
9302         (amd64_tobjs, i386_tobjs): Use it.
9303
9304 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9305
9306         * symtab.c (print_symbol_info): Precede the symbol definition by
9307         the line number when available.
9308         * NEWS: Advertise this enhancement.
9309
9310 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
9311
9312         * NEWS (New options): announce set/show record btrace cpu.
9313         * btrace.c: Include record-btrace.h.
9314         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
9315         the vendor is unknown.
9316         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
9317         Maybe overwrite the btrace configuration's cpu.
9318         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
9319         (btrace_fetch): Add cpu parameter.  Update callers.
9320         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
9321         Maybe overwrite the btrace configuration's cpu.  Skip enabling
9322         errata workarounds if the vendor is unknown.
9323         * python/py-record-btrace.c: Include record-btrace.h.
9324         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
9325         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
9326         * record-btrace.c (record_btrace_cpu_state_kind): New.
9327         (record_btrace_cpu): New.
9328         (set_record_btrace_cpu_cmdlist): New.
9329         (record_btrace_get_cpu): New.
9330         (require_btrace_thread, record_btrace_info)
9331         (record_btrace_resume_thread): Call record_btrace_get_cpu.
9332         (cmd_set_record_btrace_cpu_none): New.
9333         (cmd_set_record_btrace_cpu_auto): New.
9334         (cmd_set_record_btrace_cpu): New.
9335         (cmd_show_record_btrace_cpu): New.
9336         (_initialize_record_btrace): Initialize set/show record btrace cpu
9337         commands.
9338         * record-btrace.h (record_btrace_get_cpu): New.
9339
9340 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
9341
9342         * record.c (set_record_command): Fix typo in message.
9343
9344 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
9345
9346         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
9347
9348 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
9349
9350         * infrun.c (process_event_stop_test): Call
9351         gdbarch_in_indirect_branch_thunk.
9352         * gdbarch.sh (in_indirect_branch_thunk): New.
9353         * gdbarch.c: Regenerated.
9354         * gdbarch.h: Regenerated.
9355         * x86-tdep.h: New.
9356         * x86-tdep.c: New.
9357         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
9358         (HFILES_NO_SRCDIR): Add x86-tdep.h.
9359         (ALLDEPFILES): Add x86-tdep.c.
9360         * arch-utils.h (default_in_indirect_branch_thunk): New.
9361         * arch-utils.c (default_in_indirect_branch_thunk): New.
9362         * i386-tdep: Include x86-tdep.h.
9363         (i386_in_indirect_branch_thunk): New.
9364         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
9365         function.
9366         * amd64-tdep: Include x86-tdep.h.
9367         (amd64_in_indirect_branch_thunk): New.
9368         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
9369
9370 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
9371
9372         PR gdb/23053
9373         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
9374         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
9375         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
9376         regression.
9377
9378 2018-04-12  Tom Tromey  <tom@tromey.com>
9379
9380         * rust-lang.c (rust_print_struct_def): Remove univariant code.
9381         (rust_evaluate_subexp): Likewise.
9382
9383 2018-04-12  Pedro Alves  <palves@redhat.com>
9384
9385         * procfs.c (procfs_detach): Make forward declaration's prototype
9386         match definition's protototype.
9387         (proc_get_LDT_entry): Remove stale do_cleanups call.
9388
9389 2018-04-12  Pedro Alves  <palves@redhat.com>
9390
9391         * target.h (target_ops::to_has_exited): Delete.
9392         (target_has_exited): Delete.
9393         * target-delegates.c: Regenerate.
9394
9395 2018-04-11  Pedro Alves  <palves@redhat.com>
9396
9397         * target.c (fileio_fh_t::t): Add comment.
9398         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
9399         (target_fileio_close): Handle a NULL target.
9400         (invalidate_fileio_fh): New.
9401         (target_close): Call it.
9402         * remote.c (remote_hostio_send_command): No longer check whether
9403         remote_desc is open.
9404
9405 2018-04-11  Pedro Alves  <palves@redhat.com>
9406
9407         * target.c (fileio_fh_t): Make it a named struct instead of a
9408         typedef.
9409         (fileio_fh_t::is_closed): New method.
9410         (DEF_VEC_O (fileio_fh_t)): Remove.
9411         (fileio_fhandles): Now a std::vector.
9412         (is_closed_fileio_fh): Delete.
9413         (acquire_fileio_fd): Adjust.  Rename parameters.
9414         (release_fileio_fd): Adjust.
9415         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
9416         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
9417         (target_fileio_close): Adjust.
9418
9419 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
9420
9421         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
9422         index.
9423
9424 2018-04-10  Pedro Alves  <palves@redhat.com>
9425
9426         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
9427         (scoped_finish_thread_state): New class.
9428         * infcmd.c (run_command_1): Use it instead of finish_thread_state
9429         cleanup.
9430         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
9431         (fetch_inferior_event, normal_stop): Likewise.
9432         * thread.c (finish_thread_state_cleanup): Delete.
9433
9434 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9435             Pedro Alves  <palves@redhat.com>
9436
9437         * value.c: Include "selftest.h" and "common/array-view.h".
9438         (struct range) <operator ==>: New.
9439         (test_ranges_contain): New.
9440         (check_ranges_vector): New.
9441         (test_insert_into_bit_range_vector): New.
9442         (_initialize_values): Register selftests.
9443         * common/array-view.h (operator==, operator!=): New.
9444
9445 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9446
9447         * common/gdb_vecs.h (unordered_remove): Add overload that takes
9448         an iterator.
9449         * inline-frame.c: Include <algorithm>.
9450         (struct inline_state): Add constructor.
9451         (inline_state_s): Remove.
9452         (DEF_VEC_O(inline_state_s)): Remove.
9453         (inline_states): Change type to std::vector.
9454         (find_inline_frame_state): Adjust to std::vector.
9455         (allocate_inline_frame_state): Remove.
9456         (clear_inline_frame_state): Adjust to std::vector.
9457         (skip_inline_frames): Adjust to std::vector.
9458
9459 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9460
9461         * tracepoint.h (struct trace_state_variable): Add constructor.
9462         <name>: Change type to std::string.
9463         * tracepoint.c (tsv_s): Remove.
9464         (DEF_VEC_O(tsv_s)): Remove.
9465         (tvariables): Change to std::vector.
9466         (create_trace_state_variable): Adjust to std::vector.
9467         (find_trace_state_variable): Likewise.
9468         (find_trace_state_variable_by_number): Likewise.
9469         (delete_trace_state_variable): Likewise.
9470         (trace_variable_command): Adjust to std::string.
9471         (delete_trace_variable_command): Likewise.
9472         (tvariables_info_1): Adjust to std::vector.
9473         (save_trace_state_variables): Likewise.
9474         (start_tracing): Likewise.
9475         (merge_uploaded_trace_state_variables): Adjust to std::vector
9476         and std::string.
9477         * target.h (struct target_ops)
9478         <to_download_trace_state_variable>: Pass reference to
9479         trace_state_variable.
9480         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
9481         * target-delegates.c: Re-generate.
9482         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
9483         (mi_tsv_deleted): Likewise.
9484         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
9485         * remote.c (remote_download_trace_state_variable): Change
9486         pointer to reference and adjust.
9487         * make-target-delegates (parse_argtypes): Handle references.
9488         (write_function_header): Likewise.
9489         (munge_type): Likewise.
9490
9491 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9492
9493         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9494         string_view-selftests.c.
9495         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
9496         testsuite.
9497         * unittests/basic_string_view/cons/char/1.cc: Likewise.
9498         * unittests/basic_string_view/cons/char/2.cc: Likewise.
9499         * unittests/basic_string_view/cons/char/3.cc: Likewise.
9500         * unittests/basic_string_view/element_access/char/1.cc:
9501         Likewise.
9502         * unittests/basic_string_view/element_access/char/empty.cc:
9503         Likewise.
9504         * unittests/basic_string_view/element_access/char/front_back.cc:
9505         Likewise.
9506         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
9507         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
9508         Likewise.
9509         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
9510         Likewise.
9511         * unittests/basic_string_view/modifiers/swap/char/1.cc:
9512         Likewise.
9513         * unittests/basic_string_view/operations/compare/char/1.cc:
9514         Likewise.
9515         * unittests/basic_string_view/operations/compare/char/13650.cc:
9516         Likewise.
9517         * unittests/basic_string_view/operations/copy/char/1.cc:
9518         Likewise.
9519         * unittests/basic_string_view/operations/data/char/1.cc:
9520         Likewise.
9521         * unittests/basic_string_view/operations/find/char/1.cc:
9522         Likewise.
9523         * unittests/basic_string_view/operations/find/char/2.cc:
9524         Likewise.
9525         * unittests/basic_string_view/operations/find/char/3.cc:
9526         Likewise.
9527         * unittests/basic_string_view/operations/find/char/4.cc:
9528         Likewise.
9529         * unittests/basic_string_view/operations/rfind/char/1.cc:
9530         Likewise.
9531         * unittests/basic_string_view/operations/rfind/char/2.cc:
9532         Likewise.
9533         * unittests/basic_string_view/operations/rfind/char/3.cc:
9534         Likewise.
9535         * unittests/basic_string_view/operations/substr/char/1.cc:
9536         Likewise.
9537         * unittests/basic_string_view/operators/char/2.cc: Likewise.
9538         * unittests/string_view-selftests.c: New file.
9539
9540 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9541
9542         * unittests/basic_string_view/capacity/1.cc: New file.
9543         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
9544         * unittests/basic_string_view/cons/char/1.cc: New file.
9545         * unittests/basic_string_view/cons/char/2.cc: New file.
9546         * unittests/basic_string_view/cons/char/3.cc: New file.
9547         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
9548         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
9549         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
9550         * unittests/basic_string_view/element_access/char/1.cc: New file.
9551         * unittests/basic_string_view/element_access/char/2.cc: New file.
9552         * unittests/basic_string_view/element_access/char/empty.cc: New file.
9553         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
9554         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
9555         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
9556         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
9557         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
9558         * unittests/basic_string_view/include.cc: New file.
9559         * unittests/basic_string_view/inserters/char/1.cc: New file.
9560         * unittests/basic_string_view/inserters/char/2.cc: New file.
9561         * unittests/basic_string_view/inserters/char/3.cc: New file.
9562         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
9563         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
9564         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
9565         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
9566         * unittests/basic_string_view/literals/types.cc: New file.
9567         * unittests/basic_string_view/literals/values.cc: New file.
9568         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
9569         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
9570         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
9571         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
9572         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
9573         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
9574         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
9575         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
9576         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
9577         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
9578         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
9579         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
9580         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
9581         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
9582         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
9583         * unittests/basic_string_view/operations/data/char/1.cc: New file.
9584         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
9585         * unittests/basic_string_view/operations/find/char/1.cc: New file.
9586         * unittests/basic_string_view/operations/find/char/2.cc: New file.
9587         * unittests/basic_string_view/operations/find/char/3.cc: New file.
9588         * unittests/basic_string_view/operations/find/char/4.cc: New file.
9589         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
9590         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
9591         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
9592         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
9593         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
9594         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
9595         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
9596         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
9597         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
9598         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
9599         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
9600         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
9601         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
9602         * unittests/basic_string_view/operators/char/2.cc: New file.
9603         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
9604         * unittests/basic_string_view/range_access/char/1.cc: New file.
9605         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
9606         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
9607         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
9608         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
9609         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
9610         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
9611         * unittests/basic_string_view/requirements/typedefs.cc: New file.
9612         * unittests/basic_string_view/typedefs.cc: New file.
9613         * unittests/basic_string_view/types/1.cc: New file.
9614
9615 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9616
9617         * common/gdb_string_view.h: Remove libstdc++ implementation
9618         details, adjust to gdb reality.
9619         * common/gdb_string_view.tcc: Likewise.
9620         * cli/cli-script.c (struct string_view): Remove.
9621         (user_args) <m_args>: Change element type to gdb::string_view.
9622         (user_args::insert_args): Adjust.
9623
9624 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9625
9626         * common/gdb_string_view.h: New file.
9627         * common/gdb_string_view.tcc: New file.
9628
9629 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9630
9631         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
9632         * configure: Re-generate.
9633
9634 2018-04-09  Pedro Alves  <palves@redhat.com>
9635
9636         * gdbarch.sh: Include "observable.h" instead of "observer.h".
9637         (set_target_gdbarch): Call
9638         gdb::observers::architecture_changed.notify instead of
9639         observer_notify_architecture_changed.
9640
9641 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9642
9643         * tracepoint.c (struct current_traceframe_cleanup): Remove.
9644         (do_restore_current_traceframe_cleanup): Remove.
9645         (restore_current_traceframe_cleanup_dtor): Remove.
9646         (make_cleanup_restore_current_traceframe): Remove.
9647         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
9648         New.
9649         * tracepoint.h (struct scoped_restore_current_traceframe): New.
9650         * infrun.c (fetch_inferior_event): Use
9651         scoped_restore_current_traceframe.
9652
9653 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9654
9655         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
9656         Remove.
9657         <n_allocated_type_units>: Remove.
9658         <all_type_units>: Change to std::vector.
9659         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
9660         to std::vector change.
9661         (dwarf2_per_objfile::get_cutu): Likewise.
9662         (dwarf2_per_objfile::get_tu): Likewise.
9663         (create_signatured_type_table_from_index): Likewise.
9664         (create_signatured_type_table_from_debug_names): Likewise.
9665         (dw2_symtab_iter_next): Likewise.
9666         (dw2_print_stats): Likewise.
9667         (dw2_expand_all_symtabs): Likewise.
9668         (dw2_expand_marked_cus): Likewise.
9669         (dw2_debug_names_iterator::next): Likewise.
9670         (dwarf2_initialize_objfile): Likewise.
9671         (add_signatured_type_cu_to_table): Likewise.
9672         (create_all_type_units): Likewise.
9673         (add_type_unit): Likewise.
9674         (struct tu_abbrev_offset): Add constructor.
9675         (build_type_psymtabs_1): Adjust to std::vector change.
9676         (print_tu_stats): Likewise.
9677         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9678         (write_debug_names): Likewise.
9679
9680 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9681
9682         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
9683         Make an std::vector.
9684         <n_comp_units>: Remove.
9685         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
9686         to std::vector change.
9687         (dwarf2_per_objfile::get_cutu): Likewise.
9688         (dwarf2_per_objfile::get_cu): Likewise.
9689         (create_cus_from_index): Likewise.
9690         (create_addrmap_from_index): Likewise.
9691         (create_addrmap_from_aranges): Likewise.
9692         (dwarf2_read_index): Likewise.
9693         (dw2_find_last_source_symtab): Likewise.
9694         (dw2_map_symtabs_matching_filename): Likewise.
9695         (dw2_symtab_iter_next): Likewise.
9696         (dw2_print_stats): Likewise.
9697         (dw2_expand_all_symtabs): Likewise.
9698         (dw2_expand_symtabs_with_fullname): Likewise.
9699         (dw2_expand_marked_cus): Likewise.
9700         (dw2_map_symbol_filenames): Likewise.
9701         (create_cus_from_debug_names): Likewise.
9702         (dwarf2_read_debug_names): Likewise.
9703         (dw2_debug_names_iterator::next): Likewise.
9704         (dwarf2_initialize_objfile): Likewise.
9705         (set_partial_user): Likewise.
9706         (dwarf2_build_psymtabs_hard): Likewise.
9707         (read_comp_units_from_section): Remove arguments, adjust to
9708         std::vector change.
9709         (create_all_comp_units): Adjust to std::vector and
9710         read_comp_units_from_section changes.
9711         (dwarf2_find_containing_comp_unit): Adjust to std::vector
9712         change.
9713         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9714         (psyms_seen_size): Likewise.
9715         (write_gdbindex): Likewise.
9716         (write_debug_names): Likewise.
9717
9718 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9719
9720         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
9721         with dwarf2_per_objfile.
9722         (create_cus_from_index): Likewise.
9723         (create_signatured_type_table_from_index): Likewise.
9724         (dwarf2_read_index): Likewise.
9725         (dwarf2_initialize_objfile): Likewise.
9726         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
9727         per_cu rather than get_dwarf2_per_objfile.
9728
9729 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9730
9731         * dwarf2read.h (struct signatured_type): Forward declare.
9732         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
9733         New methods.
9734         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
9735         (dw2_get_cutu): ...this.
9736         (dwarf2_per_objfile::get_cu): Rename from...
9737         (dw2_get_cu): ...this.
9738         (dwarf2_per_objfile::get_tu): New.
9739         (create_addrmap_from_index): Adjust.
9740         (create_addrmap_from_aranges): Adjust.
9741         (dw2_find_last_source_symtab): Adjust.
9742         (dw2_map_symtabs_matching_filename): Adjust.
9743         (dw2_symtab_iter_next): Adjust.
9744         (dw2_print_stats): Adjust.
9745         (dw2_expand_all_symtabs): Adjust.
9746         (dw2_expand_symtabs_with_fullname): Adjust.
9747         (dw2_expand_marked_cus): Adjust.
9748         (dw_expand_symtabs_matching_file_matcher): Adjust.
9749         (dw2_map_symbol_filenames): Adjust.
9750         (dw2_debug_names_iterator::next): Adjust.
9751         (dwarf2_initialize_objfile): Adjust.
9752         (set_partial_user): Adjust.
9753         (dwarf2_build_psymtabs_hard): Adjust.
9754
9755 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9756
9757         * dwarf2read.c (create_signatured_type_table_from_debug_names):
9758         Remove unused variables.
9759         (dw2_map_symtabs_matching_filename): Likewise.
9760         (dwarf2_record_block_ranges): Likewise.
9761         (dwarf2_read_addr_index): Likewise.
9762         (follow_die_offset): Likewise.
9763
9764 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9765
9766         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
9767         to symbol_file_add_main.
9768
9769 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9770
9771         PR mi/22299
9772         * mi/mi-console.c (do_fputc_async_safe): New.
9773         (mi_console_file::write_async_safe): New.
9774         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
9775         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
9776         New.
9777         * ui-file.c (ui_file::putstrn): Adjust call to
9778         fputstrn_unfiltered.
9779         * utils.c (printchar): Replace do_fputs and do_fprintf
9780         parameters by do_fputc.
9781         (fputstr_filtered): Adjust call to printchar.
9782         (fputstr_unfiltered): Likewise.
9783         (fputstrn_filtered): Likewise.
9784         (fputstrn_unfiltered): Add do_fputc parameter, pass to
9785         printchar.
9786         * utils.h (do_fputc_ftype): New typedef.
9787         (fputstrn_unfiltered): Add do_fputc parameter.
9788
9789 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9790
9791         * regformats/i386/i386-avx.dat: Remove.
9792
9793 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
9794
9795         PR gdb/22979
9796         * amd64-tdep.c (amd64_none_init_abi): New function.
9797         (amd64_x32_none_init_abi): New function.
9798         (_initialize_amd64_tdep): Register handlers for x86-64 and
9799         x64_32 with GDB_OSABI_NONE.
9800         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
9801         GDB_OSABI_NONE osabi.
9802
9803 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
9804
9805         PR gdb/22980
9806         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
9807         GDB_OSABI_NONE.
9808         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
9809         * osabi.c (gdb_osabi_names): Add "unknown" entry.
9810
9811 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
9812
9813         * common/byte-vector.h (char_vector): New type.
9814         * target.h (target_read_alloc): Return
9815         gdb::optional<byte_vector>.
9816         (target_read_stralloc): Return gdb::optional<char_vector>.
9817         (target_get_osdata): Return gdb::optional<char_vector>.
9818         * target.c (target_read_alloc_1): Templatize.  Replacement
9819         manual memory management with vector.
9820         (target_read_alloc): Change return type, adjust.
9821         (target_read_stralloc): Change return type, adjust.
9822         (target_get_osdata): Change return type, adjust.
9823         * auxv.c (struct auxv_info) <length>: Remove.
9824         <data>: Change type to gdb::optional<byte_vector>.
9825         (auxv_inferior_data_cleanup): Free auxv_info with delete.
9826         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
9827         (target_auxv_search): Adjust.
9828         (fprint_target_auxv): Adjust.
9829         * avr-tdep.c (avr_io_reg_read_command): Adjust.
9830         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
9831         (linux_make_corefile_notes): Adjust.
9832         * osdata.c (get_osdata): Adjust.
9833         * remote.c (remote_get_threads_with_qxfer): Adjust.
9834         (remote_memory_map): Adjust.
9835         (remote_traceframe_info): Adjust.
9836         (btrace_read_config): Adjust.
9837         (remote_read_btrace): Adjust.
9838         (remote_pid_to_exec_file): Adjust.
9839         * solib-aix.c (solib_aix_get_library_list): Adjust.
9840         * solib-dsbt.c (decode_loadmap): Don't free buf.
9841         (dsbt_get_initial_loadmaps): Adjust.
9842         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
9843         * solib-target.c (solib_target_current_sos): Adjust.
9844         * tracepoint.c (sdata_make_value): Adjust.
9845         * xml-support.c (xinclude_start_include): Adjust.
9846         (xml_fetch_content_from_file): Adjust.
9847         * xml-support.h (xml_fetch_another): Change return type.
9848         (xml_fetch_content_from_file): Change return type.
9849         * xml-syscall.c (xml_init_syscalls_info): Adjust.
9850         * xml-tdesc.c (file_read_description_xml): Adjust.
9851         (fetch_available_features_from_target): Change return type.
9852         (target_fetch_description_xml): Adjust.
9853         (target_read_description_xml): Adjust.
9854
9855 2018-04-06  Tom Tromey  <tom@tromey.com>
9856
9857         * value.c (~value): Update.
9858         (struct value) <contents>: Now unique_xmalloc_ptr.
9859         (value_contents_bits_eq, allocate_value_contents)
9860         (value_contents_raw, value_contents_all_raw)
9861         (value_contents_for_printing, value_contents_for_printing_const)
9862         (set_value_enclosing_type): Update.
9863
9864 2018-04-06  Tom Tromey  <tom@tromey.com>
9865
9866         * value.c (range_s): Remove typedef, VEC.
9867         (struct range): Add operator<.
9868         (range_lessthan): Remove.
9869         (ranges_contain): Change type.
9870         (~value): Update.
9871         (struct value) <unavailable, optimized_out>: Now std::vector.
9872         (value_entirely_available)
9873         (value_entirely_covered_by_range_vector)
9874         (value_entirely_unavailable, value_entirely_optimized_out):
9875         Update.
9876         (insert_into_bit_range_vector): Change argument type.
9877         (find_first_range_overlap): Likewise.
9878         (struct ranges_and_idx, value_contents_bits_eq)
9879         (require_not_optimized_out, require_available): Update.
9880         (ranges_copy_adjusted): Change argument types.
9881         (value_optimized_out, value_copy, value_fetch_lazy): Update.
9882
9883 2018-04-06  Tom Tromey  <tom@tromey.com>
9884
9885         * value.c (~value): Update.
9886         (struct value) <parent>: Now a value_ref_ptr.
9887         (value_parent, set_value_parent, value_address, value_copy):
9888         Update.
9889
9890 2018-04-06  Tom Tromey  <tom@tromey.com>
9891
9892         * value.c (struct value): Add constructor, destructor, and member
9893         initializers.
9894         (allocate_value_lazy, value_decref): Update.
9895
9896 2018-04-06  Tom Tromey  <tom@tromey.com>
9897
9898         * value.c (struct value) <released, next>: Remove.
9899         (all_values): Now a std::vector.
9900         (allocate_value_lazy): Update.
9901         (value_next): Remove.
9902         (value_mark, value_free_to_mark, release_value)
9903         (value_release_to_mark): Update.
9904
9905 2018-04-06  Tom Tromey  <tom@tromey.com>
9906
9907         * value.h (fetch_subexp_value, value_release_to_mark): Update.
9908         (free_value_chain): Remove.
9909         * value.c (free_value_chain): Remove.
9910         (value_release_to_mark): Return a std::vector.
9911         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
9912         std::vector.
9913         (check_condition): Update.
9914         * eval.c (fetch_subexp_value): Change "val_chain" to a
9915         std::vector.
9916         * breakpoint.c (update_watchpoint): Update.
9917         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
9918
9919 2018-04-06  Tom Tromey  <tom@tromey.com>
9920
9921         * value.h (free_all_values): Remove.
9922         * value.c (free_all_values): Remove.
9923
9924 2018-04-06  Tom Tromey  <tom@tromey.com>
9925
9926         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
9927         (value_history_chain, value_history_count): Remove.
9928         (value_history): New global.
9929         (record_latest_value, access_value_history, show_values)
9930         (preserve_values): Update.
9931
9932 2018-04-06  Tom Tromey  <tom@tromey.com>
9933
9934         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
9935         * varobj.c (varobj_set_display_format, varobj_set_value)
9936         (install_default_visualizer, construct_visualizer)
9937         (install_new_value, ~varobj, varobj_get_value_type)
9938         (my_value_of_variable, varobj_editable_p): Update.
9939         * c-varobj.c (c_describe_child, c_value_of_variable)
9940         (cplus_number_of_children, cplus_describe_child): Update.
9941         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
9942         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
9943         (ada_value_of_variable, ada_value_is_changeable_p): Update.
9944
9945 2018-04-06  Tom Tromey  <tom@tromey.com>
9946
9947         * printcmd.c (last_examine_address): Change type to
9948         value_ref_ptr.
9949         (do_examine, x_command): Update.
9950
9951 2018-04-06  Tom Tromey  <tom@tromey.com>
9952
9953         * value.c (release_value): Update.
9954         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
9955         (struct bpstats) <val>: Now a value_ref_ptr.
9956         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9957         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9958         (~watchpoint, print_it_watchpoint, watch_command_1)
9959         (invalidate_bp_value_on_memory_change): Update.
9960
9961 2018-04-06  Tom Tromey  <tom@tromey.com>
9962
9963         * varobj.c (varobj_clear_saved_item)
9964         (update_dynamic_varobj_children, install_new_value, ~varobj):
9965         Update.
9966         * value.h (value_incref): Move declaration earlier.
9967         (value_decref): Rename from value_free.
9968         (struct value_ref_policy): New.
9969         (value_ref_ptr): New typedef.
9970         (struct value_deleter): Remove.
9971         (gdb_value_up): Remove typedef.
9972         (release_value): Change return type.
9973         (release_value_or_incref): Remove.
9974         * value.c (set_value_parent): Update.
9975         (value_incref): Change return type.
9976         (value_decref): Rename from value_free.
9977         (value_free_to_mark, free_all_values, free_value_chain): Update.
9978         (release_value): Return value_ref_ptr.
9979         (release_value_or_incref): Remove.
9980         (record_latest_value, set_internalvar, clear_internalvar):
9981         Update.
9982         * stack.c (info_frame_command): Don't call value_free.
9983         * python/py-value.c (valpy_dealloc, valpy_new)
9984         (value_to_value_object): Update.
9985         * printcmd.c (do_examine): Update.
9986         * opencl-lang.c (lval_func_free_closure): Update.
9987         * mi/mi-main.c (register_changed_p): Don't call value_free.
9988         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
9989         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
9990         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
9991         value_free.
9992         * guile/scm-value.c (vlscm_free_value_smob)
9993         (vlscm_scm_from_value): Update.
9994         * frame.c (frame_register_unwind, frame_unwind_register_signed)
9995         (frame_unwind_register_unsigned, get_frame_register_bytes)
9996         (put_frame_register_bytes): Don't call value_free.
9997         * findvar.c (address_from_register): Don't call value_free.
9998         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
9999         * dwarf2loc.c (entry_data_value_free_closure)
10000         (value_of_dwarf_reg_entry, free_pieced_value_closure)
10001         (dwarf2_evaluate_loc_desc_full): Update.
10002         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
10003         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
10004         (~watchpoint, watch_command_1)
10005         (invalidate_bp_value_on_memory_change): Update.
10006         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
10007
10008 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
10009
10010         PR gdb/23022
10011         * warning.m4: Add -Wno-error=deprecated-register.
10012         * configure: Re-generate.
10013
10014 2018-04-05  Tom Tromey  <tom@tromey.com>
10015
10016         * linespec.h: Remove include of "vec.h".
10017
10018 2018-04-05  Tom Tromey  <tom@tromey.com>
10019
10020         * linespec.c (typep): Remove typedef.
10021         (find_methods, find_superclass_methods): Take a std::vector.
10022         (find_method): Use std::vector.
10023
10024 2018-04-05  Tom Tromey  <tom@tromey.com>
10025
10026         * utils.c (compare_strings): Remove.
10027         * utils.h (compare_strings): Remove.
10028         * objc-lang.h (find_imps): Update.
10029         * objc-lang.c (find_methods): Take a std::vector.
10030         (uniquify_strings, find_imps): Likewise.
10031         * linespec.c (find_methods): Take a std::vector.
10032         (decode_objc): Use std::vector.
10033         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
10034         a std::vector.
10035         (find_method, find_function_symbols): Use std::vector.
10036
10037 2018-04-05  Tom Tromey  <tom@tromey.com>
10038
10039         * completer.c (completion_tracker::completion_tracker): Remove
10040         cast.
10041         (completion_tracker::discard_completions): Likewise.
10042         * breakpoint.c (ambiguous_names_p): Remove cast.
10043         * ada-lang.c (_initialize_ada_language): Remove cast.
10044         * utils.h (streq): Update.
10045         (streq_hash): Add new declaration.
10046         * utils.c (streq): Return bool.
10047         (streq_hash): New function.
10048
10049 2018-04-05  Tom Tromey  <tom@tromey.com>
10050
10051         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
10052         Remove a string copy.
10053
10054 2018-04-05  Tom Tromey  <tom@tromey.com>
10055
10056         * linespec.c (filter_results): Use std::vector.
10057         (decode_line_2, decode_line_full): Update.
10058
10059 2018-04-05  Tom Tromey  <tom@tromey.com>
10060
10061         * linespec.c (canonical_to_fullform): Return std::string.
10062         (filter_results): Update.
10063         (struct decode_line_2_item): Add constructor.
10064         <fullform, displayform>: Now std::string.
10065         (decode_line_2_compare_items): Now a std::sort comparator.
10066         (decode_line_2): Update.
10067
10068 2018-04-05  Tom Tromey  <tom@tromey.com>
10069
10070         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
10071         (unexpected_linespec_error): Update.
10072         (linespec_parse_basic, parse_linespec): Update.
10073
10074 2018-04-05  Tom Tromey  <tom@tromey.com>
10075
10076         * linespec.c (linespec_parse_basic): Reindent.
10077
10078 2018-04-05  Tom Tromey  <tom@tromey.com>
10079
10080         * minsyms.h (iterate_over_minimal_symbols): Update.
10081         * minsyms.c (iterate_over_minimal_symbols): Take a
10082         gdb::function_view.
10083         * linespec.c (struct collect_minsyms): Remove.
10084         (compare_msyms): Now a std::sort comparator.
10085         (add_minsym): Add parameters.
10086         (search_minsyms_for_name): Update.  Use std::vector.
10087
10088 2018-04-03  Tom Tromey  <tom@tromey.com>
10089
10090         * mipsread.c (read_alphacoff_dynamic_symtab): Use
10091         gdb::byte_vector.
10092
10093 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
10094
10095         * MAINTAINERS (Write After Approval): Add Weimin Pan.
10096
10097 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
10098
10099         PR gdb/16959
10100         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
10101         printing static type.
10102
10103 2018-04-01  Tom Tromey  <tom@tromey.com>
10104
10105         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
10106         (rs6000_xfer_shared_libraries): Update.
10107
10108 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
10109
10110         * common/gdb_vecs.h (char_ptr): Remove.
10111         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
10112
10113 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
10114
10115         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
10116         with std::vector.
10117         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
10118
10119 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
10120
10121         * tracepoint.h (struct uploaded_tp): Initialize fields.
10122         <actions, step_actions, cmd_strings>: Change type to
10123         std::vector<char *>.
10124         * tracepoint.c (get_uploaded_tp): Allocate with new.
10125         (free_uploaded_tps): Free with delete.
10126         (parse_tracepoint_definition): Adjust to std::vector change.
10127         * breakpoint.c (read_uploaded_action): Likewise.
10128         (create_tracepoint_from_upload): Likewise.
10129         * ctf.c (ctf_write_uploaded_tp): Likewise.
10130         (SET_ARRAY_FIELD): Likewise.
10131         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
10132
10133 2018-03-30  Tom Tromey  <tom@tromey.com>
10134
10135         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
10136         std::unique_ptr.
10137         (svr4_keep_data_in_core): Update.
10138         (svr4_read_so_list): Update.
10139
10140 2018-03-30  Tom Tromey  <tom@tromey.com>
10141
10142         * windows-nat.c (handle_output_debug_string, handle_exception):
10143         Update.
10144         * target.h (target_read_string): Update.
10145         * target.c (target_read_string): Change "string" to
10146         unique_xmalloc_ptr.
10147         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
10148         Update.
10149         * solib-frv.c (frv_current_sos): Update.
10150         * solib-dsbt.c (dsbt_current_sos): Update.
10151         * solib-darwin.c (darwin_current_sos): Update.
10152         * linux-thread-db.c (inferior_has_bug): Update.
10153         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
10154         Update.  Remove alloca.
10155         * ada-lang.c (ada_main_name): Update.
10156
10157 2018-03-30  Tom Tromey  <tom@tromey.com>
10158
10159         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
10160         (struct dwo_file_deleter): New.
10161         (dwo_file_up): New typedef.
10162         (open_and_init_dwo_file): Use dwo_file_up.
10163         (free_dwo_file_cleanup): Remove.
10164
10165 2018-03-30  Tom Tromey  <tom@tromey.com>
10166
10167         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
10168         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
10169
10170 2018-03-30  Tom Tromey  <tom@tromey.com>
10171
10172         * dwarf2read.c (class free_cached_comp_units): New class.
10173         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
10174         (free_cached_comp_units): Remove function.
10175
10176 2018-03-30  Tom Tromey  <tom@tromey.com>
10177
10178         * utils.h (make_cleanup_unpush_target): Remove.
10179         * inf-ptrace.c (struct target_unpusher): New.
10180         (target_unpush_up) New typedef.
10181         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
10182         target_unpush_up.
10183         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
10184
10185 2018-03-27  Tom Tromey  <tom@tromey.com>
10186
10187         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
10188
10189 2018-03-27  Pedro Alves  <palves@redhat.com>
10190             Tom Tromey  <tom@tromey.com>
10191
10192         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
10193         destructor.  Now a class.
10194         (gdb_readline_wrapper_cleanup): Remove function.
10195         (gdb_readline_wrapper): Remove cleanups.
10196
10197 2018-03-27  Tom Tromey  <tom@tromey.com>
10198
10199         * typeprint.h (struct type_print_options) <local_typedefs,
10200         global_typedefs>: Remove "struct" keyword.
10201         (class typedef_hash_table): New class.
10202         (recursively_update_typedef_hash, add_template_parameters)
10203         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
10204         (find_typedef_in_hash): Don't declare.
10205         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
10206         (typedef_hash_table::recursively_update): Rename from
10207         recursively_update_typedef_hash.  Now a member.
10208         (typedef_hash_table::add_template_parameters): Rename from
10209         add_template_parameters.  Now a member.
10210         (typedef_hash_table::typedef_hash_table): Now a constructor;
10211         rename from create_typedef_hash.
10212         (typedef_hash_table::~typedef_hash_table): Now a destructor;
10213         rename from free_typedef_hash.
10214         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
10215         (do_free_global_table): Remove.
10216         (typedef_hash_table::typedef_hash_table): New constructor; renamed
10217         from copy_type_recursive.
10218         (create_global_typedef_table): Remove.
10219         (typedef_hash_table::find_global_typedef): Now a member of
10220         typedef_hash_table.
10221         (typedef_hash_table::find_typedef): Rename from
10222         find_typedef_in_hash; now a member.
10223         (whatis_exp): Update.
10224         * extension.h (struct ext_lang_type_printers): Add constructor and
10225         destructor.
10226         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
10227         declare.
10228         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
10229         Now a constructor; rename from start_ext_lang_type_printers.
10230         (ext_lang_type_printers): Now a destructor; rename from
10231         free_ext_lang_type_printers.
10232         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
10233         Update.
10234         (c_type_print_base_struct_union): Update.  Remove cleanups.
10235
10236 2018-03-27  Tom Tromey  <tom@tromey.com>
10237
10238         * dwarf-index-write.c: Include <cmath>.
10239
10240 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
10241
10242         * NEWS: Add entry describing new "set|show varsize-limit" command.
10243         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
10244         command.
10245         * printcmd.c (_initialize_printcmd): Add "set var" alias of
10246         "set variable".
10247
10248 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
10249
10250         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
10251         dwarf-index-write.c
10252         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
10253         * dwarf-index-common.c: New file.
10254         * dwarf-index-common.h: New file.
10255         * dwarf-index-write.c: New file.
10256         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
10257         (struct dwarf2_section_info): Move from here.
10258         (dwarf2_section_info_def): Likewise.
10259         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
10260         (offset_type): Likewise.
10261         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
10262         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
10263         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
10264         (byte_swap): Likewise.
10265         (MAYBE_SWAP): Likewise.
10266         (dwarf2_per_cu_ptr): Likewise.
10267         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
10268         (struct tu_stats): Likewise.
10269         (struct dwarf2_per_objfile): Likewise.
10270         (struct dwarf2_per_cu_data): Likewise.
10271         (struct signatured_type): Likewise.
10272         (sig_type_ptr): Likewise.
10273         (DEF_VEC_P (sig_type_ptr)): Likewise.
10274         (INDEX4_SUFFIX): Likewise.
10275         (INDEX5_SUFFIX): Likewise.
10276         (DEBUG_STR_SUFFIX): Likewise.
10277         (dwarf2_read_section): Make non-static.
10278         (mapped_index_string_hash): Move from here.
10279         (dwarf5_djb_hash): Likewise.
10280         (file_write): Likewise.
10281         (class data_buf): Likewise.
10282         (struct symtab_index_entry): Likewise.
10283         (struct mapped_symtab): Likewise.
10284         (find_slot): Likewise.
10285         (hash_expand): Likewise.
10286         (add_index_entry): Likewise.
10287         (uniquify_cu_indices): Likewise.
10288         (class c_str_view): Likewise.
10289         (class c_str_view_hasher): Likewise.
10290         (class vector_hasher): Likewise.
10291         (write_hash_table): Likewise.
10292         (psym_index_map): Likewise.
10293         (struct addrmap_index_data): Likewise.
10294         (add_address_entry): Likewise.
10295         (add_address_entry_worker): Likewise.
10296         (write_address_map): Likewise.
10297         (symbol_kind): Likewise.
10298         (write_psymbols): Likewise.
10299         (struct signatured_type_index_data): Likewise.
10300         (write_one_signatured_type): Likewise.
10301         (recursively_count_psymbols): Likewise.
10302         (recursively_write_psymbols): Likewise.
10303         (class debug_names): Likewise.
10304         (check_dwarf64_offsets): Likewise.
10305         (psyms_seen_size): Likewise.
10306         (write_gdbindex): Likewise.
10307         (write_debug_names): Likewise.
10308         (assert_file_size): Likewise.
10309         (write_psymtabs_to_index): Likewise.
10310         (save_gdb_index_command): Likewise.
10311         (_initialize_dwarf2_read): Don't register the "save gdb-index"
10312         command.
10313         * dwarf2read.h: New file.
10314
10315 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
10316
10317         PR gdb/22670
10318         * dwarf2read.c (dwarf2_physname): Do not return the demangled
10319         symbol name if the CU's language stores symbol names in linkage
10320         format.
10321         * language.h (struct language_defn)
10322         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
10323         all instances of this struct.
10324
10325 2018-03-26  Tom Tromey  <tom@tromey.com>
10326
10327         * stack.c (backtrace_command_1): Remove verbose code.
10328
10329 2018-03-26  Tom Tromey  <tom@tromey.com>
10330
10331         * python/py-framefilter.c (py_print_type): Don't catch
10332         exceptions.  Return void.
10333         (py_print_value): Likewise.
10334         (py_print_single_arg): Likewise.
10335         (enumerate_args): Don't catch exceptions.
10336         (py_print_args): Likewise.
10337         (py_print_frame): Likewise.
10338         (gdbpy_apply_frame_filter): Catch exceptions here.
10339
10340 2018-03-26  Tom Tromey  <tom@tromey.com>
10341
10342         * stack.c (_initialize_stack): Remove trailing newlines from help
10343         text.  Add "Usage" line to "backtrace" help.
10344
10345 2018-03-26  Tom Tromey  <tom@tromey.com>
10346
10347         PR python/16486:
10348         * python/py-framefilter.c (py_print_args): Call wrap_hint.
10349
10350 2018-03-26  Tom Tromey  <tom@tromey.com>
10351
10352         * python/py-framefilter.c (py_print_single_arg): Return
10353         EXT_LANG_BT_ERROR from catch.
10354
10355 2018-03-26  Tom Tromey  <tom@tromey.com>
10356
10357         PR backtrace/15584:
10358         * stack.c (backtrace_command_1): Move some code into no-filters
10359         "if".
10360
10361 2018-03-26  Tom Tromey  <tom@tromey.com>
10362
10363         * python/py-framefilter.c (throw_quit_or_print_exception): New
10364         function.
10365         (gdbpy_apply_frame_filter): Use it.
10366
10367 2018-03-26  Tom Tromey  <tom@tromey.com>
10368
10369         PR cli/17716:
10370         * python/py-framefilter.c (py_print_type, py_print_value)
10371         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
10372         RETURN_MASK_ERROR.
10373
10374 2018-03-26  Tom Tromey  <tom@tromey.com>
10375
10376         * python/py-framefilter.c (enumerate_args): Use
10377         gdb::unique_xmalloc_ptr.
10378
10379 2018-03-26  Tom Tromey  <tom@tromey.com>
10380
10381         * python/py-framefilter.c (py_print_frame): Return
10382         EXT_LANG_BT_OK.
10383         (gdbpy_apply_frame_filter): Update comment.
10384         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
10385         Remove.
10386         <EXT_LANG_BT_NO_FILTERS>: Change value.
10387
10388 2018-03-26  Tom Tromey  <tom@tromey.com>
10389
10390         PR backtrace/15582:
10391         * stack.c (backtrace_command): Parse "hide" argument.
10392         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
10393         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
10394         constant.
10395
10396 2018-03-26  Tom Tromey  <tom@tromey.com>
10397
10398         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
10399         add "flags".
10400         (backtrace_command): Remove "fulltrace", add "flags".
10401
10402 2018-03-26  Tom Tromey  <tom@tromey.com>
10403
10404         * stack.c (backtrace_command): Rewrite command line parsing.
10405
10406 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
10407
10408         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
10409
10410 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
10411
10412         * filename-seen-cache.h: Add include guard.
10413
10414 2018-03-26  Keith Seitz  <keiths@redhat.com>
10415
10416         * symfile.c (place_section): Remove "struct" from section_addr_info
10417         in comment.
10418         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
10419         "struct" keyword from section_addr_info.
10420
10421 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
10422
10423         * regformats/regdef.h (reg): Add constructors.
10424
10425 2018-03-25  Pedro Alves  <palves@redhat.com>
10426
10427         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
10428         if then/else bodies in var_func_name extraction.
10429
10430 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
10431
10432         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
10433         lookup_minimal_symbol() to find symbol entry.
10434         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
10435
10436 2018-03-23  Keith Seitz  <keiths@redhat.com>
10437
10438         PR c++/22968
10439         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
10440         nested type definitions for C++, too.
10441
10442 2018-03-23  Tom Tromey  <tom@tromey.com>
10443
10444         * machoread.c (struct oso_el): Add a constructor.  Don't define as
10445         a typedef.
10446         (macho_register_oso): Remove.
10447         (macho_symtab_read): Take a std::vector.
10448         (oso_el_compare_name): Now a std::sort comparator.
10449         (macho_symfile_read_all_oso): Take a std::vector.
10450         (macho_symfile_read): Use std::vector.  Remove cleanups.
10451
10452 2018-03-22  Tom Tromey  <tom@tromey.com>
10453
10454         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
10455         (record_full_goto_bookmark): Use std::string.
10456
10457 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
10458
10459         PR tdep/18295
10460         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
10461         a single mask.
10462
10463 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
10464
10465         * rs6000-tdep.c (store_insn_p): New function.
10466         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
10467         and cr_reg to their unshifted values. Use store_insn_p to
10468         match LR saves using either R1 or fdata->alloca_reg. Use
10469         store_insn_p to match CR saves. Set alloca_reg_offset
10470         when alloca_reg and framep are set. Remove lr_reg shift
10471         when assigning to fdata->lr_register.
10472
10473 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10474
10475         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
10476         command line args instead of emitting a warning.
10477
10478 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
10479
10480         * tracepoint.h (struct static_tracepoint_marker): Initialize
10481         fields, define default constructor, move constructor and move
10482         assignment, disable the rest.
10483         <str_id, extra>: Make std::string.
10484         (release_static_tracepoint_marker): Remove.
10485         (free_current_marker): Remove.
10486         * tracepoint.c (free_current_marker): Remove.
10487         (parse_static_tracepoint_marker_definition): Adjust to
10488         std::string, use new hex2str overload.
10489         (release_static_tracepoint_marker): Remove.
10490         (print_one_static_tracepoint_marker): Get marker by reference
10491         and adjust to std::string.
10492         (info_static_tracepoint_markers_command): Adjust to std::vector
10493         changes
10494         * target.h (static_tracepoint_marker_p): Remove typedef.
10495         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
10496         (struct target_ops) <to_static_tracepoint_marker_at>: Return
10497         bool.
10498         <to_static_tracepoint_markers_by_strid>: Return std::vector.
10499         * target-debug.h
10500         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
10501         (target_debug_print_std_vector_static_tracepoint_marker): New.
10502         (target_debug_print_struct_static_tracepoint_marker_p): Rename
10503         to...
10504         (target_debug_print_static_tracepoint_marker_p): ... this.
10505         * target-delegates.c: Re-generate.
10506         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
10507         Make std::string.
10508         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
10509         (decode_static_tracepoint_spec): Adjust to std::vector.
10510         (tracepoint_print_one_detail): Adjust to std::string.
10511         (strace_marker_decode_location): Adjust to std::string.
10512         (update_static_tracepoint): Adjust to std::string, remove call
10513         to release_static_tracepoint_marker.
10514         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
10515         Adjust to std::vector.
10516         * remote.c (remote_static_tracepoint_marker_at): Return bool.
10517         (remote_static_tracepoint_markers_by_strid): Adjust to
10518         std::vector.
10519         * common/rsp-low.h (hex2str): New overload with explicit count
10520         of bytes.
10521         * common/rsp-low.c (hex2str): New overload with explicit count
10522         of bytes.
10523         * unittests/rsp-low-selftests.c (test_hex2str): New function.
10524         (_initialize_rsp_low_selftests): Add test_hex2str test.
10525         * unittests/tracepoint-selftests.c
10526         (test_parse_static_tracepoint_marker_definition): Adjust to
10527         std::string.
10528
10529 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
10530
10531         * tracepoint.c (parse_static_tracepoint_marker_definition):
10532         Consider case where the definition is followed by more
10533         definitions.
10534         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10535         tracepoint-selftests.c.
10536         * unittests/tracepoint-selftests.c: New.
10537
10538 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
10539
10540         * MAINTAINERS (Write After Approval): Add Pedro Franco de
10541         Carvalho.
10542
10543 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
10544
10545         * symtab.c (find_pc_sect_line): fixed indentation.
10546
10547 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
10548
10549         * symtab.c (find_pc_sect_line): now uses binary search.
10550
10551 2018-03-19  Tom Tromey  <tom@tromey.com>
10552
10553         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
10554         "IDENT" production.
10555
10556 2018-03-19  Pedro Alves  <palves@redhat.com>
10557             Tom Tromey  <tom@tromey.com>
10558
10559         * unittests/observable-selftests.c: New file.
10560         * common/observable.h: New file.
10561         * observable.h: New file.
10562         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
10563         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
10564         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
10565         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
10566         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
10567         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
10568         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
10569         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
10570         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
10571         python/py-breakpoint.c, python/py-finishbreakpoint.c,
10572         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
10573         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
10574         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
10575         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
10576         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
10577         tui/tui-interp.c, valops.c: Update all users.
10578         * tui/tui-hooks.c (tui_bp_created_observer)
10579         (tui_bp_deleted_observer, tui_bp_modified_observer)
10580         (tui_inferior_exit_observer, tui_before_prompt_observer)
10581         (tui_normal_stop_observer, tui_register_changed_observer):
10582         Remove.
10583         (tui_observers_token): New global.
10584         (attach_or_detach, tui_attach_detach_observers): New functions.
10585         (tui_install_hooks, tui_remove_hooks): Use
10586         tui_attach_detach_observers.
10587         * record-btrace.c (record_btrace_thread_observer): Remove.
10588         (record_btrace_thread_observer_token): New global.
10589         * observer.sh: Remove.
10590         * observer.c: Rename to observable.c.
10591         * observable.c (namespace gdb_observers): Define new objects.
10592         (observer_debug): Move into gdb_observers namespace.
10593         (struct observer, struct observer_list, xalloc_observer_list_node)
10594         (xfree_observer_list_node, generic_observer_attach)
10595         (generic_observer_detach, generic_observer_notify): Remove.
10596         (_initialize_observer): Update.
10597         Don't include observer.inc.
10598         * Makefile.in (generated_files): Remove observer.h, observer.inc.
10599         (clean mostlyclean): Likewise.
10600         (observer.h, observer.inc): Remove targets.
10601         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
10602         (COMMON_SFILES): Use observable.c, not observer.c.
10603         * .gitignore: Remove observer.h.
10604
10605 2018-03-18  Tom Tromey  <tom@tromey.com>
10606
10607         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
10608         gdb::def_vector.
10609         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
10610
10611 2018-03-17  Tom Tromey  <tom@tromey.com>
10612
10613         * auto-load.c (auto_load_objfile_script_1): Use std::string.
10614
10615 2018-03-17  Tom Tromey  <tom@tromey.com>
10616
10617         * target.c (class scoped_target_fd): New.
10618         (target_fileio_close_cleanup): Remove.
10619         (target_fileio_read_alloc_1): Use scoped_target_fd.
10620
10621 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
10622
10623         * silent-rules.mk: New.
10624         * Makefile.in: Include silent-rules.mk
10625         (srcdir, VPATH, top_srcdir): Move up.
10626         (COMPILE): Add ECHO_CXX.
10627         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
10628         (init.c): Add ECHO_INIT_C.
10629         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
10630         (version.c): Add ECHO_GEN.
10631         (printcmd.o): Add ECHO_CXX.
10632         (target-float.o): Add ECHO_CXX.
10633         (ada-exp.o): Add ECHO_CXX.
10634         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
10635         (insight$(EXEEXT)): Add ECHO_CXXLD.
10636         * gnulib/configure.ac: Add AM_SILENT_RULES.
10637         * gnulib/aclocal.m4: Re-generate.
10638         * gnulib/configure: Re-generate.
10639         * gnulib/import/Makefile.in: Re-generate.
10640
10641 2018-03-16  Tom Tromey  <tom@tromey.com>
10642
10643         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
10644         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
10645         * utils.c (do_free_section_addr_info)
10646         (make_cleanup_free_section_addr_info): Remove.
10647         * symfile.h (struct other_sections): Add constructor.
10648         (struct section_addr_info): Remove.
10649         (section_addr_info): New typedef.
10650         (struct sym_fns) <sym_offsets>: Change type of parameter.
10651         (build_section_addr_info_from_objfile)
10652         (relative_addr_info_to_section_offsets, addr_info_make_relative)
10653         (default_symfile_offsets, symbol_file_add)
10654         (symbol_file_add_from_bfd)
10655         (build_section_addr_info_from_section_table): Update.
10656         (alloc_section_addr_info, free_section_addr_info): Don't declare.
10657         * symfile.c (alloc_section_addr_info): Remove.
10658         (build_section_addr_info_from_section_table): Change return type.
10659         Update.
10660         (build_section_addr_info_from_bfd)
10661         (build_section_addr_info_from_objfile): Likewise.
10662         (free_section_addr_info): Remove.
10663         (relative_addr_info_to_section_offsets): Change type of "addrs".
10664         (addrs_section_compar): Now a std::sort comparator.
10665         (addrs_section_sort): Change return type.
10666         (addr_info_make_relative): Change type of "addrs".  Update.
10667         (default_symfile_offsets, syms_from_objfile_1)
10668         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
10669         (symbol_file_add_separate): Update.
10670         (symbol_file_add): Change type of "addrs".  Update.
10671         (add_symbol_file_command): Update.  Remove cleanups.
10672         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
10673         cleanups.
10674         * symfile-debug.c (debug_sym_offsets): Change type of "info".
10675         * solib.c (solib_read_symbols): Update.
10676         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
10677         * machoread.c (macho_symfile_offsets): Update.
10678         * jit.c (jit_bfd_try_read_symtab): Update.
10679
10680 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
10681
10682         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10683         unittests/utils-selftests.c.
10684         * unittests/utils-selftests.c: New file.
10685
10686 2018-03-14  Tom Tromey  <tom@tromey.com>
10687
10688         PR cli/14977:
10689         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
10690         for NULL.
10691
10692 2018-03-14  Tom Tromey  <tom@tromey.com>
10693
10694         PR cli/19918:
10695         * printcmd.c (printf_pointer): Allow "-" in format.
10696
10697 2018-03-14  Tom Tromey  <tom@tromey.com>
10698
10699         * printcmd.c (_initialize_printcmd): Add usage to printf.
10700
10701 2018-03-14  Yao Qi  <qiyao@sourceware.org>
10702
10703         * MAINTAINERS: Update my email address.
10704
10705 2018-03-13  Tom Tromey  <tom@tromey.com>
10706
10707         * machoread.c (macho_check_dsym): Change filenamep to a
10708         std::string*.
10709         (macho_symfile_read): Update.
10710         * symfile.c (load_command): Use std::string.
10711
10712 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
10713
10714         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
10715         to error message string.
10716         (riscv_register_name): Use xsnprintf instead of sprintf.
10717         (riscv_insn::fetch_instruction): Use gdb_assert instead of
10718         internal_error.
10719         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
10720         error.
10721         (riscv_push_dummy_call): Likewise.
10722
10723 2018-03-12  Tom Tromey  <tom@tromey.com>
10724
10725         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
10726         Use gdb::byte_vector.
10727         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
10728
10729 2018-03-12  Yao Qi  <yao.qi@linaro.org>
10730
10731         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
10732         parameter type to readable_regcache.
10733         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
10734         the declaration.
10735
10736 2018-03-11  Tom Tromey  <tom@tromey.com>
10737
10738         * dwarf2read.c (struct nextfield): Add initializers.
10739         (struct nextfnfield): Remove.
10740         (struct fnfieldlist): Add initializers.  Remove "length" and
10741         "head", use std::vector.
10742         (struct decl_field_list): Remove.
10743         (struct field_info): Add initializers.
10744         <fields, baseclasses>: Now std::vector.
10745         <nbaseclasses, nfnfields, typedef_field_list_count,
10746         nested_types_list_count>: Remove.
10747         (dwarf2_add_field, dwarf2_add_type_defn)
10748         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
10749         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
10750         (process_structure_scope): Update.
10751
10752 2018-03-11  Tom Tromey  <tom@tromey.com>
10753
10754         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
10755         for use by std::sort.
10756         (build_type_psymtabs_1): Use std::vector.
10757
10758 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
10759
10760         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
10761         and LIBMPFR in the printed configuration.
10762
10763 2018-03-08  Tom Tromey  <tom@tromey.com>
10764
10765         * source.c (get_filename_and_charpos): Use scoped_fd.
10766         * nto-procfs.c (procfs_open_1): Use scoped_fd.
10767         (procfs_pidlist): Likewise.
10768         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
10769         (iterate_over_mappings): Likewise.
10770
10771 2018-03-08  Tom Tromey  <tom@tromey.com>
10772
10773         * infcall.c (struct call_return_meta_info)
10774         <stack_temporaries_enabled>: Remove.
10775         (get_call_return_value, call_function_by_hand_dummy): Update.
10776         * thread.c (disable_thread_stack_temporaries): Remove.
10777         (enable_thread_stack_temporaries): Remove.
10778         (thread_stack_temporaries_enabled_p): Return bool.
10779         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
10780         (get_last_thread_stack_temporary): Update.
10781         * eval.c (evaluate_subexp): Update.
10782         * gdbthread.h (class enable_thread_stack_temporaries): Now a
10783         class, not a function.
10784         (value_ptr, value_vec): Remove typedefs.
10785         (class thread_info) <stack_temporaries_enabled>: Now bool.
10786         <stack_temporaries>: Now a std::vector.
10787         (thread_stack_temporaries_enabled_p)
10788         (value_in_thread_stack_temporaries): Return bool.
10789
10790 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
10791
10792         * remote.c (putpkt_binary): Fix omitted bytes reporting.
10793         (getpkt_or_notif_sane_1): Likewise.
10794
10795 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
10796
10797         * build-id.c (build_id_to_debug_bfd): Use std::string.
10798
10799 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
10800
10801         * build-id.c (find_separate_debug_file_by_buildid): Return
10802         std::string.
10803         * build-id.h (find_separate_debug_file_by_buildid): Return
10804         std::string.
10805         * coffread.c (coff_symfile_read): Adjust to std::string.
10806         * elfread.c (elf_symfile_read): Adjust to std::string.
10807         * symfile.c (separate_debug_file_exists): Change parameter to
10808         std::string.
10809         (find_separate_debug_file): Return std::string.
10810         (find_separate_debug_file_by_debuglink): Return std::string.
10811         * symfile.h (find_separate_debug_file_by_debuglink): Return
10812         std::string.
10813
10814 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
10815
10816         * common/xml-utils.c (xml_escape_text): Move code to...
10817         (xml_escape_text_append): ... this new function.
10818         * common/xml-utils.h (xml_escape_text_append): New declaration.
10819         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
10820         New function.
10821         (_initialize_xml_utils): register test_xml_escape_text_append as
10822         a selftest.
10823
10824 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
10825
10826         * defs.h: Remove MAX_REGISTER_SIZE.
10827         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
10828         asserts.
10829         * python/py-unwind.c (pyuw_sniffer): Likewise.
10830
10831 2018-03-07  Tom Tromey  <tom@tromey.com>
10832
10833         * linux-tdep.c (linux_info_proc): Update.
10834         * target.h (struct target_ops) <to_fileio_readlink>: Return
10835         optional<string>.
10836         (target_fileio_readlink): Return optional<string>.
10837         * remote.c (remote_hostio_readlink): Return optional<string>.
10838         * inf-child.c (inf_child_fileio_readlink): Return
10839         optional<string>.
10840         * target.c (target_fileio_readlink): Return optional<string>.
10841
10842 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
10843
10844         * regcache.c (cooked_read_test): Add riscv to the list of
10845         architectures that have a save_reggroup.
10846
10847 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10848
10849         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
10850         value is not a dynamic class object.
10851
10852 2018-03-06  Tom Tromey  <tom@tromey.com>
10853
10854         * rust-exp.y: Formatting fixes.
10855
10856 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10857
10858         * riscv-tdep.c (riscv_register_name): Remove target description
10859         support.
10860         (riscv_gdbarch_init): Remove target description check.
10861
10862 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10863
10864         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
10865         comment.
10866         * riscv-tdep.h: Likewise.
10867
10868 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10869
10870         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
10871         (riscv_pseudo_register_write): Delete.
10872         (riscv_gdbarch_init): Remove all use of pseudo registers.
10873
10874 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
10875
10876         * record-btrace.c (btrace_print_lines): Replace cleanup
10877         parameter with RAII equivalents.
10878         (btrace_insn_history): Replace cleanup with RAII equivalents.
10879         * ui-out.h (make_cleanup_ui_out_list_begin_end,
10880         make_cleanup_ui_out_tuple_begin_end): Remove.
10881         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
10882         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
10883         make_cleanup_ui_out_list_begin_end): Remove.
10884
10885 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
10886
10887         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
10888         parameter types to std::vector.  Use bool.
10889         (record_btrace_wait): Replace VEC(tp_t) with
10890         std::vector<thread_info *>.
10891         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
10892
10893 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
10894
10895         * record-btrace.c (record_btrace_disable_callback): Remove.
10896         (struct scoped_btrace_disable): New.
10897         (record_btrace_open): Use scoped_btrace_disable.
10898
10899 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10900
10901         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
10902         reading values from registers.
10903
10904 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10905
10906         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
10907         where appropriate.
10908
10909 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10910
10911         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
10912         change parameter type.  Use GDB's print functions, and use
10913         core_addr_to_string where appropriate.
10914         (riscv_push_dummy_call): Use core_addr_to_string where
10915         appropriate, update call to riscv_print_arg_location, and reindent
10916         a few lines.
10917         (riscv_return_value): Update call to riscv_print_arg_location.
10918
10919 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10920             Tim Newsome <tim@sifive.com>
10921             Albert Ou <a0u@eecs.berkeley.edu>
10922             Darius Rad <darius@bluespec.com>
10923
10924         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
10925         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
10926         (ALLDEPFILES): Add riscv-tdep.c
10927         * configure.tgt: Add riscv support.
10928         * riscv-tdep.c: New file.
10929         * riscv-tdep.h: New file.
10930         * NEWS: Mention new target.
10931         * MAINTAINERS: Add entry for riscv.
10932
10933 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10934
10935         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
10936         fields within aggregates.
10937
10938 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
10939
10940         * record-btrace.c (btrace_print_lines): Change type of flags to
10941         gdb_disassembly_flags.
10942
10943 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
10944
10945         * fbsd-nat.c: Include "inf-ptrace.h".
10946         (USE_SIGTRAP_SIGINFO): Conditionally define.
10947         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
10948         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
10949         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
10950         function.
10951         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
10952         Likewise.
10953         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
10954         Likewise.
10955         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
10956         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
10957         "supports_stopped_by_hw_breakpoint" target methods.
10958
10959 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
10960
10961         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
10962         * fbsd-nat.c (debug_fbsd_nat): New variable.
10963         (show_fbsd_nat_debug): New function.
10964         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
10965         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
10966
10967 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
10968
10969         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
10970         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
10971         prototype.
10972         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
10973         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
10974         method.
10975
10976 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10977
10978         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
10979         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
10980
10981 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10982
10983         * charset.c (struct charset_vector): New.
10984         (charsets): Change type to charset_vector.
10985         (find_charset_names): Adjust.
10986         (add_one): Adjust.
10987         (_initialize_charset): Adjust.
10988
10989 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10990
10991         * progspace.h (struct program_space) <deleted_solibs>: Change
10992         type to std::vector<std::string>.
10993         * progspace.c (clear_program_space_solib_cache): Adjust.
10994         * breakpoint.c (print_solib_event): Adjust.
10995         (check_status_catch_solib): Adjust.
10996         * solib.c (update_solib_list): Adjust.
10997         * ui-out.h (class ui_out) <field_string>: New overload.
10998         * ui-out.c (ui_out::field_string): New overload.
10999
11000 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
11001
11002         * progspace.h (struct program_space): Add constructor and
11003         destructor, initialize fields.
11004         (add_program_space): Remove.
11005         * progspace.c (add_program_space): Rename to...
11006         (program_space::program_space): ... this.
11007         (release_program_space): Rename to...
11008         (program_space::~program_space): ... this.
11009         (delete_program_space): Use delete to delete program_space.
11010         (initialize_progspace): Use new to allocate program_space.
11011         * inferior.c (add_inferior_with_spaces): Likewise.
11012         (clone_inferior_command): Likewise.
11013         * infrun.c (follow_fork_inferior): Likewise.
11014         (handle_vfork_child_exec_or_exit): Likewise.
11015
11016 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
11017
11018         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
11019         (delim_string_to_char_ptr_vec): Return std::vector of
11020         gdb::unique_xmalloc_ptr.
11021         (dirnames_to_char_ptr_vec_append): Take std::vector of
11022         gdb::unique_xmalloc_ptr.
11023         (dirnames_to_char_ptr_vec): Return std::vector of
11024         gdb::unique_xmalloc_ptr.
11025         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
11026         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
11027         (delim_string_to_char_ptr_vec): Return an std::vector of
11028         gdb::unique_xmalloc_ptr, adjust the code.
11029         (dirnames_to_char_ptr_vec_append): Take an std::vector of
11030         gdb::unique_xmalloc_ptr, adjust the code.
11031         (dirnames_to_char_ptr_vec): Return an std::vector of
11032         gdb::unique_xmalloc_ptr, adjust the code.
11033         * auto-load.c (auto_load_safe_path_vec): Change type to
11034         std::vector of gdb::unique_xmalloc_ptr.
11035         (auto_load_expand_dir_vars): Return an std::vector of
11036         gdb::unique_xmalloc_ptr, adjust the code.
11037         (auto_load_safe_path_vec_update): Adjust.
11038         (filename_is_in_auto_load_safe_path_vec): Adjust.
11039         (auto_load_objfile_script_1): Adjust.
11040         * build-id.c (build_id_to_debug_bfd): Adjust.
11041         * linux-thread-db.c (thread_db_load_search): Adjust.
11042         * source.c (add_path): Adjust.
11043         (openp): Adjust.
11044         * symfile.c (find_separate_debug_file): Adjust.
11045         * utils.c (do_free_char_ptr_vec): Remove.
11046         (make_cleanup_free_char_ptr_vec): Remove.
11047
11048 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
11049
11050         PR gdb/22907
11051         * common/pathstuff.c: Conditionally include "<windows.h>".
11052
11053 2018-03-01  Georg Sauthoff  <mail@georg.so>
11054
11055         PR gdb/22888
11056         * gcore.in: Quote variables and switch interpreter to bash.
11057
11058 2018-03-01  Tom Tromey  <tom@tromey.com>
11059
11060         * dwarf2read.c (alloc_discriminant_info): Fix default_index
11061         assertion.  Add assertion for discriminant_index.
11062         (quirk_rust_enum): Use correct base type name in univariant case.
11063
11064 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
11065
11066         * record.c (get_call_history_modifiers): Return a
11067         record_print_flags.
11068         (cmd_record_call_history): Adjust.
11069         * record-btrace.c (record_btrace_call_history): Adjust.
11070         (record_btrace_call_history_range): Adjust.
11071         (record_btrace_call_history_from): Adjust.
11072         * target-debug.h (target_debug_print_record_print_flags): New.
11073         * target-delegates.c: Re-generate.
11074         * target.c (target_call_history): Change flags type.
11075         (target_call_history_from): Likewise.
11076         (target_call_history_range): Likewise.
11077         * target.h (struct target_ops) <target_call_history>: Likewise.
11078         (target_call_history_from): Likewise.
11079         (target_call_history_range): Likewise.
11080
11081 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
11082             Simon Marchi  <simon.marchi@polymtl.ca>
11083
11084         * common/common-utils.c: Include "sys/stat.h".
11085         (is_regular_file): Move here from "source.c"; change return
11086         type to "bool".
11087         * common/common-utils.h (is_regular_file): New prototype.
11088         * common/pathstuff.c (contains_dir_separator): New function.
11089         * common/pathstuff.h (contains_dir_separator): New prototype.
11090         * source.c: Don't include "sys/stat.h".
11091         (is_regular_file): Move to "common/common-utils.c".
11092
11093 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
11094
11095         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
11096         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
11097         * auto-load.c: Include "common/pathstuff.h".
11098         * common/common-def.h (current_directory): Move here.
11099         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
11100         function.
11101         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
11102         prototype.
11103         * common/pathstuff.c: New file.
11104         * common/pathstuff.h: New file.
11105         * compile/compile.c: Include "common/pathstuff.h".
11106         * defs.h (current_directory): Move to "common/common-defs.h".
11107         * dwarf2read.c: Include "common/pathstuff.h".
11108         * exec.c: Likewise.
11109         * guile/scm-safe-call.c: Likewise.
11110         * linux-thread-db.c: Likewise.
11111         * main.c: Likewise.
11112         * nto-tdep.c: Likewise.
11113         * objfiles.c: Likewise.
11114         * source.c: Likewise.
11115         * symtab.c: Likewise.
11116         * utils.c: Include "common/pathstuff.h".
11117         (gdb_realpath): Move to "common/pathstuff.c".
11118         (gdb_realpath_keepfile): Likewise.
11119         (gdb_abspath): Likewise.
11120         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
11121         (gdb_realpath_keepfile): Likewise.
11122         (gdb_abspath): Likewise.
11123
11124 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
11125
11126         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
11127         wildcard process pid for super_resume for kernels with a
11128         specific bug.
11129
11130 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
11131
11132         * compile/compile.c (get_args): Add additional comments
11133         explaining function.
11134
11135 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
11136             Tom Tromey  <tom@tromey.com>
11137
11138         * target.h (memory_write_request_s): Remove typedef.  Don't define
11139         VEC.
11140         (target_write_memory_blocks): Change argument to std::vector.
11141         (struct memory_write_request): Add constructor.
11142         * target-memory.c (compare_block_starting_address): Return bool.
11143         Change argument types.
11144         (claim_memory): Change arguments to use std::vector.
11145         (split_regular_and_flash_blocks, blocks_to_erase)
11146         (compute_garbled_blocks): Likewise.
11147         (cleanup_request_data, cleanup_write_requests_vector): Remove.
11148         (target_write_memory_blocks): Change argument to std::vector.
11149         * symfile.c (struct load_section_data): Add constructor and
11150         destructor.  Use std::vector for "requests".
11151         (struct load_progress_data): Add initializers.
11152         (load_section_callback): Update.  Use "new".
11153         (clear_memory_write_data): Remove.
11154         (generic_load): Update.
11155
11156 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
11157
11158         * arch/aarch64.h: Use common/tdesc.h.
11159
11160 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
11161
11162         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
11163         architecture with a 64-bit ABI.
11164
11165 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
11166
11167         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
11168         ahead of target description loading.
11169
11170 2018-02-26  Tom Tromey  <tom@tromey.com>
11171
11172         * stack.c (backtrace_command_1): Update.
11173         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
11174         of "flags".
11175         * python/py-framefilter.c (py_print_frame)
11176         (gdbpy_apply_frame_filter): Change type of "flags".
11177         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
11178         of "flags".
11179         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
11180         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
11181         * extension.h (enum frame_filter_flag): Rename from
11182         frame_filter_flags.
11183         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
11184         (apply_ext_lang_frame_filter): Change type of "flags".
11185         * extension.c (apply_ext_lang_frame_filter): Change type of
11186         "flags".
11187         * extension-priv.h (struct extension_language_ops)
11188         <apply_frame_filter>: Change type of "flags".
11189
11190 2018-02-26  Tom Tromey  <tom@tromey.com>
11191
11192         PR python/16497:
11193         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
11194         off-by-one in py_end computation.
11195         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
11196         PRINT_MORE_FRAMES.
11197         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
11198         constant.
11199
11200 2018-02-26  Tom Tromey  <tom@tromey.com>
11201
11202         * dwarf2read.c (struct variant_field): New.
11203         (struct nextfield) <variant>: New field.
11204         (dwarf2_add_field): Handle DW_TAG_variant_part.
11205         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
11206         discriminated union.
11207         (read_structure_type): Handle DW_TAG_variant_part.
11208         (handle_struct_member_die): New function, extracted from
11209         process_structure_scope.  Handle DW_TAG_variant.
11210         (process_structure_scope): Handle discriminated unions.  Call
11211         handle_struct_member_die.
11212
11213 2018-02-26  Tom Tromey  <tom@tromey.com>
11214
11215         * rust-lang.h (rust_last_path_segment): Declare.
11216         * rust-lang.c (rust_last_path_segment): Now public.  Change
11217         contract.
11218         (struct disr_info): Remove.
11219         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
11220         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
11221         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
11222         (rust_enum_p, rust_enum_variant): New function.
11223         (rust_underscore_fields): Remove "offset" parameter.
11224         (rust_print_enum): New function.
11225         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
11226         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
11227         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
11228         enums.
11229         (rust_internal_print_type): New function, from rust_print_type.
11230         Remove enum code.
11231         (rust_print_type): Call rust_internal_print_type.
11232         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
11233         Update enum handling.
11234         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
11235         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
11236         (rust_union_quirks): New functions.
11237         (process_full_comp_unit, process_full_type_unit): Call
11238         rust_union_quirks.
11239         (process_structure_scope): Update rust_unions if necessary.
11240
11241 2018-02-26  Tom Tromey  <tom@tromey.com>
11242
11243         * value.h (value_union_variant): Declare.
11244         * valops.c (value_union_variant): New function.
11245         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
11246         (struct discriminant_info): New.
11247         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
11248         enumerator.
11249         (struct main_type) <flag_discriminated_union>: New field.
11250
11251 2018-02-26  Tom Tromey  <tom@tromey.com>
11252
11253         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11254         unittests/unpack-selftests.c.
11255         * unittests/unpack-selftests.c: New file.
11256         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
11257
11258 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11259
11260         * dwarf2read.c (struct partial_die_info) <read>: New method.
11261         (read_partial_die): Remove the declaration.
11262         (load_partial_dies): Update.
11263         (partial_die_info::partial_die_info):
11264         (read_partial_die): Change it to partial_die_info::read.
11265
11266 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11267
11268         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
11269         (fixup_partial_die): Remove declaration.
11270         (scan_partial_symbols): Update.
11271         (partial_die_parent_scope): Likewise.
11272         (partial_die_full_name): Likewise.
11273         (fixup_partial_die): Change it to partial_die_info::fixup.
11274
11275 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11276
11277         * dwarf2read.c (read_partial_die): Update the declaration.
11278         (load_partial_dies): Caller update.
11279         (read_partial_die): Remove one argument abbrev_len.
11280
11281 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11282
11283         * dwarf2read.c (struct partial_die_info): Add ctor, delete
11284         assignment operator.
11285         (load_partial_dies): Use ctor and copy ctor.
11286         (read_partial_die): Update.
11287         (dwarf2_cu::find_partial_die): Use ctor.
11288
11289 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11290
11291         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
11292         (find_partial_die_in_comp_unit): Change it to
11293         dwarf2_cu::find_partial_die.
11294         (find_partial_die): Update.
11295
11296 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11297
11298         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
11299         is NULL.
11300
11301 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11302
11303         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
11304
11305 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
11306
11307         * arch/amd64.h: Use common/tdesc.h.
11308         * arch/i386.c: Likewise.
11309         * arch/i386.h: Likewise.
11310         * arch/tic6x.c: Likewise.
11311         * arch/tdesc.h: Move file from here...
11312         * common/tdesc.h: ...to here.
11313         * features/aarch64-core.c: Regenerate.
11314         * features/aarch64-fpu.c: Regenerate.
11315         * features/i386/32bit-avx.c: Regenerate.
11316         * features/i386/32bit-avx512.c: Regenerate.
11317         * features/i386/32bit-core.c: Regenerate.
11318         * features/i386/32bit-linux.c: Regenerate.
11319         * features/i386/32bit-mpx.c: Regenerate.
11320         * features/i386/32bit-pkeys.c: Regenerate.
11321         * features/i386/32bit-sse.c: Regenerate.
11322         * features/i386/64bit-avx.c: Regenerate.
11323         * features/i386/64bit-avx512.c: Regenerate.
11324         * features/i386/64bit-core.c: Regenerate.
11325         * features/i386/64bit-linux.c: Regenerate.
11326         * features/i386/64bit-mpx.c: Regenerate.
11327         * features/i386/64bit-pkeys.c: Regenerate.
11328         * features/i386/64bit-segments.c: Regenerate.
11329         * features/i386/64bit-sse.c: Regenerate.
11330         * features/i386/x32-core.c: Regenerate.
11331         * features/tic6x-c6xp.c: Regenerate.
11332         * features/tic6x-core.c: Regenerate.
11333         * features/tic6x-gp.c: Regenerate.
11334         * target-descriptions.c: Use common/tdesc.h.
11335         * target-descriptions.h: Likewise.
11336
11337 2018-02-24  Tom Tromey  <tom@tromey.com>
11338
11339         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
11340         (try_thread_db_load_from_dir, thread_db_load_search): Use
11341         std::string.
11342         (info_auto_load_libthread_db_compare): Return bool.  Change
11343         argument types.
11344         (info_auto_load_libthread_db): Use std::vector, std::string.
11345         Remove cleanups.
11346
11347 2018-02-24  Tom Tromey  <tom@tromey.com>
11348
11349         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
11350         std::string.
11351         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
11352         std::string*.
11353         * gdbarch.c: Rebuild.
11354         * gdbarch.h: Rebuild.
11355         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
11356         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
11357         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
11358         std::string*.
11359
11360 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
11361
11362         * gdbtypes.h (sect_offset): Change type to uint64_t.
11363         (sect_offset_str): New function.
11364         * dwarf2read.c (create_addrmap_from_aranges): Use
11365         sect_offset_str.
11366         (error_check_comp_unit_head): Likewise.
11367         (create_debug_type_hash_table): Likewise.
11368         (read_cutu_die_from_dwo): Likewise.
11369         (init_cutu_and_read_dies): Likewise.
11370         (init_cutu_and_read_dies_no_follow): Likewise.
11371         (process_psymtab_comp_unit_reader): Likewise.
11372         (partial_die_parent_scope): Likewise.
11373         (peek_die_abbrev): Likewise.
11374         (process_queue): Likewise.
11375         (dwarf2_physname): Likewise.
11376         (read_namespace_alias): Likewise.
11377         (read_import_statement): Likewise.
11378         (create_dwo_cu_reader): Likewise.
11379         (create_cus_hash_table): Likewise.
11380         (lookup_dwo_cutu): Likewise.
11381         (inherit_abstract_dies): Likewise.
11382         (read_func_scope): Likewise.
11383         (read_call_site_scope): Likewise.
11384         (dwarf2_add_member_fn): Likewise.
11385         (read_common_block): Likewise.
11386         (read_module_type): Likewise.
11387         (read_typedef): Likewise.
11388         (read_subrange_type): Likewise.
11389         (load_partial_dies): Likewise.
11390         (read_partial_die): Likewise.
11391         (find_partial_die): Likewise.
11392         (read_str_index): Likewise.
11393         (dwarf2_string_attr): Likewise.
11394         (build_error_marker_type): Likewise.
11395         (lookup_die_type): Likewise.
11396         (dump_die_shallow): Likewise.
11397         (follow_die_ref): Likewise.
11398         (dwarf2_fetch_die_loc_sect_off): Likewise.
11399         (dwarf2_fetch_constant_bytes): Likewise.
11400         (follow_die_sig): Likewise.
11401         (get_signatured_type): Likewise.
11402         (get_DW_AT_signature_type): Likewise.
11403         (dwarf2_find_containing_comp_unit): Likewise.
11404         (set_die_type): Likewise.
11405
11406 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
11407
11408         * arch/aarch64.c: Include "common-defs.h".
11409         * arch/amd64.c: Likewise.
11410         * arch/i386.c: Likewise.
11411
11412 2018-02-21  Tom Tromey  <tom@tromey.com>
11413
11414         * value.h: (extract_field_op): Update.
11415         * eval.c (extract_field_op): Return a const char *.
11416         * expression.h (parse_expression_for_completion): Update.
11417         * completer.c (complete_expression): Update.
11418         (add_struct_fields): Make fieldname const.
11419         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
11420         (mark_completion_tag, parse_exp_in_context_1): Update.
11421         (parse_expression_for_completion): Change "name" to
11422         unique_xmalloc_ptr*.
11423
11424 2018-02-21  Tom Tromey  <tom@tromey.com>
11425
11426         * infcall.c (call_function_by_hand_dummy): Use std::vector.
11427
11428 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11429
11430         * avr-tdep.c (avr_read_pc): Change parameter type to
11431         readable_regcache.
11432         * gdbarch.sh (read_pc): Likewise.
11433         * gdbarch.c: Re-generated.
11434         * gdbarch.h: Re-generated.
11435         * hppa-tdep.c (hppa_read_pc): Change parameter type to
11436         readable_regcache.
11437         * ia64-tdep.c (ia64_read_pc): Likewise.
11438         * mips-tdep.c (mips_read_pc): Likewise.
11439         * spu-tdep.c (spu_read_pc): Likewise.
11440
11441 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11442
11443         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
11444         * regcache-dump.c: New file.
11445         * regcache.c: Move register_dump to regcache-dump.c.
11446         (maintenance_print_registers): Likewise.
11447         (maintenance_print_raw_registers): Likewise.
11448         (maintenance_print_cooked_registers): Likewise.
11449         (maintenance_print_register_groups): Likewise.
11450         (maintenance_print_remote_registers): Likewise.
11451         (_initialize_regcache): Likewise.
11452         * regcache.h (register_dump): Moved from regcache.c.
11453
11454 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11455
11456         * regcache.c (regcache::regcache): Update.
11457         (regcache::invalidate): Move it to detached_regcache::invalidate.
11458         (get_thread_arch_aspace_regcache): Update.
11459         (regcache::raw_update): Update.
11460         (regcache::cooked_read): Remove some code.
11461         (regcache::cooked_read_value): Likewise.
11462         (regcache::raw_write): Remove assert on m_readonly_p.
11463         (regcache::raw_supply_integer): Move it to
11464         detached_regcache::raw_supply_integer.
11465         (regcache::raw_supply_zeroed): Likewise.
11466         * regcache.h (detached_regcache) <raw_supply_integer>: New
11467         declaration.
11468         <raw_supply_zeroed, invalidate>: Likewise.
11469         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
11470         <invalidate>: Likewise.
11471         <m_readonly_p>: Removed.
11472
11473 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11474
11475         * infcmd.c (get_return_value): Let stop_regs point to
11476         get_current_regcache.
11477         * regcache.c (regcache::regcache): Remove.
11478         (register_dump_reg_buffer): New class.
11479         (regcache_print): Adjust.
11480         * regcache.h (regcache): Remove constructors.
11481
11482 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11483
11484         * regcache.c (class register_dump): New class.
11485         (register_dump_regcache, register_dump_none): New class.
11486         (register_dump_remote, register_dump_groups): New class.
11487         (regcache_print): Update.
11488         * regcache.h (regcache_dump_what): Move it to regcache.c.
11489         (regcache) <dump>: Remove.
11490
11491 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11492
11493         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
11494          reg_buffer_rw *.
11495         (jit_unwind_reg_set_impl): Call raw_supply.
11496         (jit_frame_sniffer): Use reg_buffer_rw.
11497         * record-full.c (record_full_core_regbuf): Change its type.
11498         (record_full_core_open_1): Use reg_buffer_rw.
11499         (record_full_close): Likewise.
11500         (record_full_core_fetch_registers): Use regcache->raw_supply.
11501         (record_full_core_store_registers): Likewise.
11502         * regcache.c (regcache::get_register_status): Move it to
11503         reg_buffer.
11504         (regcache_raw_set_cached_value): Remove.
11505         (regcache::raw_set_cached_value): Remove.
11506         (regcache::raw_write): Call raw_supply.
11507         (regcache::raw_supply): Move it to reg_buffer_rw.
11508         * regcache.h (regcache_raw_set_cached_value): Remove.
11509         (reg_buffer_rw): New class.
11510
11511 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11512
11513         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
11514         readonly_detached_regcache.
11515         (dummy_frame_prev_register): Use regcache->cooked_read.
11516         * frame.c (frame_save_as_regcache): Change return type.
11517         (frame_pop): Update.
11518         * frame.h (frame_save_as_regcache): Update declaration.
11519         * inferior.h (get_infcall_suspend_state_regcache): Update
11520         declaration.
11521         * infrun.c (infcall_suspend_state) <registers>: use
11522         readonly_detached_regcache.
11523         (save_infcall_suspend_state): Don't use regcache_dup.
11524         (get_infcall_suspend_state_regcache): Change return type.
11525         * linux-fork.c (struct fork_info) <savedregs>: Change to
11526         readonly_detached_regcache.
11527         <pc>: New field.
11528         (fork_save_infrun_state): Don't use regcache_dup.
11529         (info_checkpoints_command): Adjust.
11530         * mi/mi-main.c (register_changed_p): Update declaration.
11531         (mi_cmd_data_list_changed_registers): Use
11532         readonly_detached_regcache.
11533         (register_changed_p): Change parameter type to
11534         readonly_detached_regcache.
11535         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
11536         readonly_detached_regcache.
11537         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
11538         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
11539         New.
11540         (regcache::save): Move it to reg_buffer.
11541         (regcache::restore): Change parameter type.
11542         (regcache_dup): Remove.
11543         * regcache.h (reg_buffer) <save>: New method.
11544         (readonly_detached_regcache): New class.
11545         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
11546         readonly_detached_regcache.
11547         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
11548
11549 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11550
11551         * frame.c (frame_save_as_regcache): Use regcache method save.
11552         (frame_pop): Use regcache method restore.
11553         * infrun.c (restore_infcall_suspend_state): Likewise.
11554         * linux-fork.c (fork_load_infrun_state): Likewise.
11555         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
11556         save.
11557         * regcache.c (regcache_save): Remove.
11558         (regcache::restore): More asserts.
11559         (regcache_cpy): Remove.
11560         * regcache.h (regcache_save): Remove the declaration.
11561         (regcache::restore): Move from private to public.
11562         Remove the friend declaration of regcache_cpy.
11563         (regcache_cpy): Remove declaration.
11564
11565 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11566
11567         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
11568         parameter type to 'readable_regcache *'.
11569         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
11570         * arm-tdep.c (arm_neon_quad_read): Likewise.
11571         (arm_pseudo_read): Likewise.
11572         * avr-tdep.c (avr_pseudo_register_read): Likewise.
11573         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
11574         * frv-tdep.c (frv_pseudo_register_read): Likewise.
11575         * gdbarch.c: Re-generated.
11576         * gdbarch.h: Re-generated.
11577         * gdbarch.sh (pseudo_register_read): Change parameter type to
11578         'readable_regcache *'.
11579         (pseudo_register_read_value): Likewise.
11580         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
11581         (h8300_pseudo_register_read): Likewise.
11582         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
11583         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
11584         (i386_pseudo_register_read_into_value): Likewise.
11585         (i386_pseudo_register_read_value): Likewise.
11586         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
11587         declaration.
11588         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
11589         * m32c-tdep.c (m32c_raw_read): Likewise.
11590         (m32c_read_flg): Likewise.
11591         (m32c_banked_register): Likewise.
11592         (m32c_banked_read): Likewise.
11593         (m32c_sb_read): Likewise.
11594         (m32c_part_read): Likewise.
11595         (m32c_cat_read): Likewise.
11596         (m32c_r3r2r1r0_read): Likewise.
11597         (m32c_pseudo_register_read): Likewise.
11598         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
11599         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
11600         (mep_pseudo_cr64_read): Likewise.
11601         (mep_pseudo_register_read): Likewise.
11602         * mips-tdep.c (mips_pseudo_register_read): Likewise.
11603         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
11604         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
11605         * regcache.c (regcache::raw_read): Move it to readable_regcache.
11606         (regcache::cooked_read): Likewise.
11607         (regcache::cooked_read_value): Likewise.
11608         (regcache_cooked_read_signed):
11609         (regcache::cooked_read): Likewise.
11610         * regcache.h (readable_regcache): New class.
11611         (regcache): Inherit readable_regcache.  Move some methods to
11612         readable_regcache.
11613         * rl78-tdep.c (rl78_pseudo_register_read): Change
11614         parameter type to 'readable_regcache *'.
11615         * rs6000-tdep.c (do_regcache_raw_read): Remove.
11616         (e500_pseudo_register_read): Change parameter type to
11617         'readable_regcache *'.
11618         (dfp_pseudo_register_read): Likewise.
11619         (vsx_pseudo_register_read): Likewise.
11620         (efpr_pseudo_register_read): Likewise.
11621         * s390-tdep.c (s390_pseudo_register_read): Likewise.
11622         * sh-tdep.c (sh_pseudo_register_read): Likewise.
11623         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
11624         (sh64_pseudo_register_read): Likewise.
11625         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
11626         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
11627         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
11628         (spu_pseudo_register_read): Likewise.
11629         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
11630         (xtensa_pseudo_register_read): Likewise.
11631
11632 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11633
11634         * regcache.c (regcache::regcache): Call reg_buffer ctor.
11635         (regcache::arch): Move it to reg_buffer::arch.
11636         (regcache::register_buffer): Likewise.
11637         (regcache::assert_regnum): Likewise.
11638         (regcache::num_raw_registers): Likewise.
11639         * regcache.h (reg_buffer): New class.
11640         (regcache): Inherit reg_buffer.
11641
11642 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
11643
11644         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
11645         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
11646
11647 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
11648
11649         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
11650
11651 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
11652
11653         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
11654         (SFILES): Remove common/*.c files.
11655         (COMMON_OBS): Remove some *.o files built from common/*.c files.
11656         * common/common.host: Add common reference.
11657         * configure.ac: Likewise.
11658         * configure: Regenerate.
11659
11660 2018-02-16  Yao Qi  <yao.qi@linaro.org>
11661
11662         * block.c (block_namespace_info): Inherit allocate_on_obstack.
11663         (block_initialize_namespace): Use new.
11664         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
11665         (dwarf2_free_objfile): Use delete.
11666         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
11667         (copy_type_recursive): Use new.
11668         * gdb_obstack.h (allocate_on_obstack): New.
11669
11670 2018-02-15  Yao Qi  <yao.qi@linaro.org>
11671
11672         PR gdb/22849
11673         * inferior.c (exit_inferior_1): Reset inf->control.
11674
11675 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
11676
11677         * ada-lang.c (ada_to_fixed_value_create): Delete advance
11678         declaration.
11679
11680 2018-02-14  Pedro Alves  <palves@redhat.com>
11681
11682         * frame-unwind.c (frame_unwind_try_unwinder): Always call
11683         frame_cleanup_after_sniffer on exception.
11684
11685 2018-02-14  Tom Tromey  <tom@tromey.com>
11686
11687         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
11688         const.
11689         (solib_bfd_open): Make pathname const.
11690         * solib.c (solib_bfd_open): Make pathname const.
11691         * solib-spu.c (spu_bfd_fopen): Make name const.
11692         (spu_bfd_open): Make pathname const.
11693         * solib-darwin.c (darwin_bfd_open): Make pathname const.
11694         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
11695
11696 2018-02-14  Tom Tromey  <tom@tromey.com>
11697
11698         * symfile.c (symfile_bfd_open): Update.
11699         * source.h (openp, source_full_path_of, find_and_open_source):
11700         Change argument type to unique_xmalloc_ptr.
11701         * source.c (openp): Take a unique_xmalloc_ptr.
11702         (source_full_path_of, find_and_open_source): Likewise.
11703         (open_source_file, symtab_to_fullname): Update.
11704         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
11705         unique_xmalloc_ptr.
11706         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
11707         (exec_file_find): Update.
11708         * psymtab.c (psymtab_to_fullname): Update.
11709         * nto-tdep.h (nto_find_and_open_solib): Update.
11710         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
11711         unique_xmalloc_ptr.
11712         * exec.c (exec_file_attach): Update.
11713         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
11714         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
11715
11716 2018-02-14  Tom Tromey  <tom@tromey.com>
11717
11718         * solib.c: Include source.h.
11719         * nto-tdep.c: Include source.h.
11720         * mi/mi-cmd-env.c: Include source.h.
11721         * infcmd.c: Include source.h.
11722         * exec.c: Include source.h.
11723         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
11724         (add_path, directory_switch, source_path, init_source_path): Move
11725         declarations...
11726         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
11727         (add_path, directory_switch, source_path, init_source_path):
11728         ...here.
11729
11730 2018-02-14  Tom Tromey  <tom@tromey.com>
11731
11732         * solist.h (exec_file_find, solib_find): Return
11733         unique_xmalloc_ptr.
11734         (solib_bfd_fopen): Take a const char *.
11735         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
11736         (exec_file_find, solib_find): Likewise.
11737         (solib_bfd_fopen): Do not take ownership of "pathname".
11738         (solib_bfd_open): Use unique_xmalloc_ptr.
11739         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
11740         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
11741         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
11742         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
11743
11744 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
11745
11746         * ada-lang.c (name_match_type_from_name): Remove reference to
11747         ada_name_for_lookup in function's documentation.
11748         * ada-lang.h (ada_name_for_lookup): Delete declaration.
11749
11750 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
11751
11752         * defs.h (enum openp_flags): New enum.
11753         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
11754         Move to enum openp_flags.
11755         (openp_flags): New enum flags.
11756         (openp): Change parameter type to openp_flags.
11757         * source.c (openp): Change parameter type to openp_flags.
11758         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
11759         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
11760
11761 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
11762
11763         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
11764         per-command.
11765
11766 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
11767
11768         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
11769         into...
11770         (class dwarf2_queue_guard): ...the destructor of this new class.
11771         (dw2_do_instantiate_symtab): Create instance of the new class
11772         dwarf2_queue_guard, remove cleanup.
11773
11774 2018-02-09  Tom Tromey  <tom@tromey.com>
11775
11776         * source.c (find_source_lines): Don't reference past the end of
11777         the vector.
11778
11779 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11780
11781         * remote.c (remote_btrace_maybe_reopen): Change error message.
11782         * btrace.c (btrace_enable): Likewise.
11783         (parse_xml_btrace): Likewise.
11784         (parse_xml_btrace_conf): Likewise.
11785
11786 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11787
11788         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
11789         (linux_enable_pt, linux_enable_bts): Call
11790         diagnose_perf_event_open_fail.
11791
11792 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11793
11794         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
11795         Remove parameter and change return type.  Update callers.  Move it.
11796         (linux_enable_bts, linux_enable_pt): Improve error message.
11797         (linux_enable_pt): Remove zero buffer size check.
11798         (linux_enable_btrace): Improve error messages.  Remove NULL return
11799         check.
11800
11801 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11802
11803         * btrace.c (btrace_enable): Remove target_supports_btrace call.
11804         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
11805         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
11806         (linux_supports_pt, linux_supports_btrace): Remove.
11807         (linux_enable_bts): Call cpu_supports_bts.
11808         * nat/linux-btrace.h (linux_supports_btrace): Remove.
11809         * remote.c (remote_supports_btrace): Remove.
11810         (init_remote_ops): Remove remote_supports_btrace.
11811         * target-delegates.c: Regenerated.
11812         * target.c (target_supports_btrace): Remove.
11813         * target.h (target_ops) <to_supports_btrace>: Remove
11814         (target_supports_btrace): Remove.
11815         * x86-linux-nat.c (x86_linux_create_target): Remove
11816         linux_supports_btrace.
11817
11818 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11819
11820         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
11821         btrace failed.
11822         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
11823         exception and use message in own exception.
11824
11825 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11826
11827         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
11828         (perf_event_pt_event_type): Use gdb_file_up.
11829         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
11830         scoped_fd, and scoped_mmap.
11831
11832 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11833
11834         * common/scoped_mmap.h: New.
11835         * unittests/scoped_mmap-selftest.c: New.
11836         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11837         unittests/scoped_mmap-selftest.c.
11838
11839 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11840
11841         * common/scoped_fd.h: New.
11842         * unittests/scoped_fd-selftest.c: New.
11843         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11844         unittests/scoped_fd-selftest.c.
11845
11846 2018-02-09  Tom Tromey  <tom@tromey.com>
11847
11848         * auto-load.c (auto_load_section_scripts): Use
11849         gdb::unique_xmalloc_ptr.
11850
11851 2018-02-09  Tom Tromey  <tom@tromey.com>
11852
11853         * auto-load.c (execute_script_contents): Use std::string.
11854
11855 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
11856
11857         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
11858         Python function, rather than a new command.
11859
11860 2018-02-08  Tom Tromey  <tom@tromey.com>
11861
11862         * solib.c (solib_find_1): Use std::string.
11863         (solib_bfd_fopen): Use unique_xmalloc_ptr.
11864
11865 2018-02-08  Tom Tromey  <tom@tromey.com>
11866
11867         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
11868
11869 2018-02-08  Tom Tromey  <tom@tromey.com>
11870
11871         * source.c (find_source_lines): Use gdb::def_vector.
11872
11873 2018-02-08  Tom Tromey  <tom@tromey.com>
11874
11875         * macrocmd.c (struct temporary_macro_definition): New.
11876         (macro_define_command): Use temporary_macro_definition.  Remove
11877         cleanups.
11878         (free_macro_definition_ptr): Remove.
11879
11880 2018-02-08  Tom Tromey  <tom@tromey.com>
11881
11882         * macroexp.c (maybe_expand): Use std::string.
11883
11884 2018-02-08  Tom Tromey  <tom@tromey.com>
11885
11886         * macroexp.c (struct macro_buffer): Add initializers for some
11887         members.
11888         (init_buffer, init_shared_buffer, free_buffer)
11889         (free_buffer_return_text): Remove.
11890         (macro_buffer): New constructors.
11891         (~macro_buffer): New destructor.
11892         (macro_buffer::set_shared): New method.
11893         (macro_buffer::resize_buffer, macro_buffer::appendc)
11894         (macro_buffer::appendmem): Now methods, not free functions.
11895         (set_token, append_tokens_without_splicing, stringify)
11896         (macro_stringify): Update.
11897         (gather_arguments): Change return type.  Remove argc_p argument,
11898         add args_ptr argument.  Use std::vector.
11899         (substitute_args): Remove argc argument.  Accept std::vector.
11900         (expand): Update.  Use std::vector.
11901         (scan, macro_expand, macro_expand_next): Update.
11902
11903 2018-02-08  Tom Tromey  <tom@tromey.com>
11904
11905         * symtab.c (default_collect_symbol_completion_matches_break_on):
11906         Use unique_xmalloc_ptr.
11907         * macroscope.h: (sal_macro_scope, user_macro_scope)
11908         (default_macro_scope): Return unique_xmalloc_ptr.
11909         * macroscope.c (sal_macro_scope, user_macro_scope)
11910         (default_macro_scope): Return unique_xmalloc_ptr.
11911         * macroexp.h (macro_expand, macro_expand_once): Return
11912         unique_xmalloc_ptr.
11913         * macroexp.c (macro_expand, macro_expand_once): Return
11914         unique_xmalloc_ptr.
11915         * macrocmd.c (macro_expand_command, macro_expand_once_command)
11916         (info_macro_command, info_macros_command): Use
11917         unique_xmalloc_ptr.
11918         * compile/compile-c-support.c (write_macro_definitions): Use
11919         unique_xmalloc_ptr.
11920         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
11921
11922 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
11923
11924         * value.c (value_static_field): Assign field type instead of
11925         containing type when returning an optimized out value.
11926
11927 2018-02-06  Yao Qi  <yao.qi@linaro.org>
11928
11929         * ft32-tdep.c (ft32_read_pc): Remove.
11930         (ft32_write_pc): Remove.
11931         (ft32_gdbarch_init): Update.
11932         * m32r-tdep.c (m32r_read_pc): Remove.
11933         (m32r_gdbarch_init): Update.
11934         * mep-tdep.c (mep_read_pc): Remove.
11935         (mep_gdbarch_init): Update.
11936         * microblaze-tdep.c (microblaze_write_pc): Remove.
11937         (microblaze_gdbarch_init): Update.
11938         * mn10300-tdep.c (mn10300_read_pc): Remove.
11939         (mn10300_write_pc): Remove.
11940         (mn10300_gdbarch_init): Update.
11941         * moxie-tdep.c (moxie_read_pc): Remove.
11942         (moxie_write_pc): Remove.
11943         (moxie_gdbarch_init): Update.
11944
11945 2018-02-06  Yao Qi  <yao.qi@linaro.org>
11946
11947         * expprint.c (print_subexp_standard): Handle
11948         OP_F77_UNDETERMINED_ARGLIST.
11949         (dump_subexp_body_standard): Likewise.
11950
11951 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
11952
11953         * target-descriptions.c (tdesc_element_visitor) Add empty
11954         implementations.
11955         (tdesc_type): Move make_gdb_type from here.
11956         (tdesc_type_builtin): Likewise.
11957         (tdesc_type_vector): Likewise.
11958         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
11959         (make_gdb_type_struct): Move from tdesc_type_with_fields.
11960         (make_gdb_type_union): Likewise.
11961         (make_gdb_type_flags): Likewise.
11962         (make_gdb_type_enum): Likewise.
11963         (make_gdb_type): New function.
11964         (tdesc_register_type): Use static make_gdb_type.
11965
11966 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
11967
11968         * infcmd.c (default_print_one_register_info): Align natural-format
11969         column values consistently one under another.
11970         (pad_to_column): New function.
11971
11972 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
11973
11974         * dwarf2read.c (dwarf2_physname): Move commment.
11975
11976 2018-02-01  Leszek Swirski  <leszeks@google.com>
11977
11978         * varobj.c (varobj_formatted_print_options): Allow recursive
11979         pretty printing if pretty printing is enabled.
11980
11981 2018-02-01  Leszek Swirski  <leszeks@google.com>
11982
11983         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
11984         names after a structop as a filename.
11985
11986 2018-02-01  Yao Qi  <yao.qi@linaro.org>
11987
11988         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
11989         (arm_record_coproc_data_proc): Likewise.
11990
11991 2018-02-01  Yao Qi  <yao.qi@linaro.org>
11992
11993         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
11994
11995 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
11996
11997         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
11998         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
11999
12000 2018-01-31  Pedro Alves  <palves@redhat.com>
12001
12002         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
12003         * inflow.c (child_terminal_save_inferior): Wrap reference to
12004         tcgetpgrp in HAVE_TERMIOS_H.
12005         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
12006         _WIN32.
12007         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
12008         always iterate over all inferiors.
12009         (gdbsim_cntrl_c): Adjust.
12010         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
12011
12012 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
12013
12014         * gdbtypes.c (lookup_array_range_type): Make sure the array's
12015         index type is objfile-owned if the element type is as well.
12016
12017 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
12018
12019         GDB 8.1 released.
12020
12021 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12022
12023         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
12024         "features/s390x-linux64.c".
12025         (_initialize_s390_linux_tdep): Remove initialization of tdescs
12026         s390_linux32 and s390x_linux64.
12027         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
12028         default tdesc.
12029         * s390-tdep.c: Include "features/s390-linux32.c" and
12030         "features/s390x-linux64.c".
12031         (s390_tdesc_valid): Add check for tdesc_has_registers.
12032         (s390_gdbarch_init): Make sure there is always a valid tdesc.
12033         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
12034         tdesc_s390x_linux64.
12035         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
12036         tdesc_s390x_linux64 to...
12037         * s390-tdep.h: ...here.
12038
12039 2018-01-30  Pedro Alves  <palves@redhat.com>
12040
12041         PR gdb/13211
12042         * config.in, configure: Regenerate.
12043         * configure.ac: Check for getpgid.
12044         * go32-nat.c (go32_pass_ctrlc): New.
12045         (go32_target): Install it.
12046         * inf-child.c (inf_child_target): Install
12047         child_terminal_save_inferior, child_pass_ctrlc and
12048         child_interrupt.
12049         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
12050         (inf_ptrace_target): No longer install it.
12051         * infcmd.c (interrupt_target_1): Adjust.
12052         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
12053         (child_interrupt): Declare.
12054         (inferior::terminal_state): New.
12055         * inflow.c (struct terminal_info): Update comments.
12056         (inferior_process_group): Delete.
12057         (terminal_is_ours): Delete.
12058         (gdb_tty_state): New.
12059         (child_terminal_init): Adjust.
12060         (is_gdb_terminal, sharing_input_terminal_1)
12061         (sharing_input_terminal): New functions.
12062         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
12063         Set the process's actual process group in the foreground if
12064         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
12065         mark terminal as the inferior's if not sharing GDB's terminal.
12066         Don't check attach_flag.
12067         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
12068         pass down a target_terminal_state.
12069         (child_terminal_save_inferior): New, factored out from ...
12070         (child_terminal_ours_1): ... this.  Handle
12071         target_terminal_state::is_ours_for_output.
12072         (child_interrupt, child_pass_ctrlc): New.
12073         (inflow_inferior_exit): Clear the inferior's terminal_state.
12074         (copy_terminal_info): Copy the inferior's terminal state.
12075         (_initialize_inflow): Remove reference to terminal_is_ours.
12076         * inflow.h (inferior_process_group): Delete.
12077         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
12078         * procfs.c (procfs_target): Don't install procfs_interrupt.
12079         (procfs_interrupt): Delete.
12080         * remote.c (remote_serial_quit_handler): Adjust.
12081         (remote_interrupt): Remove ptid parameter.  Adjust.
12082         * target-delegates.c: Regenerate.
12083         * target.c: Include "terminal.h".
12084         (target_terminal::terminal_state): Rename to ...
12085         (target_terminal::m_terminal_state): ... this.
12086         (target_terminal::init): Adjust.
12087         (target_terminal::inferior): Adjust to per-inferior
12088         terminal_state.
12089         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
12090         (target_terminal::ours, target_terminal::ours_for_output): Use
12091         target_terminal_is_ours_kind.
12092         (target_interrupt): Remove ptid parameter.  Adjust.
12093         (default_target_pass_ctrlc): Adjust.
12094         * target.h (target_ops::to_terminal_save_inferior): New field.
12095         (target_ops::to_interrupt): Remove ptid_t parameter.
12096         (target_interrupt): Remove ptid_t parameter.  Update comment.
12097         (target_pass_ctrlc): Update comment.
12098         * target/target.h (target_terminal_state): New scoped enum,
12099         factored out of ...
12100         (target_terminal::terminal_state): ... here.
12101         (target_terminal::inferior): Update comments.
12102         (target_terminal::restore_inferior): New.
12103         (target_terminal::is_inferior, target_terminal::is_ours)
12104         (target_terminal::is_ours_for_output): Adjust.
12105         (target_terminal::scoped_restore_terminal_state): Adjust to
12106         rename, and call restore_inferior() instead of inferior().
12107         (target_terminal::scoped_restore_terminal_state::m_state): Change
12108         type.
12109         (target_terminal::terminal_state): Rename to ...
12110         (target_terminal::m_terminal_state): ... this and change type.
12111
12112 2018-01-30  Pedro Alves  <palves@redhat.com>
12113
12114         * linux-nat.c (wait_for_signal): New function.
12115         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
12116         directly.
12117         (async_terminal_is_ours)
12118         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
12119         (linux_nat_add_target): Don't override
12120         to_terminal_inferior/to_terminal_ours.
12121
12122 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
12123
12124         * remote.c (remote_follow_fork): Don't call "detach_inferior".
12125
12126 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
12127
12128         * dwarf2read.c (free_dwo_files): Add forward-declaration.
12129         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
12130         dwarf2_per_objfile_free here.
12131         (dwarf2_per_objfile_free): Remove.
12132         (_initialize_dwarf2_read): Don't register
12133         dwarf2_per_objfile_free as a registry cleanup.
12134
12135 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
12136
12137         Avoid compilation errors in MinGW native builds
12138
12139         The error is triggered by including python-internal.h, and the
12140         error message is:
12141
12142              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
12143                       from build-gnulib/import/math.h:27,
12144                       from d:/usr/Python26/include/pyport.h:235,
12145                       from d:/usr/Python26/include/Python.h:58,
12146                       from python/python-internal.h:94,
12147                       from python/py-arch.c:24:
12148              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
12149         using ::hypot;
12150                 ^~~~~
12151
12152         This happens because Python headers define 'hypot' to expand t
12153         '_hypot' in the Windows builds.
12154         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
12155         'hypoth'.  This avoids a compilation error.
12156
12157 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
12158
12159         * MAINTAINERS (Write After Approval): Fix ordering.
12160
12161 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
12162
12163         * MAINTAINERS (Write After Approval): Add Alan Hayward.
12164
12165 2018-01-26  Alan Modra  <amodra@gmail.com>
12166
12167         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
12168         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
12169         Remove nop.  Make const.  Comment.
12170         (powerpc32_plt_stub_so_2): New.
12171         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
12172         Correct count.  Update uses.
12173         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
12174         Move common code reading PLT entry word.  Correct
12175         powerpc32_plt_stub PLT address calculation.
12176         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
12177         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
12178         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
12179         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
12180         (ppc64_standard_linkage8): Likewise.
12181         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
12182         Correct insns description.
12183         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
12184
12185 2018-01-24  Pedro Alves  <palves@redhat.com>
12186
12187         GCC PR libstdc++/83906
12188         * gdbtypes.c (operator==(const dynamic_prop &,
12189         const dynamic_prop &)): New.
12190         (operator==(const range_bounds &, const range_bounds &)): New.
12191         (check_types_equal): Use them instead of memcmp.
12192         * gdbtypes.h (operator==(const dynamic_prop &,
12193         const dynamic_prop &)): Declare.
12194         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
12195         (operator==(const range_bounds &, const range_bounds &)): Declare.
12196         (operator!=(const range_bounds &, const range_bounds &)): Declare.
12197
12198 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12199
12200         * s390-linux-tdep.c (s390_record_address_mask)
12201         (s390_record_calc_disp_common, s390_record_calc_disp)
12202         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12203         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12204         (s390_process_record): Move to s390-tdep.c.
12205         (s390_linux_init_abi_any): Adjust.
12206         * s390-tdep.c (s390_record_address_mask)
12207         (s390_record_calc_disp_common, s390_record_calc_disp)
12208         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12209         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12210         (s390_process_record): Moved from s390-linux-tdep.c
12211         (s390_gdbarch_init): Adjust.
12212
12213 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12214
12215         * s390-linux-nat.c (s390-tdep.h): New include.
12216         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
12217         (HFILES_NO_SRCDIR): Add s390-tdep.h.
12218         (ALLDEPFILES): Add s390-tdep.c.
12219         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
12220         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
12221         * s390-tdep.h: ...this.  New file.
12222         * s390-linux-tdep.c (s390-tdep.h): New include.
12223         (_initialize_s390_tdep): Rename to...
12224         (_initialize_s390_linux_tdep): ...this and adjust.
12225         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
12226         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
12227         s390-tdep.h.
12228         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
12229         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
12230         (s390_is_partial_instruction, s390_software_single_step)
12231         (is_non_branch_ril, s390_displaced_step_copy_insn)
12232         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
12233         (s390_prologue_data, s390_addr, s390_store, s390_load)
12234         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
12235         (s390_register_call_saved, s390_guess_tracepoint_registers)
12236         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
12237         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
12238         (s390_pseudo_register_name, s390_pseudo_register_type)
12239         (s390_pseudo_register_read, s390_pseudo_register_write)
12240         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
12241         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
12242         (s390_addr_bits_remove, s390_address_class_type_flags)
12243         (s390_address_class_type_flags_to_name)
12244         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
12245         (s390_function_arg_float, s390_function_arg_vector)
12246         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
12247         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
12248         (s390_frame_align, s390_register_return_value, s390_return_value)
12249         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
12250         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
12251         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
12252         (s390_trad_frame_prev_register, s390_unwind_cache)
12253         (s390_prologue_frame_unwind_cache)
12254         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
12255         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
12256         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
12257         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
12258         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
12259         (s390_frame_base_address, s390_local_base_address)
12260         (s390_frame_base, s390_gcc_target_options)
12261         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
12262         (s390_validate_reg_range, s390_tdesc_valid)
12263         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
12264         * s390-tdep.c: ...this.  New file.
12265
12266 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12267
12268         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
12269         (s390_process_record, s390_gdbarch_tdep_alloc)
12270         (s390_linux_init_abi_any): Use/set new hook.
12271
12272 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12273
12274         * s390-linux-tdep.c (osabi.h): New include.
12275         (s390_linux_init_abi_31, s390_linux_init_abi_64)
12276         (s390_linux_init_abi_any): New functions.
12277         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
12278
12279 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12280
12281         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
12282         tdesc_has_registers check
12283
12284 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12285
12286         * s390-linux-tdep.c (s390_tdesc_valid): New function.
12287         (s390_validate_reg_range): New macro.
12288         (s390_gdbarch_init): Adjust.
12289
12290 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12291
12292         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
12293         (s390_gdbarch_tdep_alloc): Adjust.
12294         (s390_gdbarch_init): Adjust.
12295
12296 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12297
12298         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
12299         <have_tdb>: Change type to bool.
12300         (s390_gdbarch_tdep_alloc): Adjust.
12301         (s390_gdbarch_init): Adjust.
12302
12303 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12304
12305         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
12306         (gdbarch_tdep) <have_upper, have_vx>: New fields.
12307         (s390_gdbarch_tdep_alloc): New function.
12308         (s390_gdbarch_init): Allocate tdep at start and use its fields
12309         instead of separate variables.
12310
12311 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12312
12313         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
12314         when looking for cached gdbarch and add comment for remaining.
12315
12316 2018-01-22  Pedro Alves  <palves@redhat.com>
12317             Sergio Durigan Junior  <sergiodj@redhat.com>
12318
12319         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
12320         case.
12321
12322 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
12323
12324         * MAINTAINERS: Update my company e-mail address.
12325
12326 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12327
12328         * regcache.c (cooked_write_test): New function.
12329         (_initialize_regcache): Register the test.
12330
12331 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12332
12333         * ia64-tdep.c (ia64_pseudo_register_read): Call
12334         regcache->cooked_read instead of regcache_cooked_read_unsigned.
12335         * m32c-tdep.c (m32c_cat_read): Likewise.
12336         (m32c_r3r2r1r0_read): Likewise.
12337         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
12338         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
12339
12340 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12341
12342         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
12343         method raw_read instead of regcache_raw_read.
12344         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
12345         * arm-tdep.c (arm_neon_quad_read): Likewise.
12346         * avr-tdep.c (avr_pseudo_register_read): Likewise.
12347         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
12348         * frv-tdep.c (frv_pseudo_register_read): Likewise.
12349         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
12350         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
12351         (i386_pseudo_register_read_into_value): Likewise.
12352         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
12353         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
12354         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
12355         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
12356         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
12357         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
12358         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
12359         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
12360         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
12361
12362 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12363
12364         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
12365         * configure.tgt: Remove target mt.
12366         * mt-tdep.c: Remove.
12367         * regcache.c (cooked_read_test): Remove the check for mt.
12368
12369 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12370
12371         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
12372         instead of gdbarch_pseudo_register_read_value.
12373
12374 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
12375
12376         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
12377         language is Ada.
12378
12379 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
12380
12381         * linespec.c (create_sals_line_offset): Remove code that preserved
12382         the symtab_and_line's line number.
12383
12384 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12385
12386         * varobj.c (varobj_create): Don't set valid_block when creating a
12387         floating varobj.
12388
12389 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12390
12391         * varobj.c (varobj_create): Remove out of date comment.
12392
12393 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12394
12395         PR mi/20395
12396         * ada-exp.y (write_var_from_sym): Pass extra parameter when
12397         updating innermost block.
12398         * parse.c (innermost_block_tracker::update): Take extra type
12399         parameter, and check types match before updating innermost block.
12400         (write_dollar_variable): Update innermost block for registers.
12401         * parser-defs.h (enum innermost_block_tracker_type): New enum.
12402         (innermost_block_tracker::innermost_block_tracker): Initialise
12403         m_types member.
12404         (innermost_block_tracker::reset): Take type parameter.
12405         (innermost_block_tracker::update): Take type parameter, and pass
12406         type through as needed.
12407         (innermost_block_tracker::m_types): New member.
12408         * varobj.c (varobj_create): Pass type when reseting innermost
12409         block.
12410
12411 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12412
12413         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
12414         * ada-lang.c (resolve_subexp): Likewise.
12415         * breakpoint.c (set_breakpoint_condition) Likewise.
12416         (watch_command_1) Likewise.
12417         * c-exp.y (variable): Likewise.
12418         * d-exp.y (PrimaryExpression): Likewise.
12419         * f-exp.y (variable): Likewise.
12420         * go-exp.y (variable): Likewise.
12421         * m2-exp.y (variable): Likewise.
12422         * objfiles.c (objfile::~objfile): Likewise.
12423         * p-exp.y (variable): Likewise.
12424         * parse.c (innermost_block): Change type.
12425         * parser-defs.h (class innermost_block_tracker): New.
12426         (innermost_block): Change to innermost_block_tracker.
12427         * printcmd.c (display_command): Switch to innermost_block API.
12428         (do_one_display): Likewise.
12429         * rust-exp.y (do_one_display): Likewise.
12430         * symfile.c (clear_symtab_users): Likewise.
12431         * varobj.c (varobj_create): Switch to innermost_block API, replace
12432         use of innermost_block with block stored on varobj object.
12433
12434 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12435
12436         * expression.h (innermost_block): Remove declaration.
12437         * varobj.c: Add 'parser-defs.h' include.
12438
12439 2018-01-19  Tom Tromey  <tom@tromey.com>
12440
12441         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
12442         symbols in the static and global blocks.
12443
12444 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
12445
12446         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
12447         gdb_ptrace.h, and move including gdb_wait.h ...
12448         * nat/linux-ptrace.h: ... to here.
12449
12450 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
12451
12452         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
12453         inf_ptrace_detach_success.
12454         (inf_ptrace_detach_success): Add inferior parameter, use it
12455         instead of inferior_ptid, pass it to detach_inferior.
12456         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
12457         parameter.
12458         * inferior.c (detach_inferior): Add overload that takes an
12459         inferior object.
12460         * inferior.h (detach_inferior): Likewise.
12461         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
12462         use inferior_ptid, adjust call to inf_ptrace_detach_success.
12463         * linux-thread-db.c (thread_db_detach): Use inf parameter.
12464
12465 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
12466
12467         * target.h (struct target_ops) <to_detach>: Add inferior
12468         parameter.
12469         (target_detach): Likewise.
12470         * target.c (dispose_inferior): Pass inferior down.
12471         (target_detach): Pass inferior down.  Assert that it is equal to
12472         the current inferior.
12473         * aix-thread.c (aix_thread_detach): Pass inferior down.
12474         * corefile.c (core_file_command): Pass current_inferior() down.
12475         * corelow.c (core_detach): Add inferior parameter.
12476         * darwin-nat.c (darwin_detach): Likewise.
12477         * gnu-nat.c (gnu_detach): Likewise.
12478         * inf-ptrace.c (inf_ptrace_detach): Likewise.
12479         * infcmd.c (detach_command): Pass current_inferior() down to
12480         target_detach.
12481         * infrun.c (follow_fork_inferior): Pass parent_inf to
12482         target_detach.
12483         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
12484         target_detach.
12485         * linux-nat.c (linux_nat_detach): Add inferior parameter.
12486         * linux-thread-db.c (thread_db_detach): Likewise.
12487         * nto-procfs.c (procfs_detach): Likewise.
12488         * procfs.c (procfs_detach): Likewise.
12489         * record.c (record_detach): Likewise.
12490         * record.h (struct inferior): Forward-declare.
12491         (record_detach): Add inferior parameter.
12492         * remote-sim.c (gdbsim_detach): Likewise.
12493         * remote.c (remote_detach_1): Likewise.
12494         (remote_detach): Likewise.
12495         (extended_remote_detach): Likewise.
12496         * sol-thread.c (sol_thread_detach): Likewise.
12497         * target-debug.h (target_debug_print_inferior_p): New macro.
12498         * target-delegates.c: Re-generate.
12499         * top.c (kill_or_detach): Pass inferior down to target_detach.
12500         * windows-nat.c (windows_detach): Add inferior parameter.
12501
12502 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
12503
12504         * target.h (struct target_ops) <to_detach>: Remove args
12505         parameter.
12506         (target_detach): Likewise.
12507         * target.c (dispose_inferior): Adjust.
12508         (target_detach): Remove args parameter, adjust.
12509         * aix-thread.c (aix_thread_detach): Adjust.
12510         * corefile.c (core_file_command): Adjust.
12511         * corelow.c (core_detach): Adjust.
12512         * darwin-nat.c (darwin_detach): Adjust.
12513         * gnu-nat.c (gnu_detach): Adjust.
12514         * inf-ptrace.c (inf_ptrace_detach): Adjust.
12515         * infcmd.c (detach_command): Adjust
12516         * infrun.c (follow_fork_inferior): Adjust.
12517         (handle_vfork_child_exec_or_exit): Adjust.
12518         * linux-fork.c (linux_fork_detach): Remove args parameter.
12519         * linux-fork.h (linux_fork_detach): Likewise.
12520         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
12521         * linux-thread-db.c (thread_db_detach): Likewise.
12522         * nto-procfs.c (procfs_detach): Likewise.
12523         * procfs.c (procfs_detach): Likewise.
12524         (do_detach): Remove signo parameter.
12525         * record.c (record_detach): Remove args parameter.
12526         * record.h (record_detach): Likewise.
12527         * remote-sim.c (gdbsim_detach): Likewise.
12528         * remote.c (remote_detach_1): Likewise.
12529         (remote_detach): Likewise.
12530         (extended_remote_detach): Likewise.
12531         * sol-thread.c (sol_thread_detach): Likewise.
12532         * target-delegates.c: Re-generate.
12533         * top.c (struct qt_args) <args>: Remove field.
12534         (kill_or_detach): Don't pass args.
12535         (quit_force): Don't set args.
12536         * windows-nat.c (windows_detach): Remove args parameter.
12537
12538 2018-01-19  Yao Qi  <yao.qi@linaro.org>
12539
12540         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
12541         (arm_linux_init_abi): Install it.
12542
12543 2018-01-19  Yao Qi  <yao.qi@linaro.org>
12544
12545         * osabi.c (gdb_osabi_names): Extend the regexp for
12546         arm-linux-gnueabihf.
12547
12548 2018-01-18  Yao Qi  <yao.qi@linaro.org>
12549
12550         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
12551         m_abbrevs.
12552         (abbrev_table::add_abbrev): Update.
12553         (abbrev_table::lookup_abbrev): Update.
12554
12555 2018-01-18  Yao Qi  <yao.qi@linaro.org>
12556
12557         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
12558
12559 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
12560
12561         * compile/compile.c (compile_to_object): Convert "triplet_rx"
12562         to "std::string".
12563
12564 2018-01-17  Tom Tromey  <tom@tromey.com>
12565
12566         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
12567
12568 2018-01-17  Tom Tromey  <tom@tromey.com>
12569
12570         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
12571         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
12572         (create_array_type_with_stride): Update.
12573         * dwarf2read.c (set_die_type): Update.
12574
12575 2018-01-17  Tom Tromey  <tom@tromey.com>
12576
12577         * dwarf2read.c (delayed_method_info): Remove typedef.
12578         (dwarf2_cu::method_info): Now a std::vector.
12579         (add_to_method_list): Update.
12580         (free_delayed_list): Remove.
12581         (compute_delayed_physnames): Update.
12582         (process_full_comp_unit, process_full_type_unit): Clear the method
12583         list.  Remove cleanups.
12584         (psymtab_include_file_name): Add name_holder parameter.  Use
12585         unique_xmalloc_ptr.
12586         (dwarf_decode_lines): Update.
12587
12588 2018-01-17  Tom Tromey  <tom@tromey.com>
12589             Simon Marchi  <simon.marchi@ericsson.com>
12590
12591         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
12592         (dwarf2_per_objfile::free_cached_comp_units)
12593         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
12594         (init_cutu_and_read_dies_no_follow): Update.
12595         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
12596         (dwarf2_cu::~dwarf2_cu): New.
12597         (free_heap_comp_unit, free_stack_comp_unit): Remove.
12598         (age_cached_comp_units, free_one_cached_comp_unit): Update.
12599
12600 2018-01-17  Tom Tromey  <tom@tromey.com>
12601             Simon Marchi  <simon.marchi@ericsson.com>
12602
12603         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
12604         (struct die_reader_specs) <abbrev_table>: New member.
12605         (struct abbrev_table): Add constructor.
12606         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
12607         <abbrev_obstack>: Now an auto_obstack.
12608         (abbrev_table_up): New typedef.
12609         (init_cu_die_reader): Add abbrev_table parameter.
12610         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
12611         Add result_dwo_abbrev_table.
12612         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
12613         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
12614         Update.
12615         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
12616         parameter.
12617         (skip_children): Update.
12618         (abbrev_table::alloc_abbrev): Rename from
12619         abbrev_table_alloc_abbrev.
12620         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
12621         (abbrev_table::lookup_abbrev): Rename from
12622         abbrev_table_lookup_abbrev.
12623         (abbrev_table_read_table): Return abbrev_table_up.
12624         (abbrev_table_free, abbrev_table_free_cleanup)
12625         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
12626         (load_partial_dies): Update.
12627
12628 2018-01-17  Tom Tromey  <tom@tromey.com>
12629
12630         * dwarf2read.c (dwarf2_compute_name): Update comment.
12631         (read_func_scope, read_variable): Update.
12632         (new_symbol): Remove.
12633         (new_symbol_full): Rename to new_symbol.
12634
12635 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
12636
12637         PR gdb/16577
12638         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
12639         a warning instead of throwing an error, set section size to 0 and return
12640         NULL.
12641         * gdb_bfd.h (gdb_bfd_map_section): Update description.
12642
12643 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
12644
12645         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
12646         std::string.
12647         (linux_ptrace_attach_fail_reason_string): Likewise.
12648         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
12649         Likewise.
12650         (linux_ptrace_attach_fail_reason_string): Likewise.
12651         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
12652
12653 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
12654
12655         * linux-nat.c (linux_nat_attach): Remove xstrdup.
12656
12657 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
12658
12659         PR gdb/21559
12660         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
12661         checking for fs_base/gs_base fields in struct user_regs_struct.
12662         * configure: Regenerate.
12663
12664 2018-01-17  Yao Qi  <yao.qi@linaro.org>
12665
12666         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
12667         function.
12668         (aarch64_linux_init_abi): Install it to gdbarch hook
12669         gcc_target_options.
12670
12671 2018-01-15  Pedro Alves  <palves@redhat.com>
12672
12673         * common/signals-state-save-restore.c
12674         (save_original_signals_state): Fix typos.
12675
12676 2017-01-12  Tom Tromey  <tom@tromey.com>
12677             Sergio Durigan Junior  <sergiodj@redhat.com>
12678
12679         * Makefile.in (install-only): Install gdb-add-index.
12680
12681 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
12682
12683         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
12684
12685 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12686
12687         * infrun.c (keep_going_pass_signal): Clear step-over info when
12688         insert_breakpoints fails.
12689
12690 2018-01-11  Pedro Alves  <palves@redhat.com>
12691
12692         PR gdb/22583
12693         * infrun.c (resume): Rename to ...
12694         (resume_1): ... this.
12695         (resume): Reimplement as wrapper around resume_1.
12696
12697 2018-01-11  Pedro Alves  <palves@redhat.com>
12698
12699         PR remote/22597
12700         * remote.c (remote_parse_stop_reply): Default to the last-set
12701         general thread instead of to 'magic_null_ptid'.
12702
12703 2018-01-10  Pedro Alves  <palves@redhat.com>
12704
12705         * language.h (language_get_symbol_name_matcher): Rename ...
12706         (get_symbol_name_matcher): ... this.
12707         * language.c (language_get_symbol_name_matcher): Ditto.
12708         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
12709         callers adjusted.
12710
12711 2018-01-10  Pedro Alves  <palves@redhat.com>
12712
12713         PR gdb/22670
12714         * dwarf2read.c
12715         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
12716         Adjust to use language_get_symbol_name_matcher instead of
12717         language_defn::la_get_symbol_name_matcher.
12718         * language.c (language_get_symbol_name_matcher): If in Ada mode
12719         and the lookup name is a verbatim match, return Ada's matcher.
12720         * language.h (language_get_symbol_name_matcher): Adjust comment.
12721         (ada_lookup_name_info::verbatim_p):: New method.
12722
12723 2018-01-10  Pedro Alves  <palves@redhat.com>
12724
12725         PR gdb/22670
12726         * ada-lang.c (ada_collect_symbol_completion_matches): If the
12727         minsym's language is language_auto or language_cplus, pass down
12728         language_ada instead.
12729         * symtab.c (compare_symbol_name): Don't frob symbol language here.
12730
12731 2018-01-10  Pedro Alves  <palves@redhat.com>
12732
12733         PR gdb/22670
12734         * minsyms.c (linkage_name_str): New function.
12735         (iterate_over_minimal_symbols): Use it.
12736
12737 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12738
12739         * NEWS: Document that 'info proc' now works on FreeBSD.
12740
12741 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12742
12743         * configure.ac: Check for kinfo_getfile in libutil.
12744         * configure: Regenerate.
12745         * config.in: Regenerate.
12746         * fbsd-nat.c: Include "fbsd-tdep.h".
12747         (fbsd_fetch_cmdline): New.
12748         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
12749         rather than calling error.
12750         (fbsd_info_proc): New.
12751         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
12752         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
12753         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
12754
12755 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12756
12757         * fbsd-nat.c (struct free_deleter): Remove.
12758         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
12759
12760 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12761
12762         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
12763         NULL for an empty pathname.
12764
12765 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12766
12767         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
12768         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
12769         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
12770         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
12771         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
12772         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
12773         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
12774         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
12775         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
12776         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
12777         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
12778         (fbsd_core_fetch_timeval, fbsd_print_sigset)
12779         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
12780         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
12781         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
12782
12783 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
12784
12785         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
12786         (gnu_xfer_auxv): New function.
12787         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
12788         TARGET_OBJECT_AUXV.
12789
12790 2018-01-08  Yao Qi  <yao.qi@linaro.org>
12791             Simon Marchi  <simon.marchi@ericsson.com>
12792
12793         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
12794         common/selftest.c.
12795         (COMMON_OBS): Remove selftest.o.
12796         * configure.ac: Append selftest-arch.c and common/selftest.c to
12797         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
12798         * configure: Re-generated.
12799         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
12800         GDB_SELF_TEST.
12801         (maintenance_info_selftests): Likewise.
12802
12803 2018-01-08  Xavier Roirand  <roirand@adacore.com>
12804
12805         * ada-valprint.c (val_print_packed_array_elements): Use
12806         proper number of elements when printing an array indexed
12807         by an enumeration type.
12808
12809 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12810
12811         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
12812         (dw2_get_file_names_reader): Adjust.
12813         (lookup_dwo_signatured_type): Adjust.
12814         (lookup_dwp_signatured_type): Adjust.
12815         (lookup_signatured_type): Adjust.
12816         (create_type_unit_group): Adjust.
12817         (get_type_unit_group): Adjust.
12818         (process_psymtab_comp_unit_reader): Adjust.
12819         (build_type_psymtabs_reader): Adjust.
12820         (scan_partial_symbols): Adjust.
12821         (add_partial_symbol): Adjust.
12822         (add_partial_subprogram): Adjust.
12823         (peek_die_abbrev): Adjust.
12824         (fixup_go_packaging): Adjust.
12825         (process_imported_unit_die): Adjust.
12826         (dwarf2_compute_name): Adjust.
12827         (dwarf2_physname): Adjust.
12828         (read_import_statement): Adjust.
12829         (handle_DW_AT_stmt_list): Adjust.
12830         (read_file_scope): Adjust.
12831         (read_func_scope): Adjust.
12832         (read_lexical_block_scope): Adjust.
12833         (read_call_site_scope): Adjust.
12834         (read_variable): Adjust.
12835         (dwarf2_rnglists_process): Adjust.
12836         (dwarf2_ranges_process): Adjust.
12837         (dwarf2_ranges_read): Adjust.
12838         (dwarf2_get_pc_bounds): Adjust.
12839         (dwarf2_record_block_ranges): Adjust.
12840         (dwarf2_add_field): Adjust.
12841         (dwarf2_add_member_fn): Adjust.
12842         (read_structure_type): Adjust.
12843         (process_structure_scope): Adjust.
12844         (read_enumeration_type): Adjust.
12845         (read_array_type): Adjust.
12846         (mark_common_block_symbol_computed): Adjust.
12847         (read_common_block): Adjust.
12848         (read_namespace_type): Adjust.
12849         (read_namespace): Adjust.
12850         (read_module_type): Adjust.
12851         (read_tag_pointer_type): Adjust.
12852         (read_tag_ptr_to_member_type): Adjust.
12853         (read_tag_string_type): Adjust.
12854         (read_subroutine_type): Adjust.
12855         (read_typedef): Adjust.
12856         (read_base_type): Adjust.
12857         (attr_to_dynamic_prop): Adjust.
12858         (read_subrange_type): Adjust.
12859         (read_unspecified_type): Adjust.
12860         (dwarf2_read_abbrevs): Adjust.
12861         (load_partial_dies): Adjust.
12862         (read_partial_die): Adjust.
12863         (find_partial_die): Adjust.
12864         (guess_partial_die_structure_name): Adjust.
12865         (fixup_partial_die): Adjust.
12866         (read_attribute_value): Adjust.
12867         (read_addr_index): Adjust.
12868         (read_addr_index_from_leb128): Adjust.
12869         (read_str_index): Adjust.
12870         (dwarf2_string_attr): Adjust.
12871         (get_debug_line_section): Adjust.
12872         (dwarf_decode_line_header): Adjust.
12873         (lnp_state_machine::check_line_address): Adjust.
12874         (dwarf_decode_lines_1): Adjust.
12875         (dwarf_decode_lines): Adjust.
12876         (dwarf2_start_symtab): Adjust.
12877         (var_decode_location): Adjust.
12878         (new_symbol_full): Adjust.
12879         (dwarf2_const_value_data): Adjust.
12880         (dwarf2_const_value_attr): Adjust.
12881         (dwarf2_const_value): Adjust.
12882         (die_type): Adjust.
12883         (die_containing_type): Adjust.
12884         (build_error_marker_type): Adjust.
12885         (lookup_die_type): Adjust.
12886         (guess_full_die_structure_name): Adjust.
12887         (anonymous_struct_prefix): Adjust.
12888         (determine_prefix): Adjust.
12889         (dwarf2_name): Adjust.
12890         (follow_die_ref_or_sig): Adjust.
12891         (follow_die_offset): Adjust.
12892         (follow_die_ref): Adjust.
12893         (follow_die_sig_1): Adjust.
12894         (follow_die_sig): Adjust.
12895         (get_signatured_type): Adjust.
12896         (get_DW_AT_signature_type): Adjust.
12897         (decode_locdesc): Adjust.
12898         (dwarf_decode_macros): Adjust.
12899         (cu_debug_loc_section): Adjust.
12900         (fill_in_loclist_baton): Adjust.
12901         (dwarf2_symbol_mark_computed): Adjust.
12902         (init_one_comp_unit): Don't assign
12903         dwarf2_cu::dwarf2_per_objfile.
12904         (set_die_type): Adjust.
12905
12906 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
12907
12908         * dwarf2read.c (struct mapped_debug_names): Add constructor.
12909         <dwarf2_per_objfile>: New field.
12910         (dwarf2_per_objfile): Remove global.
12911         (get_dwarf2_per_objfile): New function.
12912         (set_dwarf2_per_objfile): New function.
12913         (dwarf2_build_psymtabs_hard): Change objfile parameter to
12914         dwarf2_per_objfile.
12915         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12916         (read_abbrev_offset): Likewise.
12917         (read_indirect_string): Likewise.
12918         (read_indirect_line_string): Likewise.
12919         (read_indirect_string_at_offset): Likewise.
12920         (read_indirect_string_from_dwz): Likewise.
12921         (dwarf2_find_containing_comp_unit): Change objfile parameter to
12922         dwarf2_per_objfile.
12923         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12924         (create_all_comp_units): Change objfile parameter to
12925         dwarf2_per_objfile.
12926         (create_all_type_units): Likewise.
12927         (process_queue): Add dwarf2_per_objfile parameter.
12928         (read_and_check_comp_unit_head): Likewise.
12929         (lookup_dwo_unit_in_dwp): Likewise.
12930         (get_dwp_file): Likewise.
12931         (process_cu_includes): Likewise.
12932         (struct free_dwo_file_cleanup_data): New struct.
12933         (dwarf2_has_info): Use get_dwarf2_per_objfile and
12934         set_dwarf2_per_objfile.
12935         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
12936         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
12937         context, adjust calls.
12938         (dw2_instantiate_symtab): Likewise.
12939         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
12940         (dw2_get_cu): Likewise.
12941         (create_cu_from_index_list): Change objfile parameter to
12942         dwarf2_per_objfile.
12943         (create_cus_from_index_list): Get dwarf2_per_objfile from
12944         context, adjust calls.
12945         (create_cus_from_index): Likewise.
12946         (create_signatured_type_table_from_index): Change objfile
12947         parameter to dwarf2_per_objfile.
12948         (create_signatured_type_table_from_debug_names): Change objfile
12949         parameter to dwarf2_per_objfile.
12950         (create_addrmap_from_index): Likewise.
12951         (create_addrmap_from_aranges): Likewise.
12952         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
12953         (dw2_setup): Remove.
12954         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
12955         context.
12956         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
12957         get_dwarf2_per_objfile.
12958         (dw2_forget_cached_source_info): Likewise.
12959         (dw2_map_symtabs_matching_filename): Likewise.
12960         (struct dw2_symtab_iterator) <index>: Remove.
12961         <dwarf2_per_objfile>: New field.
12962         (dw2_symtab_iter_init): Replace index parameter with
12963         dwarf2_per_objfile.
12964         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
12965         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
12966         (dw2_print_stats): Likewise.
12967         (dw2_dump): Likewise.
12968         (dw2_expand_symtabs_for_function): Likewise.
12969         (dw2_expand_all_symtabs): Likewise.
12970         (dw2_expand_symtabs_with_fullname): Likewise.
12971         (dw2_expand_marked_cus): Replace index and objfile parameters
12972         with dwarf2_per_objfile.
12973         (dw_expand_symtabs_matching_file_matcher): Add
12974         dwarf2_per_objfile parameter and adjust calls.
12975         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
12976         adjust calls.
12977         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
12978         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
12979         adjust calls.
12980         (create_cus_from_debug_names_list): Replace objfile parameter
12981         with dwarf2_per_objfile and adjust calls.
12982         (create_cus_from_debug_names): Likewise.
12983         (dwarf2_read_debug_names): Likewise.
12984         (mapped_debug_names::namei_to_name): Adjust call.
12985         (dw2_debug_names_iterator::next): Likewise.
12986         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
12987         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
12988         (dw2_debug_names_dump): Likewise.
12989         (dw2_debug_names_expand_symtabs_for_function): Likewise.
12990         (dw2_debug_names_expand_symtabs_matching): Likewise.
12991         (dwarf2_initialize_objfile): Likewise.
12992         (dwarf2_build_psymtabs): Likewise.
12993         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
12994         this_cu.
12995         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
12996         (read_and_check_comp_unit_head): Likewise.
12997         (read_abbrev_offset): Likewise.
12998         (create_debug_type_hash_table): Likewise.
12999         (create_debug_types_hash_table): Likewise.
13000         (create_all_type_units): Replace objfile parameter with
13001         dwarf2_per_objfile.
13002         (add_type_unit): Add dwarf2_per_objfile parameter.
13003         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
13004         with dwarf2_per_objfile.
13005         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
13006         (lookup_dwp_signatured_type): Likewise.
13007         (lookup_signatured_type): Likewise.
13008         (read_cutu_die_from_dwo): Likewise.
13009         (init_tu_and_read_dwo_dies): Likewise.
13010         (init_cutu_and_read_dies): Likewise.
13011         (init_cutu_and_read_dies_no_follow): Likewise.
13012         (allocate_type_unit_groups_table): Add objfile parameter.
13013         (create_type_unit_group): Use dwarf2_per_objfile from cu.
13014         (get_type_unit_group): Likewise.
13015         (process_psymtab_comp_unit): Update call.
13016         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
13017         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
13018         (print_tu_stats): Likewise.
13019         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
13020         in void* parameter.
13021         (build_type_psymtabs): Change objfile parameter to
13022         dwarf2_per_objfile.
13023         (process_skeletonless_type_unit): Use dwarf2_per_objfile
13024         passed in void* parameter.
13025         (process_skeletonless_type_units): Change objfile parameter to
13026         dwarf2_per_objfile.
13027         (set_partial_user): Likewise.
13028         (dwarf2_build_psymtabs_hard): Likewise.
13029         (read_comp_units_from_section): Likewise.
13030         (create_all_comp_units): Likewise.
13031         (scan_partial_symbols): Update calls.
13032         (add_partial_symbol): Likewise.
13033         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
13034         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
13035         (process_queue): Add dwarf2_per_objfile parameter.
13036         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
13037         (compute_compunit_symtab_includes): Likewise.
13038         (process_cu_includes): Add dwarf2_per_objfile parameter.
13039         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
13040         (process_full_type_unit): Likewise.
13041         (process_imported_unit_die): Update call.
13042         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
13043         (read_file_scope): Likewise.
13044         (allocate_dwo_file_hash_table): Add objfile parameter.
13045         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
13046         (create_cus_hash_table): Likewise.
13047         (create_dwp_hash_table): Likewise.
13048         (create_dwo_unit_in_dwp_v1): Likewise.
13049         (create_dwp_v2_section): Likewise.
13050         (create_dwo_unit_in_dwp_v2): Likewise.
13051         (lookup_dwo_unit_in_dwp): Likewise.
13052         (try_open_dwop_file): Likewise.
13053         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
13054         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
13055         cleanup to include a reference to dwarf2_per_objfile.
13056         (open_dwp_file): Add dwarf2_per_objfile parameter.
13057         (open_and_init_dwp_file): Likewise.
13058         (get_dwp_file): Likewise.
13059         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
13060         (queue_and_load_all_dwo_tus): Update call.
13061         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
13062         data.
13063         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
13064         (dwarf2_ranges_process): Likewise.
13065         (dwarf2_get_pc_bounds): Likewise.
13066         (mark_common_block_symbol_computed): Likewise.
13067         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
13068         (dwarf2_read_abbrevs): Update call.
13069         (read_partial_die): Use dwarf2_per_objfile from cu.
13070         (find_partial_die): Likewise.
13071         (fixup_partial_die): Likewise.
13072         (read_attribute_value): Likewise.
13073         (read_indirect_string_at_offset_from): Add objfile parameter.
13074         (read_indirect_string_at_offset): Add dwarf2_per_objfile
13075         parameter.
13076         (read_indirect_string_from_dwz): Add objfile parameter.
13077         (read_indirect_string): Add objfile parameter.
13078         (read_addr_index_1): Add dwarf2_per_objfile parameter.
13079         (read_addr_index): Use dwarf2_per_objfile from cu.
13080         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
13081         call dw2_setup.
13082         (read_str_index): Use dwarf2_per_objfile from cu.
13083         (get_debug_line_section): Likewise.
13084         (read_formatted_entries): Add dwarf2_per_objfile parameter.
13085         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
13086         (new_symbol_full): Use dwarf2_per_objfile from cu.
13087         (build_error_marker_type): Likewise.
13088         (lookup_die_type): Likewise.
13089         (determine_prefix): Likewise.
13090         (follow_die_offset): Likewise.
13091         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
13092         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
13093         (dwarf2_fetch_die_type_sect_off): Likewise.
13094         (dwarf2_get_die_type): Likewise.
13095         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
13096         (get_signatured_type): Likewise.
13097         (get_DW_AT_signature_type): Likewise.
13098         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
13099         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
13100         (cu_debug_loc_section): Likewise.
13101         (fill_in_loclist_baton): Likewise.
13102         (dwarf2_symbol_mark_computed): Likewise.
13103         (dwarf2_find_containing_comp_unit): Change objfile parameter to
13104         dwarf2_per_objfile.
13105         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
13106         parameter.
13107         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
13108         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
13109         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
13110         (set_die_type): Use dwarf2_free_objfile from cu.
13111         (get_die_type_at_offset): Likewise.
13112         (dwarf2_per_objfile_free): Don't assign global variable.
13113         (debug_names) <constructor>: Add dwarf2_per_objfile
13114         parameter, update m_debugstrlookup construction.
13115         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
13116         parameter.
13117         <m_dwarf2_per_objfile>: New field.
13118         <lookup>: Use m_dwarf2_per_objfile.
13119         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
13120         (psyms_seen_size): Likewise.
13121         (write_gdbindex): Replace objfile parameter with
13122         dwarf2_per_objfile.
13123         (write_debug_names): Likewise.
13124         (write_psymtabs_to_index): Likewise.
13125         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
13126         calls.
13127
13128 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
13129
13130         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
13131         <dwarf2_per_objfile>: New field.
13132         (struct dwarf2_per_cu_data) <objfile>: Remove.
13133         <dwarf2_per_objfile>: New field.
13134         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
13135         of objfile.
13136         (create_signatured_type_table_from_index): Likewise.
13137         (create_debug_type_hash_table): Likewise.
13138         (fill_in_sig_entry_from_dwo_entry): Likewise.
13139         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
13140         (create_type_unit_group): Assign dwarf2_per_objfile instead of
13141         objfile.
13142         (create_partial_symtab): Access objfile through
13143         dwarf2_per_objfile.
13144         (process_psymtab_comp_unit_reader): Likewise.
13145         (read_comp_units_from_section): Likewise.
13146         (scan_partial_symbols): Likewise.
13147         (add_partial_symbol): Likewise.
13148         (add_partial_subprogram): Likewise.
13149         (peek_die_abbrev): Likewise.
13150         (fixup_go_packaging): Likewise.
13151         (process_full_comp_unit): Likewise.
13152         (process_full_type_unit): Likewise.
13153         (process_imported_unit_die): Likewise.
13154         (dwarf2_compute_name): Likewise.
13155         (dwarf2_physname): Likewise.
13156         (read_import_statement): Likewise.
13157         (create_cus_hash_table): Assign dwarf2_physname instead of
13158         objfile.
13159         (read_func_scope): Access objfile through dwarf2_per_objfile.
13160         (read_lexical_block_scope): Likewise.
13161         (read_call_site_scope): Likewise.
13162         (read_variable): Likewise.
13163         (dwarf2_rnglists_process): Likewise.
13164         (dwarf2_ranges_process): Likewise.
13165         (dwarf2_ranges_read): Likewise.
13166         (dwarf2_record_block_ranges): Likewise.
13167         (dwarf2_add_field): Likewise.
13168         (dwarf2_add_member_fn): Likewise.
13169         (read_structure_type): Likewise.
13170         (process_structure_scope): Likewise.
13171         (read_enumeration_type): Likewise.
13172         (read_array_type): Likewise.
13173         (read_common_block): Likewise.
13174         (read_namespace_type): Likewise.
13175         (read_namespace): Likewise.
13176         (read_module_type): Likewise.
13177         (read_tag_pointer_type): Likewise.
13178         (read_tag_ptr_to_member_type): Likewise.
13179         (read_tag_string_type): Likewise.
13180         (read_subroutine_type): Likewise.
13181         (read_typedef): Likewise.
13182         (read_base_type): Likewise.
13183         (attr_to_dynamic_prop): Likewise.
13184         (read_subrange_type): Likewise.
13185         (read_unspecified_type): Likewise.
13186         (load_partial_dies): Likewise.
13187         (read_partial_die): Likewise.
13188         (find_partial_die): Likewise.
13189         (guess_partial_die_structure_name): Likewise.
13190         (fixup_partial_die): Likewise.
13191         (read_attribute_value): Likewise.
13192         (read_addr_index_from_leb128): Likewise.
13193         (dwarf2_read_addr_index): Likewise.
13194         (dwarf2_string_attr): Likewise.
13195         (lnp_state_machine::check_line_address): Likewise.
13196         (dwarf_decode_lines_1): Likewise.
13197         (dwarf_decode_lines): Likewise.
13198         (dwarf2_start_symtab): Likewise.
13199         (var_decode_location): Likewise.
13200         (new_symbol_full): Likewise.
13201         (dwarf2_const_value_data): Likewise.
13202         (dwarf2_const_value_attr): Likewise.
13203         (dwarf2_const_value): Likewise.
13204         (die_type): Likewise.
13205         (die_containing_type): Likewise.
13206         (lookup_die_type): Likewise.
13207         (guess_full_die_structure_name): Likewise.
13208         (anonymous_struct_prefix): Likewise.
13209         (dwarf2_name): Likewise.
13210         (follow_die_ref_or_sig): Likewise.
13211         (follow_die_offset): Likewise.
13212         (follow_die_ref): Likewise.
13213         (dwarf2_fetch_die_loc_sect_off): Likewise.
13214         (dwarf2_fetch_constant_bytes): Likewise.
13215         (dwarf2_fetch_die_type_sect_off): Likewise.
13216         (dwarf2_get_die_type): Likewise.
13217         (follow_die_sig): Likewise.
13218         (decode_locdesc): Likewise.
13219         (dwarf2_per_cu_objfile): Likewise.
13220         (dwarf2_per_cu_text_offset): Likewise.
13221         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
13222         objfile.
13223         (set_die_type): Access objfile through
13224         dwarf2_per_objfile.
13225
13226 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
13227
13228         * valprint.c (converted_character_d): Remove typedef.
13229         (DEF_VEC_O (converted_character_d)): Remove.
13230         (count_next_character): Use std::vector.
13231         (print_converted_chars_to_obstack): Likewise.
13232         (generic_printstr): Likewise.
13233
13234 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
13235
13236         * xml-support.h (struct gdb_xml_value): Add constructor.
13237         <value>: Change type to unique_xmalloc_ptr.
13238         (gdb_xml_value_s): Remove typedef.
13239         (DEF_VEC_O (gdb_xml_value_s)): Remove.
13240         (gdb_xml_element_start_handler): Change parameter type to
13241         std::vector.
13242         (xml_find_attribute): Likewise.
13243         * xml-support.c (xml_find_attribute): Change parameter type to
13244         std::vector and adjust.
13245         (gdb_xml_values_cleanup): Remove.
13246         (gdb_xml_parser::start_element): Adjust to std::vector.
13247         (xinclude_start_include): Change paraeter type to std::vector
13248         and adjust.
13249         * btrace.c (check_xml_btrace_version): Likewise.
13250         (parse_xml_btrace_block): Likewise.
13251         (parse_xml_btrace_pt_config_cpu): Likewise.
13252         (parse_xml_btrace_pt): Likewise.
13253         (parse_xml_btrace_conf_bts): Likewise.
13254         (parse_xml_btrace_conf_pt): Likewise.
13255         * memory-map.c (memory_map_start_memory): Likewise.
13256         (memory_map_start_property): Likewise.
13257         * osdata.c (osdata_start_osdata): Likewise.
13258         (osdata_start_item): Likewise.
13259         (osdata_start_column): Likewise.
13260         * remote.c (start_thread): Likewise.
13261         * solib-aix.c (library_list_start_library): Likewise.
13262         (library_list_start_list): Likewise.
13263         * solib-svr4.c (library_list_start_library): Likewise.
13264         (svr4_library_list_start_list): Likewise.
13265         * solib-target.c (library_list_start_segment): Likewise.
13266         (library_list_start_section): Likewise.
13267         (library_list_start_library): Likewise.
13268         (library_list_start_list): Likewise.
13269         * tracepoint.c (traceframe_info_start_memory): Likewise.
13270         (traceframe_info_start_tvar): Likewise.
13271         * xml-syscall.c (syscall_start_syscall): Likewise.
13272         * xml-tdesc.c (tdesc_start_target): Likewise.
13273         (tdesc_start_feature): Likewise.
13274         (tdesc_start_reg): Likewise.
13275         (tdesc_start_union): Likewise.
13276         (tdesc_start_struct): Likewise.
13277         (tdesc_start_flags): Likewise.
13278         (tdesc_start_enum): Likewise.
13279         (tdesc_start_field): Likewise.
13280         (tdesc_start_enum_value): Likewise.
13281         (tdesc_start_vector): Likewise.
13282
13283 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
13284
13285         * extension.h (struct xmethod_worker) <clone>: Remove.
13286         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
13287         Remove.
13288         (python_xmethod_worker::clone): Remove.
13289         * valops.c (find_overload_match): Use std::move instead of
13290         clone.
13291
13292 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
13293
13294         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
13295         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
13296         <free_xmethod_worker_data>: Remove.
13297         <get_matching_xmethod_workers>: Chance VEC to std::vector.
13298         <get_xmethod_arg_types>: Remove.
13299         <get_xmethod_result_type>: Remove.
13300         <invoke_xmethod>: Remove.
13301         * extension.c (new_xmethod_worker): Remove.
13302         (clone_xmethod_worker): Remove.
13303         (get_matching_xmethod_workers): Return void, pass std::vector by
13304         pointer.
13305         (get_xmethod_arg_types): Rename to...
13306         (xmethod_worker::get_arg_types): ... this, and adjust.
13307         (get_xmethod_result_type): Rename to...
13308         (xmethod_worker::get_result_type): ... this, and adjust.
13309         (invoke_xmethod): Remove.
13310         (free_xmethod_worker): Remove.
13311         (free_xmethod_worker_vec): Remove.
13312         * extension.h (enum ext_lang_rc): Move here from
13313         extension-priv.h.
13314         (struct xmethod_worker): Add constructor and destructor.
13315         <data>: Remove.
13316         <value>: Remove.
13317         <invoke, clone, do_get_result_type, do_get_arg_types>: New
13318         virtual pure methods.
13319         <get_arg_types, get_result_type>: New methods.
13320         (xmethod_worker_ptr): Remove typedef.
13321         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
13322         (xmethod_worker_vec): Remove typedef.
13323         (xmethod_worker_up): New typedef.
13324         (invoke_xmethod): Remove.
13325         (clone_xmethod_worker): Remove.
13326         (free_xmethod_worker): Remove.
13327         (free_xmethod_worker_vec): Remove.
13328         (get_xmethod_arg_types): Remove.
13329         (get_xmethod_result_type): Remove.
13330         * valops.c (find_method_list): Use std::vector, don't use
13331         intermediate vector.
13332         (value_find_oload_method_list): Use std::vector.
13333         (find_overload_match): Use std::vector.
13334         (find_oload_champ): Use std::vector.
13335         * value.c (value_free): Use operator delete.
13336         (value_of_xmethod): Rename to...
13337         (value_from_xmethod): ... this.  Don't assign
13338         xmethod_worker::value, take rvalue-reference.
13339         (result_type_of_xmethod): Adjust.
13340         (call_xmethod): Adjust.
13341         * value.h: Include extension.h.
13342         (struct xmethod_worker): Don't forward-declare.
13343         (value_of_xmethod): Rename to...
13344         (value_from_xmethod): ... this, take rvalue-reference.
13345         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
13346         (struct python_xmethod_worker): ... this, add constructor and
13347         destructor.
13348         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
13349         (gdbpy_free_xmethod_worker_data): Rename to...
13350         (python_xmethod_worker::~python_xmethod_worker): ... this and
13351         adjust.
13352         (gdbpy_clone_xmethod_worker_data): Rename to...
13353         (python_xmethod_worker::clone): ... this and adjust.
13354         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
13355         temporary vector.
13356         (gdbpy_get_xmethod_arg_types): Rename to...
13357         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
13358         (gdbpy_get_xmethod_result_type): Rename to...
13359         (python_xmethod_worker::do_get_result_type): ... this and
13360         adjust.
13361         (gdbpy_invoke_xmethod): Rename to...
13362         (python_xmethod_worker::invoke): ... this and adjust.
13363         (new_python_xmethod_worker): Rename to...
13364         (python_xmethod_worker::python_xmethod_worker): ... this and
13365         adjust.
13366         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
13367         Remove.
13368         (gdbpy_free_xmethod_worker_data): Remove.
13369         (gdbpy_get_matching_xmethod_workers): Use std::vector.
13370         (gdbpy_get_xmethod_arg_types): Remove.
13371         (gdbpy_get_xmethod_result_type): Remove.
13372         (gdbpy_invoke_xmethod): Remove.
13373         * python/python.c (python_extension_ops): Remove obsolete
13374         callbacks.
13375
13376 2018-01-05  Pedro Alves  <palves@redhat.com>
13377
13378         PR gdb/18653
13379         * common/signals-state-save-restore.c
13380         (save_original_signals_state): New parameter 'quiet'.  Warn if we
13381         find a custom handler preinstalled, instead of internal erroring.
13382         But only warn if !quiet.
13383         * common/signals-state-save-restore.h
13384         (save_original_signals_state): New parameter 'quiet'.
13385         * main.c (captured_main_1): Move save_original_signals_state call
13386         after option handling, and pass QUIET.
13387
13388 2018-01-05  Pedro Alves  <palves@redhat.com>
13389
13390         * spu-tdep.c (spu_catch_start): Pass
13391         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
13392
13393 2018-01-05  Pedro Alves  <palves@redhat.com>
13394
13395         PR gdb/22670
13396         * ada-lang.c (literal_symbol_name_matcher): New function.
13397         (ada_get_symbol_name_matcher): Use it for
13398         symbol_name_match_type::SEARCH_NAME.
13399         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
13400         it down instead of assuming symbol_name_match_type::FULL.
13401         * block.h (block_lookup_symbol): New parameter 'match_type'.
13402         * c-valprint.c (print_unpacked_pointer): Use
13403         lookup_symbol_search_name instead of lookup_symbol.
13404         * compile/compile-object-load.c (get_out_value_type): Pass down
13405         symbol_name_match_type::SEARCH_NAME.
13406         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
13407         symbol_name_match_type::FULL.
13408         * cp-support.c (cp_get_symbol_name_matcher): Handle
13409         symbol_name_match_type::SEARCH_NAME.
13410         * infrun.c (insert_exception_resume_breakpoint): Use
13411         lookup_symbol_search_name.
13412         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
13413         * psymtab.c (maintenance_check_psymtabs): Use
13414         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
13415         * stack.c (print_frame_args): Use lookup_symbol_search_name and
13416         SYMBOL_SEARCH_NAME.
13417         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
13418         if symbol_name_match_type::SEARCH_NAME.
13419         (lookup_symbol_in_language): Pass down
13420         symbol_name_match_type::FULL.
13421         (lookup_symbol_search_name): New.
13422         (lookup_language_this): Pass down
13423         symbol_name_match_type::SEARCH_NAME.
13424         (lookup_symbol_aux, lookup_local_symbol): New parameter
13425         'match_type'.  Pass it down.
13426         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
13427         (lookup_symbol_search_name): New declaration.
13428         (lookup_symbol_in_block): New 'match_type' parameter.
13429
13430 2018-01-05  Pedro Alves  <palves@redhat.com>
13431
13432         PR gdb/22670
13433         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
13434         ada_lookup_symbol.
13435         (ada_lookup_symbol): Reimplement in terms of
13436         ada_lookup_symbol_list, bits factored out from
13437         ada_lookup_encoded_symbol.
13438
13439 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
13440
13441         * ada-exp.y (write_object_renaming): When subscripting an array
13442         using a symbol as the index, pass the block in call to
13443         ada_lookup_encoded_symbol when looking that symbol up.
13444
13445 2018-01-05  Jerome Guitton  <guitton@adacore.com>
13446
13447         * ada-lang.c (ada_array_length): Use ada_index_type instead of
13448         TYPE_INDEX_TYPE.
13449
13450 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
13451
13452         * ada-lang.c (ada_to_fixed_value_create): Add handling of
13453         the case where VALUE_LVAL (val0) is not lval_memory.
13454
13455 2018-01-05  Xavier Roirand  <roirand@adacore.com>
13456
13457         * ada-valprint.c (print_optional_low_bound): Handle
13458         character-indexed array printing like boolean-indexed array
13459         printing.
13460
13461 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
13462
13463         * NEWS: Create a new section for the next release branch.
13464         Rename the section of the current branch, now that it has
13465         been cut.
13466
13467 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
13468
13469         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
13470         * version.in: Bump version to 8.1.50.DATE-git.
13471
13472 2018-01-03  Xavier Roirand  <roirand@adacore.com>
13473
13474         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
13475         Add field.
13476         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
13477         Add field.
13478         (default_exception_support_info) <catch_handlers_sym>: Add field.
13479         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
13480         (ada_exception_name_addr_1): Add "catch handlers" handling.
13481         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
13482         Update all callers.
13483         (create_excep_cond_exprs) <ex>: Add parameter.
13484         (re_set_exception): Update create_excep_cond_exprs call.
13485         (print_it_exception, print_one_exception, print_mention_exception)
13486         (print_recreate_exception): Add "catch handler" handling.
13487         (allocate_location_catch_handlers, re_set_catch_handlers)
13488         (check_status_catch_handlers, print_it_catch_handlers)
13489         (print_one_catch_handlers, print_mention_catch_handlers)
13490         (print_recreate_catch_handlers): New function.
13491         (catch_handlers_breakpoint_ops): New variable.
13492         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
13493         Add parameter.  Add "catch handler" handling.
13494         (ada_exception_sym_name, ada_exception_breakpoint_ops):
13495         Add "catch handler" handling.
13496         (ada_exception_catchpoint_cond_string): Add "catch handler"
13497         handling.
13498         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
13499         call.
13500         (catch_ada_handlers_command): New function.
13501         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
13502         operations structure.
13503         (_initialize_ada_language): Add "catch handlers" command entry.
13504         * NEWS: Document "catch handlers" feature.
13505
13506 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
13507
13508         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
13509         account when creating the array type of the slice.
13510         (ada_value_slice): Likewise.
13511
13512 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
13513
13514         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
13515         New enum value.
13516         (create_array_type_with_stride): Add byte_stride_prop parameter.
13517         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
13518         New parameter.  Update all callers in this file.
13519         (array_type_has_dynamic_stride): New function.
13520         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
13521         of arrays with dynamic byte strides.
13522         * dwarf2read.c (read_array_type): Add support for dynamic
13523         DW_AT_byte_stride attributes.
13524
13525 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
13526
13527         * dwarf2read.c (read_unspecified_type): Treat
13528         DW_TAG_enumeration_type DIEs from Ada units as stubs.
13529
13530 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
13531
13532         Update copyright year range in all GDB files.
13533
13534 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
13535
13536         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
13537         and gdb/testsuite/gdb.base/step-line.c.
13538
13539 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
13540
13541         * copyright.py (main): Dump the contents of
13542         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
13543         even if BY_HAND is empty.
13544
13545 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
13546
13547         * top.c (print_gdb_version): Update Copyright year in version
13548         message.
13549
13550 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
13551
13552         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
13553
13554 For older changes see ChangeLog-2017.
13555 \f
13556 Local Variables:
13557 mode: change-log
13558 left-margin: 8
13559 fill-column: 74
13560 version-control: never
13561 coding: utf-8
13562 End: