Simplify uses of thread_to_thread_object
[external/binutils.git] / gdb / ChangeLog
1 2018-09-16  Tom Tromey  <tom@tromey.com>
2
3         * python/py-threadevent.c (py_get_event_thread): Simplify.
4         * python/py-inferior.c (infpy_thread_from_thread_handle):
5         Return immediately after calling thread_to_thread_object.  Use
6         Py_RETURN_NONE.
7         (thread_to_thread_object): Set the exception on a NULL return.
8
9 2018-09-16  Simon Marchi  <simon.marchi@polymtl.ca>
10
11         * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
12
13 2018-09-16  Tom Tromey  <tom@tromey.com>
14
15         * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
16         Remove.
17
18 2018-09-16  Tom Tromey  <tom@tromey.com>
19
20         * python/python-internal.h (thread_to_thread_object): Change
21         return type.
22         * python/py-inferior.c (thread_to_thread_object): Return a new
23         reference.
24         (infpy_thread_from_thread_handle): Update.
25         * python/py-infthread.c (gdbpy_selected_thread): Update.
26         * python/py-stopevent.c (create_stop_event_object): Update.
27         * python/py-threadevent.c (py_get_event_thread): Return a new
28         reference.
29         (py_get_event_thread): Update.
30         * python/py-event.h (py_get_event_thread): Change return type.
31         * python/py-continueevent.c (create_continue_event_object):
32         Update.
33
34 2018-09-16  Tom Tromey  <tom@tromey.com>
35
36         * python/py-progspace.c (pspy_get_objfiles): Update.
37         * python/python-internal.h (objfile_to_objfile_object): Change
38         return type.
39         * python/py-newobjfileevent.c (create_new_objfile_event_object):
40         Update.
41         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
42         Update.
43         * python/python.c (gdbpy_get_current_objfile): Update.
44         (gdbpy_objfiles): Update.
45         * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
46         Update.
47         (objfile_to_objfile_object): Return a new reference.
48         * python/py-symtab.c (stpy_get_objfile): Update.
49         * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
50         Update.
51
52 2018-09-16  Tom Tromey  <tom@tromey.com>
53
54         * python/py-inferior.c (infpy_get_progspace): Update.
55         * python/python-internal.h (pspace_to_pspace_object): Change
56         return type.
57         * python/py-newobjfileevent.c
58         (create_clear_objfiles_event_object): Update.
59         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
60         Update.
61         * python/python.c (gdbpy_get_current_progspace): Update.
62         (gdbpy_progspaces): Update.
63         * python/py-progspace.c (pspace_to_pspace_object): Return a new
64         reference.
65         * python/py-objfile.c (objfpy_get_progspace): Update.
66         * python/py-prettyprint.c (find_pretty_printer_from_progspace):
67         Update.
68
69 2018-09-16  Tom Tromey  <tom@tromey.com>
70
71         * python/lib/gdb/__init__.py (current_progspace, objfiles)
72         (solib_name, block_for_pc, find_pc_line): New functions.
73         (execute_unwinders): Update.
74         * python/py-block.c (gdbpy_block_for_pc): Remove.
75         * python/py-inferior.c (infpy_get_progspace): New function.
76         (inferior_object_getset) <progspace>: Add.
77         * python/py-progspace.c (pspy_objfiles): Rewrite.
78         (pspy_solib_name, pspy_block_for_pc)
79         (pspy_find_pc_line, pspy_is_valid): New functions.
80         (progspace_object_methods): Add entries for solib_name,
81         block_for_pc, find_pc_line, is_valid.
82         * python/python-internal.h (gdbpy_block_for_pc)
83         (build_objfiles_list): Don't declare.
84         * python/python.c: Don't include solib.h.
85         (gdbpy_solib_name, gdbpy_find_pc_line)
86         (gdbpy_get_current_progspace, build_objfiles_list)
87         (gdbpy_objfiles): Remove.
88         (GdbMethods) <current_progspace, objfiles, block_for_pc,
89         solib_name, find_pc_line>: Remove entries.
90
91 2018-09-16  Tom Tromey  <tom@tromey.com>
92
93         * top.c (new_ui_command): Use GNU style for metasyntactic
94         variables.
95         * breakpoint.c (stopat_command): Use GNU style for metasyntactic
96         variables.
97         * maint.c (maintenance_translate_address): Remove "<>" around
98         text.
99         * interps.c (interpreter_exec_cmd): Use GNU style for
100         metasyntactic variables.
101         * nto-procfs.c (nto_procfs_target_info): Use GNU style for
102         metasyntactic variables.
103         * tracepoint.c (tfind_range_command): Use GNU style for
104         metasyntactic variables.
105         (tfind_outside_command): Likewise.
106         (_initialize_tracepoint): Likewise.
107         * remote.c (extended_remote_target::create_inferior): Use GNU
108         style for metasyntactic variables.
109         * sparc64-tdep.c (adi_examine_command): Use GNU style for
110         metasyntactic variables.
111         (adi_assign_command): Likewise.
112
113 2018-09-16  Tom Tromey  <tom@tromey.com>
114
115         * disasm.c (show_disassembler_options_sfunc): Use GNU style for
116         metasyntactic variables.  Print message if no disassembler options
117         are available.
118
119 2018-09-15  Tom Tromey  <tom@tromey.com>
120
121         * infcmd.c (get_inferior_args): Return const char *.
122         * inferior.h (get_inferior_args): Return type now const.
123         * linux-tdep.c (linux_fill_prpsinfo): Update.
124         * procfs.c (procfs_target::make_corefile_notes): Update.
125
126 2018-09-07  Tom Tromey  <tom@tromey.com>
127
128         * python/python.c (execute_gdb_command): Call bpstat_do_actions
129         inside the TRY.
130
131 2018-09-14  Sandra Loosemore  <sandra@codesourcery.com>
132
133         * nios2-tdep.c (nios2_type_align): New.
134         (nios2_gdb_arch_init): Install type_align hook.
135
136 2018-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
137
138         * eval.c (fake_method::fake_method): Call xzalloc directly for a
139         type that is neither object file owned, nor gdbarch owned.
140         * gdbtypes.c (get_type_gdbarch): Add an assert that returned
141         gdbarch is non-NULL.
142         (alloc_type_instance): Allocate non-objfile owned types on the
143         gdbarch obstack.
144         (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
145         using TYPE_ALLOC to ensure memory is allocated on the correct
146         obstack.
147         * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
148         obstack, or the gdbarch obstack.
149         (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
150
151 2018-09-14  Tom Tromey  <tom@tromey.com>
152
153         * infcall.c (call_function_by_hand_dummy): Remove unnecessary
154         block.
155
156 2018-09-14  Tom Tromey  <tom@tromey.com>
157
158         * nat/fork-inferior.c (get_startup_shell): Remove "static".
159
160 2018-09-13  Tom Tromey  <tom@tromey.com>
161
162         * python/py-inferior.c (infpy_thread_from_thread_handle): Now
163         static.
164
165 2018-09-13  Tom Tromey  <tom@tromey.com>
166
167         * exec.c (try_open_exec_file): Use std::string.
168
169 2018-09-13  Tom Tromey  <tom@tromey.com>
170
171         * utils.h (gdb_bfd_errmsg): Return std::string.
172         * exec.c (exec_file_attach): Update.
173         * compile/compile-object-load.c (compile_object_load): Update.
174         * utils.c (gdb_bfd_errmsg): Return std::string.
175
176 2018-09-13  Tom Tromey  <tom@tromey.com>
177
178         * procfs.c (struct procinfo_deleter): New.
179         (procinfo_up): New typedef.
180         (do_destroy_procinfo_cleanup): Remove.
181         (procfs_target::info_proc): Use procinfo_up.  Remove cleanups.
182
183 2018-09-13  Tom Tromey  <tom@tromey.com>
184
185         * source.c (add_path): Use gdb::unique_xmalloc_ptr.
186
187 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
188 2018-09-13  Tom Tromey  <tom@tromey.com>
189
190         * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
191         (pspy_get_objfiles): New function.
192         (progspace_object_methods): New.
193         (pspace_object_type): Add tp_methods callback.
194         * python/python-internal.h (build_objfiles_list): New
195         declaration.
196         * python/python.c (build_objfiles_list): New function.
197         (gdbpy_objfiles): Implement using build_objfiles_list.
198         * NEWS: Mention the Progspace.objfiles method.
199
200 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
201
202         * python/py-inferior.c (infpy_get_progspace): New function.
203         (inferior_object_getset): Add progspace property.
204         * NEWS: Mention the new property.
205
206 2018-09-13  Tom Tromey  <tom@tromey.com>
207
208         PR rust/23650:
209         * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
210
211 2018-09-13  Tom Tromey  <tom@tromey.com>
212
213         PR rust/23626:
214         * rust-lang.c (rust_enum_variant): Now static.
215         (rust_empty_enum_p): New function.
216         (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
217         Handle empty enum.
218
219 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
220
221         * python/py-inferior.c (infpy_repr): New.
222         (inferior_object_type): Register infpy_repr.
223         * python/py-objfile.c (objfpy_repr): New.
224         (objfile_object_type): Register objfpy_repr.
225
226 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
227
228         * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
229
230 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
231
232         * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
233         typo.
234
235 2018-09-12  Sergio Durigan Junior  <sergiodj@redhat.com>
236
237         * common/common-utils.c: Don't include '<sys/stat.h>'.
238         (is_regular_file): Move to...
239         * common/filestuff.c (is_regular_file): ... here.
240         * common/common-utils.h (is_regular_file): Move to...
241         * common/filestuff.h (is_regular_file): ... here.
242
243 2018-09-12  Simon Marchi  <simon.marchi@ericsson.com>
244
245         * skip.c (debug_skip): New variable.
246         (skiplist_entry::do_skip_file_p): Add debug output.
247         (skiplist_entry::do_skip_gfile_p): Likewise.
248         (skiplist_entry::skip_function_p): Likewise.
249         (_initialize_step_skip): Create debug command.
250         * NEWS: Mention set/show debug skip.
251
252 2018-09-11  Xavier Roirand  <roirand@adacore.com>
253
254         * darwin-nat.c (should_disable_startup_with_shell):
255         New function.
256         (darwin_nat_target::create_inferior): Add call.
257
258 2018-09-11  Xavier Roirand  <roirand@adacore.com>
259
260         * darwin-nat.h (struct darwin_thread_info) <gdb_port,
261         inf_port, msg_state>: Initialize.
262         (struct darwin_thread_info) <signaled, single_step>: Change
263         type and initialize.
264         (struct darwin_thread_info) <event>: Initialize.
265
266 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
267
268         PR gdb/23555
269         PR gdb/23558
270         * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
271         guesses.
272
273 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
274
275         Revert:
276         2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
277
278         PR gdb/23555
279         PR gdb/23558
280         * gnulib/aclocal.m4: Regenerate.
281         * gnulib/config.in: Regenerate.
282         * gnulib/configure: Regenerate.
283         * gnulib/import/Makefile.am: Update.
284         * gnulib/import/Makefile.in: Update.
285         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
286         * gnulib/import/_Noreturn.h: ... this.
287         * gnulib/import/alloca.in.h: Update.
288         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
289         * gnulib/import/arg-nonnull.h: ... this.
290         * gnulib/import/assure.h: Update.
291         * gnulib/import/at-func.c: Update.
292         * gnulib/import/basename-lgpl.c: Update.
293         * gnulib/import/extra/snippet/c++defs.h: Rename to...
294         * gnulib/import/c++defs.h: ... this.
295         * gnulib/import/canonicalize-lgpl.c: Update.
296         * gnulib/import/cdefs.h: Update.
297         * gnulib/import/chdir-long.c: Update.
298         * gnulib/import/chdir-long.h: Update.
299         * gnulib/import/cloexec.c: Update.
300         * gnulib/import/cloexec.h: Update.
301         * gnulib/import/close.c: Update.
302         * gnulib/import/closedir.c: Update.
303         * gnulib/import/config.charset: Update.
304         * gnulib/import/dirent-private.h: Update.
305         * gnulib/import/dirent.in.h: Update.
306         * gnulib/import/dirfd.c: Update.
307         * gnulib/import/dirname-lgpl.c: Update.
308         * gnulib/import/dirname.h: Update.
309         * gnulib/import/dosname.h: Update.
310         * gnulib/import/dup-safer-flag.c: Update.
311         * gnulib/import/dup-safer.c: Update.
312         * gnulib/import/dup.c: Update.
313         * gnulib/import/dup2.c: Update.
314         * gnulib/import/errno.in.h: Update.
315         * gnulib/import/error.c: Update.
316         * gnulib/import/error.h: Update.
317         * gnulib/import/exitfail.c: Update.
318         * gnulib/import/exitfail.h: Update.
319         * gnulib/import/extra/update-copyright: Update.
320         * gnulib/import/fchdir.c: Update.
321         * gnulib/import/fcntl.c: Update.
322         * gnulib/import/fcntl.in.h: Update.
323         * gnulib/import/fd-hook.c: Update.
324         * gnulib/import/fd-hook.h: Update.
325         * gnulib/import/fd-safer-flag.c: Update.
326         * gnulib/import/fd-safer.c: Update.
327         * gnulib/import/fdopendir.c: Update.
328         * gnulib/import/filename.h: Update.
329         * gnulib/import/filenamecat-lgpl.c: Update.
330         * gnulib/import/filenamecat.h: Update.
331         * gnulib/import/flexmember.h: Update.
332         * gnulib/import/float+.h: Update.
333         * gnulib/import/float.c: Update.
334         * gnulib/import/float.in.h: Update.
335         * gnulib/import/fnmatch.c: Update.
336         * gnulib/import/fnmatch.in.h: Update.
337         * gnulib/import/fnmatch_loop.c: Update.
338         * gnulib/import/fpucw.h: Update.
339         * gnulib/import/frexp.c: Update.
340         * gnulib/import/frexpl.c: Update.
341         * gnulib/import/fstat.c: Update.
342         * gnulib/import/fstatat.c: Update.
343         * gnulib/import/getcwd-lgpl.c: Update.
344         * gnulib/import/getcwd.c: Update.
345         * gnulib/import/getdtablesize.c: Update.
346         * gnulib/import/getlogin_r.c: Update.
347         * gnulib/import/getprogname.c: Update.
348         * gnulib/import/getprogname.h: Update.
349         * gnulib/import/gettext.h: Update.
350         * gnulib/import/gettimeofday.c: Update.
351         * gnulib/import/glob-libc.h: Update.
352         * gnulib/import/glob.c: Update.
353         * gnulib/import/glob.in.h: Update.
354         * gnulib/import/glob_internal.h: Update.
355         * gnulib/import/glob_pattern_p.c: Update.
356         * gnulib/import/globfree.c: Update.
357         * gnulib/import/hard-locale.c: Update.
358         * gnulib/import/hard-locale.h: Update.
359         * gnulib/import/intprops.h: Update.
360         * gnulib/import/inttypes.in.h: Update.
361         * gnulib/import/isnan.c: Update.
362         * gnulib/import/isnand-nolibm.h: Update.
363         * gnulib/import/isnand.c: Update.
364         * gnulib/import/isnanl-nolibm.h: Update.
365         * gnulib/import/isnanl.c: Update.
366         * gnulib/import/itold.c: Update.
367         * gnulib/import/libc-config.h: Update.
368         * gnulib/import/limits.in.h: Update.
369         * gnulib/import/localcharset.c: Update.
370         * gnulib/import/localcharset.h: Update.
371         * gnulib/import/localtime-buffer.c: Update.
372         * gnulib/import/localtime-buffer.h: Update.
373         * gnulib/import/lstat.c: Update.
374         * gnulib/import/m4/00gnulib.m4: Update.
375         * gnulib/import/m4/__inline.m4: Update.
376         * gnulib/import/m4/absolute-header.m4: Update.
377         * gnulib/import/m4/alloca.m4: Update.
378         * gnulib/import/m4/builtin-expect.m4: Update.
379         * gnulib/import/m4/canonicalize.m4: Update.
380         * gnulib/import/m4/chdir-long.m4: Update.
381         * gnulib/import/m4/close.m4: Update.
382         * gnulib/import/m4/closedir.m4: Update.
383         * gnulib/import/m4/configmake.m4: Update.
384         * gnulib/import/m4/d-ino.m4: Update.
385         * gnulib/import/m4/d-type.m4: Update.
386         * gnulib/import/m4/dirent_h.m4: Update.
387         * gnulib/import/m4/dirfd.m4: Update.
388         * gnulib/import/m4/dirname.m4: Update.
389         * gnulib/import/m4/double-slash-root.m4: Update.
390         * gnulib/import/m4/dup.m4: Update.
391         * gnulib/import/m4/dup2.m4: Update.
392         * gnulib/import/m4/eealloc.m4: Update.
393         * gnulib/import/m4/environ.m4: Update.
394         * gnulib/import/m4/errno_h.m4: Update.
395         * gnulib/import/m4/error.m4: Update.
396         * gnulib/import/m4/exponentd.m4: Update.
397         * gnulib/import/m4/exponentl.m4: Update.
398         * gnulib/import/m4/extensions.m4: Update.
399         * gnulib/import/m4/extern-inline.m4: Update.
400         * gnulib/import/m4/fchdir.m4: Update.
401         * gnulib/import/m4/fcntl-o.m4: Update.
402         * gnulib/import/m4/fcntl.m4: Update.
403         * gnulib/import/m4/fcntl_h.m4: Update.
404         * gnulib/import/m4/fdopendir.m4: Update.
405         * gnulib/import/m4/filenamecat.m4: Update.
406         * gnulib/import/m4/flexmember.m4: Update.
407         * gnulib/import/m4/float_h.m4: Update.
408         * gnulib/import/m4/fnmatch.m4: Update.
409         * gnulib/import/m4/fnmatch_h.m4: Update.
410         * gnulib/import/m4/fpieee.m4: Update.
411         * gnulib/import/m4/frexp.m4: Update.
412         * gnulib/import/m4/frexpl.m4: Update.
413         * gnulib/import/m4/fstat.m4: Update.
414         * gnulib/import/m4/fstatat.m4: Update.
415         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
416         * gnulib/import/m4/getcwd-path-max.m4: Update.
417         * gnulib/import/m4/getcwd.m4: Update.
418         * gnulib/import/m4/getdtablesize.m4: Update.
419         * gnulib/import/m4/getlogin.m4: Update.
420         * gnulib/import/m4/getlogin_r.m4: Update.
421         * gnulib/import/m4/getpagesize.m4: Update.
422         * gnulib/import/m4/getprogname.m4: Update.
423         * gnulib/import/m4/gettimeofday.m4: Update.
424         * gnulib/import/m4/glibc21.m4: Update.
425         * gnulib/import/m4/glob.m4: Update.
426         * gnulib/import/m4/glob_h.m4: Update.
427         * gnulib/import/m4/gnulib-cache.m4: Update.
428         * gnulib/import/m4/gnulib-common.m4: Update.
429         * gnulib/import/m4/gnulib-comp.m4: Update.
430         * gnulib/import/m4/gnulib-tool.m4: Update.
431         * gnulib/import/m4/hard-locale.m4: Update.
432         * gnulib/import/m4/include_next.m4: Update.
433         * gnulib/import/m4/inttypes-pri.m4: Update.
434         * gnulib/import/m4/inttypes.m4: Update.
435         * gnulib/import/m4/isnand.m4: Update.
436         * gnulib/import/m4/isnanl.m4: Update.
437         * gnulib/import/m4/largefile.m4: Update.
438         * gnulib/import/m4/limits-h.m4: Update.
439         * gnulib/import/m4/localcharset.m4: Update.
440         * gnulib/import/m4/locale-fr.m4: Update.
441         * gnulib/import/m4/locale-ja.m4: Update.
442         * gnulib/import/m4/locale-zh.m4: Update.
443         * gnulib/import/m4/localtime-buffer.m4: Update.
444         * gnulib/import/m4/longlong.m4: Update.
445         * gnulib/import/m4/lstat.m4: Update.
446         * gnulib/import/m4/malloc.m4: Update.
447         * gnulib/import/m4/malloca.m4: Update.
448         * gnulib/import/m4/math_h.m4: Update.
449         * gnulib/import/m4/mbrtowc.m4: Update.
450         * gnulib/import/m4/mbsinit.m4: Update.
451         * gnulib/import/m4/mbsrtowcs.m4: Update.
452         * gnulib/import/m4/mbstate_t.m4: Update.
453         * gnulib/import/m4/memchr.m4: Update.
454         * gnulib/import/m4/memmem.m4: Update.
455         * gnulib/import/m4/mempcpy.m4: Update.
456         * gnulib/import/m4/memrchr.m4: Update.
457         * gnulib/import/m4/mkdir.m4: Update.
458         * gnulib/import/m4/mkstemp.m4: Update.
459         * gnulib/import/m4/mmap-anon.m4: Update.
460         * gnulib/import/m4/mode_t.m4: Update.
461         * gnulib/import/m4/msvc-inval.m4: Update.
462         * gnulib/import/m4/msvc-nothrow.m4: Update.
463         * gnulib/import/m4/multiarch.m4: Update.
464         * gnulib/import/m4/nocrash.m4: Update.
465         * gnulib/import/m4/off_t.m4: Update.
466         * gnulib/import/m4/onceonly.m4: Update.
467         * gnulib/import/m4/open-cloexec.m4: Update.
468         * gnulib/import/m4/open.m4: Update.
469         * gnulib/import/m4/openat.m4: Update.
470         * gnulib/import/m4/opendir.m4: Update.
471         * gnulib/import/m4/pathmax.m4: Update.
472         * gnulib/import/m4/rawmemchr.m4: Update.
473         * gnulib/import/m4/readdir.m4: Update.
474         * gnulib/import/m4/readlink.m4: Update.
475         * gnulib/import/m4/realloc.m4: Update.
476         * gnulib/import/m4/rename.m4: Update.
477         * gnulib/import/m4/rewinddir.m4: Update.
478         * gnulib/import/m4/rmdir.m4: Update.
479         * gnulib/import/m4/save-cwd.m4: Update.
480         * gnulib/import/m4/secure_getenv.m4: Update.
481         * gnulib/import/m4/setenv.m4: Update.
482         * gnulib/import/m4/signal_h.m4: Update.
483         * gnulib/import/m4/ssize_t.m4: Update.
484         * gnulib/import/m4/stat-time.m4: Update.
485         * gnulib/import/m4/stat.m4: Update.
486         * gnulib/import/m4/std-gnu11.m4: Update.
487         * gnulib/import/m4/stdbool.m4: Update.
488         * gnulib/import/m4/stddef_h.m4: Update.
489         * gnulib/import/m4/stdint.m4: Update.
490         * gnulib/import/m4/stdio_h.m4: Update.
491         * gnulib/import/m4/stdlib_h.m4: Update.
492         * gnulib/import/m4/strchrnul.m4: Update.
493         * gnulib/import/m4/strdup.m4: Update.
494         * gnulib/import/m4/strerror.m4: Update.
495         * gnulib/import/m4/string_h.m4: Update.
496         * gnulib/import/m4/strstr.m4: Update.
497         * gnulib/import/m4/strtok_r.m4: Update.
498         * gnulib/import/m4/sys_socket_h.m4: Update.
499         * gnulib/import/m4/sys_stat_h.m4: Update.
500         * gnulib/import/m4/sys_time_h.m4: Update.
501         * gnulib/import/m4/sys_types_h.m4: Update.
502         * gnulib/import/m4/tempname.m4: Update.
503         * gnulib/import/m4/time_h.m4: Update.
504         * gnulib/import/m4/unistd-safer.m4: Update.
505         * gnulib/import/m4/unistd_h.m4: Update.
506         * gnulib/import/m4/warn-on-use.m4: Update.
507         * gnulib/import/m4/wchar_h.m4: Update.
508         * gnulib/import/m4/wchar_t.m4: Update.
509         * gnulib/import/m4/wctype_h.m4: Update.
510         * gnulib/import/m4/wint_t.m4: Update.
511         * gnulib/import/malloc.c: Update.
512         * gnulib/import/malloc/scratch_buffer.h: Update.
513         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
514         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
515         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
516         * gnulib/import/malloca.c: Update.
517         * gnulib/import/malloca.h: Update.
518         * gnulib/import/malloca.valgrind: Update.
519         * gnulib/import/math.in.h: Update.
520         * gnulib/import/mbrtowc.c: Update.
521         * gnulib/import/mbsinit.c: Update.
522         * gnulib/import/mbsrtowcs-impl.h: Update.
523         * gnulib/import/mbsrtowcs-state.c: Update.
524         * gnulib/import/mbsrtowcs.c: Update.
525         * gnulib/import/memchr.c: Update.
526         * gnulib/import/memmem.c: Update.
527         * gnulib/import/mempcpy.c: Update.
528         * gnulib/import/memrchr.c: Update.
529         * gnulib/import/mkdir.c: Update.
530         * gnulib/import/mkstemp.c: Update.
531         * gnulib/import/msvc-inval.c: Update.
532         * gnulib/import/msvc-inval.h: Update.
533         * gnulib/import/msvc-nothrow.c: Update.
534         * gnulib/import/msvc-nothrow.h: Update.
535         * gnulib/import/open.c: Update.
536         * gnulib/import/openat-die.c: Update.
537         * gnulib/import/openat-priv.h: Update.
538         * gnulib/import/openat-proc.c: Update.
539         * gnulib/import/openat.c: Update.
540         * gnulib/import/openat.h: Update.
541         * gnulib/import/opendir.c: Update.
542         * gnulib/import/pathmax.h: Update.
543         * gnulib/import/pipe-safer.c: Update.
544         * gnulib/import/rawmemchr.c: Update.
545         * gnulib/import/readdir.c: Update.
546         * gnulib/import/readlink.c: Update.
547         * gnulib/import/realloc.c: Update.
548         * gnulib/import/ref-add.sin: Update.
549         * gnulib/import/ref-del.sin: Update.
550         * gnulib/import/rename.c: Update.
551         * gnulib/import/rewinddir.c: Update.
552         * gnulib/import/rmdir.c: Update.
553         * gnulib/import/same-inode.h: Update.
554         * gnulib/import/save-cwd.c: Update.
555         * gnulib/import/save-cwd.h: Update.
556         * gnulib/import/scratch_buffer.h: Update.
557         * gnulib/import/secure_getenv.c: Update.
558         * gnulib/import/setenv.c: Update.
559         * gnulib/import/signal.in.h: Update.
560         * gnulib/import/stat-time.c: Update.
561         * gnulib/import/stat-time.h: Update.
562         * gnulib/import/stat-w32.c: Update.
563         * gnulib/import/stat-w32.h: Update.
564         * gnulib/import/stat.c: Update.
565         * gnulib/import/stdbool.in.h: Update.
566         * gnulib/import/stddef.in.h: Update.
567         * gnulib/import/stdint.in.h: Update.
568         * gnulib/import/stdio.in.h: Update.
569         * gnulib/import/stdlib.in.h: Update.
570         * gnulib/import/str-two-way.h: Update.
571         * gnulib/import/strchrnul.c: Update.
572         * gnulib/import/strdup.c: Update.
573         * gnulib/import/streq.h: Update.
574         * gnulib/import/strerror-override.c: Update.
575         * gnulib/import/strerror-override.h: Update.
576         * gnulib/import/strerror.c: Update.
577         * gnulib/import/string.in.h: Update.
578         * gnulib/import/stripslash.c: Update.
579         * gnulib/import/strnlen1.c: Update.
580         * gnulib/import/strnlen1.h: Update.
581         * gnulib/import/strstr.c: Update.
582         * gnulib/import/strtok_r.c: Update.
583         * gnulib/import/sys_stat.in.h: Update.
584         * gnulib/import/sys_time.in.h: Update.
585         * gnulib/import/sys_types.in.h: Update.
586         * gnulib/import/tempname.c: Update.
587         * gnulib/import/tempname.h: Update.
588         * gnulib/import/time.in.h: Update.
589         * gnulib/import/unistd--.h: Update.
590         * gnulib/import/unistd-safer.h: Update.
591         * gnulib/import/unistd.in.h: Update.
592         * gnulib/import/unsetenv.c: Update.
593         * gnulib/import/verify.h: Update.
594         * gnulib/import/extra/snippet/warn-on-use.h: Update.
595         * gnulib/import/wchar.in.h: Update.
596         * gnulib/import/wctype.in.h: Update.
597         * gnulib/import/xalloc-oversized.h: Update.
598         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
599         "53e2c179f26a890fa6685af4b6c1397ee370433b".
600
601 2018-09-10  Simon Marchi  <simon.marchi@ericsson.com>
602
603         * record-btrace.c (get_thread_current_frame): Remove
604         old_inferior_ptid.
605
606 2018-09-10  Jerome Guitton  <guitton@adacore.com>
607
608         * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
609         with check_tag to 1 if and only if the type is tagged and the
610         component being searched cannot been found in the current
611         view. Otherwise, always call ada_to_fixed_type with
612         check_tag to 0.
613
614 2018-09-10  Xavier Roirand  <roirand@adacore.com>
615
616         * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
617         declaration.
618         * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
619         * ada-varobj.c (ada_varobj_get_number_of_children,
620         ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
621
622 2018-09-10  Xavier Roirand  <roirand@adacore.com>
623
624         * ada-valprint.c (ada_value_print): Use type instead of
625         enclosing type.
626
627 2018-09-10  Xavier Roirand  <roirand@adacore.com>
628
629         * ada-lang.c (ada_value_subscript): Handle case when parameter is
630         an array of access to unconstrained array.
631
632 2018-09-10  Xavier Roirand  <roirand@adacore.com>
633
634         * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
635         (ada_check_typedef): Use it.
636
637 2018-09-10  Xavier Roirand  <roirand@adacore.com>
638
639         * ada-varobj.c (ada_varobj_describe_struct_child)
640         (ada_varobj_describe_child): Handle union case like struct one.
641
642 2018-09-10  Tom Tromey  <tom@tromey.com>
643
644         PR python/18380:
645         * python/python.c (_initialize_python): Make example in "python"
646         help work in Python 3.
647
648 2018-09-10  Eli Zaretskii  <eliz@gnu.org>
649
650         * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
651         INSTALL_PROGRAM to install gdb-add-index.sh.  Don't append
652         $(EXEEXT) to the script, as it is not a program.
653
654 2018-09-09  Simon Marchi  <simon.marchi@ericsson.com>
655
656         * python/py-prettyprint.c (pretty_print_one_value): Return
657         gdbpy_ref<>.
658         (print_string_repr): Adjust.
659         (apply_varobj_pretty_printer): Return gdbpy_ref<>.
660         * python/python-internal.h (apply_varobj_pretty_printer): Return
661         gdbpy_ref<>.
662         * varobj.c (varobj_value_get_print_value): Adjust.
663
664 2018-09-08  Tom Tromey  <tom@tromey.com>
665
666         PR python/16047:
667         * python/py-prettyprint.c (pretty_print_one_value): Check for
668         to_string method.
669
670 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
671
672         * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
673         replace_operator_with_call.
674
675 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
676
677         * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
678
679 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
680
681         * ada-typeprint.c (print_range): Print the bounds using TYPE
682         rather than its TYPE_TARGET_TYPE.
683
684 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
685
686         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
687         call to ada_to_fixed_value_create.
688
689 2018-09-08  Jerome Guitton  <guitton@adacore.com>
690
691         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
692
693 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
694
695         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
696         by calls to error.
697
698 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
699
700         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
701         Move update of loop variable "fi".
702
703 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
704
705         * ada-lang.c (value_assign_to_component): In the case of
706         big-endian targets, extract the bits of the given VAL
707         using an src_offset of zero if container is not a scalar.
708
709 2018-09-06  Simon Ser  <contact@emersion.fr>
710
711         PR gdb/23105
712         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
713         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
714         * fbsd-tdep.c (fbsd_make_note_desc): New.
715         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
716         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
717         * target.h (enum target_object) Add FreeBSD-specific
718         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
719
720 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
721
722         * compile/compile-c.h (generate_c_for_variable_locations):
723         Change reference to pointer.
724         * compile/compile-c-support.c (compile_program) <compute>:
725         Likewise.
726         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
727         (generate_c_for_for_one_variable): Likewise
728         (generate_c_for_variable_locations): Likewise
729         * compile/compile-c-types.c (compile_c_instance::convert_type):
730         Likewise
731         * compile/compile-cplus-symbols.c (convert_one_symbol):
732         std::move the scope passed to enter_scope.
733         * compile/compile-cplus-types.c
734         (compile_cplus_instance::enter_scope): Make parameter
735         rvalue-reference.
736         (compile_cplus_instance::new_scope): Change reference to
737         pointer.
738         (compile_cplus_instance::convert_type): Likewise
739         (compile_cplus_convert_typedef): std::move the scope passed to
740         enter_scope.
741         (compile_cplus_convert_struct_or_union): Likewise.
742         (compile_cplus_convert_enum): Likewise.
743         (compile_cplus_convert_namespace): Likewise.
744         * compile/compile-cplus.h (compile_cplus_instance)
745         <enter_scope>: Make parameter rvalue-reference.
746         * compile/compile-internal.h (compile_instance)
747         <get_cached_type>: Likewise
748         * compile/compile-loc2c.c (push): Likewise
749         (pushf): Likewise
750         (unary): Likewise
751         (binary): Likewise
752         (print_label): Likewise
753         (pushf_register_address): Likewise
754         (pushf_register): Likewise
755         (do_compile_dwarf_expr_to_c): Likewise
756         (compile_dwarf_expr_to_c): Likewise
757         (compile_dwarf_bounds_to_c): Likewise
758         * compile/compile.c (compile_instance::get_cached_type):
759         Likewise
760         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
761         (compile_dwarf_bounds_to_c): Likewise
762         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
763         (dwarf2_compile_property_to_c): Likewise
764         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
765         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
766         Likewise
767
768 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
769
770         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
771         * tui/tui-data.c (init_content_element): Don't initialize it.
772
773 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
774
775         * tui/tui-data.h (struct tui_win_info)
776         <detail::opaque>: Remove.
777         * tui/tui-data.c (init_win_info): Remove assignment.
778
779 2018-09-05  Tom Tromey  <tom@tromey.com>
780
781         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
782         -Wformat-nonliteral.
783         * target-float.c (host_float_ops<T>::to_string)
784         (host_float_ops<T>::from_string): Use
785         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
786         * configure: Rebuild.
787
788 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
789
790         * printcmd.c (printf_c_string): Use
791         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
792         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
793
794 2018-09-05  Tom Tromey  <tom@tromey.com>
795
796         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
797
798 2018-09-05  Tom de Vries  <tdevries@suse.de>
799
800         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
801         with resolve_abstract_p == true.
802         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
803         defaulting to false. Propagate resolve_abstract_p to
804         dwarf2_fetch_die_loc_sect_off.
805         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
806         parameter, defaulting to false.
807         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
808         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
809         parameter.
810         * dwarf2read.h (struct die_info): Forward-declare.
811         (die_info_ptr): New typedef.
812         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
813
814 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
815
816         GDB 8.2 released.
817
818 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
819             Pedro Alves  <palves@redhat.com>
820
821         * gnulib/Makefile.in (aclocal_m4_deps): Move to
822         "aclocal-m4-deps.mk".  Include file here.
823         $(srcdir)/aclocal.m4: Add "configure.ac".
824         * gnulib/aclocal-m4-deps.mk: New file.
825         * gnulib/update-gnulib.sh: Automatically update
826         "aclocal-m4-deps.mk".
827
828 2018-09-04  Tom Tromey  <tom@tromey.com>
829
830         * configure: Rebuild.
831         * configure.ac: Remove multi-ice code.
832
833 2018-09-04  Tom Tromey  <tom@tromey.com>
834
835         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
836         (ada-exp.o): Update.
837
838 2018-09-04  Tom Tromey  <tom@tromey.com>
839
840         * Makefile.in (printcmd.o, target-float.o): Remove.
841         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
842
843 2018-09-04  Tom Tromey  <tom@tromey.com>
844
845         * gnulib/Makefile.in: Remove obsolete comment.
846         * Makefile.in: Remove obsolete comment.
847
848 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
849
850         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
851         line with '+'.
852
853 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
854
855         * riscv-tdep.c: Add 'prologue-value.h' include.
856         (struct riscv_unwind_cache): New struct.
857         (riscv_debug_unwinder): New global.
858         (riscv_scan_prologue): Update arguments, capture register details
859         from prologue scan.
860         (riscv_skip_prologue): Reformat arguments line, move end of
861         prologue calculation into riscv_scan_prologue.
862         (riscv_frame_cache): Update return type, create
863         riscv_unwind_cache, scan the prologue, and fill in remaining cache
864         details.
865         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
866         (riscv_frame_prev_register): Use the trad_frame within the
867         riscv_unwind_cache.
868         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
869         flag.
870
871 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
872
873         * trad-frame.h (trad_frame_set_realreg): Declare.
874         (trad_frame_set_addr): Declare.
875         * trad-frame.c (trad_frame_set_realreg): Define new function.
876         (trad_frame_set_addr): Define new function.
877         (trad_frame_set_reg_realreg): Use new function.
878         (trad_frame_set_reg_addr): Use new function.
879
880 2018-09-01  Keith Seitz  <keiths@redhat.com>
881
882         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
883         pulongest instead of "%lld".
884         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
885         ATTRIBUTE_UNUSED.
886
887 2018-08-31  Tom Tromey  <tom@tromey.com>
888
889         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
890         variant part type.
891
892 2018-08-31  Pedro Alves  <palves@redhat.com>
893
894         * gdbarch.h: Regenerate.
895
896 2018-08-31  Pedro Alves  <palves@redhat.com>
897
898         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
899         * target.h (Hardware watchpoint interfaces): Describe
900         continuable/steppable/non-steppable watchpoints.
901         * gdbarch.h, gdbarch.c: Regenerate.
902
903 2018-08-31  Pedro Alves  <palves@redhat.com>
904
905         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
906         Delete.
907         * s390-linux-nat.c
908         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
909         * target.h (target_ops::have_continuable_watchpoint): Delete.
910         (target_have_continuable_watchpoint): Delete.
911         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
912         * target-delegates.c: Regenerate.
913
914 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
915
916         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
917         the files present in "gnulib/import/m4/".
918
919 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
920
921         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
922         c.sw, c.swsp, and c.sdsp.
923
924 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
925
926         * riscv-tdep.c (struct riscv_inferior_data): Delete.
927         (riscv_read_misa_reg): Don't cache value read into inferior data.
928         (riscv_new_inferior_data): Delete.
929         (riscv_inferior_data_cleanup): Delete.
930         (riscv_inferior_data): Delete.
931         (riscv_invalidate_inferior_data): Delete.
932         (_initialize_riscv_tdep): Remove initialisation of inferior data.
933
934 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
935
936         * compile/compile-cplus-types.c
937         (compile_cplus_instance::leave_scope): Take the address of scope
938         object.
939         (compile_cplus_instance::convert_qualified_base): Compare quals
940         to 0.
941
942 2018-08-30  Keith Seitz  <keiths@redhat.com>
943
944         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
945         Use "%s" and host_address_to_string instead of "%p" in printf.
946
947 2018-08-29  Keith Seitz  <keiths@redhat.com>
948
949         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
950         and compile-cplus-types.c.
951         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
952         * c-lang.c (cplus_language_defn): Set C++ compile functions.
953         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
954         Declare.
955         * compile/compile-c-support.c: Include compile-cplus.h.
956         (load_libcompile): Templatize.
957         (get_compile_context): "New" function.
958         (c_get_compile_context): Use get_compile_context.
959         (cplus_get_compile_context): New function.
960         (cplus_push_user_expression, cplus_pop_user_expression)
961         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
962         (cplus_compute_program): Define new structs/functions.
963         * compile/compile-cplus-symmbols.c: New file.
964         * compile/compile-cplus-types.c: New file.
965         * compile/compile-cplus.h: New file.
966         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
967         Declare.
968         * compile/compile-object-load.c (get_out_value_type): Use
969         strncmp_iw when comparing symbol names.
970         (compile_object_load): Add mst_bss and mst_data.
971         * compile/compile.c (_initialize_compile): Remove
972         -Wno-implicit-function-declaration from `compile_args'.
973         * compile/gcc-cp-plugin.h: New file.
974         * NEWS: Mention C++ compile support and new debug options.
975
976 2018-08-29  Keith Seitz  <keiths@redhat.com>
977
978         * linespec.c (collect_info::add_symbol): Make virtual.
979         (struct symbol_searcher_collect_info): New struct.
980         (symbol_searcher::find_all_symbols): New method.
981         * symtab.h (class symbol_searcher): New class.
982
983 2018-08-29  Keith Seitz  <keiths@redhat.com>
984
985         * linespec.c (struct linespec) <function_symbols, label_symbols>:
986         Change to vector of block_symbol.  Update all users.
987         (struct collect_info) <symbols>: Likewise.
988         (collect_info::add_symbol): Take block_symbol as argument.
989         Update all callers.
990         (decode_compound_collector) <m_symbols>: Change type to vector
991         of block_symbol.  Update all users.
992         (decode_compound_collector::operator ()): Change parameter type
993         to block_symbol.
994         (find_method, find_function_symbols, find_linespec_symbols)
995         (find_label_symbols_in_block, find_label_symbols): Change symbol
996         vectors to block_symbol vectors.
997         * symtab.h (symbol_found_callback_ftype): Change parameter type to
998         block_symbol.
999
1000 2018-08-29  Keith Seitz  <keiths@redhat.com>
1001
1002         * linespec.c (symbolp): Remove typedef and VEC definitions.
1003         (bound_minimal_symbol_d): Likewise.
1004
1005 2018-08-29  Keith Seitz  <keiths@redhat.com>
1006
1007         * linespec.c (decode_compound_collector::decode_compound_collector):
1008         Remove initialization for `m_symtabs'.
1009         (decode_compound_collector::release_symbols): Change return type
1010         to std::vector.  Update all callers.
1011         (class decode_compound_collector) <m_symbols>: Change type to
1012         std::vector.
1013         (lookup_prefix_sym): Change return type to std::vector.  Update all
1014         callers.
1015         (compare_symbols): Remove.
1016         (std_compare_symbols): Rename to `compare_symbols'.
1017         (find_method): Change `sym_classes' parameter to std::vector.
1018         Update all callers.  Use std::sort to sort sym_classes.
1019         (find_linespec_symbols): Remove cleanup.
1020
1021 2018-08-29  Keith Seitz  <keiths@redhat.com>
1022
1023         * linespec.c (struct linespec) <minimal_symbols>: Change type to
1024         std::vector.  Update all users.
1025         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
1026         (struct collect_info) <minimal_symbols>: Likewise.
1027         (compare_msymbols): Return bool.  Change parameters to const
1028         bound_minimal_symbol references.
1029         (find_method, find_function_symbols, find_linespec_symbols): Change
1030         `minsyms' parameter to std::vector.  Update all callers.
1031
1032 2018-08-29  Keith Seitz  <keiths@redhat.com>
1033
1034         * linespec.c (struct linespec) <label_symbols>: Change type to
1035         std::vector.  Update all users.
1036         (find_label_symbols_in_block): Change `result' parameter to
1037         std::vector.  Update all callers.
1038         (find_label_symbols): Return std::vector.  Update all callers.
1039
1040 2018-08-29  Keith Seitz  <keiths@redhat.com>
1041
1042         * linespec.c (struct linespec) <function_symbols>: Change type to
1043         std::vector.  Update all users.
1044         (struct collect_info) <function_symbols>: Likewise.
1045         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
1046         (std_compare_symbols): New function.
1047         (find_method, find_function_symbols, find_linespec_symbols)
1048         (find_label_symbols_in_block): Change `symbols' parameter to
1049         std::vector.  Update all callers.
1050         (find_label_symbols): Likewise for `function_symbols' and
1051         `label_funcs_ret'.
1052
1053 2018-08-29  Keith Seitz  <keiths@redhat.com>
1054
1055         * linespec.c (symtab_vector_up): Define.
1056         (struct linespec) <file_symtabs>: Change type to std::vector *.
1057         Update all uses.
1058         (struct collect_info) <file_symtabs>: Likewise.
1059         (collect_symtabs_from_filename): Return symtab_vector_up.
1060         Update all callers.
1061         (decode_objc): Remove cleanup.
1062         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
1063         (symtab_collector::release_symtabs): Return symtab_vector_up.
1064         Update all callers.
1065         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
1066         Update all users.
1067         (collect_symtabs_from_filename, symtabs_from_filename): Return
1068         symtab_vector_up.  Update all callers.
1069
1070 2018-08-29  Tom Tromey  <tom@tromey.com>
1071
1072         * csky-tdep.c (csky_analyze_prologue): Use
1073         core_addr_to_string_nz.
1074
1075 2018-08-29  Tom Tromey  <tom@tromey.com>
1076
1077         * windows-nat.c (struct xlate_exception) <them>: Change type to
1078         DWORD.
1079         (xlate): Fix formatting.  Remove last entry.
1080         (struct xlate_exception, xlate): Comment out.
1081         (windows_nat_target::resume): Use ranged for.
1082
1083 2018-08-29  Jim Wilson  <jimw@sifive.com>
1084
1085         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
1086         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
1087         of NT_PRFPREG.
1088         (riscv_linux_nat_target::store_registers): Likewise.
1089
1090 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
1091
1092         PR gdb/23555
1093         PR gdb/23558
1094         * gnulib/aclocal.m4: Regenerate.
1095         * gnulib/config.in: Regenerate.
1096         * gnulib/configure: Regenerate.
1097         * gnulib/import/Makefile.am: Update.
1098         * gnulib/import/Makefile.in: Update.
1099         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
1100         * gnulib/import/_Noreturn.h: ... this.
1101         * gnulib/import/alloca.in.h: Update.
1102         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
1103         * gnulib/import/arg-nonnull.h: ... this.
1104         * gnulib/import/assure.h: Update.
1105         * gnulib/import/at-func.c: Update.
1106         * gnulib/import/basename-lgpl.c: Update.
1107         * gnulib/import/extra/snippet/c++defs.h: Rename to...
1108         * gnulib/import/c++defs.h: ... this.
1109         * gnulib/import/canonicalize-lgpl.c: Update.
1110         * gnulib/import/cdefs.h: Update.
1111         * gnulib/import/chdir-long.c: Update.
1112         * gnulib/import/chdir-long.h: Update.
1113         * gnulib/import/cloexec.c: Update.
1114         * gnulib/import/cloexec.h: Update.
1115         * gnulib/import/close.c: Update.
1116         * gnulib/import/closedir.c: Update.
1117         * gnulib/import/config.charset: Update.
1118         * gnulib/import/dirent-private.h: Update.
1119         * gnulib/import/dirent.in.h: Update.
1120         * gnulib/import/dirfd.c: Update.
1121         * gnulib/import/dirname-lgpl.c: Update.
1122         * gnulib/import/dirname.h: Update.
1123         * gnulib/import/dosname.h: Update.
1124         * gnulib/import/dup-safer-flag.c: Update.
1125         * gnulib/import/dup-safer.c: Update.
1126         * gnulib/import/dup.c: Update.
1127         * gnulib/import/dup2.c: Update.
1128         * gnulib/import/errno.in.h: Update.
1129         * gnulib/import/error.c: Update.
1130         * gnulib/import/error.h: Update.
1131         * gnulib/import/exitfail.c: Update.
1132         * gnulib/import/exitfail.h: Update.
1133         * gnulib/import/extra/update-copyright: Update.
1134         * gnulib/import/fchdir.c: Update.
1135         * gnulib/import/fcntl.c: Update.
1136         * gnulib/import/fcntl.in.h: Update.
1137         * gnulib/import/fd-hook.c: Update.
1138         * gnulib/import/fd-hook.h: Update.
1139         * gnulib/import/fd-safer-flag.c: Update.
1140         * gnulib/import/fd-safer.c: Update.
1141         * gnulib/import/fdopendir.c: Update.
1142         * gnulib/import/filename.h: Update.
1143         * gnulib/import/filenamecat-lgpl.c: Update.
1144         * gnulib/import/filenamecat.h: Update.
1145         * gnulib/import/flexmember.h: Update.
1146         * gnulib/import/float+.h: Update.
1147         * gnulib/import/float.c: Update.
1148         * gnulib/import/float.in.h: Update.
1149         * gnulib/import/fnmatch.c: Update.
1150         * gnulib/import/fnmatch.in.h: Update.
1151         * gnulib/import/fnmatch_loop.c: Update.
1152         * gnulib/import/fpucw.h: Update.
1153         * gnulib/import/frexp.c: Update.
1154         * gnulib/import/frexpl.c: Update.
1155         * gnulib/import/fstat.c: Update.
1156         * gnulib/import/fstatat.c: Update.
1157         * gnulib/import/getcwd-lgpl.c: Update.
1158         * gnulib/import/getcwd.c: Update.
1159         * gnulib/import/getdtablesize.c: Update.
1160         * gnulib/import/getlogin_r.c: Update.
1161         * gnulib/import/getprogname.c: Update.
1162         * gnulib/import/getprogname.h: Update.
1163         * gnulib/import/gettext.h: Update.
1164         * gnulib/import/gettimeofday.c: Update.
1165         * gnulib/import/glob-libc.h: Update.
1166         * gnulib/import/glob.c: Update.
1167         * gnulib/import/glob.in.h: Update.
1168         * gnulib/import/glob_internal.h: Update.
1169         * gnulib/import/glob_pattern_p.c: Update.
1170         * gnulib/import/globfree.c: Update.
1171         * gnulib/import/hard-locale.c: Update.
1172         * gnulib/import/hard-locale.h: Update.
1173         * gnulib/import/intprops.h: Update.
1174         * gnulib/import/inttypes.in.h: Update.
1175         * gnulib/import/isnan.c: Update.
1176         * gnulib/import/isnand-nolibm.h: Update.
1177         * gnulib/import/isnand.c: Update.
1178         * gnulib/import/isnanl-nolibm.h: Update.
1179         * gnulib/import/isnanl.c: Update.
1180         * gnulib/import/itold.c: Update.
1181         * gnulib/import/libc-config.h: Update.
1182         * gnulib/import/limits.in.h: Update.
1183         * gnulib/import/localcharset.c: Update.
1184         * gnulib/import/localcharset.h: Update.
1185         * gnulib/import/localtime-buffer.c: Update.
1186         * gnulib/import/localtime-buffer.h: Update.
1187         * gnulib/import/lstat.c: Update.
1188         * gnulib/import/m4/00gnulib.m4: Update.
1189         * gnulib/import/m4/__inline.m4: Update.
1190         * gnulib/import/m4/absolute-header.m4: Update.
1191         * gnulib/import/m4/alloca.m4: Update.
1192         * gnulib/import/m4/builtin-expect.m4: Update.
1193         * gnulib/import/m4/canonicalize.m4: Update.
1194         * gnulib/import/m4/chdir-long.m4: Update.
1195         * gnulib/import/m4/close.m4: Update.
1196         * gnulib/import/m4/closedir.m4: Update.
1197         * gnulib/import/m4/configmake.m4: Update.
1198         * gnulib/import/m4/d-ino.m4: Update.
1199         * gnulib/import/m4/d-type.m4: Update.
1200         * gnulib/import/m4/dirent_h.m4: Update.
1201         * gnulib/import/m4/dirfd.m4: Update.
1202         * gnulib/import/m4/dirname.m4: Update.
1203         * gnulib/import/m4/double-slash-root.m4: Update.
1204         * gnulib/import/m4/dup.m4: Update.
1205         * gnulib/import/m4/dup2.m4: Update.
1206         * gnulib/import/m4/eealloc.m4: Update.
1207         * gnulib/import/m4/environ.m4: Update.
1208         * gnulib/import/m4/errno_h.m4: Update.
1209         * gnulib/import/m4/error.m4: Update.
1210         * gnulib/import/m4/exponentd.m4: Update.
1211         * gnulib/import/m4/exponentl.m4: Update.
1212         * gnulib/import/m4/extensions.m4: Update.
1213         * gnulib/import/m4/extern-inline.m4: Update.
1214         * gnulib/import/m4/fchdir.m4: Update.
1215         * gnulib/import/m4/fcntl-o.m4: Update.
1216         * gnulib/import/m4/fcntl.m4: Update.
1217         * gnulib/import/m4/fcntl_h.m4: Update.
1218         * gnulib/import/m4/fdopendir.m4: Update.
1219         * gnulib/import/m4/filenamecat.m4: Update.
1220         * gnulib/import/m4/flexmember.m4: Update.
1221         * gnulib/import/m4/float_h.m4: Update.
1222         * gnulib/import/m4/fnmatch.m4: Update.
1223         * gnulib/import/m4/fnmatch_h.m4: Update.
1224         * gnulib/import/m4/fpieee.m4: Update.
1225         * gnulib/import/m4/frexp.m4: Update.
1226         * gnulib/import/m4/frexpl.m4: Update.
1227         * gnulib/import/m4/fstat.m4: Update.
1228         * gnulib/import/m4/fstatat.m4: Update.
1229         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
1230         * gnulib/import/m4/getcwd-path-max.m4: Update.
1231         * gnulib/import/m4/getcwd.m4: Update.
1232         * gnulib/import/m4/getdtablesize.m4: Update.
1233         * gnulib/import/m4/getlogin.m4: Update.
1234         * gnulib/import/m4/getlogin_r.m4: Update.
1235         * gnulib/import/m4/getpagesize.m4: Update.
1236         * gnulib/import/m4/getprogname.m4: Update.
1237         * gnulib/import/m4/gettimeofday.m4: Update.
1238         * gnulib/import/m4/glibc21.m4: Update.
1239         * gnulib/import/m4/glob.m4: Update.
1240         * gnulib/import/m4/glob_h.m4: Update.
1241         * gnulib/import/m4/gnulib-cache.m4: Update.
1242         * gnulib/import/m4/gnulib-common.m4: Update.
1243         * gnulib/import/m4/gnulib-comp.m4: Update.
1244         * gnulib/import/m4/gnulib-tool.m4: Update.
1245         * gnulib/import/m4/hard-locale.m4: Update.
1246         * gnulib/import/m4/include_next.m4: Update.
1247         * gnulib/import/m4/inttypes-pri.m4: Update.
1248         * gnulib/import/m4/inttypes.m4: Update.
1249         * gnulib/import/m4/isnand.m4: Update.
1250         * gnulib/import/m4/isnanl.m4: Update.
1251         * gnulib/import/m4/largefile.m4: Update.
1252         * gnulib/import/m4/limits-h.m4: Update.
1253         * gnulib/import/m4/localcharset.m4: Update.
1254         * gnulib/import/m4/locale-fr.m4: Update.
1255         * gnulib/import/m4/locale-ja.m4: Update.
1256         * gnulib/import/m4/locale-zh.m4: Update.
1257         * gnulib/import/m4/localtime-buffer.m4: Update.
1258         * gnulib/import/m4/longlong.m4: Update.
1259         * gnulib/import/m4/lstat.m4: Update.
1260         * gnulib/import/m4/malloc.m4: Update.
1261         * gnulib/import/m4/malloca.m4: Update.
1262         * gnulib/import/m4/math_h.m4: Update.
1263         * gnulib/import/m4/mbrtowc.m4: Update.
1264         * gnulib/import/m4/mbsinit.m4: Update.
1265         * gnulib/import/m4/mbsrtowcs.m4: Update.
1266         * gnulib/import/m4/mbstate_t.m4: Update.
1267         * gnulib/import/m4/memchr.m4: Update.
1268         * gnulib/import/m4/memmem.m4: Update.
1269         * gnulib/import/m4/mempcpy.m4: Update.
1270         * gnulib/import/m4/memrchr.m4: Update.
1271         * gnulib/import/m4/mkdir.m4: Update.
1272         * gnulib/import/m4/mkstemp.m4: Update.
1273         * gnulib/import/m4/mmap-anon.m4: Update.
1274         * gnulib/import/m4/mode_t.m4: Update.
1275         * gnulib/import/m4/msvc-inval.m4: Update.
1276         * gnulib/import/m4/msvc-nothrow.m4: Update.
1277         * gnulib/import/m4/multiarch.m4: Update.
1278         * gnulib/import/m4/nocrash.m4: Update.
1279         * gnulib/import/m4/off_t.m4: Update.
1280         * gnulib/import/m4/onceonly.m4: Update.
1281         * gnulib/import/m4/open-cloexec.m4: Update.
1282         * gnulib/import/m4/open.m4: Update.
1283         * gnulib/import/m4/openat.m4: Update.
1284         * gnulib/import/m4/opendir.m4: Update.
1285         * gnulib/import/m4/pathmax.m4: Update.
1286         * gnulib/import/m4/rawmemchr.m4: Update.
1287         * gnulib/import/m4/readdir.m4: Update.
1288         * gnulib/import/m4/readlink.m4: Update.
1289         * gnulib/import/m4/realloc.m4: Update.
1290         * gnulib/import/m4/rename.m4: Update.
1291         * gnulib/import/m4/rewinddir.m4: Update.
1292         * gnulib/import/m4/rmdir.m4: Update.
1293         * gnulib/import/m4/save-cwd.m4: Update.
1294         * gnulib/import/m4/secure_getenv.m4: Update.
1295         * gnulib/import/m4/setenv.m4: Update.
1296         * gnulib/import/m4/signal_h.m4: Update.
1297         * gnulib/import/m4/ssize_t.m4: Update.
1298         * gnulib/import/m4/stat-time.m4: Update.
1299         * gnulib/import/m4/stat.m4: Update.
1300         * gnulib/import/m4/std-gnu11.m4: Update.
1301         * gnulib/import/m4/stdbool.m4: Update.
1302         * gnulib/import/m4/stddef_h.m4: Update.
1303         * gnulib/import/m4/stdint.m4: Update.
1304         * gnulib/import/m4/stdio_h.m4: Update.
1305         * gnulib/import/m4/stdlib_h.m4: Update.
1306         * gnulib/import/m4/strchrnul.m4: Update.
1307         * gnulib/import/m4/strdup.m4: Update.
1308         * gnulib/import/m4/strerror.m4: Update.
1309         * gnulib/import/m4/string_h.m4: Update.
1310         * gnulib/import/m4/strstr.m4: Update.
1311         * gnulib/import/m4/strtok_r.m4: Update.
1312         * gnulib/import/m4/sys_socket_h.m4: Update.
1313         * gnulib/import/m4/sys_stat_h.m4: Update.
1314         * gnulib/import/m4/sys_time_h.m4: Update.
1315         * gnulib/import/m4/sys_types_h.m4: Update.
1316         * gnulib/import/m4/tempname.m4: Update.
1317         * gnulib/import/m4/time_h.m4: Update.
1318         * gnulib/import/m4/unistd-safer.m4: Update.
1319         * gnulib/import/m4/unistd_h.m4: Update.
1320         * gnulib/import/m4/warn-on-use.m4: Update.
1321         * gnulib/import/m4/wchar_h.m4: Update.
1322         * gnulib/import/m4/wchar_t.m4: Update.
1323         * gnulib/import/m4/wctype_h.m4: Update.
1324         * gnulib/import/m4/wint_t.m4: Update.
1325         * gnulib/import/malloc.c: Update.
1326         * gnulib/import/malloc/scratch_buffer.h: Update.
1327         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
1328         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
1329         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
1330         * gnulib/import/malloca.c: Update.
1331         * gnulib/import/malloca.h: Update.
1332         * gnulib/import/malloca.valgrind: Update.
1333         * gnulib/import/math.in.h: Update.
1334         * gnulib/import/mbrtowc.c: Update.
1335         * gnulib/import/mbsinit.c: Update.
1336         * gnulib/import/mbsrtowcs-impl.h: Update.
1337         * gnulib/import/mbsrtowcs-state.c: Update.
1338         * gnulib/import/mbsrtowcs.c: Update.
1339         * gnulib/import/memchr.c: Update.
1340         * gnulib/import/memmem.c: Update.
1341         * gnulib/import/mempcpy.c: Update.
1342         * gnulib/import/memrchr.c: Update.
1343         * gnulib/import/mkdir.c: Update.
1344         * gnulib/import/mkstemp.c: Update.
1345         * gnulib/import/msvc-inval.c: Update.
1346         * gnulib/import/msvc-inval.h: Update.
1347         * gnulib/import/msvc-nothrow.c: Update.
1348         * gnulib/import/msvc-nothrow.h: Update.
1349         * gnulib/import/open.c: Update.
1350         * gnulib/import/openat-die.c: Update.
1351         * gnulib/import/openat-priv.h: Update.
1352         * gnulib/import/openat-proc.c: Update.
1353         * gnulib/import/openat.c: Update.
1354         * gnulib/import/openat.h: Update.
1355         * gnulib/import/opendir.c: Update.
1356         * gnulib/import/pathmax.h: Update.
1357         * gnulib/import/pipe-safer.c: Update.
1358         * gnulib/import/rawmemchr.c: Update.
1359         * gnulib/import/readdir.c: Update.
1360         * gnulib/import/readlink.c: Update.
1361         * gnulib/import/realloc.c: Update.
1362         * gnulib/import/ref-add.sin: Update.
1363         * gnulib/import/ref-del.sin: Update.
1364         * gnulib/import/rename.c: Update.
1365         * gnulib/import/rewinddir.c: Update.
1366         * gnulib/import/rmdir.c: Update.
1367         * gnulib/import/same-inode.h: Update.
1368         * gnulib/import/save-cwd.c: Update.
1369         * gnulib/import/save-cwd.h: Update.
1370         * gnulib/import/scratch_buffer.h: Update.
1371         * gnulib/import/secure_getenv.c: Update.
1372         * gnulib/import/setenv.c: Update.
1373         * gnulib/import/signal.in.h: Update.
1374         * gnulib/import/stat-time.c: Update.
1375         * gnulib/import/stat-time.h: Update.
1376         * gnulib/import/stat-w32.c: Update.
1377         * gnulib/import/stat-w32.h: Update.
1378         * gnulib/import/stat.c: Update.
1379         * gnulib/import/stdbool.in.h: Update.
1380         * gnulib/import/stddef.in.h: Update.
1381         * gnulib/import/stdint.in.h: Update.
1382         * gnulib/import/stdio.in.h: Update.
1383         * gnulib/import/stdlib.in.h: Update.
1384         * gnulib/import/str-two-way.h: Update.
1385         * gnulib/import/strchrnul.c: Update.
1386         * gnulib/import/strdup.c: Update.
1387         * gnulib/import/streq.h: Update.
1388         * gnulib/import/strerror-override.c: Update.
1389         * gnulib/import/strerror-override.h: Update.
1390         * gnulib/import/strerror.c: Update.
1391         * gnulib/import/string.in.h: Update.
1392         * gnulib/import/stripslash.c: Update.
1393         * gnulib/import/strnlen1.c: Update.
1394         * gnulib/import/strnlen1.h: Update.
1395         * gnulib/import/strstr.c: Update.
1396         * gnulib/import/strtok_r.c: Update.
1397         * gnulib/import/sys_stat.in.h: Update.
1398         * gnulib/import/sys_time.in.h: Update.
1399         * gnulib/import/sys_types.in.h: Update.
1400         * gnulib/import/tempname.c: Update.
1401         * gnulib/import/tempname.h: Update.
1402         * gnulib/import/time.in.h: Update.
1403         * gnulib/import/unistd--.h: Update.
1404         * gnulib/import/unistd-safer.h: Update.
1405         * gnulib/import/unistd.in.h: Update.
1406         * gnulib/import/unsetenv.c: Update.
1407         * gnulib/import/verify.h: Update.
1408         * gnulib/import/extra/snippet/warn-on-use.h: Update.
1409         * gnulib/import/wchar.in.h: Update.
1410         * gnulib/import/wctype.in.h: Update.
1411         * gnulib/import/xalloc-oversized.h: Update.
1412         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
1413         "53e2c179f26a890fa6685af4b6c1397ee370433b".
1414
1415 2018-08-16  Gary Benson <gbenson@redhat.com>
1416
1417         PR gdb/13000:
1418         * gdb/main.c (captured_main_1): Exit with nonzero status
1419         in batch mode if the last command to be executed failed.
1420         * NEWS: Mention the above.
1421
1422 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
1423
1424         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
1425         end of warning message.
1426
1427 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
1428
1429         PR gdb/22943:
1430         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
1431         (aarch64_extract_return_value): Use
1432         aapcs_is_vfp_call_or_return_candidate.
1433         (aarch64_return_in_memory): Likewise.
1434         (aarch64_store_return_value): Likewise.
1435
1436 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
1437
1438         * aarch64-tdep.c
1439         (aapcs_is_vfp_call_or_return_candidate): Make static
1440         (pass_in_v_or_stack): Remove function.
1441         (pass_in_v_vfp_candidate): New function.
1442         (aarch64_push_dummy_call): Check for float register candidates.
1443
1444 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
1445
1446         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
1447         (aapcs_is_vfp_call_or_return_candidate_1): New function.
1448         (aapcs_is_vfp_call_or_return_candidate): Likewise.
1449
1450 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
1451
1452         PR build/23399
1453         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
1454         (struct ipa_sym_addresses): Rename to...
1455         (struct ipa_sym_addresses_common): ... this.
1456         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
1457
1458 2018-08-28  Tom Tromey  <tom@tromey.com>
1459
1460         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1461         (token_fifo): Now a std::vector.
1462         (yylex, c_parse): Update.
1463         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1464         (token_fifo): Now a std::vector.
1465         (yylex, d_parse): Update.
1466         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1467         (token_fifo): Now a std::vector.
1468         (yylex, go_parse): Update.
1469
1470 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
1471
1472         * parser-defs.h (struct type_stack) <elements>: Change type to
1473         std::vector<union type_stack_elt>.
1474         <depth, size>: Remove.
1475         * parse.c (parse_exp_in_context_1): Adjust.
1476         (type_stack_reserve): Remove.
1477         (check_type_stack_depth): Remove.
1478         (insert_into_type_stack): Adjust to std::vector.
1479         (insert_type): Likewise.
1480         (push_type): Likewise.
1481         (push_type_int): Likewise.
1482         (insert_type_address_space): Likewise.
1483         (pop_type): Likewise.
1484         (pop_type_int): Likewise.
1485         (pop_typelist): Likewise.
1486         (pop_type_stack): Likewise.
1487         (append_type_stack): Likewise.
1488         (push_type_stack): Likewise.
1489         (get_type_stack): Likewise.
1490         (type_stack_cleanup): Likewise.
1491         (push_typelist): Likewise.
1492         (follow_types): Likewise.
1493         (_initialize_parse): Likewise.
1494
1495 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
1496
1497         * NEWS: Mention csky target.
1498
1499 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
1500             Hafiz Abid Qadeer  <abidh@codesourcery.com>
1501             Don Breazeal  <donb@codesourcery.com>
1502
1503         * csky-linux-tdep.c: New file.
1504         * csky-tdep.c: Likewise.
1505         * csky-tdep.h: Likewise.
1506         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
1507         csky-tdep.o.
1508         (HFILES_NO_SRCDIR): Add csky-tdep.h.
1509         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
1510         * configure.tgt: Add csky support.
1511
1512 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
1513
1514         * python/py-framefilter.c (py_print_frame): Print frame architecture
1515         when printing on an MI output.
1516
1517 2018-08-27  Tom Tromey  <tom@tromey.com>
1518
1519         PR build/23087:
1520         * configure: Rebuild.
1521         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
1522
1523 2018-08-27  Tom Tromey  <tom@tromey.com>
1524
1525         * aarch64-linux-tdep.c
1526         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
1527         casts to int.
1528
1529 2018-08-27  Tom Tromey  <tom@tromey.com>
1530
1531         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
1532         unsigned.
1533         (ppc64_standard_linkage1, ppc64_standard_linkage2)
1534         (ppc64_standard_linkage3, ppc64_standard_linkage4)
1535         (ppc64_standard_linkage5, ppc64_standard_linkage6)
1536         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
1537         unsigned.
1538
1539 2018-08-27  Tom Tromey  <tom@tromey.com>
1540
1541         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
1542         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
1543
1544 2018-08-27  Tom Tromey  <tom@tromey.com>
1545
1546         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
1547         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
1548         ULONGEST_MAX.
1549         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
1550         ULONGEST_MAX.
1551         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
1552         ULONGEST_MAX.
1553         * sparc-linux-tdep.c (sparc32_linux_sigframe)
1554         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
1555         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
1556         ULONGEST_MAX.
1557         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
1558         (ppc64_linux_sigaction_tramp_frame)
1559         (ppc32_linux_sighandler_tramp_frame)
1560         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
1561         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
1562         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
1563         * mn10300-linux-tdep.c (am33_linux_sigframe)
1564         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
1565         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
1566         * mips-linux-tdep.c (mips_linux_o32_sigframe)
1567         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
1568         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
1569         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
1570         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
1571         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
1572         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
1573         * microblaze-linux-tdep.c
1574         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
1575         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
1576         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
1577         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
1578         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
1579         * common/common-types.h (ULONGEST_MAX): New define.
1580         (CORE_ADDR_MAX): Fix formatting.
1581         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
1582         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
1583         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
1584         (arm_linux_rt_sigreturn_tramp_frame)
1585         (arm_eabi_linux_sigreturn_tramp_frame)
1586         (arm_eabi_linux_rt_sigreturn_tramp_frame)
1587         (thumb2_eabi_linux_sigreturn_tramp_frame)
1588         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
1589         (arm_linux_restart_syscall_tramp_frame)
1590         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
1591         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
1592         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
1593         ULONGEST_MAX.
1594         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
1595
1596 2018-08-27  Tom Tromey  <tom@tromey.com>
1597
1598         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
1599         CORE_ADDR_MAX.
1600         * mips-tdep.c (mips_deal_with_atomic_sequence)
1601         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
1602         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
1603         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
1604         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
1605         CORE_ADDR_MAX.
1606         * aarch64-tdep.c (aarch64_software_single_step): Use
1607         CORE_ADDR_MAX.
1608
1609 2018-08-27  Tom Tromey  <tom@tromey.com>
1610
1611         * linespec.c (complete_linespec_component): Add cast to "char".
1612         * completer.c (completion_tracker::build_completion_result): Add
1613         cast to "char".
1614
1615 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
1616
1617         * solist.h (struct solist, struct target_so_ops): Fix
1618         indentation.
1619
1620 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
1621
1622         * ada-tasks.c (ada_task_info_s): Remove typedef.
1623         (DEF_VEC_O(ada_task_info_s)): Remove.
1624         (struct ada_tasks_inferior_data): Initialize fields.
1625         <task_list>: Make an std::vector.
1626         (get_ada_tasks_inferior_data): Allocate with new.
1627         (ada_get_task_number): Adjust.
1628         (get_task_number_from_id): Likewise.
1629         (valid_task_id): Likewise.
1630         (ada_get_task_info_from_ptid): Likewise.
1631         (iterate_over_live_ada_tasks): Likewise.
1632         (add_ada_task): Likewise.
1633         (read_known_tasks): Likewise.
1634         (ada_build_task_list): Likewise.
1635         (print_ada_task_info): Likewise.
1636         (info_task): Likewise.
1637         (task_command_1): Likewise.
1638
1639 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
1640
1641         * ada-lang.c (add_angle_brackets): Return std::string.
1642
1643 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
1644
1645         * python/py-threadevent.c (py_get_event_thread): Initialize
1646         pythread.
1647
1648 2018-08-24  Pedro Alves  <palves@redhat.com>
1649
1650         * python/py-bpevent.c (create_breakpoint_event_object): Use
1651         copy-initialization.
1652         * python/py-continueevent.c (emit_continue_event): Use
1653         copy-initialization.
1654         * python/py-exitedevent.c (create_exited_event_object): Return a
1655         gdbpy_ref<>.
1656         (emit_exited_event): Use copy-initialization.
1657         * python/py-inferior.c (python_new_inferior)
1658         (python_inferior_deleted, add_thread_object): Use
1659         copy-initialization.
1660         * python/py-infevents.c (create_inferior_call_event_object)
1661         (create_register_changed_event_object)
1662         (create_memory_changed_event_object): Return a gdbpy_ref<>.
1663         (emit_inferior_call_event, emit_memory_changed_event)
1664         (emit_register_changed_event): Use copy-initialization.
1665         * python/py-newobjfileevent.c (create_new_objfile_event_object):
1666         Return a gdbpy_ref<>.
1667         (emit_new_objfile_event): Use copy-initialization.
1668         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
1669         (emit_clear_objfiles_event): Use copy-initialization.
1670         * python/py-signalevent.c (create_signal_event_object): Use
1671         copy-initialization.
1672         * python/py-threadevent.c (create_thread_event_object): Use
1673         copy-initialization.
1674
1675 2018-08-24  Pedro Alves  <palves@redhat.com>
1676             Simon Marchi  <simon.marchi@ericsson.com>
1677
1678         PR gdb/23379
1679         * python/py-continueevent.c: Include "gdbthread.h".
1680         (create_continue_event_object): Add intro comment.  Add 'ptid'
1681         parameter.  Use it to find thread to pass to
1682         create_thread_event_object.
1683         (emit_continue_event): Pass PTID down to
1684         create_continue_event_object.
1685         * python/py-event.h (py_get_event_thread): Declare.
1686         (create_thread_event_object): Remove default from 'thread'
1687         parameter.
1688         * python/py-stopevent.c (create_stop_event_object): Use
1689         py_get_event_thread.
1690         * python/py-threadevent.c (get_event_thread): Rename to ...
1691         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
1692         and use it to find the thread.
1693         (create_thread_event_object): Assert that THREAD isn't null.
1694         Don't find the event thread here.
1695
1696 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
1697
1698         * block.h (blockrange, blockranges): New struct declarations.
1699         (struct block): Add new field named `ranges'.
1700         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
1701         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
1702         macros for accessing ranges in struct block.
1703         (make_blockranges): New declaration.
1704         block.c (make_blockranges): New function.
1705         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
1706         for block.
1707         * symtab.h (find_pc_partial_function): Add new parameter `block'.
1708         * blockframe.c (cache_pc_function_block): New static global.
1709         (clear_pc_function_cache): Clear cache_pc_function_block.
1710         (find_pc_partial_function): Move comment to symtab.h.  Add
1711         support for non-contiguous blocks.
1712         * cli/cli-cmds.c (block.h): Include.
1713         (print_disassembly): Handle printing of non-contiguous blocks.
1714         (disassemble_current_function): Likewise.
1715         (disassemble_command): Likewise.
1716
1717         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
1718         BLOCK_START.
1719         * blockframe.c (get_pc_function_start): Likewise.
1720         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
1721         (gcc_symbol_address): Likewise.
1722         * compile/compile-object-run.c (compile_object_run): Likewise.
1723         * compile/compile.c (get_expr_block_and_pc): Likewise.
1724         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
1725         (func_addr_to_tail_call_list): Likewise.
1726         * findvar.c (default_read_var_value): Likewise.
1727         * inline-frame.c (inline_frame_this_id): Likewise.
1728         (skip-inline_frames): Likewise.
1729         * infcmd.c (until_next_command): Likewise.
1730         * linespec.c (convert_linespec_to_sals): Likewise.
1731         * parse.c (parse_exp_in_context_1): Likewise.
1732         * printcmd.c (build_address_symbolic): likewise.
1733         (info_address_command): Likewise.
1734         symtab.c (find_function_start_sal): Likewise.
1735         (skip_prologue_sal): Likewise.
1736         (find_function_alias_target): Likewise.
1737         (find_gnu_ifunc): Likewise.
1738         * stack.c (find_frame_funname): Likewise.
1739         * symtab.c (fixup_symbol_section): Likewise.
1740         (find_function_start_sal): Likewise.
1741         (skip_prologue_sal): Likewsie.
1742         (find_function_alias_target): Likewise.
1743         (find_gnu_ifunc): Likewise.
1744         * tracepoint.c (info_scope_command): Likewise.
1745         * value.c (value_fn_field): Likewise.
1746
1747         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
1748         in place of find_pc_partial_function.
1749         * blockframe.c (find_function_entry_range_from_pc): New function.
1750         * symtab.h (find_function_entry_range_from_pc): Declare and document.
1751         * objfiles.c (objfile_relocate1): Relocate start and end addresses
1752         for each range in a block.
1753
1754
1755 2018-08-23  Xavier Roirand  <roirand@adacore.com>
1756
1757         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
1758         incrementation.
1759
1760 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
1761
1762         * solib-svr4.c (read_program_headers_from_bfd): Return
1763         gdb::optional<gdb::byte_vector>.
1764         (svr4_exec_displacement): Adjust.
1765
1766 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
1767
1768         * solib-svr4.c (read_program_header): Return
1769         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
1770         (find_program_interpreter): Return
1771         gdb::optional<gdb::byte_vector>.
1772         (scan_dyntag_auxv): Adjust.
1773         (enable_break): Adjust.
1774         (svr4_exec_displacement): Adjust.
1775
1776 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
1777
1778         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
1779         * inf-child.c (inf_child_target::terminal_save_inferior): New.
1780
1781 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
1782
1783         * guile/scm-string.c (gdbscm_scm_from_printf): Use
1784         string_vprintf.
1785         * guile/scm-utils.c (gdbscm_printf): Likewise.
1786         * serial.c (serial_printf): Likewise.
1787         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
1788
1789 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
1790
1791         * stack.c (print_frame): Print frame architecture when printing on
1792         an MI output.
1793         * NEWS: Mention new "arch" attribute in frame output.
1794
1795 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
1796
1797         * arch/aarch64.h (aarch64_regnum): Update comment.
1798
1799 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
1800
1801         * NEWS: Add SVE to 8.2 section.
1802
1803 2018-08-21  Pedro Alves  <palves@redhat.com>
1804
1805         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
1806         out from gdbscm_parse_function_args.
1807         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
1808         gdbscm_parse_function_args_1.
1809
1810 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
1811
1812         PR gdb/17816
1813         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
1814         operator.
1815
1816 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
1817
1818         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
1819
1820 2018-08-19  Michael Spang  <spang@google.com>
1821
1822         PR gdb/11786
1823         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
1824         for PT_TLS segments.
1825
1826 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
1827
1828         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
1829         dwarf_variable_value.
1830         * dwarf2-frame.c (class dwarf_expr_executor):
1831         Add override for dwarf_variable_value.
1832         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
1833         (class symbol_needs_eval_context): Likewise.
1834         (indirect_synthetic_pointer): Add forward declaration.
1835         (sect_variable_value): New function.
1836         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
1837         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
1838         for DW_OP_GNU_variable_value.
1839
1840 2018-08-16  Tom Tromey  <tom@tromey.com>
1841
1842         * top.c (read_command_file): Update.
1843         (command_line_input): Remove "repeat" argument.
1844         * ada-lang.c (get_selections): Update.
1845         * linespec.c (decode_line_2): Update.
1846         * defs.h (command_line_input): Remove argument.
1847         * cli/cli-script.c (read_next_line): Update.
1848         * python/py-gdb-readline.c: Update.
1849
1850 2018-08-17  Tom Tromey  <tom@tromey.com>
1851
1852         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
1853         command_line_input.
1854
1855 2018-08-15  Tom Tromey  <tom@tromey.com>
1856
1857         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
1858
1859 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
1860
1861         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
1862         If used, use find_pc_partial_function to find address range
1863         to disassemble.
1864         * mi/mi-main.c (mi_cmd_list_features): Report
1865         "data-disassemble-a-option" feature.
1866         * NEWS: Mention new -data-disassemble option -a.
1867
1868 2018-08-13  Tom Tromey  <tom@tromey.com>
1869
1870         * common/common-defs.h (_FORTIFY_SOURCE): Define.
1871
1872 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
1873
1874         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
1875         (aarch64_linux_collect_sve_regset): Likewise.
1876         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
1877         * regcache.h (regcache_map_entry_size): New function.
1878
1879 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
1880
1881         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
1882         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
1883         (SVE_HEADER_VL_LENGTH): Likewise.
1884         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
1885         (SVE_HEADER_FLAGS_LENGTH): Likewise.
1886         (SVE_HEADER_RESERVED_LENGTH): Likewise.
1887         (SVE_HEADER_SIZE_OFFSET): Likewise.
1888         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
1889         (SVE_HEADER_VL_OFFSET): Likewise.
1890         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
1891         (SVE_HEADER_FLAGS_OFFSET): Likewise.
1892         (SVE_HEADER_RESERVED_OFFSET): Likewise.
1893         (SVE_HEADER_SIZE): Likewise.
1894         (aarch64_linux_core_read_vq): Add function.
1895         (aarch64_linux_core_read_description): Check for SVE section.
1896
1897 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
1898
1899         * aarch64-fbsd-tdep.c
1900         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
1901         collect_size.
1902         * aarch64-linux-tdep.c
1903         (aarch64_linux_iterate_over_regset_sections): Likewise.
1904         * alpha-linux-tdep.c
1905         (alpha_linux_iterate_over_regset_sections):
1906         * alpha-nbsd-tdep.c
1907         (alphanbsd_iterate_over_regset_sections): Likewise.
1908         * amd64-fbsd-tdep.c
1909         (amd64fbsd_iterate_over_regset_sections): Likewise.
1910         * amd64-linux-tdep.c
1911         (amd64_linux_iterate_over_regset_sections): Likewise.
1912         * arm-bsd-tdep.c
1913         (armbsd_iterate_over_regset_sections): Likewise.
1914         * arm-fbsd-tdep.c
1915         (arm_fbsd_iterate_over_regset_sections): Likewise.
1916         * arm-linux-tdep.c
1917         (arm_linux_iterate_over_regset_sections): Likewise.
1918         * corelow.c (get_core_registers_cb): Likewise.
1919         (core_target::fetch_registers): Likewise.
1920         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
1921         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
1922         * gdbarch.h (void): Regenerate.
1923         * gdbarch.sh: Add supply_size and collect_size.
1924         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
1925         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
1926         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
1927         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
1928         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
1929         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
1930         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
1931         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
1932         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
1933         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
1934         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
1935         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
1936         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
1937         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
1938         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
1939         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
1940         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
1941         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
1942         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
1943         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
1944         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
1945         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
1946         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
1947         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
1948         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
1949         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
1950         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
1951         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
1952         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
1953         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
1954
1955 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
1956
1957         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
1958         with string_printf.
1959
1960 2018-08-10  Keith Seitz  <keiths@redhat.com>
1961
1962         * compile/compile-c-support.c (add_code_header, add_code_footer):
1963         Move into policy class.
1964         (c_push_user_expression, pop_user_expression_nop)
1965         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
1966         (compile_program): New host class.
1967         (c_compile_program): New typedef.
1968         (c_compute_porgram): Use c_compile_program.
1969
1970 2018-08-10  Keith Seitz  <keiths@redhat.com>
1971
1972         * compile/compile-internal.h (compile_instance::~compile_instance):
1973         Remove calls to htab_delete.
1974         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
1975         * compile.c (compile_instance::compile_instance): Initialize
1976         htab unique pointers.
1977         (compile_instance::get_cached_type, compile_instance::insert_type)
1978         (compile_instance::error_symbol_once): Update for unique_ptr.
1979
1980 2018-08-10  Keith Seitz  <keiths@redhat.com>
1981
1982         * compile/compile-c-symbols.c (struct symbol_error)
1983         (hash_symbol_error, eq_symbol_error, del_symbol_error)
1984         (compile_instance::insert_symbol_error)
1985         (compile_instance::error_symbol_once): Move to ...
1986         * compile/compile.c: ... here.
1987
1988 2018-08-10  Keith Seitz  <keiths@redhat.com>
1989
1990         * compile/compile-c-support.c (c_get_compile_context): Use `new'
1991         instead of `new_compile_instance'.
1992         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
1993         Update description.
1994         If the symbol error map is not initialized, create it.
1995         (generate_c_for_for_one_symbol): Do not check/initialize
1996         the symbol error map.
1997         * compile/compile-c-types.c (compile_c_instance): Make a class.
1998         Update all callers.
1999         (compile_instance::compile_instance): Initialize the type cache.
2000         (get_cached_type): New function.
2001         (insert_type): Update description.
2002         (compile_c_instance::m_default_cflags): Define.
2003         (convert_type): Update description.  Use get_cached_type.
2004         (delete_instance): Moved to destructor.
2005         (new_compile_instance): Moved to constructor.
2006         * compile/compile-c.h (compile_c_instance): Make class inheriting
2007         from compile_instance.
2008         <base>: Remove field.
2009         <type_map, symbol_err_map>: Move to base class.
2010         <c_plugin>: Rename to `m_plugin' and remove pointer type.
2011         * compile/compile-internal.h (compile_instance): Make class.
2012         <type_map_t, symbol_err_map_t>: Define.
2013         <fe>: Rename to `m_gcc_fe'.
2014         <scope, block, gcc_target_options>: Add `m_' prefix.
2015         <m_type_map, m_symbol_err_map>: New fields, moved from
2016         compile_c_instance.
2017         <destroy>: Remove.
2018         (convert_type, new_compile_instance): Remove.
2019         * compile/compile.c (cleanup_compile_instance): Remove.
2020         (compile_to_object): Use unique_ptr to eliminate cleanups.
2021         (compile_instance::set_print_callback, compile_instance::version)
2022         (compile_instance::set_verbose)
2023         (compile_instance::set_driver_filename)
2024         (compile_instance::set_triplet_regexp)
2025         (compile_instance::set_arguments)
2026         (compile_instance::set_source_file)
2027         (compile_instance::compile): Define.
2028
2029 2018-08-10  Keith Seitz  <keiths@redhat.com>
2030
2031         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
2032         * compile/compile-c-types.c: Define GCC_METHODN macros and include
2033         gcc-c-fe.def to define C plugin.
2034         (delete_instance): Delete `c_plugin'.
2035         (new_compile_instance): Initialize `c_plugin'.
2036         * compile/compile-c.h: Include gcc_c_plugin.h.
2037         (struct compile_c_instance) <c_plugin>: New member.
2038         * gcc-c-plugin.h: New file.
2039         Update all callers with API change.
2040
2041 2018-08-10  Keith Seitz  <keiths@redhat.com>
2042
2043         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
2044         (HFILES_NO_SRCDIR): ... to here.
2045         Add compile-internal.h and compile-c.h.
2046         * compile/compile-c-support.c: Include compile-c.h.
2047         * compile/compile-c-symbols.c: Include compile-c.h.
2048         (generate_c_for_variable_locations): Update comment.
2049         * compile/compile-c-types.c: Include compile-c.h.
2050         * compile/compile-c.h: New file -- moved C language declarations
2051         from other files here.
2052         * compile/compile-internal.h: Do not include hashtab.h or
2053         common/enum-flags.h.
2054         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
2055         (gcc_convert_symbol, gcc_symbol_address)
2056         (generate_c_for_variable_locations, c_get_mode_for_size)
2057         (c_get_range_decl_name): Definitions moved to compile-c.h.
2058         * compile/compile-loc2c.c: Include compile-c.h.
2059
2060 2018-08-10  Keith Seitz  <keiths@redhat.com>
2061
2062         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
2063         (c_symbol_substitution_name): ... this.
2064         Update all callers.
2065
2066 2018-08-10  Keith Seitz  <keiths@redhat.com>
2067
2068         * compile/compile-c-support.c (c_compute_program): Use
2069         unique_xmalloc_ptr to eliminate cleanup.
2070         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
2071         Return a unique_xmalloc_ptr and eliminate cleanup.
2072         * compile/compile-internal.h (generate_c_for_variable_locations):
2073         Return unique_xmalloc_ptr and update description.
2074
2075 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
2076
2077         * corelow.c (core_target::get_core_register_section): Rename
2078         min_size to section_min_size.
2079
2080 2018-08-09  Jim Wilson  <jimw@sifive.com>
2081
2082         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
2083         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
2084         * NEWS: Mention new GNU/Linux RISC-V target.
2085         * configure.host: Add riscv*-*-linux*.
2086         * configure.nat: Add riscv*.
2087         * configure.tgt: Add riscv*-*-linux*.
2088         * riscv-linux-nat.c: New file.
2089         * riscv-linux-tdep.c: New file.
2090
2091 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
2092
2093         * infrun.c (resume): Make static, add forward declaration.
2094         (proceed): Update header comment.
2095         * infrun.h (resume): Delete declaration.
2096
2097 2018-08-09  Tom Tromey  <tom@tromey.com>
2098
2099         * riscv-tdep.h: Minor formatting fixes.
2100
2101 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
2102
2103         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
2104         * dwarf-index-cache.c (create_dir_and_check): Likewise.
2105         (test_mkdir_recursive): Likewise.
2106         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
2107
2108 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
2109
2110         * valarith.c (value_subscripted_rvalue): If an array is not in
2111         memory, and we don't know the upper bound, then we can't know that
2112         the requested element exists or not.
2113
2114 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
2115
2116         * target.c (str_comma_list_concat_elem): Fix typo in comment.
2117         (target_options_to_string): Add comment.
2118
2119 2018-08-08  Tom Tromey  <tom@tromey.com>
2120
2121         * unittests/scoped_mmap-selftests.c: Check result of "write".
2122
2123 2018-08-08  Jim Wilson  <jimw@sifive.com>
2124
2125         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
2126         (decode_register_index_short): New.
2127         (decode_j_type_insn, decode_cj_type_insn): New.
2128         (decode_b_type_insn, decode_cb_type_insn): New.
2129         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
2130         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
2131         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
2132         is_c_sw_insn instead of is_sw_insn.
2133         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
2134         (riscv_software_single_step): New.
2135         * riscv-tdep.h (riscv_software_single_step): Declare.
2136
2137         * riscv-tdep.c (riscv_isa_xlen): Drop static.
2138         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
2139
2140 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
2141
2142         PR gdb/18050:
2143         * target.c (dispose_inferior): Don't dispose of inferiors that are
2144         already killed.
2145
2146 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
2147
2148         * remote.c (remote_target::download_tracepoint): Change char* to
2149         const char*.
2150
2151 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
2152
2153         * target.h (target_options_to_string): Return an std::string.
2154         * target.c (str_comma_list_concat_elem): Return void, use
2155         std::string.
2156         (do_option): Likewise.
2157         (target_options_to_string): Return an std::string.
2158         * linux-nat.c (linux_nat_target::wait): Adjust.
2159         * target-debug.h (target_debug_print_options): Adjust.
2160
2161 2018-08-07  Tom Tromey  <tom@tromey.com>
2162
2163         * Makefile.in (CPPFLAGS): New variable.
2164         (INTERNAL_CPPFLAGS): Use it.
2165
2166 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2167
2168         * NEWS: Mention the index cache.
2169
2170 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2171
2172         * common/pathstuff.h (get_standard_cache_dir): New.
2173         * common/pathstuff.c (get_standard_cache_dir): New.
2174         * build-id.h (build_id_to_string): New.
2175         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
2176         DEBUG_STR_SUFFIX): Move to here.
2177         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
2178         DEBUG_STR_SUFFIX): Move from there.
2179         (write_psymtabs_to_index): Make non-static, add basename
2180         parameter.  Write to temporary files, rename when done.
2181         (save_gdb_index_command): Adjust call to
2182         write_psymtabs_to_index.
2183         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
2184         field.
2185         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
2186         (get_gdb_index_contents_from_cache): New.
2187         (get_gdb_index_contents_from_cache_dwz): New.
2188         (dwarf2_initialize_objfile): Read index from cache.
2189         (dwarf2_build_psymtabs): Save to index.
2190         * dwarf-index-cache.h: New file.
2191         * dwarf-index-cache.c: New file.
2192         * dwarf-index-write.h: New file.
2193
2194 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2195
2196         * gnulib/aclocal.m4: Re-generate.
2197         * gnulib/config.in: Re-generate.
2198         * gnulib/configure: Re-generate.
2199         * gnulib/import/Makefile.am: Re-generate.
2200         * gnulib/import/Makefile.in: Re-generate.
2201         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
2202         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2203         * gnulib/import/m4/mkdir.m4: New file.
2204         * gnulib/import/mkdir.c: New file.
2205         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
2206         module.
2207
2208 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2209
2210         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
2211         * common/scoped_mmap.c: New file.
2212         * common/scoped_mmap.h (destroy): New method.
2213         (~scoped_mmap, reset): Use destroy.
2214         (scoped_mmap): New move constructor.
2215         (mmap_file): New declaration.
2216         * unittests/scoped_mmap-selftests.c (test_normal,
2217         test_invalid_filename, run_tests): New functions.
2218         (_initialize_scoped_mmap_selftests): Register selftest.
2219
2220 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2221
2222         * dwarf2read.c (read_gdb_index_from_section): Rename to...
2223         (read_gdb_index_from_buffer): ... this.  Remove section
2224         parameter, add buffer parameter.
2225         (get_gdb_index_contents_ftype,
2226         get_gdb_index_contents_dwz_ftype): New typedefs.
2227         (dwarf2_read_gdb_index): Add callback parameters to get the
2228         index contents.
2229         (get_gdb_index_contents_from_section): New.
2230         (dwarf2_initialize_objfile): Update call to
2231         dwarf2_read_gdb_index.
2232
2233 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2234
2235         * common/filestuff.h (gdb_fopen_cloexec): New overload.
2236         (gdb_open_cloexec): Likewise.
2237         * nat/linux-osdata.c (command_from_pid): Use string_printf.
2238         (commandline_from_pid): Likewise.
2239         (linux_xfer_osdata_threads): Likewise.
2240         (linux_xfer_osdata_fds): Likewise.
2241         * ada-lang.c (is_package_name): Likewise.
2242         * auxv.c (procfs_xfer_auxv): Likewise.
2243         * breakpoint.c (print_one_breakpoint_location): Use
2244         uiout::field_fmt.
2245         (print_one_catch_solib): Use string_printf.
2246         * coff-pe-read.c (add_pe_exported_sym): Likewise.
2247         (add_pe_forwarded_sym): Likewise.
2248         * dwarf2read.c (create_type_unit_group): Likewise.
2249         (build_error_marker_type): Likewise.
2250         * infcall.c (get_function_name): Likewise.
2251         * valprint.c (print_converted_chars_to_obstack): Likewise.
2252         * xtensa-tdep.c (xtensa_register_type): Likewise.
2253
2254 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
2255
2256         * remote.c (remote_target::download_tracepoint): Fix format
2257         string errors.
2258
2259 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2260
2261         * tracefile.c: Include common/byte-vector.h.
2262         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
2263         with trace_regblock_size if needed.  Update uses of buf.
2264
2265 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2266
2267         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
2268         std::vector<unsigned char>.
2269         * tracepoint.c (collection_list::collection_list): Remove
2270         m_regs_mask initializer from initializer list.  Resize
2271         m_regs_mask using the largest remote register number.
2272         (collection_list::add_remote_register): Remove size check on
2273         m_regs_mask.  Use at to access element.
2274         (collection_list::stringify): Change type of temp_buf to
2275         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
2276         stringify the register mask.  Use pack_hex_byte for the register
2277         mask.
2278
2279 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2280
2281         * tracepoint.h (class collection_list) <add_register>: Remove.
2282         <add_remote_register, add_ax_registers, add_local_register>:
2283         Declare.
2284         <add_memrange>: Add scope parameter.
2285         * tracepoint.c (encode_actions_1): Likewise.
2286         (collection_list::add_register): Rename to ...
2287         (collection_list::add_remote_register): ... this.  Update
2288         comment.
2289         (collection_list::add_ax_registers, add_local_register): New
2290         methods.
2291         (collection_list::add_memrange): Add scope parameter.  Call
2292         add_local_register instead of add_register.
2293         (finalize_tracepoint_aexpr): New function.
2294         (collection_list::collect_symbol): Update calls to add_memrange.
2295         Call add_local_register instead of add_register.  Call
2296         add_ax_registers.  Call finalize_tracepoint_aexpr.
2297         (encode_actions_1): Get remote regnos for $reg action.  Call
2298         add_remote_register, add_ax_registers, and add_local_register.
2299         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
2300         (validate_actionline): Call finalize_tracepoint_aexpr.
2301
2302 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2303
2304         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
2305         Replace array buf with gdb::char_vector buf, of size
2306         get_remote_packet_size ().  Replace references to buf and
2307         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
2308         and xsnprintf with snprintf.  Raise errors if the buffer is too
2309         small.
2310
2311 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2312
2313         * remote.c (remote_target::download_tracepoint): Fix the has_more
2314         predicate in the QTDP action list iteration.
2315
2316 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2317
2318         * remote.c (remote_target::download_tracepoint): Fix indentation
2319         in for block.
2320
2321 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2322
2323         * proc-api.c (_initialize_proc_api): Remove c, unused.
2324         * procfs.c (procfs_init_inferior): Remove signals, unused.
2325         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
2326         unused.
2327
2328 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
2329             Andrew Burgess  <andrew.burgess@embecosm.com>
2330
2331         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
2332         'W_STOPCODE (0)' as this could be ambiguous.
2333
2334 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
2335
2336         * ser-tcp.c (net_open): Fix thinko when deciding whether to
2337         disable TCP's Nagle algorithm (use "ai_protocol" instead of
2338         "ai_socktype").
2339
2340 2018-08-02  Tom Tromey  <tom@tromey.com>
2341
2342         PR symtab/16842.
2343         * dwarf2read.c (read_func_scope): Set symtab on template parameter
2344         symbols.
2345         (process_structure_scope): Likewise.
2346
2347 2018-08-02  Xavier Roirand  <roirand@adacore.com>
2348
2349         PR gdb/22629:
2350         * darwin-nat.c (darwin_kill_inferior): Fix handling of
2351         kill inferior.
2352
2353 2018-08-02  Tom Tromey  <tom@tromey.com>
2354
2355         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
2356         (darwin_suspend_inferior, darwin_resume_inferior)
2357         (darwin_decode_notify_message, darwin_resume_inferior_threads)
2358         (darwin_check_new_threads): Check result of get_darwin_inferior.
2359
2360 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
2361
2362         GDB 8.1.1 released.
2363
2364 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
2365
2366         * varobj.c (varobj_get_path_expr_parent): Report an error if
2367         parent is a dynamic varobj.
2368
2369 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
2370
2371         * gnulib/aclocal.m4: Re-generate.
2372         * gnulib/config.in: Re-generate.
2373         * gnulib/configure: Re-generate.
2374         * gnulib/import/Makefile.in: Re-generate.
2375         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2376         * gnulib/import/m4/onceonly.m4: Re-generate.
2377
2378 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
2379
2380         * target-descriptions.c (struct xml_test_tdesc): New.
2381         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
2382         (record_xml_tdesc): Update.
2383         (maintenance_check_xml_descriptions): Update.
2384         * target-descriptions.h (record_xml_tdesc): Update comment.
2385
2386 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
2387
2388         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
2389         checking array bounds are defined.
2390
2391 2018-07-30  Tom Tromey  <tom@tromey.com>
2392
2393         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
2394         irreflexivity violation.
2395
2396 2018-07-30  Tom Tromey  <tom@tromey.com>
2397
2398         * cli/cli-decode.c (lookup_cmd): Remove lint code.
2399         * value.c (unpack_long): Remove lint code.
2400         * valops.c (value_ind): Remove lint code.
2401         * valarith.c (value_x_binop, value_x_unop, value_equal)
2402         (value_pos): Remove lint code.
2403
2404 2018-07-28  Tom de Vries  <tdevries@suse.de>
2405
2406         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
2407         with undefined upper bound as <optimized out>.
2408
2409 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
2410
2411         * gcore.in: Rename variable "name" to "prefix".  Expand
2412         "usage" text.
2413
2414 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
2415
2416         * windows-nat.c (windows_nat_target::create_inferior): Update to
2417         call close() in global namespace.
2418
2419 2018-07-26  Tom Tromey  <tom@tromey.com>
2420
2421         * dwarf-index-write.c (add_address_entry): Don't add objfile
2422         offsets.
2423         * dbxread.c (find_stab_function): Rename from
2424         find_stab_function_addr.  Return a bound_minimal_symbol.
2425         (read_dbx_symtab): Use raw_text_low, raw_text_high.
2426         Don't add objfile offsets.
2427         (end_psymtab): Use raw_text_low, raw_text_high,
2428         MSYMBOL_VALUE_RAW_ADDRESS.
2429         (read_ofile_symtab): Update.
2430         (process_one_symbol): Update.
2431         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
2432         offsets.
2433         (dw2_relocate): Remove.
2434         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
2435         searching addrmap.
2436         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
2437         Update.
2438         (process_psymtab_comp_unit_reader, add_partial_symbol)
2439         (add_partial_subprogram, dwarf2_ranges_read): Update.
2440         (load_partial_dies): Update.
2441         (add_address_entry): Don't add objfile offsets.
2442         (dwarf2_build_include_psymtabs): Update.
2443         (create_addrmap_from_aranges): Don't add objfile offsets.
2444         (dw2_find_pc_sect_compunit_symtab): Update.
2445         * mdebugread.c (parse_symbol): Don't add objfile offsets.
2446         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
2447         Update.
2448         (parse_partial_symbols): Don't add objfile offsets.  Use
2449         raw_text_low, raw_text_high.  Update.
2450         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
2451         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
2452         or call 'relocate' quick function.  Clear psymbol_map.
2453         * psympriv.h (struct partial_symbol) <address>: Add section
2454         offset.
2455         <set_unrelocated_address>: Rename from set_address.
2456         <raw_text_low, raw_text_high>: New methods.
2457         <text_low, text_high>: Add objfile parameter.
2458         (add_psymbol_to_bcache): Add 'section' parameter.  Call
2459         set_unrelocated_address.
2460         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2461         (find_pc_psymbol): Update.
2462         (fixup_psymbol_section, relocate_psymtabs): Remove.
2463         (dump_psymtab, psym_functions): Update.
2464         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
2465         parameter.
2466         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
2467         (start_psymtab_common): Update.
2468         * symfile-debug.c (debug_qf_relocate): Remove.
2469         (debug_sym_quick_functions): Update.
2470         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
2471         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
2472         Update.
2473
2474 2018-07-26  Tom Tromey  <tromey@redhat.com>
2475
2476         * dbxread.c (end_psymtab): Use text_high_valid and
2477         text_low_valid.
2478         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
2479         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
2480         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
2481         Update comment.
2482         <text_low_valid, text_high_valid>: New fields.
2483         <set_text_low, set_text_high>: Update.
2484         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
2485
2486 2018-07-26  Tom Tromey  <tom@tromey.com>
2487
2488         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
2489         Update.
2490         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
2491         textlow and texthigh fields.
2492         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
2493         Update.
2494         * mdebugread.c (parse_lines, parse_partial_symbols)
2495         (psymtab_to_symtab_1): Update.
2496         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
2497         Rename fields.  Update comment.  Now private.
2498         <text_low, text_high, set_text_low, set_text_high>: New methods.
2499         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2500         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
2501         (start_psymtab_common, maintenance_info_psymtabs)
2502         (maintenance_check_psymtabs): Update.
2503         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
2504         texthigh fields.
2505         (scan_xcoff_symtab): Update.
2506
2507 2018-07-26  Tom Tromey  <tromey@redhat.com>
2508
2509         * psympriv.h (struct partial_symbol) <unrelocated_address,
2510         address, set_address>: New methods.
2511         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
2512         (fixup_psymbol_section, relocate_psymtabs): Update.
2513         (print_partial_symbols): Add 'objfile' parameter.  Update.
2514         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
2515         Update.
2516
2517 2018-07-26  Tom Tromey  <tom@tromey.com>
2518
2519         * dwarf-index-write.c (write_psymbols, debug_names::insert)
2520         (debug_names::write_psymbols): Update.
2521         * psympriv.h (struct partial_symbol): Derive from
2522         general_symbol_info.
2523         <obj_section>: New method.
2524         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
2525         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2526         (find_pc_sect_psymbol, fixup_psymbol_section)
2527         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
2528         (print_partial_symbols, recursively_search_psymtabs)
2529         (compare_psymbols, psymbol_hash, psymbol_compare)
2530         (add_psymbol_to_bcache, maintenance_check_psymtabs)
2531         (psymbol_name_matches, psym_fill_psymbol_map): Update.
2532
2533 2018-07-26  Tom Tromey  <tromey@redhat.com>
2534
2535         * dbxread.c (end_psymtab): Remove dead code.
2536
2537 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
2538
2539         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
2540         DWARF unwinders are disabled.
2541         * dwarf2-frame.c: Add dwarf2read.h include.
2542         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
2543         disabled.
2544         (dwarf2_frame_unwinders_enabled_p): Define.
2545         (show_dwarf_unwinders_enabled_p): New function.
2546         (_initialize_dwarf2_frame): Register switch to control DWARF
2547         unwinder use.
2548         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
2549         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
2550         (show_dwarf_cmdlist): Remove static keyword.
2551         * dwarf2read.h (set_dwarf_cmdlist): Declare.
2552         (show_dwarf_cmdlist): Declare.
2553         * NEWS: Document new feature.
2554
2555 2018-07-26  Tom de Vries  <tdevries@suse.de>
2556
2557         PR breakpoints/23366
2558         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
2559
2560 2018-07-26  Tom de Vries  <tdevries@suse.de>
2561
2562         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
2563         DW_AT_count can't be translated to a dynamic prop.
2564
2565 2018-07-25  Tom de Vries  <tdevries@suse.de>
2566
2567         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
2568         try/catch.
2569
2570 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
2571
2572         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
2573
2574 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
2575
2576         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
2577
2578 2018-07-24  Keith Seitz  <keiths@redhat.comt
2579
2580         PR symtab/23010
2581         * dwarf2read.c (dw2_add_symbol_to_list): New function.
2582         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
2583         instead of add_symbol_to_list.
2584         (read_file_scope): Call prepare_one_comp_unit before reading
2585         any other DIEs.
2586
2587 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
2588
2589         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
2590
2591 2018-07-24  Tom Tromey  <tom@tromey.com>
2592
2593         * utils.c (malloc, realloc, free): Don't declare.
2594         * configure, config.in: Rebuild.
2595         * configure.ac: Don't check for declarations of free, malloc, or
2596         realloc.
2597
2598 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
2599
2600         * aarch64-linux-nat.c
2601         (aarch64_linux_nat_target::stopped_data_address): Remove unused
2602         variable.
2603         * arm-linux-nat.c (fetch_regs): Likewise.
2604         (store_regs): Likewise.
2605         (fetch_vfp_regs): Likewise.
2606         (store_vfp_regs): Likewise.
2607         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
2608         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
2609         (arm_linux_nat_target::insert_watchpoint): Likewise.
2610         (arm_linux_nat_target::remove_watchpoint): Likewise.
2611         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
2612         Likewise.
2613         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
2614         Likewise.
2615         * ppc-linux-nat.c (fetch_register): Likewise.
2616         (fetch_all_gp_regs): Likewise.
2617         (fetch_ppc_registers): Likewise.
2618         (store_all_gp_regs): Likewise.
2619         (store_ppc_registers): Likewise.
2620         (hwdebug_insert_point): Likewise.
2621         (can_use_watchpoint_cond_accel): Likewise.
2622         * remote-sim.c (gdb_os_write_stdout): Likewise.
2623
2624 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
2625             Tom Tromey  <tom@tromey.com>
2626
2627         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
2628         test for it.
2629         * configure: Rebuild.
2630
2631 2018-07-22  Tom Tromey  <tom@tromey.com>
2632
2633         * regformats/regdat.sh: Define xmltarget_${name} inside
2634         #ifndef IN_PROCESS_AGENT.
2635
2636 2018-07-22  Tom Tromey  <tom@tromey.com>
2637
2638         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
2639
2640 2018-07-22  Tom Tromey  <tom@tromey.com>
2641
2642         * symfile.c (reread_symbols): Notify iter, not objfile.
2643
2644 2018-07-22  Tom Tromey  <tom@tromey.com>
2645
2646         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
2647         Use arch_ops.
2648         (ravenscar_thread_target::prepare_to_store): Likewise.
2649
2650 2018-07-22  Tom Tromey  <tom@tromey.com>
2651
2652         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
2653         unused variable.  Call value_fetch_lazy when needed.
2654         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
2655         Remove unused variable.  Call value_fetch_lazy when needed.
2656
2657 2018-07-22  Tom Tromey  <tom@tromey.com>
2658
2659         * m32c-tdep.c (mark_dma): Return void.
2660         (make_regs): Remove unused declarations.
2661
2662 2018-07-22  Tom Tromey  <tom@tromey.com>
2663
2664         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
2665         cmdscm_get_valid_command_smob_arg_unsafe for effect.
2666         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
2667         bkscm_get_valid_block_smob_arg_unsafe for effect.
2668
2669 2018-07-22  Tom Tromey  <tom@tromey.com>
2670
2671         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
2672         value_type.
2673
2674 2018-07-22  Tom Tromey  <tom@tromey.com>
2675
2676         * windows-nat.c (saved_context): Conditionally define.
2677         * remote.c (remote_target::remote_btrace_maybe_reopen):
2678         Conditionally declare "warned".
2679         * inflow.c (sigquit_ours): Conditionally define.
2680         (new_tty): Move "tty" declaration inside #if.
2681         * guile/guile.c (guile_datadir): Conditionally define.
2682         * charset.c (set_be_le_names): Move some declarations inside #if.
2683         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
2684         #if.
2685         (parse_xml_btrace_conf): Likewise.
2686
2687 2018-07-22  Tom Tromey  <tom@tromey.com>
2688
2689         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
2690
2691 2018-07-22  Tom Tromey  <tom@tromey.com>
2692
2693         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
2694         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
2695         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
2696         * buildsym-legacy.c (get_macro_table): Remove unused variable.
2697         * stack.c (frame_apply_level_command): Remove unused variable.
2698         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
2699         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
2700         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
2701         unused variable.
2702         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
2703         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
2704         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
2705         variable.
2706         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
2707         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
2708         variable.
2709         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
2710         Remove unused variable.
2711         * cli/cli-script.c (recurse_read_control_structure): Remove unused
2712         variable.
2713         * common/tdesc.c (print_xml_feature::visit): Remove unused
2714         variable.
2715         * compile/compile-object-load.c (store_regs): Remove unused
2716         variables.
2717         * complaints.c (clear_complaints): Remove unused variable.
2718         * corelow.c (core_target_open): Remove unused variable.
2719         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
2720         variable.
2721         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
2722         variable.
2723         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
2724         variable.
2725         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
2726         variable.
2727         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
2728         variable.
2729         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
2730         variable.
2731         * ia64-tdep.c (examine_prologue): Remove unused variable.
2732         * infcall.c (run_inferior_call): Remove unused variable.
2733         * inferior.c (exit_inferior): Remove unused variable.
2734         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
2735         * linespec.c (decode_line_2): Remove unused variable.
2736         * linux-nat.c (super_close): Remove.
2737         * linux-tdep.c (linux_info_proc): Remove unused variable.
2738         * mi/mi-main.c (mi_execute_command): Remove unused variable.
2739         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
2740         Remove unused variable.
2741         * parse.c (find_minsym_type_and_address): Remove unused variable.
2742         * printcmd.c (info_symbol_command, printf_floating): Remove unused
2743         variable.
2744         * python/py-breakpoint.c (bppy_set_commands): Remove unused
2745         variable.
2746         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
2747         variables.
2748         * record-btrace.c (record_btrace_target::store_registers): Remove
2749         unused variable.
2750         (cmd_show_record_btrace_cpu): Remove unused variable.
2751         * riscv-tdep.c (riscv_register_reggroup_p)
2752         (riscv_push_dummy_call, riscv_return_value): Remove unused
2753         variable.
2754         * rust-exp.y (literal): Remove unused variable.
2755         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
2756         unused variable.
2757         <STRUCTOP_ANONYMOUS>: Likewise.
2758         * s390-linux-tdep.c (s390_linux_init_abi_31)
2759         (s390_linux_init_abi_64): Remove unused variable.
2760         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
2761         (file_select_thread, net_windows_open, _initialize_ser_windows):
2762         Remove unused variables.
2763         * symtab.c (find_pc_sect_line): Remove unused variable.
2764         * target-memory.c (compute_garbled_blocks): Remove unused
2765         variable.
2766         (target_write_memory_blocks): Remove unused variable.
2767         * target.c (target_stack::unpush): Remove unused variables.
2768         * tracepoint.c (start_tracing, all_tracepoint_actions)
2769         (merge_uploaded_trace_state_variables)
2770         (print_one_static_tracepoint_marker): Remove unused variable.
2771         * unittests/basic_string_view/element_access/char/1.cc (test01):
2772         Remove unused variable.
2773         * windows-nat.c (windows_continue, windows_add_all_dlls)
2774         (do_initial_windows_stuff, windows_nat_target::create_inferior):
2775         Remove unused variables.
2776
2777 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
2778
2779         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
2780         attr_profile in HAVE_ELF.
2781         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
2782         HAVE_ELF.
2783
2784 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
2785
2786         * frame.c (frame_register_unwind): Change parameter name.
2787         (frame_unwind_register): Likewise.
2788         (frame_unwind_register_value): Likewise.
2789         (frame_unwind_register_signed): Likewise.
2790         (frame_unwind_register_unsigned): Likewise.
2791         * frame.h (frame_register_unwind): Likewise.
2792         (frame_unwind_register): Likewise.
2793         (frame_unwind_register_value): Likewise.
2794         (frame_unwind_register_signed): Likewise.
2795         (frame_unwind_register_unsigned): Likewise.
2796         (frame_unwind_arch): Likewise.
2797
2798 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
2799
2800         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
2801         ISA maintenance.
2802
2803 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
2804
2805         * mips-linux-nat.c (mips_linux_nat_target::read_description):
2806         Call `get_ptrace_pid' rather than extracting the ptrace PID by
2807         hand.
2808
2809 2018-07-20  Keith Seitz  <keiths@redhat.com>
2810
2811         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
2812         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
2813         m_compunit_symtab, m_language>: Add "m_" prefix.
2814         Update all uses.
2815         * buildsym.c: Update all uses.
2816
2817 2018-07-20  Tom Tromey  <tom@tromey.com>
2818
2819         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
2820         * buildsym.h (record_line_ftype): Remove typedef.
2821
2822 2018-07-20  Tom Tromey  <tom@tromey.com>
2823
2824         * buildsym-legacy.h (augment_type_symtab): Don't declare.
2825         (end_expandable_symtab): Likewise.
2826         (end_symtab_get_static_block): Likewise.
2827         (end_symtab_from_static_block): Likewise.
2828         * buildsym-legacy.c (augment_type_symtab): Remove.
2829         (end_expandable_symtab): Remove.
2830         (end_symtab_get_static_block): Remove.
2831         (end_symtab_from_static_block): Remove.
2832
2833 2018-07-20  Tom Tromey  <tom@tromey.com>
2834
2835         * dwarf2read.c: Include buildsym.h.
2836         (struct dwarf2_cu) <builder>: New method.
2837         (fixup_go_packaging): Update.
2838         (process_full_comp_unit, process_full_type_unit): Update.  Don't
2839         use scoped_free_pendings.
2840         (using_directives): Add "cu" parameter, remove "language".
2841         (read_import_statement, setup_type_unit_groups, )
2842         (read_func_scope, read_lexical_block_scope)
2843         (dwarf2_record_block_ranges, read_namespace): Update.
2844         (lnp_state_machine::lnp_state_machine): Add cu parameter.
2845         (lnp_state_machine::handle_end_sequence): Update.
2846         (class lnp_state_machine) <m_cu>: New member.
2847         <m_record_line_callback>: Remove.
2848         <m_currently_recording_lines>: New member.
2849         (lnp_state_machine::handle_set_file): Update.
2850         (noop_record_line): Remove.
2851         (dwarf_record_line_p): Add cu parameter.
2852         (dwarf_record_line_1, dwarf_finish_line): Likewise.
2853         (lnp_state_machine::record_line)
2854         (lnp_state_machine::lnp_state_machine)
2855         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
2856         (dwarf_decode_lines): Update.
2857         (dwarf2_start_subfile): Add cu parameter.
2858         (dwarf2_start_symtab, new_symbol): Update.
2859         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
2860         Remove dwarf2_per_objfile parameter.
2861         (dwarf_decode_macros): Update.
2862
2863 2018-07-20  Tom Tromey  <tom@tromey.com>
2864
2865         * stabsread.c (define_symbol): Update.
2866         * buildsym-legacy.h (get_buildsym_compunit): Declare.
2867         * dwarf2read.c (new_symbol): Update.
2868         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
2869         * cp-namespace.c: Include buildsym.h.
2870         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
2871         * buildsym-legacy.c (get_buildsym_compunit): New function.
2872
2873 2018-07-20  Tom Tromey  <tom@tromey.com>
2874
2875         * xcoffread.c: Include buildsym-legacy.h.
2876         * windows-nat.c: Include buildsym-legacy.h.
2877         * stabsread.c: Include buildsym-legacy.h.
2878         * mdebugread.c: Include buildsym-legacy.h.
2879         * buildsym-legacy.h: New file.
2880         * buildsym-legacy.c: New file, from buildsym.c.
2881         * go32-nat.c: Include buildsym-legacy.h.
2882         * dwarf2read.c: Include buildsym-legacy.h.
2883         * dbxread.c: Include buildsym-legacy.h.
2884         * cp-namespace.c: Include buildsym-legacy.h.
2885         * coffread.c: Include buildsym-legacy.h.
2886         * buildsym.h: Move some contents to buildsym-legacy.h.
2887         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
2888         buildsym-legacy.c.
2889         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
2890
2891 2018-07-20  Tom Tromey  <tom@tromey.com>
2892
2893         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
2894         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
2895         (buildsym_compunit::buildsym_compunit)
2896         (buildsym_compunit::~buildsym_compunit)
2897         (buildsym_compunit::get_macro_table): Define.
2898
2899 2018-07-20  Tom Tromey  <tom@tromey.com>
2900
2901         * buildsym.c (reset_symtab_globals): Remove.
2902         (buildsym_compunit::end_symtab_from_static_block): Update.
2903         (buildsym_compunit::augment_type_symtab): Update.
2904         (end_symtab_from_static_block): Call free_buildsym_compunit.
2905         (augment_type_symtab, end_symtab, end_expandable_symtab):
2906         Likewise.
2907
2908 2018-07-20  Tom Tromey  <tom@tromey.com>
2909
2910         * arch-utils.c: Do not include buildsym.h.
2911         * mipsread.c: Do not include buildsym.h.
2912         * machoread.c: Do not include buildsym.h.
2913         * elfread.c: Do not include buildsym.h.
2914
2915 2018-07-20  Tom Tromey  <tom@tromey.com>
2916
2917         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
2918         initialization.
2919         (buildsym_compunit): Add new constructor.
2920         (struct buildsym_compunit) <get_last_source_file, finish_block,
2921         record_block_range, start_subfile, patch_subfile_names,
2922         push_subfile, pop_subfile, record_line, get_compunit_symtab,
2923         set_last_source_start_addr, get_last_source_start_addr,
2924         get_local_using_directives, set_local_using_directives,
2925         get_global_using_directives, outermost_context_p,
2926         get_current_context_stack, get_context_stack_depth,
2927         get_current_subfile, get_local_symbols, get_file_symbols,
2928         get_global_symbols, record_debugformat, record_producer,
2929         push_context, pop_context, end_symtab_get_static_block,
2930         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
2931         New public methods.
2932         <record_pending_block, finish_block_internal, make_blockvector,
2933         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
2934         private methods.
2935         Update all users.
2936
2937 2018-05-22  Tom Tromey  <tom@tromey.com>
2938
2939         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
2940         parameter.
2941         (finish_block_internal): Update.
2942
2943 2018-07-20  Tom Tromey  <tom@tromey.com>
2944
2945         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
2946         parameter.
2947         (finish_block_internal): Update.
2948
2949 2018-07-20  Tom Tromey  <tom@tromey.com>
2950
2951         * buildsym.h (EXTERN): Don't define or undef.
2952         * buildsym.c (EXTERN): Don't define.
2953
2954 2018-07-20  Tom Tromey  <tom@tromey.com>
2955
2956         * buildsym.c: Remove TODO comment.
2957
2958 2018-07-20  Tom Tromey  <tom@tromey.com>
2959
2960         * coffread.c (coff_symtab_read): Update.
2961         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
2962         (xcoff_new_init): Update.
2963         * mipsread.c (mipscoff_new_init): Update.
2964         * mdebugread.c (mdebug_build_psymtabs): Update.
2965         * elfread.c (elf_new_init): Update.
2966         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
2967         Update.
2968         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
2969         (coffstab_build_psymtabs, elfstab_build_psymtabs)
2970         (stabsect_build_psymtabs): Update.
2971         * buildsym.h (buildsym_init): Don't declare.
2972         * buildsym.c: Update comment.
2973         (prepare_for_building): Remove.
2974         (start_symtab, restart_symtab): Update.
2975         (reset_symtab_globals): Update comment.
2976         (buildsym_init): Remove.
2977
2978 2018-07-20  Tom Tromey  <tom@tromey.com>
2979
2980         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
2981         * stabsread.c (patch_block_stabs, define_symbol, read_type)
2982         (read_enum_type, common_block_start, common_block_end)
2983         (cleanup_undefined_types_1, finish_global_stabs): Update.
2984         * mdebugread.c (psymtab_to_symtab_1): Update.
2985         * dwarf2read.c (fixup_go_packaging, read_func_scope)
2986         (read_lexical_block_scope, new_symbol): Update.
2987         * dbxread.c (process_one_symbol): Update.
2988         * coffread.c (coff_symtab_read, process_coff_symbol)
2989         (coff_read_enum_type): Update.
2990         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
2991         declare.
2992         (get_local_symbols, get_file_symbols, get_global_symbols): New
2993         functions.
2994         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
2995         m_global_symbols.
2996         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
2997         (~scoped_free_pendings): Update.
2998         (finish_block, prepare_for_building, reset_symtab_globals)
2999         (end_symtab_get_static_block, end_symtab_with_blockvector)
3000         (augment_type_symtab, push_context): Update.
3001         (get_local_symbols, get_file_symbols, get_global_symbols): New
3002         functions.
3003         (buildsym_init): Update.
3004
3005 2018-07-20  Tom Tromey  <tom@tromey.com>
3006
3007         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
3008         (process_full_type_unit): Likewise.
3009         (dwarf2_start_symtab): Set list_in_scope.
3010
3011 2018-07-20  Tom Tromey  <tom@tromey.com>
3012
3013         * dwarf2read.c (process_psymtab_comp_unit_reader)
3014         (build_type_psymtabs_reader): Do not set list_in_scope.
3015
3016 2018-07-20  Tom Tromey  <tom@tromey.com>
3017
3018         * buildsym.c (free_pendings): Remove.
3019         (add_symbol_to_list, scoped_free_pendings)
3020         (finish_block_internal, buildsym_init): Update.
3021
3022 2018-07-20  Tom Tromey  <tom@tromey.com>
3023
3024         * xcoffread.c (read_xcoff_symtab): Update.
3025         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
3026         Update.
3027         * dbxread.c (process_one_symbol): Update.
3028         * coffread.c (coff_symtab_read): Update.
3029         * buildsym.h (finish_block): Update.
3030         * buildsym.c (finish_block): Remove "listhead" argument.
3031         (end_symtab_get_static_block): Update.
3032
3033 2018-07-20  Tom Tromey  <tom@tromey.com>
3034
3035         * buildsym.h (class scoped_free_pendings): Remove constructor.
3036         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
3037         method.
3038         <m_pending_block_obstack, m_pending_blocks>: New members.
3039         (pending_block_obstack, pending_blocks): Remove.
3040         (scoped_free_pendings::scoped_free_pendings): Default.
3041         (~scoped_free_pendings): Update.
3042         (free_pending_blocks): Remove.
3043         (finish_block_internal, record_pending_block, make_blockvector)
3044         (end_symtab_get_static_block, augment_type_symtab, push_context)
3045         (buildsym_init): Update.
3046
3047 2018-07-20  Tom Tromey  <tom@tromey.com>
3048
3049         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
3050         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
3051         members.
3052         (pending_addrmap, pending_addrmap_obstack)
3053         (pending_addrmap_interesting): Remove.
3054         (scoped_free_pendings, record_block_range, make_blockvector)
3055         (prepare_for_building, reset_symtab_globals, buildsym_init):
3056         Update.
3057
3058 2018-07-20  Tom Tromey  <tom@tromey.com>
3059
3060         * xcoffread.c (process_linenos): Update.
3061         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
3062         * mdebugread.c (psymtab_to_symtab_1): Update.
3063         * dwarf2read.c (setup_type_unit_groups)
3064         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
3065         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
3066         * dbxread.c (process_one_symbol): Update.
3067         * coffread.c (coff_symtab_read, enter_linenos)
3068         (process_coff_symbol): Update.
3069         * buildsym.h (current_subfile): Don't declare.
3070         (get_current_subfile): Declare.
3071         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
3072         member.
3073         (start_subfile, free_buildsym_compunit, push_subfile)
3074         (prepare_for_building, start_symtab): Update.
3075         (get_current_subfile): New function.
3076
3077 2018-07-20  Tom Tromey  <tom@tromey.com>
3078
3079         * coffread.c (coff_symtab_read): Update.
3080         * xcoffread.c (read_xcoff_symtab): Update.
3081         * dwarf2read.c (new_symbol): Update.
3082         (read_func_scope, read_lexical_block_scope): Update.
3083         * dbxread.c (process_one_symbol): Update.
3084         * buildsym.h (context_stack, context_stack_depth): Don't declare.
3085         (outermost_context_p): Remove macro.
3086         (outermost_context_p, get_current_context_stack)
3087         (get_context_stack_depth): Declare.
3088         (pop_context): Return struct context_stack.
3089         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
3090         member.
3091         (context_stack_size): Remove.
3092         (INITIAL_CONTEXT_STACK_SIZE): Remove.
3093         (prepare_for_building, end_symtab_get_static_block)
3094         (augment_type_symtab, push_context): Update.
3095         (pop_context): Return struct context_stack.
3096         (outermost_context_p, get_current_context_stack)
3097         (get_context_stack_depth): New functions.
3098         (buildsym_init): Update.
3099
3100 2018-07-20  Tom Tromey  <tom@tromey.com>
3101
3102         * rust-exp.y: Now a pure parser.  Update all rules.
3103         (%union): Move earlier.
3104         (current_parser, work_obstack): Remove globals.
3105         (rust_parser, ~rust_parser): Update.
3106         (class rust_parser) <copy_name, concat3, crate_name, super_name,
3107         lex_character, lex_number, lex_string, lex_identifier,
3108         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
3109         convert_name, convert_params_to_expression,
3110         convert_ast_to_expression, ast_basic_type, ast_operation,
3111         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
3112         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
3113         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
3114         ast_array_type, ast_slice_type, ast_reference_type,
3115         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
3116         (rust_parse): Update.
3117         (rustyyerror, rustyylex): Add parser parameter.
3118         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
3119         (rust_lex_stringish_test, rust_lex_test_sequence)
3120         (rust_lex_test_trailing_dot, rust_lex_test_completion)
3121         (rust_lex_test_push_back, rust_lex_tests): Update.
3122
3123 2018-07-19  Pedro Alves  <palves@redhat.com>
3124
3125         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
3126         gdb::unique_xmalloc_ptr.
3127         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
3128         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
3129         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
3130         copy-initialization.
3131         * guile/scm-pretty-print.c (ppscm_print_children): Use
3132         gdb::unique_xmalloc_ptr instead of cleanups.
3133         (gdbscm_apply_val_pretty_printer): Remove cleanups.
3134         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
3135         gdb::unique_xmalloc_ptr.
3136         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
3137         Adjust to use gdb::unique_xmalloc_ptr.
3138         * guile/scm-utils.c (extract_arg): Adjust.
3139         * guile/scm-value.c (gdbscm_value_field): Adjust to use
3140         gdb::unique_xmalloc_ptr instead of a cleanup.
3141
3142 2018-07-19  Tom Tromey  <tom@tromey.com>
3143
3144         * utils.c (do_value_free_to_mark)
3145         (make_cleanup_value_free_to_mark): Remove.
3146         * utils.h (make_cleanup_value_free_to_mark): Remove.
3147
3148 2018-07-19  Pedro Alves  <palves@redhat.com>
3149
3150         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
3151         forwarding reference.
3152
3153 2018-07-18  Pedro Alves  <palves@redhat.com>
3154
3155         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
3156         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
3157         cleanup.
3158
3159 2018-07-18  Pedro Alves  <palves@redhat.com>
3160
3161         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
3162         exceptions.
3163         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
3164         (gdbscm_wrap): New.
3165         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
3166         directly instead of a cleanup.
3167         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
3168         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
3169         (vlscm_binop_gdbthrow): New, factored out from ...
3170         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
3171         (vlscm_rich_compare): Use gdbscm_wrap.
3172         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
3173         instead of a cleanup.
3174         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
3175         cleanup.
3176         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
3177         Use xfree directly instead of a cleanup.
3178         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
3179         Adjust to use gdbscm_wrap and scoped_value_mark.
3180         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
3181         (gdbscm_value_address, gdbscm_value_dereference)
3182         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
3183         scoped_value_mark.
3184         (gdbscm_value_dynamic_type): Use scoped_value_mark.
3185         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
3186         scoped_value_mark.
3187         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
3188         gdbscm_wrap and scoped_value_mark.
3189         (gdbscm_value_to_string): Use xfree directly instead of a
3190         cleanup.  Move 'buffer' unique_ptr to TRY scope.
3191         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
3192         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
3193         scoped_value_mark.
3194         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
3195         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
3196         scoped_value_mark.
3197         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
3198         gdbscm_wrap.
3199
3200 2018-07-18  Tom de Vries  <tdevries@suse.de>
3201
3202         * findvar.c (default_read_var_value): Also resolve dynamic type for
3203         LOC_OPTIMIZED_OUT vars.
3204
3205 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
3206
3207         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
3208         decoding.
3209
3210 2018-07-17  Tom Tromey  <tom@tromey.com>
3211
3212         * guile/scm-param.c (pascm_set_func, pascm_show_func)
3213         (compute_enum_list, pascm_set_param_value_x)
3214         (gdbscm_parameter_value): Update.
3215         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
3216         (gdbscm_scm_to_host_string): Update.
3217         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
3218         Update.
3219         * guile/scm-cmd.c (cmdscm_add_completion): Update.
3220         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
3221         * guile/scm-string.c (gdbscm_scm_to_string): Return
3222         unique_xmalloc_ptr.
3223         (gdbscm_scm_to_host_string): Likewise.
3224
3225 2018-07-17  Tom Tromey  <tom@tromey.com>
3226
3227         * guile/guile.c (gdbscm_eval_from_control_command): Update.
3228         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
3229         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
3230         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
3231         unique_xmalloc_ptr.
3232
3233 2018-07-17  Tom Tromey  <tom@tromey.com>
3234
3235         * guile/scm-param.c (pascm_signal_setshow_error): Update.
3236         * guile/guile-internal.h (gdbscm_exception_message_to_string):
3237         Update.
3238         * guile/scm-cmd.c (cmdscm_function): Update.
3239         * guile/scm-pretty-print.c
3240         (ppscm_print_exception_unless_memory_error): Update.
3241         * guile/scm-exception.c (gdbscm_exception_message_to_string):
3242         Return unique_xmalloc_ptr.
3243
3244 2018-07-17  Tom Tromey  <tom@tromey.com>
3245
3246         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
3247         Use string_printf.
3248
3249 2018-07-17  Jim Wilson  <jimw@sifive.com>
3250
3251         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
3252         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
3253         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
3254         unecessary braces after EF_RISCV_RVC test.  Delete call to
3255         set_gdbarch_decr_pc_after_break.
3256
3257         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
3258         RISCV_LAST_FP_REGNUM + 1.
3259         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
3260
3261 2018-07-17  Tom Tromey  <tom@tromey.com>
3262
3263         * configure.ac: Remove --disable-gdbcli.
3264         * configure: Rebuild.
3265         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
3266         (SUBDIR_CLI_CFLAGS): Remove.
3267         (SFILES): Use SUBDIR_CLI_SRCS.
3268         (COMMON_OBS): Use SUBDIR_CLI_OBS.
3269
3270 2018-07-17  Tom Tromey  <tom@tromey.com>
3271
3272         PR gdb/18624:
3273         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
3274
3275 2018-07-16  Jim Wilson  <jimw@sifive.com>
3276
3277         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
3278
3279 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
3280
3281         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
3282         variable.
3283         (libunwind_frame_sniffer): Likewise.
3284         (libunwind_frame_prev_register): Likewise.
3285         (libunwind_sigtramp_frame_sniffer): Likewise.
3286         * ia64-tdep.c (ia64_access_reg): Likewise.
3287         (ia64_access_rse_reg): Likewise.
3288         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
3289         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
3290
3291 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
3292
3293         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
3294
3295 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
3296
3297         * remote-sim.c (gdbsim_target::close,
3298         gdbsim_target::mourn_inferior): Remove unused variables.
3299
3300 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
3301
3302         * ia64-tdep.c (ktab_buf): New global.
3303         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
3304         (get_kernel_table): Adjust.
3305
3306 2018-07-16  Tom Tromey  <tom@tromey.com>
3307
3308         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
3309         * dwarf2read.c (using_directives, new_symbol): Use
3310         outermost_context_p.
3311         * dbxread.c (process_one_symbol): Use outermost_context_p.
3312         * coffread.c (coff_symtab_read): Use outermost_context_p.
3313
3314 2018-07-16  Tom Tromey  <tom@tromey.com>
3315
3316         * dwarf2read.c (using_directives, read_func_scope)
3317         (read_lexical_block_scope): Update.
3318         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
3319         * buildsym.h (local_using_directives, global_using_directives):
3320         Don't declare.
3321         (get_local_using_directives, set_local_using_directives)
3322         (get_global_using_directives): Declare.
3323         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
3324         m_global_using_directives>: New members.
3325         (finish_block_internal, prepare_for_building)
3326         (reset_symtab_globals, end_symtab_get_static_block)
3327         (push_context): Update.
3328         (get_local_using_directives, set_local_using_directives)
3329         (get_global_using_directives): New functions.
3330         (buildsym_init): Update.
3331
3332 2018-07-16  Tom Tromey  <tom@tromey.com>
3333
3334         * xcoffread.c (xcoff_initial_scan): Don't call
3335         free_pending_blocks.
3336         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
3337         * buildsym.h (class scoped_free_pendings): Add constructor.
3338         (free_pending_blocks): Don't declare.
3339         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
3340         (free_pending_blocks): Now static.
3341
3342 2018-07-16  Tom Tromey  <tom@tromey.com>
3343
3344         * buildsym.h (push_subfile, pop_subfile): Update declarations.
3345         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
3346         member.
3347         (struct subfile_stack): Remove.
3348         (subfile_stack): Remove.
3349         (push_subfile, pop_subfile, buildsym_init): Update.
3350
3351 2018-07-16  Tom Tromey  <tom@tromey.com>
3352
3353         * buildsym.c (push_subfile): Use gdb_assert.
3354         (pop_subfile): Use gdb_assert.
3355
3356 2018-07-16  Tom Tromey  <tom@tromey.com>
3357
3358         * buildsym.h (merge_symbol_lists): Remove.
3359         * buildsym.c (merge_symbol_lists): Remove.
3360
3361 2018-07-16  Tom Tromey  <tom@tromey.com>
3362
3363         * stabsread.c (scan_file_globals): Update comment.
3364         * stabsread.h (scan_file_globals): Move from buildsym.h.
3365         * buildsym.h (scan_file_globals): Move to stabsread.h.
3366
3367 2018-07-16  Tom Tromey  <tom@tromey.com>
3368
3369         * xcoffread.c (xcoff_new_init): Update.
3370         * mipsread.c (mipscoff_new_init): Update.
3371         * mdebugread.c (mdebug_build_psymtabs): Update.
3372         * elfread.c (elf_new_init): Update.
3373         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
3374         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
3375         * buildsym.h (buildsym_new_init): Don't declare.
3376         * buildsym.c (buildsym_new_init): Remove.
3377
3378 2018-07-16  Tom Tromey  <tom@tromey.com>
3379
3380         * stabsread.h (within_function): Move from buildsym.h.
3381         * stabsread.c (start_stabs): Clear within_function.
3382         * coffread.c (coff_start_symtab): Clear within_function.
3383         * buildsym.h (within_function): Move to stabsread.h.
3384         * buildsym.c (prepare_for_building): Update.
3385
3386 2018-07-16  Tom Tromey  <tom@tromey.com>
3387
3388         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
3389         * dwarf2read.c (dwarf2_start_symtab): Don't set
3390         processing_gcc_compilation.
3391         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
3392
3393 2018-07-16  Tom Tromey  <tom@tromey.com>
3394
3395         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
3396         (next_symbol_text_func): Move from buildsym.h.
3397         * stabsread.c (hashname): Move from buildsym.c.
3398         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
3399         (next_symbol_text_func, hashname): Move to stabsread.h.
3400         * buildsym.c: Don't include bcache.h
3401         (hashname): Move to stasbread.c.
3402
3403 2018-07-16  Tom Tromey  <tom@tromey.com>
3404
3405         * buildsym.h (context_stack_size): Don't declare.
3406         * buildsym.c (context_stack_size): New global.
3407
3408 2018-07-16  Tom Tromey  <tom@tromey.com>
3409
3410         * dbxread.c (processing_acc_compilation): New global.
3411         * buildsym.h (processing_acc_compilation): Don't declare.
3412
3413 2018-07-16  Tom Tromey  <tom@tromey.com>
3414
3415         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
3416         * dbxread.c (read_ofile_symtab): Update.
3417         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
3418         * buildsym.h (last_source_start_addr): Remove.
3419         (set_last_source_start_addr, get_last_source_start_addr):
3420         Declare.
3421         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
3422         parameter.
3423         (struct buildsym_compunit) <m_last_source_start_addr>: New
3424         member.
3425         (prepare_for_building): Remove start_addr parameter.
3426         (start_symtab, restart_symtab, end_symtab_get_static_block)
3427         (end_symtab_with_blockvector): Update.
3428         (set_last_source_start_addr, get_last_source_start_addr): New
3429         functions.
3430
3431 2018-07-16  Tom Tromey  <tom@tromey.com>
3432
3433         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
3434         member.
3435         (have_line_numbers): Remove.
3436         (record_line, prepare_for_building, end_symtab_get_static_block)
3437         (augment_type_symtab): Update.
3438
3439 2018-07-16  Tom Tromey  <tom@tromey.com>
3440
3441         * buildsym.c (~buildsym_compunit): Free the macro table.
3442         (struct buildsym_compunit) <get_macro_table, release_macros>: New
3443         methods.
3444         <m_pending_macros>: New member.
3445         (pending_macros): Remove.
3446         (~scoped_free_pendings, get_macro_table, prepare_for_building)
3447         (reset_symtab_globals, end_symtab_get_static_block)
3448         (end_symtab_with_blockvector, augment_type_symtab)
3449         (buildsym_init): Update.
3450
3451 2018-07-16  Tom Tromey  <tom@tromey.com>
3452
3453         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
3454         parameter.
3455         (buildsym_compunit::set_last_source_file): New method.
3456         <m_last_source_file>: New member.
3457         (prepare_for_building): Remove "name" parameter.
3458         (start_symtab, restart_symtab, reset_symtab_globals): Update.
3459         (last_source_file): Remove.
3460         (set_last_source_file, get_last_source_file): Update.
3461
3462 2018-07-16  Tom Tromey  <tom@tromey.com>
3463
3464         * buildsym.c (prepare_for_building): Add assert.
3465
3466 2018-07-16  Tom Tromey  <tom@tromey.com>
3467
3468         * buildsym.c (~buildsym_compunit): Update.
3469         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
3470         (start_subfile, patch_subfile_names)
3471         (end_symtab_with_blockvector): Update.
3472
3473 2018-07-16  Tom Tromey  <tom@tromey.com>
3474
3475         * buildsym.c (struct buildsym_compunit): Add constructor,
3476         destructor, initializers.
3477         (start_buildsym_compunit): Remove.
3478         (free_buildsym_compunit): Use "delete".
3479         (start_symtab, restart_symtab): Use "new".
3480
3481 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
3482
3483         * symfile.c (set_objfile_default_section_offset): Remove struct
3484         keyword.
3485
3486 2018-07-14  Stafford Horne  <shorne@gmail.com>
3487
3488         * (Responsible Maintainers): Add myself as or1k maintainer.
3489
3490 2018-07-13  Tom Tromey  <tom@tromey.com>
3491
3492         * symfile.c (set_objfile_default_section_offset): Use extra braces
3493         around initializer.
3494
3495 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3496
3497         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
3498         non-branching basr.
3499
3500 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3501
3502         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3503         unittests/cli-utils-selftests.c
3504         * unittests/cli-utils-selftests.c: New file.
3505
3506 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3507
3508         * NEWS: Mention new commands. Mention change to 'thread apply'.
3509
3510 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3511
3512         * thread.c (thr_try_catch_cmd): New function.
3513         (thread_apply_all_command): Handle qcs flags.
3514         (thread_apply_command): Handle qcs flags.
3515         (taas_command): New function.
3516         (tfaas_command): New function.
3517         (_initialize_thread): Update to setup the new commands 'taas
3518         and 'tfaas'. Change doc string for 'thread apply'.
3519
3520 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3521
3522         * stack.c: (trailing_outermost_frame): New function, mostly
3523         extracted from backtrace_command_1.
3524         (leading_innermost_frame): New function.
3525         (backtrace_command_1): Update to call trailing_outermost_frame.
3526         (frame_apply_command_count): New function.
3527         (frame_apply_level_command): New function.
3528         (frame_apply_all_command): New function.
3529         (frame_apply_command): New function.
3530         (faas_command): New function.
3531         (frame_cmd_list): New variable.
3532         (_initialize_stack): Update to setup the new commands 'frame apply'
3533         and 'faas'.
3534
3535 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3536
3537         * cli-utils.c (number_or_range_parser::get_number): Only handle
3538         numbers or convenience var as numbers.
3539         (parse_flags): New function.
3540         (parse_flags_qcs): New function.
3541         (number_or_range_parser::finished): Ensure parsing end is detected
3542         before end of string.
3543         * cli-utils.h (parse_flags): New function.
3544         (parse_flags_qcs): New function.
3545         (number_or_range_parser): Remove m_finished bool.
3546         (number_or_range_parser::skip_range): Set m_in_range to false.
3547
3548 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
3549
3550         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
3551         on Windows.
3552
3553 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
3554             Jan Kratochvil  <jan.kratochvil@redhat.com>
3555             Paul Fertser  <fercerpav@gmail.com>
3556             Tsutomu Seki  <sekiriki@gmail.com>
3557             Pedro Alves  <palves@redhat.com>
3558
3559         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3560         'unittests/parse-connection-spec-selftests.c'.
3561         (COMMON_SFILES): Add 'common/netstuff.c'.
3562         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
3563         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
3564         * common/netstuff.c: New file.
3565         * common/netstuff.h: New file.
3566         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
3567         (wait_for_connect): Update comment.  New parameter
3568         'gdb::optional<int> sock' instead of 'struct serial *scb'.
3569         Use 'sock' directly instead of 'scb->fd'.
3570         (try_connect): New function, with code from 'net_open'.
3571         (net_open): Rewrite main loop to deal with multiple
3572         sockets/addresses.  Handle IPv6-style hostnames; implement
3573         support for IPv6 connections.
3574         * unittests/parse-connection-spec-selftests.c: New file.
3575
3576 2018-07-11  Pedro Alves  <palves@redhat.com>
3577
3578         PR gdb/23377
3579         * remote.c (remote_target::remote_detach_pid): Call
3580         set_current_process.
3581
3582 2018-07-11  Pedro Alves  <palves@redhat.com>
3583
3584         * h8300-tdep.c (h8300_gdbarch_init): Remove
3585         set_gdbarch_ecoff_reg_to_regnum calls.
3586
3587 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
3588
3589         PR c++/23373
3590         * c-typeprint.c (c_type_print_base_struct_union): Don't print
3591         offsets/sizes for static members of a class/struct.
3592
3593 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
3594
3595         * target-descriptions.c (tdesc_register_bitsize): Rename.
3596         * target-descriptions.h (tdesc_register_bitsize): Likewise.
3597         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
3598         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
3599
3600 2018-07-10  Tom Tromey  <tom@tromey.com>
3601
3602         * breakpoint.c (moribund_locations): Now static and a
3603         std::vector.
3604         (breakpoint_init_inferior, moribund_breakpoint_here_p)
3605         (build_bpstat_chain, update_global_location_list)
3606         (breakpoint_retire_moribund): Update.
3607         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
3608         VEC.
3609
3610 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
3611
3612         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
3613         (riscv_register_reggroup_p): Use new function, remove unneeded
3614         parenthesis.
3615         (riscv_push_dummy_call): Extend assert to compare against xlen or
3616         flen based on register type.
3617
3618 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
3619
3620         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
3621
3622 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
3623
3624         * remote.c (show_hardware_watchpoint_limit): New function.
3625         (show_hardware_watchpoint_length_limit): New function.
3626         (show_hardware_breakpoint_limit): New function.
3627         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
3628         where appropriate, update help text.
3629
3630 2018-07-09  Tom Tromey  <tom@tromey.com>
3631
3632         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
3633         (CLIBS): Don't mention NAT_CLIBS.
3634
3635 2018-07-09  Tom Tromey  <tom@tromey.com>
3636
3637         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
3638         (LIBGDB_OBS, clean mostlyclean): Update.
3639         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
3640
3641 2018-07-09  Tom Tromey  <tom@tromey.com>
3642
3643         * Makefile.in (%.c: %.y): Use ECHO_YACC.
3644         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
3645         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
3646
3647 2018-07-09  Tom Tromey  <tom@tromey.com>
3648
3649         * Makefile.in (ALLDEPFILES): Remove exec.c.
3650         (COMMON_OBS): Remove exec.o.
3651         (COMMON_SFILES): Add exec.c.
3652
3653 2018-07-09  Tom Tromey  <tom@tromey.com>
3654
3655         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
3656
3657 2018-07-09  Tom Tromey  <tom@tromey.com>
3658
3659         * Makefile.in (clean mostlyclean): Remove stamp-version.
3660         (version.c): Depend on stamp-version.
3661         (stamp-version): New rule, from version.c rule.
3662
3663 2018-07-09  Tom Tromey  <tom@tromey.com>
3664
3665         * Makefile.in (init.c): Depend on stamp-init.
3666         (stamp-init): New rule, from init.c rule.
3667         (clean mostlyclean): Remove stamp-init.
3668
3669 2018-07-09  Tom Tromey  <tom@tromey.com>
3670
3671         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
3672         SUBDIR_GCC_COMPILE_SRCS.
3673
3674 2018-07-09  Tom Tromey  <tom@tromey.com>
3675
3676         * Makefile.in (init.c): Remove some unused sed rules.
3677
3678 2018-07-09  Tom Tromey  <tom@tromey.com>
3679
3680         * Makefile.in (TSOBS): Remove.
3681         (INIT_FILES): Update.
3682         (LIBGDB_OBS): Update.
3683         (COMMON_SFILES): Add inflow.c.
3684         (SFILES): Remove inflow.c.
3685
3686 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
3687
3688         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
3689
3690 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
3691
3692         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
3693         get_saveloc_name, is_signal_frame_name, step_name,
3694         init_remote_name, create_addr_space_name,
3695         destroy_addr_space_name, search_unwind_table_name,
3696         find_dyn_list_name): Constify.
3697
3698 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
3699
3700         * darwin-nat.c (darwin_pthread_kill): New function.
3701         (darwin_resume_thread): Use darwin_pthread_kill.
3702
3703 2018-07-05  Tom de Vries  <tdevries@suse.de>
3704
3705         * macroexp.c (macro_buffer) <operator=>: New member function.
3706
3707 2018-07-04  Tom Tromey  <tom@tromey.com>
3708
3709         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
3710
3711 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
3712
3713         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
3714         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
3715         * maint.c: Likewise.
3716         * top.c: Likewise.
3717
3718 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
3719
3720         * NEWS: Create a new section for the next release branch.
3721         Rename the section of the current branch, now that it has
3722         been cut.
3723
3724 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
3725
3726         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
3727         * version.in: Bump version to 8.2.50.DATE-git.
3728
3729 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
3730             Pedro Alves  <palves@redhat.com>
3731
3732         * linux-nat.c (linux_init_ptrace): Rename to ...
3733         (linux_init_ptrace_procfs): ... this.  Call
3734         linux_proc_init_warnings.
3735         (linux_nat_target::post_attach)
3736         (linux_nat_target::post_startup_inferior): Adjust.
3737         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
3738         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
3739
3740 2018-07-04  Tom de Vries  <tdevries@suse.de>
3741
3742         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
3743         check ...
3744         (read_comp_unit_head): ... here.
3745
3746 2018-07-03  Tom Tromey  <tom@tromey.com>
3747
3748         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
3749         (stop_tracing, tstatus_command)
3750         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
3751         (print_one_static_tracepoint_marker): Update.
3752         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
3753         std::vector.
3754         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
3755         VEC.
3756         (all_tracepoints, static_tracepoints_here): Return std::vector.
3757
3758 2018-07-03  Tom Tromey  <tom@tromey.com>
3759
3760         * common/ptid.c (ptid_equal): Remove.
3761         * common/ptid.h (ptid_equal): Don't declare.
3762         * ada-tasks.c: Update.
3763         * breakpoint.c: Update.
3764         * common/agent.c: Update.
3765         * corelow.c: Update.
3766         * darwin-nat-info.c: Update.
3767         * darwin-nat.c: Update.
3768         * dcache.c: Update.
3769         * dtrace-probe.c: Update.
3770         * dummy-frame.c: Update.
3771         * fbsd-nat.c: Update.
3772         * frame.c: Update.
3773         * gdbthread.h: Update.
3774         * gnu-nat.c: Update.
3775         * go32-nat.c: Update.
3776         * inf-loop.c: Update.
3777         * inf-ptrace.c: Update.
3778         * infcall.c: Update.
3779         * infcmd.c: Update.
3780         * inflow.c: Update.
3781         * infrun.c: Update.
3782         * linux-fork.c: Update.
3783         * linux-nat.c: Update.
3784         * linux-thread-db.c: Update.
3785         * mi/mi-cmd-var.c: Update.
3786         * mi/mi-interp.c: Update.
3787         * mi/mi-main.c: Update.
3788         * nto-procfs.c: Update.
3789         * ppc-linux-tdep.c: Update.
3790         * procfs.c: Update.
3791         * python/py-inferior.c: Update.
3792         * python/py-record-btrace.c: Update.
3793         * python/py-record.c: Update.
3794         * ravenscar-thread.c: Update.
3795         * regcache.c: Update.
3796         * remote-sim.c: Update.
3797         * remote.c: Update.
3798         * sol-thread.c: Update.
3799         * solib.c: Update.
3800         * target.c: Update.
3801         * tui/tui-stack.c: Update.
3802         * varobj.c: Update.
3803         * windows-nat.c: Update.
3804         * windows-tdep.c: Update.
3805
3806 2018-07-03  Tom Tromey  <tom@tromey.com>
3807
3808         * common/ptid.c (ptid_match): Remove.
3809         * common/ptid.h (ptid_match): Don't declare.
3810         * fbsd-nat.c: Update.
3811         * infcmd.c: Update.
3812         * infrun.c: Update.
3813         * linux-nat.c: Update.
3814         * record-btrace.c: Update.
3815         * regcache.c: Update.
3816         * remote.c: Update.
3817
3818 2018-07-03  Tom Tromey  <tom@tromey.com>
3819
3820         * common/ptid.c (ptid_tid_p): Remove.
3821         * common/ptid.h (ptid_tid_p): Don't declare.
3822         * sol-thread.c: Update.
3823
3824 2018-07-03  Tom Tromey  <tom@tromey.com>
3825
3826         * common/ptid.c (ptid_lwp_p): Remove.
3827         * common/ptid.h (ptid_lwp_p): Don't declare.
3828         * fbsd-nat.c: Update.
3829         * linux-nat.c: Update.
3830         * nat/linux-procfs.c: Update.
3831         * nat/x86-linux-dregs.c: Update.
3832         * sol-thread.c: Update.
3833
3834 2018-07-03  Tom Tromey  <tom@tromey.com>
3835
3836         * common/ptid.c (ptid_is_pid): Remove.
3837         * common/ptid.h (ptid_is_pid): Don't declare.
3838         * infrun.c: Update.
3839         * linux-nat.c: Update.
3840         * mi/mi-interp.c: Update.
3841         * remote.c: Update.
3842         * thread.c: Update.
3843
3844 2018-07-03  Tom Tromey  <tom@tromey.com>
3845
3846         * common/ptid.c (ptid_get_tid): Remove.
3847         * common/ptid.h (ptid_get_tid): Don't declare.
3848         * ada-tasks.c: Update.
3849         * aix-thread.c: Update.
3850         * bsd-uthread.c: Update.
3851         * darwin-nat.c: Update.
3852         * fbsd-nat.c: Update.
3853         * i386-darwin-nat.c: Update.
3854         * infrun.c: Update.
3855         * linux-tdep.c: Update.
3856         * nto-procfs.c: Update.
3857         * ppc-ravenscar-thread.c: Update.
3858         * python/py-infthread.c: Update.
3859         * ravenscar-thread.c: Update.
3860         * sol-thread.c: Update.
3861         * sparc-ravenscar-thread.c: Update.
3862         * windows-nat.c: Update.
3863
3864 2018-07-03  Tom Tromey  <tom@tromey.com>
3865
3866         * common/ptid.c (ptid_get_lwp): Remove.
3867         * common/ptid.h (ptid_get_lwp): Don't declare.
3868         * aarch64-linux-nat.c: Update.
3869         * ada-tasks.c: Update.
3870         * aix-thread.c: Update.
3871         * amd64-linux-nat.c: Update.
3872         * arm-linux-nat.c: Update.
3873         * corelow.c: Update.
3874         * fbsd-nat.c: Update.
3875         * fbsd-tdep.c: Update.
3876         * gnu-nat.c: Update.
3877         * i386-cygwin-tdep.c: Update.
3878         * i386-gnu-nat.c: Update.
3879         * i386-linux-nat.c: Update.
3880         * ia64-linux-nat.c: Update.
3881         * inf-ptrace.c: Update.
3882         * infrun.c: Update.
3883         * linux-fork.c: Update.
3884         * linux-nat.c: Update.
3885         * linux-tdep.c: Update.
3886         * linux-thread-db.c: Update.
3887         * mips-linux-nat.c: Update.
3888         * nat/aarch64-linux-hw-point.c: Update.
3889         * nat/aarch64-linux.c: Update.
3890         * nat/linux-btrace.c: Update.
3891         * nat/linux-osdata.c: Update.
3892         * nat/linux-procfs.c: Update.
3893         * nat/x86-linux-dregs.c: Update.
3894         * obsd-nat.c: Update.
3895         * ppc-fbsd-nat.c: Update.
3896         * ppc-linux-nat.c: Update.
3897         * procfs.c: Update.
3898         * python/py-infthread.c: Update.
3899         * ravenscar-thread.c: Update.
3900         * remote.c: Update.
3901         * s390-linux-nat.c: Update.
3902         * sol-thread.c: Update.
3903         * sol2-tdep.c: Update.
3904         * spu-linux-nat.c: Update.
3905         * x86-linux-nat.c: Update.
3906         * xtensa-linux-nat.c: Update.
3907
3908 2018-07-03  Tom Tromey  <tom@tromey.com>
3909
3910         * common/ptid.c (ptid_get_pid): Remove.
3911         * common/ptid.h (ptid_get_pid): Don't declare.
3912         * aarch64-linux-nat.c: Update.
3913         * ada-lang.c: Update.
3914         * aix-thread.c: Update.
3915         * alpha-bsd-nat.c: Update.
3916         * amd64-fbsd-nat.c: Update.
3917         * amd64-linux-nat.c: Update.
3918         * arm-linux-nat.c: Update.
3919         * arm-nbsd-nat.c: Update.
3920         * auxv.c: Update.
3921         * break-catch-syscall.c: Update.
3922         * breakpoint.c: Update.
3923         * bsd-uthread.c: Update.
3924         * corelow.c: Update.
3925         * ctf.c: Update.
3926         * darwin-nat.c: Update.
3927         * fbsd-nat.c: Update.
3928         * fbsd-tdep.c: Update.
3929         * gcore.c: Update.
3930         * gnu-nat.c: Update.
3931         * hppa-nbsd-nat.c: Update.
3932         * hppa-obsd-nat.c: Update.
3933         * i386-fbsd-nat.c: Update.
3934         * ia64-linux-nat.c: Update.
3935         * inf-ptrace.c: Update.
3936         * infcmd.c: Update.
3937         * inferior.c: Update.
3938         * inferior.h: Update.
3939         * inflow.c: Update.
3940         * infrun.c: Update.
3941         * linux-fork.c: Update.
3942         * linux-nat.c: Update.
3943         * linux-tdep.c: Update.
3944         * linux-thread-db.c: Update.
3945         * m68k-bsd-nat.c: Update.
3946         * mi/mi-interp.c: Update.
3947         * mi/mi-main.c: Update.
3948         * mips-linux-nat.c: Update.
3949         * mips-nbsd-nat.c: Update.
3950         * mips64-obsd-nat.c: Update.
3951         * nat/aarch64-linux-hw-point.c: Update.
3952         * nat/aarch64-linux.c: Update.
3953         * nat/linux-btrace.c: Update.
3954         * nat/linux-osdata.c: Update.
3955         * nat/linux-procfs.c: Update.
3956         * nat/x86-linux-dregs.c: Update.
3957         * nto-procfs.c: Update.
3958         * obsd-nat.c: Update.
3959         * ppc-linux-nat.c: Update.
3960         * ppc-nbsd-nat.c: Update.
3961         * ppc-obsd-nat.c: Update.
3962         * proc-service.c: Update.
3963         * procfs.c: Update.
3964         * python/py-inferior.c: Update.
3965         * python/py-infthread.c: Update.
3966         * ravenscar-thread.c: Update.
3967         * record.c: Update.
3968         * remote-sim.c: Update.
3969         * remote.c: Update.
3970         * rs6000-nat.c: Update.
3971         * s390-linux-nat.c: Update.
3972         * sh-nbsd-nat.c: Update.
3973         * sol-thread.c: Update.
3974         * sparc-nat.c: Update.
3975         * sparc64-tdep.c: Update.
3976         * spu-linux-nat.c: Update.
3977         * spu-tdep.c: Update.
3978         * target-debug.h: Update.
3979         * target.c: Update.
3980         * thread.c: Update.
3981         * tid-parse.c: Update.
3982         * tracefile-tfile.c: Update.
3983         * vax-bsd-nat.c: Update.
3984         * windows-nat.c: Update.
3985         * x86-linux-nat.c: Update.
3986         * x86-nat.c: Update.
3987
3988 2018-07-03  Tom Tromey  <tom@tromey.com>
3989
3990         * common/ptid.c (pid_to_ptid): Remove.
3991         * common/ptid.h (pid_to_ptid): Don't declare.
3992         * aix-thread.c: Update.
3993         * arm-linux-nat.c: Update.
3994         * common/ptid.c: Update.
3995         * common/ptid.h: Update.
3996         * corelow.c: Update.
3997         * ctf.c: Update.
3998         * darwin-nat.c: Update.
3999         * fbsd-nat.c: Update.
4000         * fork-child.c: Update.
4001         * gnu-nat.c: Update.
4002         * go32-nat.c: Update.
4003         * inf-ptrace.c: Update.
4004         * infcmd.c: Update.
4005         * inferior.c: Update.
4006         * infrun.c: Update.
4007         * linux-fork.c: Update.
4008         * linux-nat.c: Update.
4009         * nat/aarch64-linux-hw-point.c: Update.
4010         * nat/fork-inferior.c: Update.
4011         * nat/x86-linux-dregs.c: Update.
4012         * nto-procfs.c: Update.
4013         * obsd-nat.c: Update.
4014         * procfs.c: Update.
4015         * progspace.c: Update.
4016         * remote.c: Update.
4017         * rs6000-nat.c: Update.
4018         * s390-linux-nat.c: Update.
4019         * sol-thread.c: Update.
4020         * spu-linux-nat.c: Update.
4021         * target.c: Update.
4022         * top.c: Update.
4023         * tracefile-tfile.c: Update.
4024         * windows-nat.c: Update.
4025
4026 2018-07-03  Tom Tromey  <tom@tromey.com>
4027
4028         * common/ptid.h (ptid_build): Don't declare.
4029         * common/ptid.c (ptid_build): Remove.
4030         * aix-thread.c: Update.
4031         * bsd-kvm.c: Update.
4032         * bsd-uthread.c: Update.
4033         * common/agent.c: Update.
4034         * common/ptid.c: Update.
4035         * common/ptid.h: Update.
4036         * corelow.c: Update.
4037         * darwin-nat.c: Update.
4038         * fbsd-nat.c: Update.
4039         * gnu-nat.c: Update.
4040         * linux-fork.c: Update.
4041         * linux-nat.c: Update.
4042         * linux-thread-db.c: Update.
4043         * nat/linux-osdata.c: Update.
4044         * nat/linux-procfs.c: Update.
4045         * nto-procfs.c: Update.
4046         * obsd-nat.c: Update.
4047         * proc-service.c: Update.
4048         * procfs.c: Update.
4049         * ravenscar-thread.c: Update.
4050         * remote-sim.c: Update.
4051         * remote.c: Update.
4052         * sol-thread.c: Update.
4053         * target.c: Update.
4054         * windows-nat.c: Update.
4055
4056 2018-07-03  Tom Tromey  <tom@tromey.com>
4057
4058         * infrun.c (follow_exec): Use exit_inferior_silent.
4059         * inferior.c (exit_inferior_num_silent): Remove.
4060         * inferior.h (exit_inferior_num_silent): Don't declare.
4061
4062 2018-07-03  Tom Tromey  <tom@tromey.com>
4063
4064         PR cli/23340:
4065         * darwin-nat.c (darwin_attach_pid): Reset inferior and
4066         inferior_ptid on error.
4067
4068 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
4069             Simon Marchi  <simon.marchi@polymtl.ca>
4070
4071         PR tdep/8282
4072         * disasm.h (gdb_disassembler): Add
4073         `m_disassembler_options_holder'. member
4074         * disasm.c (get_all_disassembler_options): New function.
4075         (gdb_disassembler::gdb_disassembler): Use it.
4076         (gdb_buffered_insn_length_init_dis): Likewise.
4077         (gdb_buffered_insn_length): Adjust accordingly.
4078         (set_disassembler_options): Handle options with arguments.
4079         (show_disassembler_options_sfunc): Likewise.  Add a leading new
4080         line if showing options with descriptions.
4081         (disassembler_options_completer): Adapt to using the
4082         `disasm_options_and_args_t' structure.
4083         * mips-tdep.c (mips_disassembler_options): New variable.
4084         (mips_disassembler_options_o32): Likewise.
4085         (mips_disassembler_options_n32): Likewise.
4086         (mips_disassembler_options_n64): Likewise.
4087         (gdb_print_insn_mips): Don't set `disassembler_options'.
4088         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
4089         functions.
4090         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
4091         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
4092         `gdbarch_disassembler_options_implicit' and
4093         `gdbarch_valid_disassembler_options'.
4094         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
4095         `disasm_options_and_args_t' structure.
4096         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
4097         method.
4098         (valid_disassembler_options): Switch from `disasm_options_t' to
4099         the `disasm_options_and_args_t' structure.
4100         * NEWS: Document `set disassembler-options' support for the MIPS
4101         target.
4102         * gdbarch.h: Regenerate.
4103         * gdbarch.c: Regenerate.
4104
4105 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
4106
4107         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
4108
4109 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
4110
4111         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
4112         parameter in call to amd64_target_description.
4113         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
4114         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
4115         (amd64fbsd_init_abi): Likewise.
4116         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
4117         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
4118         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
4119         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
4120
4121 2018-06-29  Pedro Alves  <palves@redhat.com>
4122
4123         * gdb/amd64-tdep.h (amd64_create_target_description): Add
4124         "segments" parameter.
4125         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
4126         (_initialize_amd64_tdep): Update call to
4127         amd64_create_target_description.
4128         (amd64_target_description): Add "segments" parameter.  Adjust
4129         the implementation to use it.
4130         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
4131         call to amd64_create_target_description.
4132         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
4133         * gdb/arch/amd64.h (amd64_create_target_description): Add
4134         "segments" register.
4135         * gdb/arch/amd64.c (amd64_create_target_description): Add
4136         "segments" parameter.  Call create_feature_i386_64bit_segments
4137         only if SEGMENTS is true.
4138         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
4139         call to amd64_create_target_description.
4140
4141 2018-06-29  Pedro Alves  <palves@redhat.com>
4142
4143         * thread.c (thread_target_id_str): New, factored out from ...
4144         (print_thread_info_1): ... here.  Use it to compute the max
4145         "Target Id" column width.
4146
4147 2018-06-29  Pedro Alves  <palves@redhat.com>
4148
4149         * remote.c (remote_target::extra_thread_info): Delete
4150         'display_buf' and 'n' locals.  from the cache, regardless of
4151         packet mechanims is in use.  Use cache for qThreadExtra and qP
4152         methods too.
4153
4154 2018-06-29  Pedro Alves  <palves@redhat.com>
4155
4156         * blockframe.c (find_pc_sect_containing_function): New function.
4157         * breakpoint.c (print_breakpoint_location): Don't call
4158         find_pc_sect_function.
4159         * linespec.c (create_sals_line_offset): Record the location's
4160         symbol in the sal.
4161         * linespec.c (convert_address_location_to_sals): Fill in sal's
4162         symbol with find_pc_sect_containing_function.
4163         * symtab.c (find_function_start_sal): Rename to ...
4164         (find_function_start_sal_1): ... this.
4165         (find_function_start_sal): Reimplement as wrapper around
4166         find_function_start_sal_1, and use
4167         find_pc_sect_containing_function to fill in the sal's symbol.
4168         (find_function_start_sal(symbol*, bool)): Adjust.
4169         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
4170         comments.
4171         (find_pc_sect_containing_function): Declare.
4172
4173 2018-06-29  Pedro Alves  <palves@redhat.com>
4174
4175         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
4176         true if the the location has no symbol.
4177
4178 2018-06-28  Tom Tromey  <tom@tromey.com>
4179
4180         * NEWS: Mention --enable-codesign.
4181         * silent-rules.mk (ECHO_SIGN): New variable.
4182         * configure.ac: Add --enable-codesign.
4183         * configure: Rebuild.
4184         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
4185         (gdb$(EXEEXT)): Optionally invoke codesign.
4186
4187 2018-06-28  Pedro Alves  <palves@redhat.com>
4188
4189         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
4190         comments.
4191         (switch_to_thread_no_regs): Adjust comment.
4192         * infcmd.c (stop_pc): Delete.
4193         (post_create_inferior, info_program_command): Replace references
4194         to stop_pc with references to thread_info->suspend.stop_pc.
4195         * inferior.h (stop_pc): Delete declaration.
4196         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
4197         (handle_inferior_event_1, handle_signal_stop)
4198         (process_event_stop_test, keep_going_stepped_thread)
4199         (handle_step_into_function, handle_step_into_function_backward)
4200         (print_stop_location): Replace references to stop_pc with
4201         references to thread_info->suspend.stop_pc.
4202         (struct infcall_suspend_state) <stop_pc>: Delete field.
4203         (save_infcall_suspend_state, restore_infcall_suspend_state):
4204         Remove references to inf_stat->stop_pc.
4205         * linux-fork.c (fork_load_infrun_state): Likewise.
4206         * record-btrace.c (record_btrace_set_replay): Likewise.
4207         * record-full.c (record_full_goto_entry): Likewise.
4208         * remote.c (print_one_stopped_thread): Likewise.
4209         * target.c (target_resume): Extend comment.
4210         * thread.c (set_executing_thread): New.
4211         (set_executing): Use it.
4212         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
4213         Remove references to stop_pc.
4214
4215 2018-06-28  Pedro Alves  <palves@redhat.com>
4216
4217         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
4218         Moving fetching stop_pc until after ecs->event_thread is refreshed.
4219
4220 2018-06-28  Tom Tromey  <tom@tromey.com>
4221
4222         * coffread.c (coff_symfile_finish): Update.
4223         * xcoffread.c (xcoff_symfile_finish): Update.
4224         * elfread.c (elf_symfile_finish): Update.
4225         * symfile.h (dwarf2_free_objfile): Don't declare.
4226         * dwarf2read.c (_initialize_dwarf2_read): Use
4227         register_objfile_data_with_cleanup.
4228         (dwarf2_free_objfile): Now static.  Change signature.
4229
4230 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4231
4232         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
4233         option "-o" to add-symbol-file-load to add an offset to each
4234         section's load address.
4235         * symfile.c (set_objfile_default_section_offset): New function.
4236
4237 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4238
4239         * symfile.c (add_symbol_file_command): Make sure that sections
4240         with the same name are sorted in the same order.
4241
4242 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4243
4244         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
4245         require the second argument.  If omitted, load sections at the
4246         addresses specified in the file.
4247
4248 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4249
4250         * symfile.c (symbol_file_command, symbol_file_add_main_1)
4251         (_initialize_symfile): Add option "-o" to symbol-file to add an
4252         offset to each section of the symbol file.
4253
4254 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4255
4256         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
4257
4258 2018-06-27  Tom Tromey  <tom@tromey.com>
4259
4260         * stack.c (_initialize_stack): Update "func" help text.
4261
4262 2018-06-27  Tom Tromey  <tom@tromey.com>
4263
4264         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
4265         std::vector.
4266         (unwind_infopy_str, pyuw_create_unwind_info)
4267         (unwind_infopy_add_saved_register, pyuw_sniffer)
4268         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
4269         Update.
4270         (struct saved_reg): Add constructor.
4271         <value>: Now a gdbpy_ref<>.
4272
4273 2018-06-27  Tom Tromey  <tom@tromey.com>
4274
4275         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
4276
4277 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4278
4279         * gdb-gdb.py.in: Format using autopep8.
4280
4281 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4282
4283         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
4284         (type_lookup_function): Recognize CORE_ADDR values.
4285
4286 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4287
4288         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
4289         print tag_name.
4290
4291 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4292
4293         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
4294         <__lt__>: Add.
4295
4296 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4297
4298         * gdb-gdb.py: Move to...
4299         * gdb-gdb.py.in: ... here.
4300         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
4301         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
4302         dependencies.
4303         (distclean): Remove gdb-gdb.py when cleaning.
4304         (gdb-gdb.py, gdb-gdb.gdb): New rules.
4305         * configure: Re-generate.
4306
4307 2018-06-27  Pedro Alves  <palves@redhat.com>
4308
4309         * proc-service.c (get_ps_regcache): New.
4310         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4311         (ps_lsetfpregs): Use it.
4312
4313 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
4314
4315         PR gdb/21695
4316         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
4317         (dwarf_decode_lines_1): Adjust.
4318
4319 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4320
4321         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
4322         override.
4323         <info_proc>: Likewise.
4324
4325 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
4326
4327         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
4328         to windows_fetch_one_register, and only handle the case of
4329         fetching one register.  Move the code that reloads the context
4330         and iterates over all registers if R is negative to...
4331         (windows_nat_target::fetch_registers): ... here.
4332         (do_windows_store_inferior_registers): Rename to
4333         windows_store_one_register, and only handle the case of storing
4334         one register.  Move the code that handles the case where r is
4335         negative to...
4336         (windows_nat_target::store_registers) ... here.
4337
4338 2018-06-26  Tom Tromey  <tom@tromey.com>
4339
4340         PR rust/22574:
4341         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
4342         * rust-lang.c (rust_print_struct_def): Add podata parameter.
4343         Update.
4344         (rust_internal_print_type): Add podata parameter.
4345         (rust_print_type): Update.
4346
4347 2018-06-26  Tom Tromey  <tom@tromey.com>
4348
4349         * typeprint.h (struct print_offset_data) <update, finish,
4350         maybe_print_hole>: New methods.
4351         <indentation>: New constant.
4352         * typeprint.c (print_offset_data::indentation): Define.
4353         (print_offset_data::maybe_print_hole, print_offset_data::update)
4354         (print_offset_data::finish): Move from c-typeprint.c and rename.
4355         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
4356         (print_spaces_filtered_with_print_options): Update.
4357         (c_print_type_union_field_offset, maybe_print_hole)
4358         (c_print_type_struct_field_offset): Move to typeprint.c and
4359         rename.
4360         (c_type_print_base_struct_union): Update.
4361
4362 2018-06-25  Pedro Alves  <palves@redhat.com>
4363
4364         * gdbthread.h (thread_info_ref, delete_thread)
4365         (delete_thread_silent, first_thread_of_inferior)
4366         (any_thread_of_inferior, switch_to_thread)
4367         (enable_thread_stack_temporaries)
4368         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4369         (get_last_thread_stack_temporary)
4370         (value_in_thread_stack_temporaries, can_access_registers_thread):
4371         Spell out "struct thread_info" instead of just "thread_info".
4372         * inferior.h (notice_new_inferior): Likewise.
4373
4374 2018-06-25  Pedro Alves  <palves@redhat.com>
4375
4376         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
4377         pass thread_info pointer to delete_thread.
4378         (windows_nat_target::detach): Pass inferior pointer to
4379         detach_inferior.
4380         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
4381         delete_thread.
4382         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
4383         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
4384         and pass a thread_info pointer to delete_thread.
4385         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
4386         pass thread_info pointer to delete_thread.
4387         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
4388         delete_thread_silent call.
4389         * procfs.c (procfs_target::detach): Pass inferior pointer to
4390         detach_inferior.
4391         (procfs_target::wait): Pass thread_info pointer to delete_thread.
4392         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
4393         delete_thread_silent call.
4394         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
4395         pass thread_info pointer to delete_thread.
4396         (windows_nat_target::detach): Pass inferior pointer to
4397         delete_inferior.
4398
4399 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
4400
4401         * regcache.c (readable_regcache::read_part): Fix asserts.
4402         (reg_buffer::raw_collect_part): New function.
4403         (regcache::write_part): Fix asserts.
4404         (reg_buffer::raw_supply_part): New function.
4405         (regcache::transfer_regset_register): New helper function.
4406         (regcache::transfer_regset): Call new functions.
4407         (regcache_supply_regset): Use gdb_byte*.
4408         (regcache::supply_regset): Likewise.
4409         (regcache_collect_regset): Likewise.
4410         (regcache::collect_regset): Likewise.
4411         * regcache.h (reg_buffer::raw_collect_part): New declaration.
4412         (reg_buffer::raw_supply_part): Likewise.
4413         (regcache::transfer_regset_register): Likewise.
4414         (regcache::transfer_regset): Use gdb_byte*.
4415
4416 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
4417
4418         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
4419
4420 2018-06-21  Pedro Alves  <palves@redhat.com>
4421
4422         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
4423         instead of a ptid_t.  All callers adjusted.
4424         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
4425         adjusted.
4426         (print_ada_task_info, display_current_task_id, task_command_1):
4427         Adjust.
4428         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
4429         inferior_thread.
4430         (breakpoint_kind): Adjust.
4431         (remove_breakpoints_pid): Rename to ...
4432         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
4433         pointer.  All callers adjusted.
4434         (bpstat_clear_actions): Use inferior_thread.
4435         (get_bpstat_thread): New.
4436         (bpstat_do_actions): Use it.
4437         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
4438         to take a thread_info pointer.  All callers adjusted.
4439         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
4440         (breakpoint_re_set_thread): Use inferior_thread.
4441         * breakpoint.h (struct inferior): Forward declare.
4442         (bpstat_stop_status): Update.
4443         (remove_breakpoints_pid): Delete.
4444         (remove_breakpoints_inf): New.
4445         * bsd-uthread.c (bsd_uthread_target::wait)
4446         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
4447         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
4448         (maint_btrace_packet_history_cmd)
4449         (maint_btrace_clear_packet_history_cmd): Adjust.
4450         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
4451         inferior_thread.
4452         * cli/cli-interp.c: Include "inferior.h".
4453         * common/refcounted-object.h (struct
4454         refcounted_object_ref_policy): New.
4455         * compile/compile-object-load.c: Include gdbthread.h.
4456         (store_regs): Use inferior_thread.
4457         * corelow.c (core_target::close): Use current_inferior.
4458         (core_target_open): Adjust to use first_thread_of_inferior and use
4459         the current inferior.
4460         * ctf.c (ctf_target::close): Adjust to use current_inferior.
4461         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
4462         <thread>: ... this new field.  All references adjusted.
4463         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
4464         Take a thread_info pointer instead of a ptid_t.
4465         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
4466         (dummy_frame_discard, register_dummy_frame_dtor): Take a
4467         thread_info pointer instead of a ptid_t.
4468         * elfread.c: Include "inferior.h".
4469         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
4470         Use inferior_thread.
4471         * eval.c (evaluate_subexp): Likewise.
4472         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
4473         inferior_thread.
4474         * gdb_proc_service.h (struct thread_info): Forward declare.
4475         (struct ps_prochandle) <ptid>: Delete, replaced by ...
4476         <thread>: ... this new field.  All references adjusted.
4477         * gdbarch.h, gdbarch.c: Regenerate.
4478         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
4479         'thread' parameter.  All implementations and callers adjusted.
4480         * gdbthread.h (thread_info) <set_running>: New method.
4481         (delete_thread, delete_thread_silent): Take a thread_info pointer
4482         instead of a ptid.
4483         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
4484         (first_thread_of_process): Delete, replaced by ...
4485         (first_thread_of_inferior): ... this new function.  All callers
4486         adjusted.
4487         (any_live_thread_of_process): Delete, replaced by ...
4488         (any_live_thread_of_inferior): ... this new function.  All callers
4489         adjusted.
4490         (switch_to_thread, switch_to_no_thread): Declare.
4491         (is_executing): Delete.
4492         (enable_thread_stack_temporaries): Update comment.
4493         <enable_thread_stack_temporaries>: Take a thread_info pointer
4494         instead of a ptid_t.  Incref the thread.
4495         <~enable_thread_stack_temporaries>: Decref the thread.
4496         <m_ptid>: Delete
4497         <m_thr>: New.
4498         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4499         (get_last_thread_stack_temporary)
4500         (value_in_thread_stack_temporaries, can_access_registers_thread):
4501         Take a thread_info pointer instead of a ptid_t.  All callers
4502         adjusted.
4503         * infcall.c (get_call_return_value): Use inferior_thread.
4504         (run_inferior_call): Work with thread pointers instead of ptid_t.
4505         (call_function_by_hand_dummy): Work with thread pointers instead
4506         of ptid_t.  Use thread_info_ref.
4507         * infcmd.c (proceed_thread_callback): Access thread's state
4508         directly.
4509         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
4510         access thread's state directly.
4511         (continue_command): Use inferior_thread.
4512         (info_program_command): Use find_thread_ptid and access thread
4513         state directly.
4514         (proceed_after_attach_callback): Use thread state directly.
4515         (notice_new_inferior): Take a thread_info pointer instead of a
4516         ptid_t.  All callers adjusted.
4517         (exit_inferior): Take an inferior pointer instead of a pid.  All
4518         callers adjusted.
4519         (exit_inferior_silent): New.
4520         (detach_inferior): Delete.
4521         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
4522         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
4523         (detach_inferior_command, kill_inferior_command): Use
4524         find_inferior_id instead of valid_gdb_inferior_id and
4525         gdb_inferior_id_to_pid.
4526         (inferior_command): Use inferior and thread pointers.
4527         * inferior.h (struct thread_info): Forward declare.
4528         (notice_new_inferior): Take a thread_info pointer instead of a
4529         ptid_t.  All callers adjusted.
4530         (detach_inferior): Delete declaration.
4531         (exit_inferior, exit_inferior_silent): Take an inferior pointer
4532         instead of a pid.  All callers adjusted.
4533         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
4534         (valid_gdb_inferior_id): Delete.
4535         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
4536         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
4537         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
4538         ...
4539         <inf>: ... this new field.
4540         <step_ptid>: Delete, replaced by ...
4541         <step_thread>: ... this new field.
4542         (get_displaced_stepping_state): Take an inferior pointer instead
4543         of a pid.  All callers adjusted.
4544         (displaced_step_in_progress_any_inferior): Adjust.
4545         (displaced_step_in_progress_thread): Take a thread pointer instead
4546         of a ptid_t.  All callers adjusted.
4547         (displaced_step_in_progress, add_displaced_stepping_state): Take
4548         an inferior pointer instead of a pid.  All callers adjusted.
4549         (get_displaced_step_closure_by_addr): Adjust.
4550         (remove_displaced_stepping_state): Take an inferior pointer
4551         instead of a pid.  All callers adjusted.
4552         (displaced_step_prepare_throw, displaced_step_prepare)
4553         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
4554         All callers adjusted.
4555         (start_step_over): Adjust.
4556         (infrun_thread_ptid_changed): Remove bit updating ptids in the
4557         displaced step queue.
4558         (do_target_resume): Adjust.
4559         (fetch_inferior_event): Use inferior_thread.
4560         (context_switch, get_inferior_stop_soon): Take an
4561         execution_control_state pointer instead of a ptid_t.  All callers
4562         adjusted.
4563         (switch_to_thread_cleanup): Delete.
4564         (stop_all_threads): Use scoped_restore_current_thread.
4565         * inline-frame.c: Include "gdbthread.h".
4566         (inline_state) <inline_state>: Take a thread pointer instead of a
4567         ptid_t.  All callers adjusted.
4568         <ptid>: Delete, replaced by ...
4569         <thread>: ... this new field.
4570         (find_inline_frame_state): Take a thread pointer instead of a
4571         ptid_t.  All callers adjusted.
4572         (skip_inline_frames, step_into_inline_frame)
4573         (inline_skipped_frames, inline_skipped_symbol): Take a thread
4574         pointer instead of a ptid_t.  All callers adjusted.
4575         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
4576         (inline_skipped_frames, inline_skipped_symbol): Likewise.
4577         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
4578         pointers directly.
4579         * linux-nat.c (get_detach_signal): Likewise.
4580         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
4581         (thread_db_notice_clone): Adjust.
4582         (thread_db_find_new_threads_silently)
4583         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
4584         a thread pointer instead of a ptid_t.  All callers adjusted.
4585         * mi/mi-cmd-var.c: Include "inferior.h".
4586         (mi_cmd_var_update_iter): Update to use thread pointers.
4587         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
4588         inferior directly.
4589         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
4590         out to ...
4591         (mi_output_running): ... this new function.
4592         (mi_on_resume_1): Adjust to use it.
4593         (mi_user_selected_context_changed): Adjust to use inferior_thread.
4594         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
4595         directly.
4596         (interrupt_thread_callback): : Adjust to use thread and inferior
4597         pointers.
4598         * proc-service.c: Include "gdbthread.h".
4599         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
4600         * progspace-and-thread.c: Include "inferior.h".
4601         * progspace.c: Include "inferior.h".
4602         * python/py-exitedevent.c (create_exited_event_object): Adjust to
4603         hold a reference to an inferior_object.
4604         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
4605         inferior_thread.
4606         * python/py-inferior.c (struct inferior_object): Give the type a
4607         tag name instead of a typedef.
4608         (python_on_normal_stop): No need to check if the current thread is
4609         listed.
4610         (inferior_to_inferior_object): Change return type to
4611         inferior_object.  All callers adjusted.
4612         (find_thread_object): Delete, bits factored out to ...
4613         (thread_to_thread_object): ... this new function.
4614         * python/py-infthread.c (create_thread_object): Use
4615         inferior_to_inferior_object.
4616         (thpy_is_stopped): Use thread pointer directly.
4617         (gdbpy_selected_thread): Use inferior_thread.
4618         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
4619         field, replaced with ...
4620         <thread>: ... this new field.  All users adjusted.
4621         (btpy_insn_or_gap_new): Drop const.
4622         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
4623         callers adjusted.
4624         * python/py-record.c: Include "gdbthread.h".
4625         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
4626         a ptid_t.  All callers adjusted.
4627         (gdbpy_current_recording): Use inferior_thread.
4628         * python/py-record.h (recpy_record_object) <ptid>: Delete
4629         field, replaced with ...
4630         <thread>: ... this new field.  All users adjusted.
4631         (recpy_element_object) <ptid>: Delete
4632         field, replaced with ...
4633         <thread>: ... this new field.  All users adjusted.
4634         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
4635         a ptid_t.  All callers adjusted.
4636         * python/py-threadevent.c: Include "gdbthread.h".
4637         (get_event_thread): Use thread_to_thread_object.
4638         * python/python-internal.h (struct inferior_object): Forward
4639         declare.
4640         (find_thread_object, find_inferior_object): Delete declarations.
4641         (thread_to_thread_object, inferior_to_inferior_object): New
4642         declarations.
4643         * record-btrace.c: Include "inferior.h".
4644         (require_btrace_thread): Use inferior_thread.
4645         (record_btrace_frame_sniffer)
4646         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
4647         (get_thread_current_frame): Use scoped_restore_current_thread and
4648         switch_to_thread.
4649         (get_thread_current_frame): Use thread pointer directly.
4650         (record_btrace_replay_at_breakpoint): Use thread's inferior
4651         pointer directly.
4652         * record-full.c: Include "inferior.h".
4653         * regcache.c: Include "gdbthread.h".
4654         (get_thread_arch_regcache): Use the inferior's address space
4655         directly.
4656         (get_thread_regcache, registers_changed_thread): New.
4657         * regcache.h (get_thread_regcache(thread_info *thread)): New
4658         overload.
4659         (registers_changed_thread): New.
4660         (remote_target) <remote_detach_1>: Swap order of parameters.
4661         (remote_add_thread): <remote_add_thread>: Return the new thread.
4662         (get_remote_thread_info(ptid_t)): New overload.
4663         (remote_target::remote_notice_new_inferior): Use thread pointers
4664         directly.
4665         (remote_target::process_initial_stop_replies): Use
4666         thread_info::set_running.
4667         (remote_target::remote_detach_1, remote_target::detach)
4668         (extended_remote_target::detach): Adjust.
4669         * stack.c (frame_show_address): Use inferior_thread.
4670         * target-debug.h (target_debug_print_thread_info_pp): New.
4671         * target-delegates.c: Regenerate.
4672         * target.c (default_thread_address_space): Delete.
4673         (memory_xfer_partial_1): Use current_inferior.
4674         (target_detach): Use current_inferior.
4675         (target_thread_address_space): Delete.
4676         (generic_mourn_inferior): Use current_inferior.
4677         * target.h (struct target_ops) <thread_address_space>: Delete.
4678         (target_thread_address_space): Delete.
4679         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
4680         pointers directly.
4681         (delete_thread_1, delete_thread, delete_thread_silent): Take a
4682         thread pointer instead of a ptid_t.  Adjust all callers.
4683         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
4684         (first_thread_of_process): Delete, replaced by ...
4685         (first_thread_of_inferior): ... this new function.  All callers
4686         adjusted.
4687         (any_thread_of_process): Rename to ...
4688         (any_thread_of_inferior): ... this, and take an inferior pointer.
4689         (any_live_thread_of_process): Rename to ...
4690         (any_live_thread_of_inferior): ... this, and take an inferior
4691         pointer.
4692         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4693         (value_in_thread_stack_temporaries)
4694         (get_last_thread_stack_temporary): Take a thread pointer instead
4695         of a ptid_t.  Adjust all callers.
4696         (thread_info::set_running): New.
4697         (validate_registers_access): Use inferior_thread.
4698         (can_access_registers_ptid): Rename to ...
4699         (can_access_registers_thread): ... this, and take a thread
4700         pointer.
4701         (print_thread_info_1): Adjust to compare thread pointers instead
4702         of ptids.
4703         (switch_to_no_thread, switch_to_thread): Make extern.
4704         (scoped_restore_current_thread::~scoped_restore_current_thread):
4705         Use m_thread pointer directly.
4706         (scoped_restore_current_thread::scoped_restore_current_thread):
4707         Use inferior_thread.
4708         (thread_command): Use thread pointer directly.
4709         (thread_num_make_value_helper): Use inferior_thread.
4710         * top.c (execute_command): Use inferior_thread.
4711         * tui/tui-interp.c: Include "inferior.h".
4712         * varobj.c (varobj_create): Use inferior_thread.
4713         (value_of_root_1): Use find_thread_global_id instead of
4714         global_thread_id_to_ptid.
4715
4716 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
4717
4718         * regcache.c (readable_regcache::read_part): Avoid memcpy when
4719         possible.
4720         (regcache::write_part): Likewise.
4721         (readable_regcache::cooked_read_part): Update comment.
4722         (readable_regcache::cooked_write_part): Likewise.
4723         * regcache.h: (readable_regcache::read_part): Likewise.
4724         (regcache::write_part): Likewise.
4725
4726 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
4727             Dirk Schubert  <dirk.schubert@arm.com>
4728
4729         * aarch64-linux-nat.c (post_attach): New.
4730         (aarch64_linux_nat_target::post_attach): Override post_attach to
4731         record the number of hardware debug registers.
4732
4733 2018-06-20  Tom Tromey  <tom@tromey.com>
4734
4735         * python/py-param.c (add_setshow_generic): Make parameters const.
4736         (parmpy_init): Update.
4737
4738 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
4739
4740         * regcache.h (regcache_cooked_read_ftype): Rename to...
4741         (register_read_ftype): ...this, change type to function_view.
4742         (class reg_buffer) <save>: Remove src parameter.
4743         (readonly_detached_regcache) <readonly_detached_regcache>: Make
4744         parameter non-const in first overload.  Remove src parameter in
4745         second overload.
4746         * regcache.c (do_cooked_read): Remove.
4747         (readonly_detached_regcache::readonly_detached_regcache): Make
4748         parameter non-const, adjust call to other constructor.
4749         (reg_buffer::save): Remove src parameter.
4750         * frame.c (do_frame_register_read): Remove.
4751         (frame_save_as_regcache): Use lambda function.
4752         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
4753         parameter to ppu2spu_data *.
4754         (ppu2spu_sniffer): Use lambda function.
4755
4756 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
4757
4758         * record-full.c (record_full_target::insert_breakpoint): Remove
4759         "struct" keyword, add const.
4760
4761 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
4762
4763         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
4764         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
4765         * configure.ac: Remove AC_PREREQ, add missing quoting.
4766         * gnulib/configure.ac: Modernize usage of
4767         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
4768         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
4769         (AUTOMAKE_VERSION): Bump to 1.15.1.
4770         * configure: Re-generate.
4771         * config.in: Re-generate.
4772         * aclocal.m4: Re-generate.
4773         * gnulib/aclocal.m4: Re-generate.
4774         * gnulib/config.in: Re-generate.
4775         * gnulib/configure: Re-generate.
4776         * gnulib/import/Makefile.in: Re-generate.
4777
4778 2018-06-19  Pedro Alves  <palves@redhat.com>
4779
4780         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
4781         (lookup_minimal_symbol_by_pc_section): ... here with
4782         gdb_assert_not_reached added.
4783
4784 2018-06-19  Pedro Alves  <palves@redhat.com>
4785
4786         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
4787         parameter with a block parameter.  Compare location's block symbol
4788         with the frame's block instead of addresses.
4789         (skip_inline_frames): Pass the current block instead of the
4790         frame's address.  Break out as soon as we determine the frame
4791         should not be skipped.
4792
4793 2018-06-18  Tom Tromey  <tom@tromey.com>
4794
4795         * solib-aix.c (solib_aix_get_section_offsets): Return
4796         unique_xmalloc_ptr.
4797         (solib_aix_solib_create_inferior_hook): Update.
4798
4799 2018-06-18  Tom Tromey  <tom@tromey.com>
4800
4801         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
4802
4803 2018-06-18  Tom Tromey  <tom@tromey.com>
4804
4805         * solib-frv.c (frv_relocate_main_executable): Use
4806         unique_xmalloc_ptr.
4807         * solib-dsbt.c (dsbt_relocate_main_executable): Use
4808         unique_xmalloc_ptr.
4809
4810 2018-06-18  Tom Tromey  <tom@tromey.com>
4811
4812         * objfiles.h (inhibit_section_map_updates): Update.
4813         (resume_section_map_updates, resume_section_map_updates_cleanup):
4814         Remove.
4815         * solib-svr4.c (svr4_handle_solib_event): Update.
4816         * objfiles.c (inhibit_section_map_updates): Return
4817         scoped_restore_tmpl<int>.
4818         (resume_section_map_updates, resume_section_map_updates_cleanup):
4819         Remove.
4820
4821 2018-06-18  Tom Tromey  <tom@tromey.com>
4822
4823         * valprint.h (read_string): Update.
4824         * valprint.c (read_string): Change type of "buffer".
4825         (val_print_string): Update.
4826         * python/py-value.c (valpy_string): Update.
4827         * language.h (struct language_defn) <la_get_string>: Change
4828         type of "buffer".
4829         (default_get_string, c_get_string): Update.
4830         * language.c (default_get_string): Change type of "buffer".
4831         * guile/scm-value.c (gdbscm_value_to_string): Update.
4832         * c-lang.c (c_get_string): Change type of "buffer".
4833
4834 2018-06-18  Tom Tromey  <tom@tromey.com>
4835
4836         * ser-mingw.c (struct pipe_state_destroyer): New.
4837         (pipe_state_up): New typedef.
4838         (cleanup_pipe_state): Remove.
4839         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
4840
4841 2018-06-18  Tom Tromey  <tom@tromey.com>
4842
4843         * rust-lang.h (rust_yyerror): Don't declare.
4844         * rust-lang.c (rust_language_defn): Update.
4845         * rust-exp.y (yyerror): Now static.
4846         * parse.c (parse_exp_in_context_1): Update.
4847         * p-lang.h (p_yyerror): Don't declare.
4848         * p-lang.c (p_language_defn): Update.
4849         * p-exp.y (yyerror): Now static.
4850         * opencl-lang.c (opencl_language_defn): Update.
4851         * objc-lang.c (objc_language_defn): Update.
4852         * m2-lang.h (m2_yyerror): Don't declare.
4853         * m2-lang.c (m2_language_defn): Update.
4854         * m2-exp.y (yyerror): Now static.
4855         * language.h (struct language_defn) <la_error>: Remove.
4856         * language.c (unk_lang_error): Remove.
4857         (unknown_language_defn, auto_language_defn): Remove.
4858         * go-lang.h (go_yyerror): Don't declare.
4859         * go-lang.c (go_language_defn): Update.
4860         * go-exp.y (yyerror): Now static.
4861         * f-lang.h (f_yyerror): Don't declare.
4862         * f-lang.c (f_language_defn): Update.
4863         * f-exp.y (yyerror): Now static.
4864         * d-lang.h (d_yyerror): Don't declare.
4865         * d-lang.c (d_language_defn): Update.
4866         * d-exp.y (yyerror): Now static.
4867         * c-lang.h (c_yyerror): Don't declare.
4868         * c-lang.c (c_language_defn, cplus_language_defn)
4869         (asm_language_defn, minimal_language_defn): Update.
4870         * c-exp.y (yyerror): Now static.
4871         * ada-lang.h (ada_yyerror): Don't declare.
4872         * ada-lang.c (ada_language_defn): Update.
4873         * ada-exp.y (yyerror): Now static.
4874
4875 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
4876
4877         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
4878         (store_sveregs_to_thread): Likewise.
4879         (aarch64_linux_fetch_inferior_registers): Check for SVE.
4880         (aarch64_linux_store_inferior_registers): Likewise.
4881         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
4882         function.
4883         (aarch64_sve_regs_copy_to_regcache): Likewise.
4884         (aarch64_sve_regs_copy_from_regcache): Likewise.
4885         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
4886         declaration.
4887         (aarch64_sve_regs_copy_to_regcache): Likewise.
4888         (aarch64_sve_regs_copy_from_regcache): Likewise.
4889         (sve_context): Structure from Linux headers.
4890         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
4891         (SVE_SIG_ZREG_SIZE): Likewise.
4892         (SVE_SIG_PREG_SIZE): Likewise.
4893         (SVE_SIG_FFR_SIZE): Likewise.
4894         (SVE_SIG_REGS_OFFSET): Likewise.
4895         (SVE_SIG_ZREGS_OFFSET): Likewise.
4896         (SVE_SIG_ZREG_OFFSET): Likewise.
4897         (SVE_SIG_ZREGS_SIZE): Likewise.
4898         (SVE_SIG_PREGS_OFFSET): Likewise.
4899         (SVE_SIG_PREG_OFFSET): Likewise.
4900         (SVE_SIG_PREGS_SIZE): Likewise.
4901         (SVE_SIG_FFR_OFFSET): Likewise.
4902         (SVE_SIG_REGS_SIZE): Likewise.
4903         (SVE_SIG_CONTEXT_SIZE): Likewise.
4904         (SVE_PT_REGS_MASK): Likewise.
4905         (SVE_PT_REGS_FPSIMD): Likewise.
4906         (SVE_PT_REGS_SVE): Likewise.
4907         (SVE_PT_VL_INHERIT): Likewise.
4908         (SVE_PT_VL_ONEXEC): Likewise.
4909         (SVE_PT_REGS_OFFSET): Likewise.
4910         (SVE_PT_FPSIMD_OFFSET): Likewise.
4911         (SVE_PT_FPSIMD_SIZE): Likewise.
4912         (SVE_PT_SVE_ZREG_SIZE): Likewise.
4913         (SVE_PT_SVE_PREG_SIZE): Likewise.
4914         (SVE_PT_SVE_FFR_SIZE): Likewise.
4915         (SVE_PT_SVE_FPSR_SIZE): Likewise.
4916         (SVE_PT_SVE_FPCR_SIZE): Likewise.
4917         (__SVE_SIG_TO_PT): Likewise.
4918         (SVE_PT_SVE_OFFSET): Likewise.
4919         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
4920         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
4921         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
4922         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
4923         (SVE_PT_SVE_PREG_OFFSET): Likewise.
4924         (SVE_PT_SVE_PREGS_SIZE): Likewise.
4925         (SVE_PT_SVE_FFR_OFFSET): Likewise.
4926         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
4927         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
4928         (SVE_PT_SVE_SIZE): Likewise.
4929         (SVE_PT_SIZE): Likewise.
4930         (HAS_SVE_STATE): New define.
4931
4932 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
4933
4934         * nat/aarch64-sve-linux-sigcontext.h: New file.
4935         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
4936         new files.
4937         (SVE_VQ_MIN): Likewise.
4938         (SVE_VQ_MAX): Likewise.
4939         (SVE_VL_MIN): Likewise.
4940         (SVE_VL_MAX): Likewise.
4941         (SVE_NUM_ZREGS): Likewise.
4942         (SVE_NUM_PREGS): Likewise.
4943         (sve_vl_valid): Likewise.
4944         (struct user_sve_header): Likewise.
4945
4946 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
4947             Richard Bunt <Richard.Bunt@arm.com>
4948
4949         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
4950         was requested by GDB.
4951
4952 2018-06-15  Tom de Vries  <tdevries@suse.de>
4953
4954         * MAINTAINERS (Write After Approval): Add Tom de Vries.
4955
4956 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
4957
4958         * gnulib/update-gnulib.sh: Print expected versions of
4959         autoconf/aclocal.
4960
4961 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
4962
4963         * arch-utils.c (default_type_align): Use type_length_units.
4964         * gdbtypes.c (type_align): Use type_length_units.
4965
4966 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4967
4968         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
4969         of 'define' command.
4970
4971 2018-06-14  Tom de Vries  <tdevries@suse.de>
4972
4973         PR cli/22573
4974         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
4975         get_no_prettyformat_print_options.
4976
4977 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
4978
4979         * sparc-nat.h: Include target.h.
4980         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
4981         <fetch_registers>: Remove this argument in function call.
4982         <store_registers>: Remove this argument in function call, remove
4983         extra semicolon.
4984         <low_forget_process>: Call sparc64_forget_process instead of
4985         sparc_forget_process.
4986
4987 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4988
4989         * procfs.c (_initialize_procfs): Use add_inf_child_target.
4990         (procfs_target::make_corefile_notes): Adjust to new
4991         target_read_alloc return type.
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 (fetch_inferior_event): If GDB is not proceeding then
4998         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
4999         Move should_notify_stop local into more inner scope.
5000
5001 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
5002             Stephen Roberts  <stephen.roberts@arm.com>
5003
5004         PR gdb/22882
5005         * infrun.c (resume_1): Add call to mark_async_event_handler.
5006
5007 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
5008
5009         * infrun.c (do_target_wait): Change old version of $pc printed.
5010
5011 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
5012
5013         * dwarf2read.c (read_index_from_section): Rename to...
5014         (read_gdb_index_from_section): ... this, update all callers.
5015         (dwarf2_read_index): Rename to...
5016         (dwarf2_read_gdb_index): ... this, update all callers.
5017
5018 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
5019
5020         * gdb/hppa-linux-nat.c
5021         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
5022         hppa_linux_nat_target::fetch_registers.
5023
5024 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
5025
5026         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
5027         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
5028         (AARCH64_DWARF_SVE_FFR): Likewise.
5029         (AARCH64_DWARF_SVE_P0): Likewise.
5030         (AARCH64_DWARF_SVE_Z0): Likewise.
5031
5032 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
5033
5034         * common/common-regcache.h (raw_compare): New function.
5035         * regcache.c (regcache::raw_compare): Likewise.
5036         * regcache.h (regcache::raw_compare): New declaration.
5037
5038 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
5039
5040         * common/common-regcache.h (reg_buffer_common): New structure.
5041         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
5042         (reg_buffer::raw_supply): Likewise.
5043         (reg_buffer::raw_supply_integer): Likewise.
5044         (reg_buffer::raw_supply_zeroed): Likewise.
5045         (reg_buffer::raw_collect): Likewise.
5046         (reg_buffer::raw_collect_integer): Likewise.
5047         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
5048         (reg_buffer::raw_supply): Likewise.
5049         (reg_buffer::raw_supply_integer): Likewise.
5050         (reg_buffer::raw_supply_zeroed): Likewise.
5051         (reg_buffer::raw_collect): Likewise.
5052         (reg_buffer::raw_collect_integer): Likewise.
5053
5054 2018-06-10  Tom Tromey  <tom@tromey.com>
5055
5056         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
5057         (class remote_state) <stop_reply_queue>: Now std::vector.
5058         (remote_state::~remote_state)
5059         (remote_target::stop_reply_queue_length): Update.
5060         (struct queue_iter_param, remove_child_of_pending_fork)
5061         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
5062         (check_pending_event_prevents_wildcard_vcont_callback)
5063         (remove_stop_reply_for_inferior)
5064         (remove_stop_reply_of_remote_state)
5065         (remote_notif_remove_once_on_match)
5066         (stop_reply_match_ptid_and_ws)
5067         (remote_kill_child_of_pending_fork): Remove.
5068         (remote_target::remove_new_fork_children)
5069         (remote_target::check_pending_events_prevent_wildcard_vcont)
5070         (remote_target::discard_pending_stop_replies)
5071         (remote_target::discard_pending_stop_replies_in_queue)
5072         (remote_target::remote_notif_remove_queued_reply)
5073         (remote_target::queued_stop_reply)
5074         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
5075         (remote_target::wait, remote_target::kill_new_fork_children)
5076         (remote_target::async): Update.
5077
5078 2018-06-10  Tom Tromey  <tom@tromey.com>
5079
5080         * record-full.c (record_full_arch_list_cleanups): Remove.
5081         (record_full_message): Use try/catch.
5082         (record_full_wait_cleanups): Remove.
5083         (record_full_wait_1): Use try/catch.
5084         (record_full_restore): Likewise.
5085
5086 2018-06-10  Tom Tromey  <tom@tromey.com>
5087
5088         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
5089         declare VEC.  Add constructor.
5090         <in_target_beneath>: Now bool.
5091         (record_full_breakpoints): Now a std::vector, static.
5092         (record_full_sync_record_breakpoints)
5093         (record_full_init_record_breakpoints)
5094         (record_full_target::insert_breakpoint)
5095         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
5096
5097 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
5098
5099         * dwarf2read.c (process_cu_includes): Remove struct keyword.
5100         * serial.c (serial_interface_lookup): Remove struct keyword.
5101
5102 2018-06-10  Tom Tromey  <tom@tromey.com>
5103
5104         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
5105         method.
5106         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
5107         a method.
5108         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
5109         method.
5110         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
5111         "beneath" as a method.
5112         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
5113         Use "beneath" as a method.
5114
5115 2018-06-10  Tom Tromey  <tom@tromey.com>
5116
5117         * tracefile.c (struct trace_file_writer_deleter): New.
5118         <operator()>: Rename from trace_file_writer_xfree.
5119         (trace_file_writer_up): New typedef.
5120         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
5121
5122 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
5123
5124         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
5125         <m_registers, m_register_status>: Change type to
5126         std::unique_ptr.
5127         * regcache.c (reg_buffer::reg_buffer): Use new instead of
5128         XCNEWVEC.
5129
5130 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
5131
5132         * common/common-regcache.h (enum register_status): Add
5133         underlying type "signed char".
5134         * regcache.h (reg_buffer) <m_register_status>: Change type to
5135         register_status *.
5136         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
5137         register_status instead of signed char.
5138         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
5139         (reg_buffer::get_register_status): Remove cast.
5140         (readable_regcache::raw_read): Remove cast.
5141         (readable_regcache::cooked_read): Remove cast.
5142
5143 2018-06-09  Tom Tromey  <tom@tromey.com>
5144
5145         * source.c (reverse_search_command, forward_search_command): Use
5146         scoped_fd.
5147
5148 2018-06-09  Tom Tromey  <tom@tromey.com>
5149
5150         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
5151         (serial_ops_list): Now static, std::vector.
5152         (serial_interface_lookup, serial_add_interface): Update.
5153
5154 2018-06-09  Tom Tromey  <tom@tromey.com>
5155
5156         * dwarf2read.c (process_cu_includes): Update.
5157         (process_full_comp_unit): Update.
5158         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
5159         std::vector.
5160
5161 2018-06-08  Paul Koning  <paul_koning@dell.com>
5162
5163         PR gdb/23252
5164
5165         * python/python.c (do_start_initialization):
5166         Avoid call to internal Python API.
5167         (init__gdb_module): New function.
5168
5169 2018-06-08  Gary Benson <gbenson@redhat.com>
5170
5171         * linux-thread-db.c (valprint.h): New include.
5172         (struct check_thread_db_info): New structure.
5173         (check_thread_db_on_load, tdb_testinfo): New static globals.
5174         (check_thread_db, check_thread_db_callback): New functions.
5175         (try_thread_db_load_1): Run integrity checks if requested.
5176         (maintenance_check_libthread_db): New function.
5177         (_initialize_thread_db): Register "maint check libthread-db"
5178         and "maint set/show check-libthread-db".
5179         * NEWS: Mention the above new commands.
5180
5181 2018-06-08  Tom Tromey  <tom@tromey.com>
5182
5183         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
5184         now a method.
5185
5186 2018-06-08  Tom Tromey  <tom@tromey.com>
5187
5188         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
5189
5190 2018-06-08  Tom Tromey  <tom@tromey.com>
5191
5192         * common/btrace-common.h (struct btrace_data): Add constructor,
5193         destructor, move assignment operator.
5194         <empty, clear, fini>: New methods.
5195         <format>: Initialize.
5196         (btrace_data_init, btrace_data_fini, btrace_data_clear)
5197         (btrace_data_empty): Don't declare.
5198         * common/btrace-common.c (btrace_data_init): Remove.
5199         (btrace_data::fini): Rename from btrace_data_fini.
5200         (btrace_data::empty): Rename from btrace_data_empty.
5201         (btrace_data::clear): Rename from btrace_data_clear.  Return
5202         bool.
5203         * btrace.h (make_cleanup_btrace_data): Don't declare.
5204         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
5205         (parse_xml_btrace): Update.
5206         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
5207         (maint_btrace_clear_packet_history_cmd): Update.
5208
5209 2018-06-07  Pedro Alves  <palves@redhat.com>
5210
5211         * target.h (target_ops) <beneath>: Now a method.  All references
5212         updated.
5213         (class target_stack): New.
5214         * target.c (g_target_stack): New.
5215         (g_current_top_target): Delete.
5216         (current_top_target): Get the top target out of g_target_stack.
5217         (target_stack::push, target_stack::unpush): New.
5218         (push_target, unpush_target): Reimplement.
5219         (target_is_pushed): Reimplement in terms of g_target_stack.
5220         (target_ops::beneath, target_stack::find_beneath): New.
5221
5222 2018-06-07  Pedro Alves  <palves@redhat.com>
5223
5224         * target.h (find_target_beneath): Delete declaration.
5225         * target.c (find_target_beneath): Delete definition.
5226         * aix-thread.c: All callers of find_target_beneath adjusted to
5227         call target_ops::beneath instead.
5228         * bsd-uthread.c: Likewise.
5229         * linux-thread-db.c: Likewise.
5230         * ravenscar-thread.c: Likewise.
5231         * sol-thread.c: Likewise.
5232         * spu-multiarch.c: Likewise.
5233
5234 2018-06-07  Pedro Alves  <palves@redhat.com>
5235
5236         * target.h (target_ops) <beneath>: Now a method.  All references
5237         updated.
5238         (target_ops) <m_beneath>: New.
5239         * target.c (target_ops::beneath): New.
5240         * corelow.c: Adjust all references to target_ops::beneath.
5241         * linux-thread-db.c: Likewise.
5242         * make-target-delegates: Likewise.
5243         * record-btrace.c: Likewise.
5244         * record-full.c: Likewise.
5245         * remote.c: Likewise.
5246         * target.c: Likewise.
5247         * target-delegates.c: Regenerate.
5248
5249 2018-06-07  Pedro Alves  <palves@redhat.com>
5250
5251         * target.h (target_stack): Delete.
5252         (current_top_target): Declare function.
5253         * target.c (target_stack): Delete.
5254         (g_current_top_target): New.
5255         (current_top_target): New function.
5256         * auxv.c: Use current_top_target instead of target_stack
5257         throughout.
5258         * avr-tdep.c: Likewise.
5259         * breakpoint.c: Likewise.
5260         * corefile.c: Likewise.
5261         * elfread.c: Likewise.
5262         * eval.c: Likewise.
5263         * exceptions.c: Likewise.
5264         * frame.c: Likewise.
5265         * gdbarch-selftests.c: Likewise.
5266         * gnu-v3-abi.c: Likewise.
5267         * ia64-tdep.c: Likewise.
5268         * ia64-vms-tdep.c: Likewise.
5269         * infcall.c: Likewise.
5270         * infcmd.c: Likewise.
5271         * infrun.c: Likewise.
5272         * linespec.c: Likewise.
5273         * linux-tdep.c: Likewise.
5274         * minsyms.c: Likewise.
5275         * ppc-linux-nat.c: Likewise.
5276         * ppc-linux-tdep.c: Likewise.
5277         * procfs.c: Likewise.
5278         * regcache.c: Likewise.
5279         * remote.c: Likewise.
5280         * rs6000-tdep.c: Likewise.
5281         * s390-linux-nat.c: Likewise.
5282         * s390-tdep.c: Likewise.
5283         * solib-aix.c: Likewise.
5284         * solib-darwin.c: Likewise.
5285         * solib-dsbt.c: Likewise.
5286         * solib-spu.c: Likewise.
5287         * solib-svr4.c: Likewise.
5288         * solib-target.c: Likewise.
5289         * sparc-tdep.c: Likewise.
5290         * sparc64-tdep.c: Likewise.
5291         * spu-tdep.c: Likewise.
5292         * symfile.c: Likewise.
5293         * symtab.c: Likewise.
5294         * target-descriptions.c: Likewise.
5295         * target-memory.c: Likewise.
5296         * target.c: Likewise.
5297         * target.h: Likewise.
5298         * tracefile-tfile.c: Likewise.
5299         * tracepoint.c: Likewise.
5300         * valops.c: Likewise.
5301         * valprint.c: Likewise.
5302         * value.c: Likewise.
5303         * windows-tdep.c: Likewise.
5304         * mi/mi-main.c: Likewise.
5305
5306 2018-06-07  Tom Tromey  <tom@tromey.com>
5307
5308         * valprint.h (build_address_symbolic): Declare.
5309         * printcmd.c (print_address_symbolic): Update.
5310         (build_address_symbolic): Change "name" and "filename" to
5311         std::string.
5312         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
5313         Update.
5314         * defs.h (build_address_symbolic): Remove declaration.
5315
5316 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
5317
5318         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
5319         (aarch64_vnv_type): Add function.
5320         (aarch64_pseudo_register_name): Add V regs for SVE.
5321         (aarch64_pseudo_register_type): Likewise.
5322         (aarch64_pseudo_register_reggroup_p): Likewise.
5323         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
5324         (aarch64_pseudo_read_value): Add V regs for SVE.
5325         (aarch64_pseudo_write_2): Use V0 offset for SVE
5326         (aarch64_pseudo_write): Add V regs for SVE.
5327         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
5328
5329 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
5330
5331         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
5332         (sve_vl_from_vq): Likewise.
5333
5334 2018-06-05  Tom Tromey  <tom@tromey.com>
5335
5336         * cli/cli-cmds.c (show_version): Update.
5337         * top.c (print_gdb_version): Add "interactive" parameter.
5338         Update.
5339         * main.c (captured_main_1): Update.
5340         * top.h (print_gdb_version): Add "interactive" parameter and a
5341         comment.
5342
5343 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
5344
5345         * common/enum-flags.h: Add trailing semicolon to example in
5346         comment.
5347
5348 2018-06-05  Tom Tromey  <tom@tromey.com>
5349
5350         PR cli/12326:
5351         * NEWS: Add entry about pager.
5352         * utils.c (pagination_disabled_for_command): New global.
5353         (prompt_for_continue): Allow "c" response to prompt.
5354         (reinitialize_more_filter): Clear
5355         pagination_disabled_for_command.
5356         (fputs_maybe_filtered): Check pagination_disabled_for_command.
5357
5358 2018-06-04  Tom Tromey  <tom@tromey.com>
5359
5360         * ada-lang.h (ada_lookup_symbol_list): Update.
5361         * ada-lang.c (resolve_subexp): Update.
5362         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
5363         parameter.
5364         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
5365         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
5366         results parameter to std::vector.
5367         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
5368         Update.
5369         * ada-exp.y (block_lookup): Update.
5370         (select_possible_type_sym): Change type of syms.  Remove nsyms
5371         parameter.
5372         (write_var_or_type, write_name_assoc): Update.
5373
5374 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
5375
5376         * windows-nat.c (windows_nat_target::xfer_partial): Return
5377         TARGET_XFER_E_IO if we need to delegate to the target beneath
5378         but BENEATH is NULL.
5379
5380 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
5381
5382         * Makefile.in (config.status): Add configure.nat as a
5383         dependency.
5384
5385 2018-06-04  Tom Tromey  <tom@tromey.com>
5386
5387         * cp-name-parser.y (cpname_state): Add method declarations.
5388         (HANDLE_QUAL): Update.
5389         (cpname_state::d_grab, cpname_state::fill_comp)
5390         (cpname_state::make_operator, cpname_state::make_dtor)
5391         (cpname_state::make_builtin_type, cpname_state::make_name)
5392         (cpname_state::d_qualify, cpname_state::d_int_type)
5393         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
5394         (%union): Move earlier.
5395
5396 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5397
5398         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
5399
5400 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5401
5402         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
5403         (aarch64_pseudo_write_1): Likewise.
5404         (aarch64_pseudo_read_value): Use helper.
5405         (aarch64_pseudo_write): Likewise.
5406
5407 2018-06-04  Pedro Alves  <palves@redhat.com>
5408
5409         * darwin-nat.c (darwin_ops): Delete.
5410         (darwin_attach_pid): Use get_native_target.
5411
5412 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5413
5414         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
5415         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
5416
5417 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5418
5419         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
5420         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
5421         (aarch64_gdbarch_init): Check for SVE.
5422         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
5423
5424 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5425
5426         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
5427         * aarch64-tdep.h (aarch64_read_description): Likewise.
5428         * arch/aarch64.c (aarch64_create_target_description): Likewise.
5429         * arch/aarch64.h (aarch64_create_target_description): Likewise.
5430         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
5431         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
5432         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
5433
5434 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
5435
5436         * value.c (value_fetch_lazy_bitfield): New.
5437         (value_fetch_lazy_memory): New.
5438         (value_fetch_lazy_register): New.
5439         (value_fetch_lazy): Factor out to smaller functions.
5440
5441 2018-06-01  Tom Tromey  <tom@tromey.com>
5442
5443         * cp-name-parser.y (backslashable, represented): Now const.
5444
5445 2018-06-01  Tom Tromey  <tom@tromey.com>
5446
5447         * cp-name-parser.y: Include parser-defs.h.
5448         (parser_fprintf): Remove declaration.
5449
5450 2018-06-01  Tom Tromey  <tom@tromey.com>
5451
5452         * cp-name-parser.y: Use %pure-parser, %lex-param, and
5453         %parse-param.
5454         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
5455         (global_result): Remove globals.
5456         (struct cpname_state): New.
5457         (yyparse): Don't declare.
5458         (yylex, yyerror): Move declarations after %union.
5459         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
5460         (make_name): Add state parameter.
5461         Update all callers.
5462         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
5463         parameter.
5464         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
5465         Update.
5466         (yylex): Add lvalp, state parameters.
5467         (yyerror): Add state parameter.
5468         (cp_demangled_name_to_comp): Update.
5469
5470 2018-06-01  Tom Tromey  <tom@tromey.com>
5471
5472         * cp-name-parser.y (parser_fprintf): Declare.
5473         (GDB_YY_REMAP_PREFIX): Define.
5474         Include yy-remap.h.  Don't redefine yy* identifiers.
5475
5476 2018-06-01  Tom Tromey  <tom@tromey.com>
5477
5478         * python/py-type.c (typy_legacy_template_argument): Update.
5479         * cp-support.h (cp_demangled_name_to_comp): Update.
5480         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
5481         parameter to be a "std::string *".
5482         (main): Update.
5483
5484 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
5485
5486         * ada-lex.l: Include "diagnostics.h" instead of
5487         "common/diagnostics.h".
5488         * unittests/environ-selftests.c: Likewise.
5489         * common/diagnostics.h: Moved to ../include.
5490
5491 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
5492
5493         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
5494         to language_mode_manual while calling breakpoint_re_set_one.
5495
5496 2018-06-01  Tom Tromey  <tom@tromey.com>
5497
5498         * valops.c (value_cast_structs, destructor_name_p): Update.
5499         * symtab.c (gdb_mangle_name): Update.
5500         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
5501         Update.
5502         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
5503         (pascal_object_print_value_fields, pascal_object_print_value):
5504         Update.
5505         * p-typeprint.c (pascal_type_print_derivation_info): Update.
5506         * linespec.c (find_methods): Update.
5507         * gdbtypes.h (type_name_no_tag): Remove.
5508         (type_name_or_error): Rename from type_name_no_tag_or_error.
5509         * gdbtypes.c (type_name_no_tag): Remove.
5510         (type_name_or_error): Rename from type_name_no_tag_or_error.
5511         (lookup_struct_elt_type, check_typedef): Update.
5512         * expprint.c (print_subexp_standard): Update.
5513         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
5514         * d-namespace.c (d_lookup_nested_symbol): Update.
5515         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
5516         (cp_print_class_member): Update.
5517         * cp-namespace.c (cp_lookup_nested_symbol): Update.
5518         * completer.c (add_struct_fields): Update.
5519         * c-typeprint.c (cp_type_print_derivation_info)
5520         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
5521         Update.
5522         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
5523         (ada_prefer_type, ada_is_exception_sym): Update.
5524
5525 2018-06-01  Tom Tromey  <tom@tromey.com>
5526
5527         * valops.c (enum_constant_from_type, value_namespace_elt)
5528         (value_maybe_namespace_elt): Update.
5529         * valarith.c (find_size_for_pointer_math): Update.
5530         * target-descriptions.c (make_gdb_type): Update.
5531         * symmisc.c (print_symbol): Update.
5532         * stabsread.c (define_symbol, read_type)
5533         (complain_about_struct_wipeout, add_undefined_type)
5534         (cleanup_undefined_types_1): Update.
5535         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
5536         (rust_range_type_p, val_print_struct, rust_print_struct_def)
5537         (rust_internal_print_type, rust_composite_type)
5538         (rust_evaluate_funcall, rust_evaluate_subexp)
5539         (rust_inclusive_range_type_p): Update.
5540         * python/py-type.c (typy_get_tag): Update.
5541         * p-typeprint.c (pascal_type_print_base): Update.
5542         * mdebugread.c (parse_symbol, parse_type): Update.
5543         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
5544         Update.
5545         * guile/scm-type.c (gdbscm_type_tag): Update.
5546         * go-lang.c (sixg_string_p): Update.
5547         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
5548         Update.
5549         * gdbtypes.h (struct main_type) <tag_name>: Remove.
5550         (TYPE_TAG_NAME): Remove.
5551         * gdbtypes.c (type_name_no_tag): Simplify.
5552         (check_typedef, check_types_equal, recursive_dump_type)
5553         (copy_type_recursive, arch_composite_type): Update.
5554         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
5555         in summary mode when needed.
5556         * eval.c (evaluate_funcall): Update.
5557         * dwarf2read.c (fixup_go_packaging, read_structure_type)
5558         (process_structure_scope, read_enumeration_type)
5559         (read_namespace_type, read_module_type, determine_prefix): Update.
5560         * cp-support.c (inspect_type): Update.
5561         * coffread.c (process_coff_symbol, decode_base_type): Update.
5562         * c-varobj.c (c_is_path_expr_parent): Update.
5563         * c-typeprint.c (c_type_print_base_struct_union): Update.
5564         (c_type_print_base_1): Update.  Print struct/class/union/enum in
5565         summary when using C language.
5566         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
5567         (gen_maybe_namespace_elt): Update.
5568         * ada-lang.c (ada_type_name): Simplify.
5569         (empty_record, ada_template_to_fixed_record_type_1)
5570         (template_to_static_fixed_type)
5571         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
5572
5573 2018-06-01  Tom Tromey  <tom@tromey.com>
5574
5575         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
5576         c_print_type.
5577         * c-typeprint.c (c_print_type_1): Add "language" parameter.
5578         (c_print_type): Update.
5579         (c_print_type): New overload.
5580         (c_type_print_varspec_prefix, c_type_print_args)
5581         (c_type_print_varspec_suffix, c_print_type_no_offsets)
5582         (c_type_print_base_struct_union, c_type_print_base_1)
5583         (cp_type_print_method_args): Add "language" parameter.
5584         (c_type_print_base): Update.
5585         * c-lang.h (c_print_type): Add new overload.
5586
5587 2018-06-01  Tom Tromey  <tom@tromey.com>
5588
5589         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
5590         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
5591
5592 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
5593
5594         * aarch64-tdep.c (aarch64_sve_register_names): New const
5595         var.
5596         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
5597         (AARCH64_SVE_Z_REGS_NUM): New define.
5598         (AARCH64_SVE_P_REGS_NUM): Likewise.
5599         (AARCH64_SVE_NUM_REGS): Likewise.
5600
5601 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
5602
5603         * nat/linux-ptrace.h [__alpha__]
5604         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
5605         definitions.
5606
5607 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
5608
5609         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
5610         the endianness selected.
5611         * NEWS: Document `set endian auto' mode operation update.
5612
5613 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
5614
5615         * Makefile.in: Add new header.
5616         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
5617         (sve_vl_from_vg): Likewise.
5618         (sve_vq_from_vl): Likewise.
5619         (sve_vl_from_vq): Likewise.
5620         (sve_vq_from_vg): Likewise.
5621         (sve_vg_from_vq): Likewise.
5622         * configure.nat: Add new c file.
5623         * nat/aarch64-sve-linux-ptrace.c: New file.
5624         * nat/aarch64-sve-linux-ptrace.h: New file.
5625
5626 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
5627
5628         * aarch64-linux-nat.c (aarch64_linux_read_description):
5629         Add parmeter zero.
5630         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
5631         Likewise.
5632         * aarch64-tdep.c (tdesc_aarch64_list): Add.
5633         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
5634         (aarch64_gdbarch_init): Add parmeter zero.
5635         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
5636         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
5637         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
5638         parmeter.
5639         * doc/gdb.texinfo: Describe SVE feature
5640         * features/aarch64-sve.c: New file.
5641
5642 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
5643
5644         PR gdb/23210
5645         * gdbarch.sh (significant_addr_bit): Default to zero when
5646         not set by target architecture.
5647         * gdbarch.c: Re-generated.
5648         * utils.c (address_significant): Update.
5649
5650 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
5651
5652         * stack.c (func_command): Remove trailing newline in call to error.
5653
5654 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5655
5656         * regcache.h (regcache_raw_collect): Remove, update callers to
5657         use regcache::raw_collect.
5658         * regcache.c (regcache_raw_collect): Remove.
5659
5660 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5661
5662         * regcache.h (regcache_raw_supply): Remove, update callers to
5663         use detached_regcache::raw_supply.
5664         * regcache.c (regcache_raw_supply): Remove.
5665
5666 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5667
5668         * regcache.h (regcache_cooked_write_part): Remove, update
5669         callers to use regcache::cooked_write_part.
5670         * regcache.c (regcache_cooked_write_part): Remove.
5671
5672 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5673
5674         * regcache.h (regcache_cooked_read_part): Remove, update callers
5675         to use readable_regcache::cooked_read_part.
5676         * regcache.c (regcache_cooked_read_part): Remove.
5677
5678 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5679
5680         * regcache.h (regcache_cooked_read_value): Remove, update
5681         callers to use readable_regcache::cooked_read_value.
5682         * regcache.c (regcache_cooked_read_value): Remove.
5683
5684 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5685
5686         * regcache.h (regcache_cooked_write): Remove, update callers to
5687         use regcache::cooked_write.
5688         * regcache.c (regcache_cooked_write): Remove.
5689
5690 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5691
5692         * regcache.h (regcache_invalidate): Remove, update callers to
5693         use detached_regcache::invalidate instead.
5694         * regcache.c (regcache_invalidate): Remove.
5695
5696 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5697
5698         * regcache.h (regcache_raw_write_part): Remove, update callers
5699         to use regcache::raw_write_part instead.
5700         * regcache.c (regcache_raw_write_part): Remove.
5701
5702 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5703
5704         * regcache.h (regcache_raw_read_part): Remove, update callers to
5705         use readable_regcache::raw_read_part instead.
5706         * regcache.c (regcache_raw_read_part): Remove.
5707
5708 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5709
5710         * regcache.h (regcache_cooked_read): Remove, update callers to
5711         use readable_regcache::cooked_read instead.
5712         * regcache.c (regcache_cooked_read): Remove.
5713
5714 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5715
5716         * regcache.h (regcache_raw_write): Remove, update callers to use
5717         regcache::raw_write instead.
5718         * regcache.c (regcache_raw_write): Remove.
5719
5720 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5721
5722         * regcache.h (regcache_raw_read): Remove, update callers to use
5723         readable_regcache::raw_read instead.
5724         * regcache.c (regcache_raw_read): Remove.
5725
5726 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5727
5728         * regcache.h (regcache_raw_update): Remove, update callers to
5729         use readable_regcache::raw_update instead.
5730         * regcache.c (regcache_raw_update): Remove.
5731
5732 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5733
5734         * regcache.h (regcache_register_status): Remove, update callers
5735         to use reg_buffer::get_register_status directly instead.
5736         * regcache.c (regcache_register_status): Remove.
5737
5738 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5739
5740         * regcache.h (regcache_get_ptid): Remove, update all callers to
5741         call regcache::ptid instead.
5742         * regcache.c (regcache_get_ptid): Remove.
5743
5744 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5745
5746         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
5747
5748 2018-05-30  Pedro Alves  <palves@redhat.com>
5749
5750         * common/common-exceptions.h (exception_rethrow): Use
5751         ATTRIBUTE_NORETURN.
5752
5753 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
5754
5755         * breakpoint.c (print_solib_event, check_status_catch_solib):
5756         Remove struct keyword in range-based for loops.
5757         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
5758         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
5759         Likewise.
5760         * linespec.c (find_superclass_methods, search_minsyms_for_name):
5761         Likewise.
5762         * symfile.c (addr_info_make_relative): Likewise.
5763         * thread.c (value_in_thread_stack_temporaries): Likewise.
5764
5765 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
5766
5767         PR gdb/16841
5768         * valops.c (value_struct_elt_for_reference): Call check_typedef on
5769         aggregate type to get its real type before accessing it.
5770
5771 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
5772
5773         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
5774         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
5775         * coff-pe-read.c (add_pe_forwarded_sym): Replace
5776         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
5777         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
5778         * jit.c (jit_breakpoint_re_set_internal): Likewise.
5779         * printcmd.c (info_address_command): Likewise.
5780
5781 2018-05-29  Tom Tromey  <tom@tromey.com>
5782
5783         * windows-nat.c (handle_exception): Update fall-through comment.
5784
5785 2018-05-29  Tom Tromey  <tom@tromey.com>
5786
5787         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
5788         (struct program_space) <added_solibs>: Now a std::vector.
5789         * breakpoint.c (print_solib_event): Update.
5790         (check_status_catch_solib): Update.
5791         * progspace.c (clear_program_space_solib_cache): Update.
5792         * solib.c (update_solib_list): Update.
5793
5794 2018-05-29  Tom Tromey  <tom@tromey.com>
5795
5796         * python/py-type.c (typy_richcompare): Update.
5797         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
5798         * gdbtypes.h (types_deeply_equal): Return bool.
5799         (types_equal): Likewise.
5800         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
5801         declare VEC.
5802         (check_types_equal): Change worklist to std::vector.  Return
5803         bool.
5804         (struct type_equality_entry): Add constructor.
5805         (compare_maybe_null_strings): Return bool.
5806         (check_types_worklist): Return bool.  Change worklist to
5807         std::vector.
5808         (types_deeply_equal): Use std::vector.
5809         (types_equal): Return bool.
5810         (compare_maybe_null_strings): Simplify.
5811
5812 2018-05-29  Tom Tromey  <tom@tromey.com>
5813
5814         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
5815
5816 2018-05-29  Tom Tromey  <tom@tromey.com>
5817
5818         * objc-lang.h: Don't include cp-support.h.
5819         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
5820         declare VEC.
5821
5822 2018-05-27  Tom Tromey  <tom@tromey.com>
5823
5824         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
5825
5826 2018-05-25  Tom Tromey  <tom@tromey.com>
5827
5828         * value.c (value::location): Initialize.
5829
5830 2018-05-25  Tom Tromey  <tom@tromey.com>
5831
5832         * dbxread.c (init_bincl_list): Remove.
5833         (bincl_list): Now a std::vector.
5834         (bincls_allocated, next_bincl): Remove.
5835         (free_bincl_list, do_free_bincl_list_cleanup)
5836         (make_cleanup_free_bincl_list): Remove.
5837         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
5838         unique_xmalloc_ptr.
5839         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
5840         (struct header_file_location): Add constructor.
5841         (add_bincl_to_list): Remove.
5842
5843 2018-05-25  Tom Tromey  <tom@tromey.com>
5844
5845         * tui/tui.c (tui_enable): Update.
5846         * mi/mi-interp.c (mi_interp::init): Update.
5847         * interps.h (class interp) <name>: New method.
5848         <m_name>: Rename from name.
5849         (~scoped_restore_interp): Update.
5850         * interps.c (interp::interp): Update.
5851         (interp_add, interp_set, interp_lookup_existing)
5852         (current_interp_named_p): Update.
5853
5854 2018-05-25  Tom Tromey  <tom@tromey.com>
5855
5856         * interps.c (interp_name): Remove.
5857         * mi/mi-interp.c (mi_interp::init): Update.
5858         * interps.h (interp_name): Remove.
5859         (~scoped_restore_interp): Update.
5860         * tui/tui.c (tui_enable): Update.
5861
5862 2018-05-25  Tom Tromey  <tom@tromey.com>
5863
5864         * utils.c (fputs_maybe_filtered): Update.
5865         * linespec.c (decode_line_full): Update.
5866         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
5867         (mi_print_breakpoint_for_event, mi_solib_loaded)
5868         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
5869         (mi_user_selected_context_changed): Update.
5870         * mi/mi-main.c (mi_execute_command): Update.
5871         * cli/cli-script.c (execute_control_command): Update.
5872         * python/python.c (execute_gdb_command): Update.
5873         * solib.c (info_sharedlibrary_command): Update.
5874         * interps.c (interp_ui_out): Remove.
5875         * interps.h (interp_ui_out): Remove.
5876
5877 2018-05-25  Tom Tromey  <tom@tromey.com>
5878
5879         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
5880         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
5881         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
5882
5883 2018-05-25  Tom Tromey  <tom@tromey.com>
5884
5885         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
5886         * interps.c (interp_exec): Use scoped_restore.
5887
5888 2018-05-25  Tom Tromey  <tom@tromey.com>
5889
5890         * remote.c (remote_target::remote_file_get): Use
5891         gdb::byte_vector.
5892         (remote_target::remote_file_put): Likewise.
5893
5894 2018-05-25  Tom Tromey  <tom@tromey.com>
5895
5896         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
5897         a std::string.
5898         (get_pe_section_index, add_pe_exported_sym): Update.
5899         (read_pe_exported_syms): Use gdb::def_vector.
5900
5901 2018-05-25  Tom Tromey  <tom@tromey.com>
5902
5903         * frame.c (remove_prev_frame): Remove.
5904         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
5905
5906 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
5907
5908         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
5909         Remove prototypes.
5910         * mips-linux-nat.c (supply_fpregset): Always call
5911         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
5912         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
5913         `mips_fill_fpregset'.
5914         * mips-linux-tdep.c (mips_supply_fpregset)
5915         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
5916         (mips_fill_fpregset_wrapper): Remove functions.
5917         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
5918         (mips_linux_fpregset): Remove variable.
5919         (mips_linux_iterate_over_regset_sections): Use
5920         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
5921         (mips_linux_o32_sigframe_init): Remove comment.
5922
5923 2018-05-25  Pedro Alves  <palves@redhat.com>
5924
5925         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
5926         (struct readahead_cache, struct packet_reg, struct
5927         remote_arch_state, class remote_state): Move higher up in the
5928         file.
5929         (remote_target::m_remote_state): Now an object instead of a pointer.
5930         (remote_target::get_remote_state): Adjust.
5931
5932 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
5933
5934         * stack.c (select_and_print_frame): Delete.
5935         (struct function_bounds): Move struct within function.
5936         (func_command): Most content moved into new function
5937         find_frame_for_function, use new function, print result, add
5938         function comment.
5939         (find_frame_for_function): New function, now returns a result.
5940
5941 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5942
5943         * stack.c (iterate_over_block_arg_vars): Fix comment.
5944         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
5945
5946 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
5947
5948         PR gdb/23203
5949         * frame.c
5950         (scoped_restore_selected_frame::scoped_restore_selected_frame):
5951         Define.
5952         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
5953         Define.
5954         * frame.h (class scoped_restore_selected_frame): New class.
5955         * stack.c (print_frame_local_vars): Remove catching and rethrowing
5956         of any exception, use scoped_restore_selected_frame to restore the
5957         frame instead.
5958
5959 2018-05-24  Pedro Alves  <palves@redhat.com>
5960
5961         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
5962         override.
5963
5964 2018-05-23  Tom Tromey  <tom@tromey.com>
5965
5966         * complaints.c (struct complaints): Remove.
5967         (symfile_complaint_book): Remove.
5968         (series): New global.
5969         (complaint_internal): Update.
5970         (clear_complaints): Update.
5971
5972 2018-05-23  Tom Tromey  <tom@tromey.com>
5973
5974         * complaints.c (counters): New global.
5975         (struct complain): Remove.
5976         (struct complaints) <root>: Remove.
5977         (complaint_sentinel): Remove.
5978         (symfile_complaint_book): Update.
5979         (find_complaint) Remove.
5980         (complaint_internal, clear_complaints): Update.
5981
5982 2018-05-23  Tom Tromey  <tom@tromey.com>
5983
5984         * complaints.c (struct complain) <file, line>: Remove.
5985         (find_complaint): Remove file, line parameters.
5986         (complaint_internal): Update.
5987
5988 2018-05-23  Tom Tromey  <tom@tromey.com>
5989
5990         * complaints.c (vcomplaint): Remove.
5991         (complaint_internal) Merge in contents of vcomplaint.
5992
5993 2018-05-23  Tom Tromey  <tom@tromey.com>
5994
5995         * complaints.c (struct complaints) <explanation>: Remove.
5996         (symfile_explanations): Remove.
5997         (symfile_complaint_book): Update.
5998         (vcomplaint): Update.
5999         (struct explanation): Remove.
6000
6001 2018-05-23  Tom Tromey  <tom@tromey.com>
6002
6003         * complaints.c (symfile_complaints): Remove.
6004         (complaint_internal): Remove "complaints" parameter.
6005         (clear_complaints, vcomplaint): Remove "c" parameter.
6006         (get_complaints): Remove.
6007         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
6008         (dwarf2_debug_line_missing_file_complaint)
6009         (dwarf2_debug_line_missing_end_sequence_complaint)
6010         (dwarf2_complex_location_expr_complaint)
6011         (dwarf2_const_value_length_mismatch_complaint)
6012         (dwarf2_section_buffer_overflow_complaint)
6013         (dwarf2_macro_malformed_definition_complaint)
6014         (dwarf2_invalid_attrib_class_complaint)
6015         (create_addrmap_from_index, dw2_symtab_iter_next)
6016         (dw2_expand_marked_cus)
6017         (dw2_debug_names_iterator::find_vec_in_debug_names)
6018         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
6019         (create_debug_type_hash_table, init_cutu_and_read_dies)
6020         (partial_die_parent_scope, add_partial_enumeration)
6021         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
6022         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
6023         (read_import_statement, read_file_scope, create_dwo_cu_reader)
6024         (create_cus_hash_table, create_dwp_hash_table)
6025         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
6026         (dwarf2_rnglists_process, dwarf2_ranges_process)
6027         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
6028         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
6029         (handle_struct_member_die, process_structure_scope)
6030         (read_array_type, read_common_block, read_module_type)
6031         (read_tag_pointer_type, read_typedef, read_base_type)
6032         (read_subrange_type, load_partial_dies, partial_die_info::read)
6033         (partial_die_info::read, partial_die_info::read)
6034         (partial_die_info::read, read_checked_initial_length_and_offset)
6035         (dwarf2_string_attr, read_formatted_entries)
6036         (dwarf_decode_line_header)
6037         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
6038         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
6039         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
6040         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6041         (get_signatured_type, get_DW_AT_signature_type)
6042         (decode_locdesc, file_file_name, consume_improper_spaces)
6043         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
6044         (dwarf_decode_macro_bytes, dwarf_decode_macros)
6045         (dwarf2_symbol_mark_computed, set_die_type)
6046         (read_attribute_value): Update.
6047         * stap-probe.c (handle_stap_probe, get_stap_base_address):
6048         Update.
6049         * dbxread.c (unknown_symtype_complaint)
6050         (lbrac_mismatch_complaint, repeated_header_complaint)
6051         (set_namestring, function_outside_compilation_unit_complaint)
6052         (read_dbx_symtab, process_one_symbol): Update.
6053         * gdbtypes.c (stub_noname_complaint): Update.
6054         * windows-nat.c (handle_unload_dll): Update.
6055         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
6056         (decode_base_type): Update.
6057         * xcoffread.c (bf_notfound_complaint, ef_complaint)
6058         (eb_complaint, record_include_begin, record_include_end)
6059         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
6060         (process_xcoff_symbol, read_symbol)
6061         (function_outside_compilation_unit_complaint)
6062         (scan_xcoff_symtab): Update.
6063         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
6064         * buildsym.c (finish_block_internal, make_blockvector)
6065         (end_symtab_get_static_block, augment_type_symtab): Update.
6066         * dtrace-probe.c (dtrace_process_dof)
6067         (dtrace_static_probe_ops::get_probes): Update.
6068         * complaints.h (struct complaint): Don't declare.
6069         (symfile_complaints): Remove.
6070         (complaint_internal): Remove "complaints" parameter.
6071         (complaint): Likewise.
6072         (clear_complaints): Likewise.
6073         * symfile.c (syms_from_objfile_1, finish_new_objfile)
6074         (reread_symbols): Update.
6075         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
6076         (dwarf2_frame_cache, decode_frame_entry): Update.
6077         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
6078         * objc-lang.c (lookup_objc_class, lookup_child_selector)
6079         (info_selectors_command): Update.
6080         * macrotab.c (macro_include, check_for_redefinition)
6081         (macro_undef): Update.
6082         * objfiles.c (filter_overlapping_sections): Update.
6083         * stabsread.c (invalid_cpp_abbrev_complaint)
6084         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
6085         (define_symbol, error_type, read_type, rs6000_builtin_type)
6086         (stabs_method_name_from_physname, read_member_functions)
6087         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
6088         (attach_fields_to_type, complain_about_struct_wipeout)
6089         (read_range_type, read_args, common_block_start)
6090         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
6091         Update.
6092         * mdebugread.c (index_complaint, unknown_ext_complaint)
6093         (basic_type_complaint, bad_tag_guess_complaint)
6094         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
6095         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
6096         (parse_procedure, parse_lines)
6097         (function_outside_compilation_unit_complaint)
6098         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
6099         (bad_tag_guess_complaint, reg_value_complaint): Update.
6100         * cp-support.c (demangled_name_complaint): Update.
6101         * macroscope.c (sal_macro_scope): Update.
6102         * dwarf-index-write.c (class debug_names): Update.
6103
6104 2018-05-23  Tom Tromey  <tom@tromey.com>
6105
6106         * complaints.c (clear_complaints): Remove "noisy" parameter.
6107         * complaints.h (clear_complaints): Update.
6108         * symfile.c (syms_from_objfile_1, finish_new_objfile)
6109         (reread_symbols): Update.
6110
6111 2018-05-23  Tom Tromey  <tom@tromey.com>
6112
6113         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
6114         SUBSEQUENT_MESSAGE.
6115         (vcomplaint, clear_complaints): Update.
6116         (symfile_explanations): Remove some messages.
6117
6118 2018-05-23  Tom Tromey  <tom@tromey.com>
6119
6120         * complaints.c (internal_complaint): Remove.
6121         * complaints.h (internal_complaint): Remove.
6122
6123 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
6124
6125         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
6126
6127 2018-05-22  Pedro Alves  <palves@redhat.com>
6128
6129         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
6130         (remote_fileio_badfd, remote_fileio_return_errno)
6131         (remote_fileio_return_success, remote_fileio_func_open)
6132         (remote_fileio_func_open, remote_fileio_func_close)
6133         (remote_fileio_func_read, remote_fileio_func_write)
6134         (remote_fileio_func_lseek, remote_fileio_func_rename)
6135         (remote_fileio_func_unlink, remote_fileio_func_stat)
6136         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
6137         (remote_fileio_func_isatty, remote_fileio_func_system): Add
6138         remote_target parameter.
6139         (remote_fio_func_map) <func>: Add remote_target parameter.
6140         (do_remote_fileio_request, remote_fileio_request):
6141         * remote-fileio.h (remote_fileio_request):
6142         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
6143         remote_target parameter.
6144         (remote_notif_process, handle_notification): Adjust to pass down
6145         the remote.
6146         (remote_notif_state_allocate): Add remote_target parameter.  Save
6147         it.
6148         * remote-notif.h (struct remote_target): Forward declare.
6149         (struct notif_client) <parse, ack, can_get_pending_events>: Add
6150         remote_target parameter.
6151         (struct remote_notif_state) <remote>: New field.
6152         (remote_notif_ack, remote_notif_parse): Add remote_target
6153         parameter.
6154         (remote_notif_state_allocate, remote_notif_state_allocate): Add
6155         remote_target parameter.
6156         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
6157         (threads_listing_context, rmt_thread_action, protocol_feature)
6158         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
6159         (packet_result, struct threads_listing_context, remote_state):
6160         Move definitions and declarations higher up.
6161         (remote_target) <~remote_target>: Declare.
6162         (remote_download_command_source, remote_file_put, remote_file_get)
6163         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
6164         (remote_hostio_pread_vFile, remote_hostio_send_command)
6165         (remote_hostio_set_filesystem, remote_hostio_open)
6166         (remote_hostio_close, remote_hostio_unlink, remote_state)
6167         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
6168         (get_memory_write_packet_size, get_memory_read_packet_size)
6169         (append_pending_thread_resumptions, remote_detach_1)
6170         (append_resumption, remote_resume_with_vcont)
6171         (add_current_inferior_and_thread, wait_ns, wait_as)
6172         (process_stop_reply, remote_notice_new_inferior)
6173         (process_initial_stop_replies, remote_add_thread)
6174         (btrace_sync_conf, remote_btrace_maybe_reopen)
6175         (remove_new_fork_children, kill_new_fork_children)
6176         (discard_pending_stop_replies, stop_reply_queue_length)
6177         (check_pending_events_prevent_wildcard_vcont)
6178         (discard_pending_stop_replies_in_queue, stop_reply)
6179         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
6180         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
6181         (remote_interrupt_as, remote_interrupt_ns)
6182         (remote_get_noisy_reply, remote_query_attached)
6183         (remote_add_inferior, remote_current_thread, get_current_thread)
6184         (set_thread, set_general_thread, set_continue_thread)
6185         (set_general_process, write_ptid)
6186         (remote_unpack_thread_info_response, remote_get_threadinfo)
6187         (parse_threadlist_response, remote_get_threadlist)
6188         (remote_threadlist_iterator, remote_get_threads_with_ql)
6189         (remote_get_threads_with_qxfer)
6190         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
6191         (get_offsets, remote_check_symbols, remote_supported_packet)
6192         (remote_query_supported, remote_packet_size)
6193         (remote_serial_quit_handler, remote_detach_pid)
6194         (remote_vcont_probe, remote_resume_with_hc)
6195         (send_interrupt_sequence, interrupt_query)
6196         (remote_notif_get_pending_events, fetch_register_using_p)
6197         (send_g_packet, process_g_packet, fetch_registers_using_g)
6198         (store_register_using_P, store_registers_using_G)
6199         (set_remote_traceframe, check_binary_download)
6200         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
6201         (remote_xfer_live_readonly_partial, remote_read_bytes)
6202         (remote_send_printf, remote_flash_write, readchar)
6203         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
6204         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
6205         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
6206         (extended_remote_disable_randomization, extended_remote_run)
6207         (send_environment_packet, extended_remote_environment_support)
6208         (extended_remote_set_inferior_cwd, remote_write_qxfer)
6209         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
6210         (packet_command): Now methods of ...
6211         (remote_target): ... this class.
6212         (m_remote_state) <remote_target>: New field.
6213         (struct remote_state) <stop_reply_queue,
6214         remote_async_inferior_event_token, wait_forever_enabled_p>: New
6215         fields.
6216         (remote_state::remote_state): Allocate stop_reply_queue.
6217         (remote_state): Delete global.
6218         (get_remote_state_raw): Delete.
6219         (remote_target::get_remote_state): Allocate m_remote_state on
6220         demand.
6221         (get_current_remote_target): New.
6222         (remote_ops, extended_remote_ops): Delete.
6223         (wait_forever_enabled_p, remote_async_inferior_event_token):
6224         Delete, moved to struct remote_state.
6225         (remote_target::close): Delete self.  Destruction bits split to
6226         ...
6227         (remote_target::~remote_target): ... this.
6228         (show_memory_packet_size): Adjust to use
6229         get_current_remote_target.
6230         (struct protocol_feature) <func>: Add remote_target parameter.
6231         All callers adjusted.
6232         (curr_quit_handler_target): New.
6233         (remote_serial_quit_handler): Reimplement.
6234         (remote_target::open_1): Adjust to use get_current_remote_target.
6235         Heap-allocate remote_target/extended_remote_target instances.
6236         (vcont_builder::vcont_builder): Add remote_target parameter, and
6237         save it in m_remote.  All callers adjusted.
6238         (vcont_builder::m_remote): New field.
6239         (vcont_builder::restart, vcont_builder::flush)
6240         (vcont_builder::push_action): Use it.
6241         (remote_target::commit_resume): Use it.
6242         (struct queue_iter_param) <remote>: New field.
6243         (remote_target::remove_new_fork_children): Fill in 'remote' field.
6244         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
6245         (check_pending_event_prevents_wildcard_vcont_callback)
6246         (remote_target::check_pending_events_prevent_wildcard_vcont)
6247         (remote_target::discard_pending_stop_replies)
6248         (remote_target::discard_pending_stop_replies_in_queue)
6249         (remote_target::remote_notif_remove_queued_reply): Fill in
6250         'remote' field.
6251         (remote_notif_get_pending_events): New.
6252         (remote_target::readchar, remote_target::remote_serial_write):
6253         Save/restore curr_quit_handler_target.
6254         (putpkt): New.
6255         (kill_new_fork_children): Fill in 'remote' field.
6256         (packet_command): Use get_current_remote_target, defer to
6257         remote_target method of same name.
6258         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
6259         parameter, and save it in m_remote.  All callers adjusted.
6260         (scoped_remote_fd::release): Use m_remote.
6261         (scoped_remote_fd::m_remote): New field.
6262         (remote_file_put, remote_file_get, remote_file_delete): Use
6263         get_current_remote_target, defer to remote_target method of same
6264         name.
6265         (remote_btrace_reset): Add remote_state paremeter.  Update all
6266         callers.
6267         (remote_async_inferior_event_handler). Pass down 'data'.
6268         (remote_new_objfile): Use get_current_remote_target.
6269         (remote_target::vcont_r_supported): New.
6270         (set_range_stepping): Use get_current_remote_target and
6271         remote_target::vcont_r_supported.
6272         (_initialize_remote): Don't allocate 'remote_state' and
6273         'stop_reply_queue' globals.
6274         * remote.h (struct remote_target): Forward declare.
6275         (getpkt, putpkt, remote_notif_get_pending_events): Add
6276         'remote_target' parameter.
6277
6278 2018-05-22  Pedro Alves  <palves@redhat.com>
6279
6280         * remote.c (vcont_builder): Now a class.  Make all data members
6281         private.
6282         (vcont_builder) <vcont_builder, restart, flush, push_action>:
6283         Declare methods.
6284         (vcont_builder_restart): Rename to ...
6285         (vcont_builder::restart): ... this.
6286         (vcont_builder_flush): Rename to ...
6287         (vcont_builder::flush): ... this.
6288         (vcont_builder_push_action): Rename to ...
6289         (vcont_builder::push_action): ... this.
6290         (remote_target::commit_resume): Adjust.
6291
6292 2018-05-22  Pedro Alves  <palves@redhat.com>
6293
6294         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
6295         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
6296         (get_fixed_memory_packet_size): New.
6297         (get_memory_packet_size): Use it.
6298         (set_memory_packet_size): Don't override the config size with
6299         DEFAULT_MAX_MEMORY_PACKET_SIZE.
6300         (show_memory_packet_size): Use get_fixed_memory_packet_size.
6301         Don't refer to get_memory_packet_size if not connected to a remote
6302         target.  Show "(default)" if configured size is 0.
6303
6304 2018-05-22  Pedro Alves  <palves@redhat.com>
6305
6306         * remote.c (remote_target::mourn_inferior): Move
6307         discard_pending_stop_replies call here from ...
6308         (_initialize_remote): ... here.
6309
6310 2018-05-22  Pedro Alves  <palves@redhat.com>
6311
6312         * remote.c (compare_section_command): Remove set_general_process
6313         call.
6314
6315 2018-05-22  Pedro Alves  <palves@redhat.com>
6316
6317         * remote.c (struct packet_reg, struct remote_arch_state):
6318         Move higher up in the file.
6319         (remote_state) <m_arch_states>: Store remote_arch_state values
6320         instead of remote_arch_state pointers.
6321         (remote_state::get_remote_arch_state): Adjust.
6322
6323 2018-05-22  Pedro Alves  <palves@redhat.com>
6324
6325         * remote.c: Include <unordered_map>.
6326         (remote_state): Now a class.
6327         (remote_state) <get_remote_arch_state>: Declare method.
6328         <get_remote_arch_state>: New field.
6329         (remote_arch_state) <remote_arch_state>: Declare ctor.
6330         <regs>: Now a unique_ptr.
6331         (remote_gdbarch_data_handle): Delete.
6332         (get_remote_arch_state): Delete.
6333         (remote_state::get_remote_arch_state): New.
6334         (get_remote_state): Adjust to call remote_state's
6335         get_remote_arch_state method.
6336         (init_remote_state): Delete, bits factored out to ...
6337         (remote_arch_state::remote_arch_state): ... this new method.
6338         (get_remote_packet_size, get_memory_packet_size)
6339         (process_g_packet, remote_target::fetch_registers)
6340         (remote_target::prepare_to_store, store_registers_using_G)
6341         (remote_target::store_registers, remote_target::get_trace_status):
6342         Adjust to call remote_state's method.
6343         (_initialize_remote): Remove reference to
6344         remote_gdbarch_data_handle.
6345
6346 2018-05-22  Pedro Alves  <palves@redhat.com>
6347
6348         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
6349         pread>: New method declarations.
6350         (remote_target::open_1): Adjust.
6351         (readahead_cache_invalidate): Rename to ...
6352         (readahead_cache::invalidate): ... this, and adjust to be a class
6353         method.
6354         (readahead_cache_invalidate_fd): Rename to ...
6355         (readahead_cache::invalidate_fd): ... this, and adjust to be a
6356         class method.
6357         (remote_hostio_pwrite): Adjust.
6358         (remote_hostio_pread_from_cache): Rename to ...
6359         (readahead_cache::pread): ... this, and adjust to be a class
6360         method.
6361         (remote_hostio_close): Adjust.
6362
6363 2018-05-22  Pedro Alves  <palves@redhat.com>
6364
6365         * remote.c (remote_hostio_close_cleanup): Delete.
6366         (class scoped_remote_fd): New.
6367         (remote_file_put, remote_file_get): Use it.
6368
6369 2018-05-22  Pedro Alves  <palves@redhat.com>
6370
6371         (struct vCont_action_support): Use bool and initialize all fields.
6372         (struct readahead_cache): Initialize all fields.
6373         (remote_state): Use bool and initialize all fields.
6374         (remote_state::remote_state, remote_state::~remote_state): New.
6375         (new_remote_state): Delete.
6376         (_initialize_remote): Use new to allocate remote_state.
6377
6378 2018-05-22  Pedro Alves  <palves@redhat.com>
6379             張俊芝  <zjz@zjz.name>
6380
6381         PR gdb/22973
6382         * c-exp.y: Include "c-support.h".
6383         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
6384         of tolower.  Use c_ident_is_alpha to scan names.
6385         * c-lang.c: Include "c-support.h".
6386         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
6387         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
6388         * c-support.h: New file, with bits factored out from ...
6389         * cp-name-parser.y: ... this file.
6390         Include "c-support.h".
6391         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
6392         c-support.h and renamed.
6393         (symbol_end, yylex): Adjust.
6394
6395 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6396
6397         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
6398         parameter type to CORE_ADDR.
6399         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
6400         parameter type in declaration to CORE_ADDR.
6401         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
6402         target_auxv_search to get AT_HWCAP and use the result to get the
6403         target description.
6404         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
6405         to CORE_ADDR. Remove the cast of the return value to unsigned
6406         long. Fix error predicate of target_auxv_search.
6407         (ppc_linux_nat_target::read_description): Change the type of the
6408         hwcap variable to CORE_ADDR.
6409
6410 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6411
6412         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
6413         if the size of fpscr is larger than 32 bits.
6414
6415 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6416
6417         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
6418         (ppc32_linux_vsxregmap): New global.
6419         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
6420         regcache_supply_regset, and regcache_collect_regset.
6421         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
6422         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
6423         (fetch_vsx_register, store_vsx_register): Remove.
6424         (fetch_vsx_registers): Add regno parameter. Get regset using
6425         ppc_linux_vsxregset. Use regset to supply registers.
6426         (store_vsx_registers): Add regno parameter. Get regset using
6427         ppc_linux_vsxregset. Use regset to collect registers.
6428         (fetch_register): Call fetch_vsx_registers instead of
6429         fetch_vsx_register.
6430         (store_register): Call store_vsx_registers instead of
6431         store_vsx_register.
6432         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
6433         new regno parameter.
6434         (store_ppc_registers): Call store_vsx_registers with -1 for the
6435         new regno parameter.
6436         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
6437         (ppc_collect_vsxregset): Remove.
6438
6439 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6440
6441         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
6442         offset fields.
6443         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
6444         for vector register offset fields.
6445         (ppc64_fbsd_reg_offsets): Likewise.
6446         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
6447         to vector register offset fields.
6448         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
6449         to vector register offset fields.
6450         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
6451         vector register offset fields.
6452         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
6453         initializers for vector register offset fields.
6454         (rs6000_aix64_reg_offsets): Likewise.
6455         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
6456         (ppc_supply_vrregset): Remove.
6457         (ppc_collect_vrregset): Remove.
6458         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
6459         (ppc_linux_vrregset) : New function.
6460         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
6461         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
6462         (ppc32_linux_vrregset): Remove.
6463         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
6464         and use result instead of ppc32_linux_vrregset.
6465         (ppc32_linux_reg_offsets): Remove initializers for vector register
6466         offset fields.
6467         (ppc64_linux_reg_offsets): Likewise.
6468         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
6469         * ppc-linux-nat.c: Include regset.h.
6470         (gdb_vrregset_t): Adjust comment to account for little-endian
6471         mode.
6472         (supply_vrregset, fill_vrregset): Remove.
6473         (fetch_altivec_register, store_altivec_register): Remove.
6474         (fetch_altivec_registers): Add regno parameter. Get regset using
6475         ppc_linux_vrregset. Use regset to supply registers.
6476         (store_altivec_registers): Add regno parameter. Get regset using
6477         ppc_linux_vrregset. Use regset to collect registers.
6478         (fetch_register): Call fetch_altivec_registers instead of
6479         fetch_altivec_register.
6480         (store_register): Call store_altivec_registers instead of
6481         store_altivec_register.
6482         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
6483         the new regno parameter.
6484         (store_ppc_registers): Call store_altivec_registers with -1 for
6485         the new regno parameter.
6486
6487 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6488
6489         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
6490         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
6491         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
6492         (gdb_vrregset_t): Change array type size to
6493         PPC_LINUX_SIZEOF_VRREGSET.
6494         (gdb_vsxregset_t): Change array type size to
6495         PPC_LINUX_SIZEOF_VSXREGSET.
6496         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
6497         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
6498         PPC_LINUX_SIZEOF_VSXREGSET.
6499
6500 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6501
6502         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
6503         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
6504         nat/ppc-linux.c.
6505         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
6506         ppc_linux_target_wordsize with tid.
6507         (ppc_linux_nat_target::read_description): Call ppc_linux_target
6508         wordsize with tid.
6509         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
6510         (ppc64_64bit_inferior_p): Add static and inline specifiers.
6511         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
6512         tid parameter. Remove static specifier.
6513         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
6514         (ppc_linux_target_wordsize): New declaration.
6515
6516 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6517
6518         * arch/ppc-linux-common.c: New file.
6519         * arch/ppc-linux-common.h: New file.
6520         * arch/ppc-linux-tdesc.h: New file.
6521         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
6522         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
6523         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
6524         arch/ppc-linux-tdesc.h.
6525         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
6526         arch/ppc-linux-tdesc.h.
6527         (ppc_linux_nat_target::read_description): Remove target
6528         description matching code. Fill a ppc_linux_features struct and
6529         call ppc_linux_match_description with it. Move comment about ISA
6530         2.05 to ppc-linux-common.c.
6531         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
6532         arch/ppc-linux-tdesc.h.
6533         (ppc_linux_core_read_description): Remove target description
6534         matching code. Fill a ppc_linux_features struct and call
6535         ppc_linux_match_description with it.
6536         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
6537         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
6538         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
6539         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
6540         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
6541         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
6542         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
6543         (tdesc_powerpc_e500l): Remove.
6544
6545 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
6546
6547         * ada-lang.c (catch_assert_command): Pass empty string instead
6548         of NULL for excep_string argument.
6549
6550 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
6551
6552         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
6553         the width of the requested register exceeds the width of the
6554         `ptrace' data type.
6555
6556 2018-05-21  Tom Tromey  <tom@tromey.com>
6557
6558         * printcmd.c (output_command): Remove.
6559         (output_command_const): Rename to output_command.
6560         * valprint.h (output_command): Rename from output_command_const.
6561         * tracepoint.c (trace_dump_actions): Call output_command.
6562
6563 2018-05-21  Tom Tromey  <tom@tromey.com>
6564
6565         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
6566         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
6567         * ada-lang.h (create_ada_exception_catchpoint): Update.
6568         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
6569         std::string.
6570         (create_excep_cond_exprs, ~ada_catchpoint)
6571         (should_stop_exception, print_one_exception)
6572         (print_mention_exception, print_recreate_exception): Update.
6573         (ada_get_next_arg): Remove.
6574         (catch_ada_exception_command_split): Use std::string.  Change type
6575         of "excep_string", "cond_string".
6576         (catch_ada_exception_command): Update.
6577         (create_ada_exception_catchpoint): Change type of excep_string.
6578         (ada_exception_sal): Remove excep_string parameter.
6579         (~ada_catchpoint): Remove.
6580
6581 2018-05-21  Tom Tromey  <tom@tromey.com>
6582
6583         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
6584         cleanup.
6585
6586 2018-05-21  Tom Tromey  <tom@tromey.com>
6587
6588         * ada-lang.c (ada_exception_message_1, ada_exception_message):
6589         Return unique_xmalloc_ptr.
6590         (print_it_exception): Update.
6591
6592 2018-05-21  Tom Tromey  <tom@tromey.com>
6593
6594         * tracepoint.c (trace_dump_actions): Use std::string.
6595
6596 2018-05-21  Tom Tromey  <tom@tromey.com>
6597
6598         * symfile.c (reread_symbols): Use std::string for original_name.
6599
6600 2018-05-21  Tom Tromey  <tom@tromey.com>
6601
6602         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
6603         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
6604         constructor.
6605
6606 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
6607
6608         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
6609         instance to...
6610         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
6611         * objfiles.c (get_objfile_bfd_data): Allocate
6612         objfile_per_bfd_storage with obstack_new when allocating on
6613         obstack.
6614
6615 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
6616
6617         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
6618         OBSTACK_ZALLOC.
6619         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
6620         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
6621         * mdebugread.c (mdebug_build_psymtabs): Likewise.
6622         (add_pending): Likewise.
6623         (parse_symbol): Likewise.
6624         (parse_partial_symbols): Likewise.
6625         (psymtab_to_symtab_1): Likewise.
6626         (new_psymtab): Likewise.
6627         (elfmdebug_build_psymtabs): Likewise.
6628         * minsyms.c (terminate_minimal_symbol_table): Likewise.
6629         * objfiles.c (get_objfile_bfd_data): Likewise.
6630         (objfile_register_static_link): Likewise.
6631         * psymtab.c (allocate_psymtab): Likewise.
6632         * stabsread.c (read_member_functions): Likewise.
6633         * xcoffread.c (xcoff_end_psymtab): Likewise.
6634
6635 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
6636
6637         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
6638         compiler supports std::is_trivially_constructible.
6639         * common/poison.h: Include obstack.h.
6640         (IsMallocable): Define to is_trivially_constructible if the
6641         compiler supports it, define to true_type otherwise.
6642         (xobnew): New.
6643         (XOBNEW): Redefine.
6644         (xobnewvec): New.
6645         (XOBNEWVEC): Redefine.
6646         * gdb_obstack.h (obstack_zalloc): New.
6647         (OBSTACK_ZALLOC): Redefine.
6648         (obstack_calloc): New.
6649         (OBSTACK_CALLOC): Redefine.
6650         (obstack_new): New.
6651         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
6652         (gdbarch_obstack): New declaration in gdbarch.h, definition in
6653         gdbarch.c.
6654         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
6655         obstack_calloc/obstack_zalloc.
6656         (gdbarch_obstack_zalloc): Remove.
6657         * target-descriptions.c (tdesc_data_init): Use obstack_new.
6658
6659 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6660
6661         * stack.c (backtrace_command_1): Remove useless variable int i.
6662
6663 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6664
6665         * stack.c (print_frame_info): Fix comment.
6666
6667 2018-05-18  Tom Tromey  <tom@tromey.com>
6668
6669         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
6670         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
6671         (~dwarf2_per_objfile): Update
6672         (dwarf2_get_dwz_file): Use new.
6673         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
6674         unique_ptr.
6675
6676 2018-05-18  Tom Tromey  <tom@tromey.com>
6677
6678         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
6679         unique_ptr.
6680         * dwarf2read.c (struct dwp_file): Add constructor and
6681         initializers.
6682         (open_and_init_dwp_file): Return a unique_ptr.
6683         (dwarf2_per_objfile, create_dwp_hash_table)
6684         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
6685         (lookup_dwo_unit_in_dwp): Update.
6686         (open_and_init_dwp_file, get_dwp_file): Update.
6687
6688 2018-05-18  Tom Tromey  <tom@tromey.com>
6689
6690         * dwarf2read.c (dwarf2_per_objfile): Update.
6691         (struct mapped_index): Add initializers.
6692         (dwarf2_read_index): Use new.
6693         (dw2_symtab_iter_init): Update.
6694         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
6695         unique_ptr.
6696
6697 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
6698
6699         * dwarf2read.c (mapped_index) <total_size>: Remove.
6700
6701 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
6702
6703         * unittests/format_pieces-selftests.c (test_format_specifier):
6704         Add ARI comments.
6705
6706 2018-05-18  Tom Tromey  <tom@tromey.com>
6707
6708         * c-typeprint.c (maybe_print_hole): New function.
6709         (c_print_type_struct_field_offset): Update.
6710         (c_type_print_base_struct_union): Call maybe_print_hole.
6711
6712 2018-05-17  Keith Seitz  <keiths@redhat.com>
6713
6714         * breakpoint.c (build_bpstat_chain): New function, moved from
6715         bpstat_stop_status.
6716         (bpstat_stop_status): Add optional parameter, `stop_chain'.
6717         If no stop chain is passed, call build_bpstat_chain to build it.
6718         * breakpoint.h (build_bpstat_chain): Declare.
6719         (bpstat_stop_status): Move documentation here from breakpoint.c.
6720         * infrun.c (handle_signal_stop): Before eliding inlined frames,
6721         build the stop chain and pass it to skip_inline_frames.
6722         Pass this stop chain to bpstat_stop_status.
6723         * inline-frame.c: Include breakpoint.h.
6724         (stopped_by_user_bp_inline_frame): New function.
6725         (skip_inline_frames): Add parameter `stop_chain'.
6726         Move documention to inline-frame.h.
6727         If non-NULL, use stopped_by_user_bp_inline_frame to determine
6728         whether the frame should be elided.
6729         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
6730         Add moved documentation and update for new parameter.
6731
6732 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
6733
6734         PR cli/14975
6735         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6736         unittests/format_pieces-selftests.c.
6737         * common/format.h (format_piece) <operator==>: New.
6738         (format_pieces) <operator[]>: Remove.
6739         * common/format.c (format_pieces::format_pieces): Handle \e.
6740         * unittests/format_pieces-selftests.c: New.
6741
6742 2018-05-17  Tom Tromey  <tom@tromey.com>
6743
6744         PR symtab/23010:
6745         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
6746         (dw2_instantiate_symtab): Add skip_partial parameter.
6747         (dw2_find_last_source_symtab, dw2_map_expand_apply)
6748         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
6749         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
6750         (dw2_expand_symtabs_matching_one)
6751         (dw2_find_pc_sect_compunit_symtab)
6752         (dw2_debug_names_lookup_symbol)
6753         (dw2_debug_names_expand_symtabs_for_function): Update.
6754         (init_cutu_and_read_dies): Add skip_partial parameter.
6755         (process_psymtab_comp_unit, build_type_psymtabs_1)
6756         (process_skeletonless_type_unit, load_partial_comp_unit)
6757         (psymtab_to_symtab_1): Update.
6758         (load_full_comp_unit): Add skip_partial parameter.
6759         (process_imported_unit_die, dwarf2_read_addr_index)
6760         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
6761         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
6762         (read_signatured_type): Update.
6763
6764 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
6765
6766         * value.c (release_value): Remove unused variable.
6767         (record_latest_value): Likewise.
6768         (access_value_history): Likewise.
6769         (preserve_values): Likewise.
6770
6771 2018-05-17  Tom Tromey  <tom@tromey.com>
6772
6773         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
6774         Initialize.
6775
6776 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
6777
6778         PR gdb/22286
6779         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
6780         Also handle registers whose width is not a multiple of
6781         PTRACE_TYPE_RET.
6782         (linux_nat_trad_target::store_register): Likewise.
6783
6784 2018-05-16  Tom Tromey  <tom@tromey.com>
6785
6786         * gdbcore.h (core_bfd): Redefine.
6787         * corelow.c (core_target::close): Update.
6788         (core_target_open): Update.
6789         * progspace.h (struct program_space) <cbfd>: Now a
6790         gdb_bfd_ref_ptr.
6791
6792 2018-05-16  Tom Tromey  <tom@tromey.com>
6793
6794         PR cli/19551:
6795         * symfile-add-flags.h (enum symfile_add_flags)
6796         <SYMFILE_NOT_FILENAME>: New constant.
6797         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
6798         objfile name from BFD.
6799         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
6800         * minidebug.c (find_separate_debug_file_in_section): Put
6801         ".gnu_debugdata" into BFD's file name.
6802
6803 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
6804
6805         * regcache.c (regcache_read_ftype, regcache_write_ftype):
6806         Remove.
6807
6808 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
6809
6810         PR binutils/21446
6811         * aarch64-tdep.c (aarch64_analyze_prologue,
6812         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
6813         Indicate not interested in errors.
6814
6815 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
6816
6817         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
6818         Supply the MIPS_ZERO_REGNUM register.
6819
6820 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
6821
6822         * mips-tdep.c (mask_address_var): Make variable static.
6823
6824 2018-05-14  Tom Tromey  <tom@tromey.com>
6825
6826         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
6827
6828 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
6829
6830         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
6831         FXSAVE_ADDR for the mxcsr register.
6832
6833 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
6834
6835         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
6836
6837 2018-05-11  Pedro Alves  <palves@redhat.com>
6838
6839         * corelow.c (core_target) <core_target>: No longer inline.
6840         Initialize m_core_gdbarch, m_core_vec and build the section table
6841         here.
6842         <~core_target>: New.
6843         <core_gdbarch, get_core_register_section>: New methods.
6844         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
6845         factored out from ...
6846         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
6847         (core_ops): Delete.
6848         (sniff_core_bfd): Add gdbarch parameter.
6849         (core_close): Delete, merged into ...
6850         (core_target::close): ... here.  Delete self.
6851         (core_close_cleanup): Delete.
6852         (core_target_open): Allocate a core_target on the heap.  Use a
6853         unique_ptr instead of a cleanup.  Bits moved into the core_target
6854         ctor.  Adjust to use core_target methods instead of globals.
6855         (get_core_register_section): Rename to ...
6856         (core_target::get_core_register_section): ... this and adjust.
6857         (struct get_core_registers_cb_data): New.
6858         (get_core_registers_cb): Use it.  Use bool.
6859         (core_target::fetch_registers, core_target::files_info)
6860         (core_target::xfer_partial, core_target::read_description)
6861         (core_target::pid_to, core_target::thread_name): Adjust to
6862         reference class fields instead of globals.
6863         * target.h (struct target_ops_deleter, target_ops_up): New.
6864
6865 2018-05-11  Pedro Alves  <palves@redhat.com>
6866
6867         * corefile.c (core_file_command): Move to corelow.c.
6868         * corelow.c (the_core_target): Delete.
6869         (core_file_command): Moved from corefile.c.  Check exec_bfd
6870         instead of the_core_target.  Use target_detach instead of calling
6871         into the_core_target directly.
6872         (maybe_say_no_core_file_now): New.
6873         (core_target::detach): Use it.
6874         (_initialize_corelow): Remove references to the_core_target.
6875         * gdbcore.h (the_core_target): Delete.
6876
6877 2018-05-11  Tom Tromey  <tromey@redhat.com>
6878             Pedro Alves  <palves@redhat.com>
6879
6880         * corefile.c (core_bfd): Remove.
6881         * gdbcore.h (core_bfd): Now a macro.
6882         * progspace.h (struct program_space) <cbfd>: New field.
6883
6884 2018-05-11  Tom Tromey  <tom@tromey.com>
6885
6886         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
6887         gdb::def_vector.
6888
6889 2018-05-10  Tom Tromey  <tom@tromey.com>
6890
6891         * configure: Rebuild.
6892         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
6893
6894 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
6895
6896         PR server/23158:
6897         * regformats/regdat.sh: Adjust script, following the addition
6898         of the new expedite_regs parameter to init_target_desc.
6899
6900 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
6901     
6902         PR gdb/23127
6903         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
6904         set_gdbarch_significant_addr_bit.
6905         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
6906         set_gdbarch_significant_addr_bit.
6907         * utils.c (address_significant): Update to sign extend addr.
6908
6909 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
6910
6911         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
6912         (xtensa_linux_init_abi): Limit tdep->num_regs by
6913         tdep->num_nopriv_regs.
6914         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
6915         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
6916         not initialized.
6917
6918 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
6919
6920         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
6921
6922 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
6923
6924         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
6925         (I387_MXCSR_INIT_VAL): New constant.
6926         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
6927         buffer if it was supplied by the inferior.
6928         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
6929         (i387_xsave_get_clear_bv): New function.
6930         (i387_supply_xsave): Only read x87 control registers from the
6931         xsave buffer if the feature is enabled, and the state will have
6932         been written, otherwise, provide a suitable default.
6933         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
6934         including x87 control registers.  Update control registers if they
6935         have changed from the default value, and mark features as enabled
6936         as required.
6937         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
6938
6939 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
6940
6941         * spu-tdep.c (info_spu_event_command): Fix output formatting.
6942
6943 2018-05-07  Tom Tromey  <tom@tromey.com>
6944
6945         * configure: Rebuild.
6946         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
6947
6948 2018-05-07  Tom Tromey  <tom@tromey.com>
6949
6950         PR tdep/20362:
6951         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
6952         bit.  Use correct value for VDIV.
6953
6954 2018-05-04  Tom Tromey  <tom@tromey.com>
6955
6956         * configure: Rebuild.
6957         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
6958
6959 2018-05-04  Tom Tromey  <tom@tromey.com>
6960
6961         * linux-record.c (record_linux_system_call) <case
6962         RECORD_SYS_RECVFROM>: Add "break".
6963
6964 2018-05-04  Tom Tromey  <tom@tromey.com>
6965
6966         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
6967         Add missing "break".
6968         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
6969         Add missing "break".
6970
6971 2018-05-04  Tom Tromey  <tom@tromey.com>
6972
6973         * rs6000-tdep.c (ppc_process_record_op4)
6974         (ppc_process_record_op63): Add fall-through comment.
6975
6976 2018-05-04  Tom Tromey  <tom@tromey.com>
6977
6978         * i386-tdep.c (i386_process_record): Add fall-through comment.
6979
6980 2018-05-04  Tom Tromey  <tom@tromey.com>
6981
6982         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
6983         comment.
6984
6985 2018-05-04  Tom Tromey  <tom@tromey.com>
6986
6987         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
6988         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
6989         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
6990         comment.
6991         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
6992         comment.
6993         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
6994         comment.
6995
6996 2018-05-04  Tom Tromey  <tom@tromey.com>
6997
6998         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
6999
7000 2018-05-04  Tom Tromey  <tom@tromey.com>
7001
7002         * s390-tdep.c (s390_process_record): Fix fall-through comments.
7003         * xcoffread.c (scan_xcoff_symtab): Move comment later.
7004         * symfile.c (section_is_mapped): Fix fall-through comment.
7005         * stabsread.c (define_symbol, read_member_functions): Fix
7006         fall-through comment.
7007         * s390-linux-tdep.c (s390_process_record): Fix fall-through
7008         comment.
7009         * remote.c (remote_wait_as): Fix fall-through comment.
7010         * p-exp.y (yylex): Fix fall-through comment.
7011         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
7012         comment.
7013         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
7014         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
7015         * jv-exp.y (yylex): Fix fall-through comment.
7016         * go-exp.y (lex_one_token): Fix fall-through comment.
7017         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
7018         fall-through comment.
7019         * f-exp.y (yylex): Fix fall-through comment.
7020         * dwarf2read.c (process_die): Fix fall-through comments.
7021         * dbxread.c (process_one_symbol): Fix fall-through comment.
7022         * d-exp.y (lex_one_token): Fix fall-through comment.
7023         * cp-name-parser.y (yylex): Fix fall-through comment.
7024         * coffread.c (coff_symtab_read): Fix fall-through comment.
7025         * c-exp.y (lex_one_token): Fix fall-through comment.
7026         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
7027         comment.
7028         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
7029         comment.
7030
7031 2018-05-04  Tom Tromey  <tom@tromey.com>
7032
7033         PR python/22730:
7034         * NEWS: Mention gdb.execute change.
7035         * gdbcmd.h (execute_control_command): Don't declare.
7036         * python/python.c (execute_gdb_command): Use read_command_lines_1,
7037         execute_control_commands, execute_control_commands_to_string.
7038         * cli/cli-script.h (execute_control_commands)
7039         (execute_control_commands_to_string): Declare.
7040         (execute_control_command): Add from_tty parameter.
7041         * cli/cli-script.c (execute_control_commands)
7042         (execute_control_commands_to_string): New functions.
7043         (execute_user_command): Use execute_control_commands.
7044         (execute_control_command_1): Add "from_tty" parameter.  Update.
7045         (execute_control_command): Likewise.
7046
7047 2018-05-04  Tom Tromey  <tom@tromey.com>
7048
7049         PR python/22731:
7050         * NEWS: Mention that breakpoint commands are writable.
7051         * python/py-breakpoint.c (bppy_set_commands): New function.
7052         (breakpoint_object_getset) <"commands">: Use it.
7053
7054 2018-05-04  Tom Tromey  <tom@tromey.com>
7055
7056         * tracepoint.c (actions_command): Update.
7057         * mi/mi-cmd-break.c (mi_command_line_array)
7058         (mi_command_line_array_cnt, mi_command_line_array_ptr)
7059         (mi_read_next_line): Remove.
7060         (mi_cmd_break_commands): Update.
7061         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
7062         function_view.
7063         * cli/cli-script.c (get_command_line): Update.
7064         (process_next_line): Use function_view.  Constify.
7065         (recurse_read_control_structure, read_command_lines)
7066         (read_command_lines_1): Change argument types to function_view.
7067         (do_define_command, document_command): Update.
7068         * breakpoint.h (check_tracepoint_command): Don't declare.
7069         * breakpoint.c (check_tracepoint_command): Remove.
7070         (commands_command_1, create_tracepoint_from_upload): Update.
7071
7072 2018-05-04  Tom Tromey  <tom@tromey.com>
7073
7074         PR gdb/11750:
7075         * cli/cli-script.h (enum command_control_type) <define_control>:
7076         New constant.
7077         * cli/cli-script.c (multi_line_command_p): Handle define_control.
7078         (build_command_line, execute_control_command_1)
7079         (process_next_line): Likewise.
7080         (do_define_command): New function, extracted from define_command.
7081         (define_command): Use it.
7082
7083 2018-05-04  Tom Tromey  <tom@tromey.com>
7084
7085         * tracepoint.c (actions_command): Update.
7086         * cli/cli-script.h (read_command_lines): Update.
7087         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
7088         (MAX_TMPBUF): Remove define.
7089         (define_command): Use string_printf.
7090         (document_command): Likewise.
7091         * breakpoint.c (commands_command_1): Update.
7092
7093 2018-05-04  Tom Tromey  <tom@tromey.com>
7094
7095         * top.c (execute_command): Update.
7096         * cli/cli-script.h (print_command_lines): Now varargs.
7097         * cli/cli-script.c (print_command_lines): Now varargs.
7098         (execute_control_command_1) <case while_control, case if_control>:
7099         Update.
7100
7101 2018-05-04  Tom Tromey  <tom@tromey.com>
7102
7103         * tracepoint.c (all_tracepoint_actions): Rename from
7104         all_tracepoint_actions_and_cleanup.  Change return type.
7105         (actions_command, encode_actions_1, encode_actions)
7106         (trace_dump_actions, tdump_command): Update.
7107         * remote.c (remote_download_command_source): Update.
7108         * python/python.c (gdbpy_eval_from_control_command)
7109         (python_command, python_interactive_command): Update.
7110         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
7111         * guile/guile.c (guile_command)
7112         (gdbscm_eval_from_control_command, guile_command): Update.
7113         * compile/compile.c (compile_code_command)
7114         (compile_print_command, compile_to_object): Update.
7115         * cli/cli-script.h (struct command_lines_deleter): New.
7116         (counted_command_line): New typedef.
7117         (struct command_line): Add constructor, destructor.
7118         <body_list>: Remove.
7119         <body_list_0, body_list_1>: New members.
7120         (command_line_up): Remove typedef.
7121         (read_command_lines, read_command_lines_1, get_command_line):
7122         Update.
7123         (copy_command_lines): Don't declare.
7124         * cli/cli-script.c (build_command_line): Use "new".
7125         (get_command_line): Return counted_command_line.
7126         (print_command_lines, execute_user_command)
7127         (execute_control_command_1, while_command, if_command): Update.
7128         (realloc_body_list): Remove.
7129         (process_next_line, recurse_read_control_structure): Update.
7130         (read_command_lines, read_command_lines_1): Return counted_command_line.
7131         (free_command_lines): Use "delete".
7132         (copy_command_lines): Remove.
7133         (define_command, document_command, show_user_1): Update.
7134         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
7135         a counted_command_line.
7136         * breakpoint.h (counted_command_line): Remove typedef.
7137         (breakpoint_set_commands): Update.
7138         * breakpoint.c (check_no_tracepoint_commands)
7139         (validate_commands_for_breakpoint): Update.
7140         (breakpoint_set_commands): Change commands to be a
7141         counted_command_line.
7142         (commands_command_1, update_dprintf_command_list)
7143         (create_tracepoint_from_upload): Update.
7144
7145 2018-05-04  Tom Tromey  <tom@tromey.com>
7146
7147         * cli/cli-decode.h (cmd_list_element): New constructor.
7148         (~cmd_list_element): New destructor.
7149         (struct cmd_list_element): Add initializers.
7150         * cli/cli-decode.c (do_add_cmd): Use "new".
7151         (delete_cmd): Use "delete".
7152
7153 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
7154             Pedro Alves <palves@redhat.com>
7155
7156         PR breakpoints/19806 and support for PR external/20207.
7157         * NEWS: Mention Aarch64 watchpoint improvements.
7158         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
7159         watchpoints and PR external/20207 watchpoints.
7160         * nat/aarch64-linux-hw-point.c
7161         (kernel_supports_any_contiguous_range): New.
7162         (aarch64_watchpoint_offset): New.
7163         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
7164         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
7165         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
7166         (aarch64_align_watchpoint): New parameters aligned_offset_p and
7167         next_addr_orig_p.  Support PR external/20207 watchpoints.
7168         (aarch64_downgrade_regs): New.
7169         (aarch64_dr_state_insert_one_point): New parameters offset and
7170         addr_orig.
7171         (aarch64_dr_state_remove_one_point): Likewise.
7172         (aarch64_handle_breakpoint): Update caller.
7173         (aarch64_handle_aligned_watchpoint): Likewise.
7174         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
7175         aligned_offset.
7176         (aarch64_linux_set_debug_regs): Remove const from state.  Call
7177         aarch64_downgrade_regs.
7178         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
7179         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
7180         (DR_CONTROL_MASK): ... this.
7181         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
7182         (unsigned int aarch64_watchpoint_offset): New prototype.
7183         (aarch64_linux_set_debug_regs): Remove const from state.
7184         * utils.c (align_up, align_down): Move to ...
7185         * common/common-utils.c (align_up, align_down): ... here.
7186         * utils.h (align_up, align_down): Move to ...
7187         * common/common-utils.h (align_up, align_down): ... here.
7188
7189 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
7190
7191         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
7192         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
7193         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
7194         Re-implement to match the ABI as summarized in GCC's
7195         gcc/config/sparc/sparc.c.  All callers updated.
7196         (sparc32_store_arguments): Remove assertion.
7197
7198 2018-05-04  Tom Tromey  <tom@tromey.com>
7199
7200         * printcmd.c: Don't include tui.h.
7201         (decode_format): Use skip_spaces.
7202
7203 2018-05-04  Tom Tromey  <tom@tromey.com>
7204
7205         PR gdb/22619:
7206         * printcmd.c (last_count): New global.
7207         (x_command): Use saved count when repeating.
7208
7209 2018-05-04  Tom Tromey  <tom@tromey.com>
7210
7211         * nto-procfs.c (do_closedir_cleanup): Remove.
7212         (procfs_pidlist): Use gdb_dir_up.
7213         * procfs.c (do_closedir_cleanup): Remove.
7214         (proc_update_threads): Use gdb_dir_up.
7215         * common/filestuff.h (struct gdb_dir_deleter): New.
7216         (gdb_dir_up): New typedef.
7217
7218 2018-05-04  Tom Tromey  <tom@tromey.com>
7219
7220         * ada-lang.c (print_mention_exception): Use std::string.
7221
7222 2018-05-04  Tom Tromey  <tom@tromey.com>
7223
7224         * ada-lang.c (create_excep_cond_exprs): Update.
7225         (ada_exception_catchpoint_cond_string): Use std::string.
7226
7227 2018-05-04  Tom Tromey  <tom@tromey.com>
7228
7229         * ada-lang.c (xget_renaming_scope): Return std::string.
7230         (old_renaming_is_invisible): Update.
7231
7232 2018-05-04  Tom Tromey  <tom@tromey.com>
7233
7234         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
7235         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
7236
7237 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
7238
7239         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
7240
7241 2018-05-04  Tom Tromey  <tom@tromey.com>
7242
7243         * remote.c (remote_query_supported_append): Change type.
7244         (remote_check_symbols): Update.
7245
7246 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
7247
7248         PR gdb/11420
7249         * configure.ac: Prepend libpython.
7250         * python/python-config.py: Likewise.
7251         * configure: Regenerate.
7252
7253 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
7254
7255         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
7256
7257 2018-05-03  Pedro Alves  <palves@redhat.com>
7258
7259         * s390-linux-nat.c
7260         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
7261         override.  Write 'true' instead of '1'.
7262         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
7263         declaration.
7264
7265 2018-05-02  Pedro Alves  <palves@redhat.com>
7266
7267         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
7268         add_inf_child_target.
7269         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
7270         add_inf_child_target.
7271         * aix-thread.c (aix_thread_target_info): New.
7272         (aix_thread_target) <shortname, longname, doc>: Delete.
7273         <info>: New.
7274         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
7275         add_inf_child_target.
7276         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
7277         add_inf_child_target.
7278         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
7279         add_inf_child_target.
7280         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
7281         add_inf_child_target.
7282         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
7283         add_inf_child_target.
7284         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
7285         add_inf_child_target.
7286         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
7287         add_inf_child_target.
7288         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
7289         add_inf_child_target.
7290         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
7291         add_inf_child_target.
7292         * bfd-target.c (target_bfd_target_info): New.
7293         (target_bfd) <shortname, longname, doc>: Delete.
7294         <info>: New.
7295         * bsd-kvm.c (bsd_kvm_target_info): New.
7296         (bsd_kvm_target) <shortname, longname, doc>: Delete.
7297         <info>: New.
7298         (bsd_kvm_target::open): Rename to ...
7299         (bsd_kvm_target_open): ... this.  Adjust.
7300         * bsd-uthread.c (bsd_uthread_target_info): New.
7301         (bsd_uthread_target) <shortname, longname, doc>: Delete.
7302         <info>: New.
7303         * corefile.c (core_file_command): Adjust.
7304         * corelow.c (core_target_info): New.
7305         (core_target) <shortname, longname, doc>: Delete.
7306         <info>: New.
7307         (core_target::open): Rename to ...
7308         (core_target_open): ... this.  Adjust.
7309         * ctf.c (ctf_target_info): New.
7310         (ctf_target) <shortname, longname, doc>: Delete.
7311         <info>: New.
7312         (ctf_target::open): Rename to ...
7313         (ctf_target_open): ... this.
7314         (_initialize_ctf): Adjust.
7315         * exec.c (exec_target_info): New.
7316         (exec_target) <shortname, longname, doc>: Delete.
7317         <info>: New.
7318         (exec_target::open): Rename to ...
7319         (exec_target_open): ... this.
7320         * gdbcore.h (core_target_open): Declare.
7321         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
7322         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
7323         add_inf_child_target.
7324         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
7325         add_inf_child_target.
7326         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
7327         add_inf_child_target.
7328         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
7329         add_inf_child_target.
7330         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
7331         add_inf_child_target.
7332         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
7333         add_inf_child_target.
7334         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
7335         add_inf_child_target.
7336         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
7337         add_inf_child_target.
7338         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
7339         add_inf_child_target.
7340         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
7341         add_inf_child_target.
7342         * inf-child.c (inf_child_target_info): New.
7343         (inf_child_target::info): New.
7344         (inf_child_open_target): Remove 'target' parameter.  Use
7345         get_native_target instead.
7346         (inf_child_target::open): Delete.
7347         (add_inf_child_target): New.
7348         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
7349         Delete.
7350         <info>: New.
7351         (add_inf_child_target): Declare.
7352         (inf_child_open_target): Declare.
7353         * linux-thread-db.c (thread_db_target_info): New.
7354         (thread_db_target) <shortname, longname, doc>: Delete.
7355         <info>: New.
7356         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
7357         add_inf_child_target.
7358         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
7359         add_inf_child_target.
7360         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
7361         add_inf_child_target.
7362         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
7363         add_inf_child_target.
7364         * make-target-delegates (print_class): Adjust.
7365         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
7366         add_inf_child_target.
7367         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
7368         add_inf_child_target.
7369         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
7370         add_inf_child_target.
7371         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
7372         add_inf_child_target.
7373         * nto-procfs.c (nto_native_target_info): New.
7374         (nto_procfs_target_native) <shortname, longname, doc>:
7375         Delete.
7376         <info>: New.
7377         (nto_procfs_target_info): New.
7378         (nto_procfs_target_procfs) <shortname, longname, doc>:
7379         Delete.
7380         <info>: New.
7381         (init_procfs_targets): Adjust.
7382         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
7383         add_inf_child_target.
7384         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
7385         add_inf_child_target.
7386         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
7387         add_inf_child_target.
7388         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
7389         add_inf_child_target.
7390         * ravenscar-thread.c (ravenscar_target_info): New.
7391         (ravenscar_thread_target) <shortname, longname, doc>:
7392         Delete.
7393         <info>: New.
7394         * record-btrace.c (record_btrace_target_info):
7395         (record_btrace_target) <shortname, longname, doc>: Delete.
7396         <info>: New.
7397         (record_btrace_target::open): Rename to ...
7398         (record_btrace_target_open): ... this.  Adjust.
7399         * record-full.c (record_longname, record_doc): New.
7400         (record_full_base_target) <shortname, longname, doc>: Delete.
7401         <info>: New.
7402         (record_full_target_info): New.
7403         (record_full_target): <shortname>: Delete.
7404         <info>: New.
7405         (record_full_core_open_1, record_full_open_1): Update comments.
7406         (record_full_base_target::open): Rename to ...
7407         (record_full_open): ... this.
7408         (cmd_record_full_restore): Update.
7409         (_initialize_record_full): Update.
7410         * remote-sim.c (remote_sim_target_info): New.
7411         (gdbsim_target) <shortname, longname, doc>: Delete.
7412         <info>: New.
7413         (gdbsim_target::open): Rename to ...
7414         (gdbsim_target_open): ... this.
7415         (_initialize_remote_sim): Adjust.
7416         * remote.c (remote_doc): New.
7417         (remote_target_info): New.
7418         (remote_target) <shortname, longname, doc>: Delete.
7419         <info>: New.
7420         (extended_remote_target_info): New.
7421         (extended_remote_target) <shortname, longname, doc>: Delete.
7422         <info>: New.
7423         (remote_target::open_1): Make static.  Adjust.
7424         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
7425         * s390-linux-nat.c (_initialize_s390_nat): Use
7426         add_inf_child_target.
7427         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
7428         add_inf_child_target.
7429         * sol-thread.c (thread_db_target_info): New.
7430         (sol_thread_target) <shortname, longname, doc>: Delete.
7431         <info>: New.
7432         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
7433         add_inf_child_target.
7434         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
7435         add_inf_child_target.
7436         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
7437         add_inf_child_target.
7438         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
7439         add_inf_child_target.
7440         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
7441         add_inf_child_target.
7442         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
7443         add_inf_child_target.
7444         * spu-linux-nat.c (_initialize_spu_nat): Use
7445         add_inf_child_target.
7446         * spu-multiarch.c (spu_multiarch_target_info): New.
7447         (spu_multiarch_target) <shortname, longname, doc>: Delete.
7448         <info>: New.
7449         * target-delegates.c: Regenerate.
7450         * target.c: Include <unordered_map>.
7451         (target_ops_p): Delete.
7452         (DEF_VEC_P(target_ops_p)): Delete.
7453         (target_factories): New.
7454         (test_target_info): New.
7455         (test_target_ops::info): New.
7456         (open_target): Adjust to use target_factories.
7457         (add_target_with_completer): Rename to ...
7458         (add_target): ... this.  Change prototype.  Register target_info
7459         and open callback in target_factories.  Register target_info in
7460         command context instead of target_ops.
7461         (add_target): Delete old implementation.
7462         (add_deprecated_target_alias): Change prototype.  Adjust.
7463         (the_native_target): New.
7464         (set_native_target, get_native_target): New.
7465         (find_default_run_target): Use the_native_target.
7466         (find_attach_target, find_run_target): Simplify.
7467         (target_ops::open): Delete.
7468         (dummy_target_info): New.
7469         (dummy_target::shortname, dummy_target::longname)
7470         (dummy_target::doc): Delete.
7471         (dummy_target::info): New.
7472         (debug_target::shortname, debug_target::longname)
7473         (debug_target::doc): Delete.
7474         (debug_target::info): New.
7475         * target.h (struct target_info): New.
7476         (target_ops::~target_ops): Add comment.
7477         (target_ops::info): New.
7478         (target_ops::shortname, target_ops::longname, target_ops::doc): No
7479         longer virtual.  Implement in terms of target_info.
7480         (set_native_target, get_native_target): Declare.
7481         (target_open_ftype): New.
7482         (add_target, add_target_with_completer)
7483         (add_deprecated_target_alias): Change prototype.
7484         (test_target) <shortname, longname, doc>: Delete.
7485         <info>: New.
7486         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
7487         add_inf_child_target.
7488         * tracefile-tfile.c (tfile_target_info): New.
7489         (tfile_target) <shortname, longname, doc>: Delete.
7490         <info>: New.
7491         (tfile_target::open): Rename to ...
7492         (tfile_target_open): ... this.
7493         (_initialize_tracefile_tfile): Adjust.
7494         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
7495         add_inf_child_target.
7496         * windows-nat.c (_initialize_windows_nat): Use
7497         add_inf_child_target.
7498         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
7499         add_inf_child_target.
7500
7501 2018-05-02  Pedro Alves  <palves@redhat.com>
7502
7503         * linux-nat.h (linux_nat_target) <low_new_thread,
7504         low_delete_thread, low_new_fork, low_forget_process,
7505         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
7506         New virtual methods.
7507         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
7508         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
7509         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
7510         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
7511         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
7512         Delete.
7513         * linux-fork.c (delete_fork): Adjust to call low method.
7514         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
7515         (linux_nat_new_fork, linux_nat_forget_process_hook)
7516         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
7517         (linux_nat_status_is_event):
7518         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
7519         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
7520         to call low method.
7521         (sigtrap_is_event): Rename to ...
7522         (linux_nat_target::low_status_is_event): ... this.
7523         (linux_nat_set_status_is_event): Delete.
7524         (save_stop_reason, linux_nat_wait_1)
7525         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
7526         low methods.
7527         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
7528         (linux_nat_set_new_fork, linux_nat_set_forget_process)
7529         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
7530         (linux_nat_set_prepare_to_resume): Delete.
7531         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
7532         low virtual methods.
7533         * amd64-linux-nat.c: Likewise.
7534         * arm-linux-nat.c: Likewise.
7535         * i386-linux-nat.c: Likewise.
7536         * ia64-linux-nat.c: Likewise.
7537         * mips-linux-nat.c: Likewise.
7538         * ppc-linux-nat.c: Likewise.
7539         * s390-linux-nat.c: Likewise.
7540         * sparc64-linux-nat.c: Likewise.
7541         * x86-linux-nat.c: Likewise.
7542         * x86-linux-nat.h: Include "nat/x86-linux.h".
7543         (x86_linux_nat_target) <low_new_fork, low_forget_process,
7544         low_prepare_to_resume, low_new_thread, low_delete_thread>:
7545         Override methods.
7546
7547 2018-05-02  Pedro Alves  <palves@redhat.com>
7548
7549         * target.h (target_ops)
7550         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
7551         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
7552         stopped_by_watchpoint, have_continuable_watchpoint,
7553         stopped_data_address, watchpoint_addr_within_range,
7554         can_accel_watchpoint_condition, can_run, thread_alive,
7555         has_all_memory, has_memory, has_stack, has_registers,
7556         has_execution, can_async_p, is_async_p, supports_non_stop,
7557         always_non_stop_p, can_execute_reverse, supports_multi_process,
7558         supports_enable_disable_tracepoint,
7559         supports_disable_randomization, supports_string_tracing,
7560         supports_evaluation_of_breakpoint_conditions,
7561         can_run_breakpoint_commands, filesystem_is_local,
7562         can_download_tracepoint, get_trace_state_variable_value,
7563         set_trace_notes, get_tib_address, use_agent, can_use_agent,
7564         record_is_replaying, record_will_replay,
7565         augmented_libraries_svr4_read>: Adjust to return bool.
7566         * aarch64-linux-nat.c: All implementations adjusted.
7567         * aix-thread.c: All implementations adjusted.
7568         * arm-linux-nat.c: All implementations adjusted.
7569         * breakpoint.c: All implementations adjusted.
7570         * bsd-kvm.c: All implementations adjusted.
7571         * bsd-uthread.c: All implementations adjusted.
7572         * corelow.c: All implementations adjusted.
7573         * ctf.c: All implementations adjusted.
7574         * darwin-nat.c: All implementations adjusted.
7575         * darwin-nat.h: All implementations adjusted.
7576         * exec.c: All implementations adjusted.
7577         * fbsd-nat.c: All implementations adjusted.
7578         * fbsd-nat.h: All implementations adjusted.
7579         * gnu-nat.c: All implementations adjusted.
7580         * gnu-nat.h: All implementations adjusted.
7581         * go32-nat.c: All implementations adjusted.
7582         * ia64-linux-nat.c: All implementations adjusted.
7583         * inf-child.c: All implementations adjusted.
7584         * inf-child.h: All implementations adjusted.
7585         * inf-ptrace.c: All implementations adjusted.
7586         * inf-ptrace.h: All implementations adjusted.
7587         * linux-nat.c: All implementations adjusted.
7588         * linux-nat.h: All implementations adjusted.
7589         * mips-linux-nat.c: All implementations adjusted.
7590         * nto-procfs.c: All implementations adjusted.
7591         * ppc-linux-nat.c: All implementations adjusted.
7592         * procfs.c: All implementations adjusted.
7593         * ravenscar-thread.c: All implementations adjusted.
7594         * record-btrace.c: All implementations adjusted.
7595         * record-full.c: All implementations adjusted.
7596         * remote-sim.c: All implementations adjusted.
7597         * remote.c: All implementations adjusted.
7598         * s390-linux-nat.c: All implementations adjusted.
7599         * sol-thread.c: All implementations adjusted.
7600         * spu-multiarch.c: All implementations adjusted.
7601         * target-delegates.c: All implementations adjusted.
7602         * target.c: All implementations adjusted.
7603         * target.h: All implementations adjusted.
7604         * tracefile-tfile.c: All implementations adjusted.
7605         * tracefile.c: All implementations adjusted.
7606         * tracefile.h: All implementations adjusted.
7607         * windows-nat.c: All implementations adjusted.
7608         * x86-linux-nat.h: All implementations adjusted.
7609         * x86-nat.h: All implementations adjusted.
7610
7611 2018-05-02  Pedro Alves  <palves@redhat.com>
7612
7613         * make-target-delegates (scan_target_h): Don't trim lines here.
7614         Replace sequences of tabs and/or whitespace with a single
7615         whitespace.
7616         (top level, parsing methods): Trim each line before processing it
7617         here.
7618
7619 2018-05-02  Pedro Alves  <palves@redhat.com>
7620             John Baldwin  <jhb@freebsd.org>
7621
7622         * target.h (enum strata) <debug_stratum>: New.
7623         (struct target_ops) <all delegation methods>: Replace by C++
7624         virtual methods, and drop "to_" prefix.  All references updated
7625         throughout.
7626         <to_shortname, to_longname, to_doc, to_data,
7627         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
7628         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
7629         virtual methods.  All references updated throughout.
7630         <can_attach, supports_terminal_ours, can_create_inferior,
7631         get_thread_control_capabilities, attach_no_wait>: New
7632         virtual methods.
7633         <insert_breakpoint, remove_breakpoint>: Now
7634         TARGET_DEFAULT_NORETURN methods.
7635         <info_proc>: Now returns bool.
7636         <to_magic>: Delete.
7637         (OPS_MAGIC): Delete.
7638         (current_target): Delete.  All references replaced by references
7639         to ...
7640         (target_stack): ... this.  New.
7641         (target_shortname, target_longname): Adjust.
7642         (target_can_run): Now a function declaration.
7643         (default_child_has_all_memory, default_child_has_memory)
7644         (default_child_has_stack, default_child_has_registers)
7645         (default_child_has_execution): Remove target_ops parameter.
7646         (complete_target_initialization): Delete.
7647         (memory_breakpoint_target): New template class.
7648         (test_target_ops): Refactor as a C++ class with virtual methods.
7649         * make-target-delegates (NAME_PART): Tighten.
7650         (POINTER_PART, CP_SYMBOL): New.
7651         (SIMPLE_RETURN_PART): Reimplement.
7652         (VEC_RETURN_PART): Expect less.
7653         (RETURN_PART, VIRTUAL_PART): New.
7654         (METHOD): Adjust to C++ virtual methods.
7655         (scan_target_h): Remove reference to C99.
7656         (dname): Output "target_ops::" prefix.
7657         (write_function_header): Adjust to output a C++ class method.
7658         (write_declaration): New.
7659         (write_delegator): Adjust to output a C++ class method.
7660         (tdname): Output "dummy_target::" prefix.
7661         (write_tdefault, write_debugmethod): Adjust to output a C++ class
7662         method.
7663         (tdefault_names, debug_names): Delete.
7664         (return_types, tdefaults, styles, argtypes_array): New.
7665         (top level): All methods are delegators.
7666         (print_class): New.
7667         (top level): Print dummy_target and debug_target classes.
7668         * target-delegates.c: Regenerate.
7669         * target-debug.h (target_debug_print_enum_info_proc_what)
7670         (target_debug_print_thread_control_capabilities)
7671         (target_debug_print_thread_info_p): New.
7672         * target.c (dummy_target): Delete.
7673         (the_dummy_target, the_debug_target): New.
7674         (target_stack): Now extern.
7675         (set_targetdebug): Push/unpush debug target.
7676         (default_child_has_all_memory, default_child_has_memory)
7677         (default_child_has_stack, default_child_has_registers)
7678         (default_child_has_execution): Remove target_ops parameter.
7679         (complete_target_initialization): Delete.
7680         (add_target_with_completer): No longer call
7681         complete_target_initialization.
7682         (target_supports_terminal_ours): Use regular delegation.
7683         (update_current_target): Delete.
7684         (push_target): No longer check magic number.  Don't call
7685         update_current_target.
7686         (unpush_target): Don't call update_current_target.
7687         (target_is_pushed): No longer check magic number.
7688         (target_require_runnable): Skip for all stratums over
7689         process_stratum.
7690         (target_ops::info_proc): New.
7691         (target_info_proc): Use find_target_at and
7692         find_default_run_target.
7693         (target_supports_disable_randomization): Use regular delegation.
7694         (target_get_osdata): Use find_target_at.
7695         (target_ops::open, target_ops::close, target_ops::can_attach)
7696         (target_ops::attach, target_ops::can_create_inferior)
7697         (target_ops::create_inferior, target_ops::can_run)
7698         (target_can_run): New.
7699         (default_fileio_target): Use regular delegation.
7700         (target_ops::fileio_open, target_ops::fileio_pwrite)
7701         (target_ops::fileio_pread, target_ops::fileio_fstat)
7702         (target_ops::fileio_close, target_ops::fileio_unlink)
7703         (target_ops::fileio_readlink): New.
7704         (target_fileio_open_1, target_fileio_unlink)
7705         (target_fileio_readlink): Always call the target method.  Handle
7706         FILEIO_ENOSYS.
7707         (return_zero, return_zero_has_execution): Delete.
7708         (init_dummy_target): Delete.
7709         (dummy_target::dummy_target, dummy_target::shortname)
7710         (dummy_target::longname, dummy_target::doc)
7711         (debug_target::debug_target, debug_target::shortname)
7712         (debug_target::longname, debug_target::doc): New.
7713         (target_supports_delete_record): Use regular delegation.
7714         (setup_target_debug): Delete.
7715         (maintenance_print_target_stack): Skip debug_stratum.
7716         (initialize_targets): Instantiate the_dummy_target and
7717         the_debug_target.
7718         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
7719         use target_stack.
7720         (target_auxv_search, fprint_target_auxv): Adjust.
7721         (info_auxv_command): Adjust to use target_stack.
7722         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
7723         * exceptions.c (print_flush): Handle a NULL target_stack.
7724         * regcache.c (target_ops_no_register): Refactor as class with
7725         virtual methods.
7726
7727         * exec.c (exec_target): New class.
7728         (exec_ops): Now an exec_target.
7729         (exec_open, exec_close_1, exec_get_section_table)
7730         (exec_xfer_partial, exec_files_info, exec_has_memory)
7731         (exec_make_note_section): Refactor as exec_target methods.
7732         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
7733         Delete.
7734         (exec_target::find_memory_regions): New.
7735         (_initialize_exec): Don't call init_exec_ops.
7736         * gdbcore.h (exec_file_clear): Delete.
7737
7738         * corefile.c (core_target): Delete.
7739         (core_file_command): Adjust.
7740         * corelow.c (core_target): New class.
7741         (the_core_target): New.
7742         (core_close): Remove target_ops parameter.
7743         (core_close_cleanup): Adjust.
7744         (core_target::close): New.
7745         (core_open, core_detach, get_core_registers, core_files_info)
7746         (core_xfer_partial, core_thread_alive, core_read_description)
7747         (core_pid_to_str, core_thread_name, core_has_memory)
7748         (core_has_stack, core_has_registers, core_info_proc): Rework as
7749         core_target methods.
7750         (ignore, core_remove_breakpoint, init_core_ops): Delete.
7751         (_initialize_corelow): Initialize the_core_target.
7752         * gdbcore.h (core_target): Delete.
7753         (the_core_target): New.
7754
7755         * ctf.c: (ctf_target): New class.
7756         (ctf_ops): Now a ctf_target.
7757         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
7758         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
7759         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
7760         methods.
7761         (init_ctf_ops): Delete.
7762         (_initialize_ctf): Don't call it.
7763         * tracefile-tfile.c (tfile_target): New class.
7764         (tfile_ops): Now a tfile_target.
7765         (tfile_open, tfile_close, tfile_files_info)
7766         (tfile_get_tracepoint_status, tfile_trace_find)
7767         (tfile_fetch_registers, tfile_xfer_partial)
7768         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
7769         Refactor as tfile_target methods.
7770         (tfile_xfer_partial_features): Remove target_ops parameter.
7771         (init_tfile_ops): Delete.
7772         (_initialize_tracefile_tfile): Don't call it.
7773         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
7774         (tracefile_has_stack, tracefile_has_registers)
7775         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
7776         tracefile_target methods.
7777         (init_tracefile_ops): Delete.
7778         (tracefile_target::tracefile_target): New.
7779         * tracefile.h: Include "target.h".
7780         (tracefile_target): New class.
7781         (init_tracefile_ops): Delete.
7782
7783         * spu-multiarch.c (spu_multiarch_target): New class.
7784         (spu_ops): Now a spu_multiarch_target.
7785         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
7786         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
7787         (spu_search_memory, spu_mourn_inferior): Refactor as
7788         spu_multiarch_target methods.
7789         (init_spu_ops): Delete.
7790         (_initialize_spu_multiarch): Remove references to init_spu_ops,
7791         complete_target_initialization.
7792
7793         * ravenscar-thread.c (ravenscar_thread_target): New class.
7794         (ravenscar_ops): Now a ravenscar_thread_target.
7795         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
7796         (ravenscar_thread_alive, ravenscar_pid_to_str)
7797         (ravenscar_fetch_registers, ravenscar_store_registers)
7798         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
7799         (ravenscar_stopped_by_hw_breakpoint)
7800         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
7801         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
7802         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
7803         methods.
7804         (init_ravenscar_thread_ops): Delete.
7805         (_initialize_ravenscar): Remove references to
7806         init_ravenscar_thread_ops and complete_target_initialization.
7807
7808         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
7809         (bsd_uthread_target): New class.
7810         (bsd_uthread_ops): Now a bsd_uthread_target.
7811         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
7812         (bsd_uthread_close, bsd_uthread_mourn_inferior)
7813         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
7814         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
7815         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
7816         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
7817         (bsd_uthread_target): Delete function.
7818         (_initialize_bsd_uthread): Remove reference to
7819         complete_target_initialization.
7820
7821         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
7822         (target_bfd): ... this new class.
7823         (target_bfd_xfer_partial, target_bfd_get_section_table)
7824         (target_bfd_close): Refactor as target_bfd methods.
7825         (target_bfd::~target_bfd): New.
7826         (target_bfd_reopen): Adjust.
7827         (target_bfd::close): New.
7828
7829         * record-btrace.c (record_btrace_target): New class.
7830         (record_btrace_ops): Now a record_btrace_target.
7831         (record_btrace_open, record_btrace_stop_recording)
7832         (record_btrace_disconnect, record_btrace_close)
7833         (record_btrace_async, record_btrace_info)
7834         (record_btrace_insn_history, record_btrace_insn_history_range)
7835         (record_btrace_insn_history_from, record_btrace_call_history)
7836         (record_btrace_call_history_range)
7837         (record_btrace_call_history_from, record_btrace_record_method)
7838         (record_btrace_is_replaying, record_btrace_will_replay)
7839         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
7840         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
7841         (record_btrace_store_registers, record_btrace_prepare_to_store)
7842         (record_btrace_to_get_unwinder)
7843         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
7844         (record_btrace_commit_resume, record_btrace_wait)
7845         (record_btrace_stop, record_btrace_can_execute_reverse)
7846         (record_btrace_stopped_by_sw_breakpoint)
7847         (record_btrace_supports_stopped_by_sw_breakpoint)
7848         (record_btrace_stopped_by_hw_breakpoint)
7849         (record_btrace_supports_stopped_by_hw_breakpoint)
7850         (record_btrace_update_thread_list, record_btrace_thread_alive)
7851         (record_btrace_goto_begin, record_btrace_goto_end)
7852         (record_btrace_goto, record_btrace_stop_replaying_all)
7853         (record_btrace_execution_direction)
7854         (record_btrace_prepare_to_generate_core)
7855         (record_btrace_done_generating_core): Refactor as
7856         record_btrace_target methods.
7857         (init_record_btrace_ops): Delete.
7858         (_initialize_record_btrace): Remove reference to
7859         init_record_btrace_ops.
7860         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
7861         the execution_direction global.
7862         (record_full_base_target, record_full_target)
7863         (record_full_core_target): New classes.
7864         (record_full_ops): Now a record_full_target.
7865         (record_full_core_ops): Now a record_full_core_target.
7866         (record_full_target::detach, record_full_target::disconnect)
7867         (record_full_core_target::disconnect)
7868         (record_full_target::mourn_inferior, record_full_target::kill):
7869         New.
7870         (record_full_open, record_full_close, record_full_async): Refactor
7871         as methods of the record_full_base_target class.
7872         (record_full_resume, record_full_commit_resume): Refactor
7873         as methods of the record_full_target class.
7874         (record_full_wait, record_full_stopped_by_watchpoint)
7875         (record_full_stopped_data_address)
7876         (record_full_stopped_by_sw_breakpoint)
7877         (record_full_supports_stopped_by_sw_breakpoint)
7878         (record_full_stopped_by_hw_breakpoint)
7879         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
7880         methods of the record_full_base_target class.
7881         (record_full_store_registers, record_full_xfer_partial)
7882         (record_full_insert_breakpoint, record_full_remove_breakpoint):
7883         Refactor as methods of the record_full_target class.
7884         (record_full_can_execute_reverse, record_full_get_bookmark)
7885         (record_full_goto_bookmark, record_full_execution_direction)
7886         (record_full_record_method, record_full_info, record_full_delete)
7887         (record_full_is_replaying, record_full_will_replay)
7888         (record_full_goto_begin, record_full_goto_end, record_full_goto)
7889         (record_full_stop_replaying): Refactor as methods of the
7890         record_full_base_target class.
7891         (record_full_core_resume, record_full_core_kill)
7892         (record_full_core_fetch_registers)
7893         (record_full_core_prepare_to_store)
7894         (record_full_core_store_registers, record_full_core_xfer_partial)
7895         (record_full_core_insert_breakpoint)
7896         (record_full_core_remove_breakpoint)
7897         (record_full_core_has_execution): Refactor
7898         as methods of the record_full_core_target class.
7899         (record_full_base_target::supports_delete_record): New.
7900         (init_record_full_ops): Delete.
7901         (init_record_full_core_ops): Delete.
7902         (record_full_save): Refactor as method of the
7903         record_full_base_target class.
7904         (_initialize_record_full): Remove references to
7905         init_record_full_ops and init_record_full_core_ops.
7906
7907         * remote.c (remote_target, extended_remote_target): New classes.
7908         (remote_ops): Now a remote_target.
7909         (extended_remote_ops): Now an extended_remote_target.
7910         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
7911         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
7912         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
7913         (remote_pass_signals, remote_set_syscall_catchpoint)
7914         (remote_program_signals, )
7915         (remote_thread_always_alive): Remove target_ops parameter.
7916         (remote_thread_alive, remote_thread_name)
7917         (remote_update_thread_list, remote_threads_extra_info)
7918         (remote_static_tracepoint_marker_at)
7919         (remote_static_tracepoint_markers_by_strid)
7920         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
7921         (remote_open): Refactor as methods of remote_target.
7922         (extended_remote_open, extended_remote_detach)
7923         (extended_remote_attach, extended_remote_post_attach):
7924         (extended_remote_supports_disable_randomization)
7925         (extended_remote_create_inferior): : Refactor as method of
7926         extended_remote_target.
7927         (remote_set_permissions, remote_open_1, remote_detach)
7928         (remote_follow_fork, remote_follow_exec, remote_disconnect)
7929         (remote_resume, remote_commit_resume, remote_stop)
7930         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
7931         (remote_terminal_ours, remote_wait, remote_fetch_registers)
7932         (remote_prepare_to_store, remote_store_registers)
7933         (remote_flash_erase, remote_flash_done, remote_files_info)
7934         (remote_kill, remote_mourn, remote_insert_breakpoint)
7935         (remote_remove_breakpoint, remote_insert_watchpoint)
7936         (remote_watchpoint_addr_within_range)
7937         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
7938         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
7939         (remote_supports_stopped_by_sw_breakpoint)
7940         (remote_stopped_by_hw_breakpoint)
7941         (remote_supports_stopped_by_hw_breakpoint)
7942         (remote_stopped_by_watchpoint, remote_stopped_data_address)
7943         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
7944         (remote_verify_memory): Refactor as methods of remote_target.
7945         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
7946         parameter.
7947         (remote_xfer_partial, remote_get_memory_xfer_limit)
7948         (remote_search_memory, remote_rcmd, remote_memory_map)
7949         (remote_pid_to_str, remote_get_thread_local_address)
7950         (remote_get_tib_address, remote_read_description): Refactor as
7951         methods of remote_target.
7952         (remote_target::fileio_open, remote_target::fileio_pwrite)
7953         (remote_target::fileio_pread, remote_target::fileio_close): New.
7954         (remote_hostio_readlink, remote_hostio_fstat)
7955         (remote_filesystem_is_local, remote_can_execute_reverse)
7956         (remote_supports_non_stop, remote_supports_disable_randomization)
7957         (remote_supports_multi_process, remote_supports_cond_breakpoints)
7958         (remote_supports_enable_disable_tracepoint)
7959         (remote_supports_string_tracing)
7960         (remote_can_run_breakpoint_commands, remote_trace_init)
7961         (remote_download_tracepoint, remote_can_download_tracepoint)
7962         (remote_download_trace_state_variable, remote_enable_tracepoint)
7963         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
7964         (remote_trace_start, remote_get_trace_status)
7965         (remote_get_tracepoint_status, remote_trace_stop)
7966         (remote_trace_find, remote_get_trace_state_variable_value)
7967         (remote_save_trace_data, remote_get_raw_trace_data)
7968         (remote_set_disconnected_tracing, remote_core_of_thread)
7969         (remote_set_circular_trace_buffer, remote_traceframe_info)
7970         (remote_get_min_fast_tracepoint_insn_len)
7971         (remote_set_trace_buffer_size, remote_set_trace_notes)
7972         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
7973         (remote_disable_btrace, remote_teardown_btrace)
7974         (remote_read_btrace, remote_btrace_conf)
7975         (remote_augmented_libraries_svr4_read, remote_load)
7976         (remote_pid_to_exec_file, remote_can_do_single_step)
7977         (remote_execution_direction, remote_thread_handle_to_thread_info):
7978         Refactor as methods of remote_target.
7979         (init_remote_ops, init_extended_remote_ops): Delete.
7980         (remote_can_async_p, remote_is_async_p, remote_async)
7981         (remote_thread_events, remote_upload_tracepoints)
7982         (remote_upload_trace_state_variables): Refactor as methods of
7983         remote_target.
7984         (_initialize_remote): Remove references to init_remote_ops and
7985         init_extended_remote_ops.
7986
7987         * remote-sim.c (gdbsim_target): New class.
7988         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
7989         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
7990         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
7991         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
7992         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
7993         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
7994         Refactor as methods of gdbsim_target.
7995         (gdbsim_ops): Now a gdbsim_target.
7996         (init_gdbsim_ops): Delete.
7997         (gdbsim_cntrl_c): Adjust.
7998         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
7999
8000         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
8001         (the_amd64_linux_nat_target): New.
8002         (amd64_linux_fetch_inferior_registers)
8003         (amd64_linux_store_inferior_registers): Refactor as methods of
8004         amd64_linux_nat_target.
8005         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
8006         * i386-linux-nat.c: Don't include "linux-nat.h".
8007         (i386_linux_nat_target): New class.
8008         (the_i386_linux_nat_target): New.
8009         (i386_linux_fetch_inferior_registers)
8010         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
8011         as methods of i386_linux_nat_target.
8012         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
8013         * inf-child.c (inf_child_ops): Delete.
8014         (inf_child_fetch_inferior_registers)
8015         (inf_child_store_inferior_registers): Delete.
8016         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
8017         methods of inf_child_target.
8018         (inf_child_target::supports_terminal_ours)
8019         (inf_child_target::terminal_init)
8020         (inf_child_target::terminal_inferior)
8021         (inf_child_target::terminal_ours_for_output)
8022         (inf_child_target::terminal_ours, inf_child_target::interrupt)
8023         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
8024         New.
8025         (inf_child_open, inf_child_disconnect, inf_child_close)
8026         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
8027         (inf_child_post_startup_inferior, inf_child_can_run)
8028         (inf_child_pid_to_exec_file): Refactor as methods of
8029         inf_child_target.
8030         (inf_child_follow_fork): Delete.
8031         (inf_child_target::can_create_inferior)
8032         (inf_child_target::can_attach): New.
8033         (inf_child_target::has_all_memory, inf_child_target::has_memory)
8034         (inf_child_target::has_stack, inf_child_target::has_registers)
8035         (inf_child_target::has_execution): New.
8036         (inf_child_fileio_open, inf_child_fileio_pwrite)
8037         (inf_child_fileio_pread, inf_child_fileio_fstat)
8038         (inf_child_fileio_close, inf_child_fileio_unlink)
8039         (inf_child_fileio_readlink, inf_child_use_agent)
8040         (inf_child_can_use_agent): Refactor as methods of
8041         inf_child_target.
8042         (return_zero, inf_child_target): Delete.
8043         (inf_child_target::inf_child_target): New.
8044         * inf-child.h: Include "target.h".
8045         (inf_child_target): Delete function prototype.
8046         (inf_child_target): New class.
8047         (inf_child_open_target, inf_child_mourn_inferior)
8048         (inf_child_maybe_unpush_target): Delete.
8049         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
8050         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
8051         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
8052         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
8053         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
8054         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
8055         (inf_ptrace_wait, inf_ptrace_xfer_partial)
8056         (inf_ptrace_thread_alive, inf_ptrace_files_info)
8057         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
8058         methods of inf_ptrace_target.
8059         (inf_ptrace_target): Delete function.
8060         * inf-ptrace.h: Include "inf-child.h".
8061         (inf_ptrace_target): Delete function declaration.
8062         (inf_ptrace_target): New class.
8063         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
8064         * linux-nat.c (linux_target): New.
8065         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
8066         (linux_nat_target::~linux_nat_target): New.
8067         (linux_child_post_attach, linux_child_post_startup_inferior)
8068         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
8069         (linux_child_remove_fork_catchpoint)
8070         (linux_child_insert_vfork_catchpoint)
8071         (linux_child_remove_vfork_catchpoint)
8072         (linux_child_insert_exec_catchpoint)
8073         (linux_child_remove_exec_catchpoint)
8074         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
8075         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
8076         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
8077         (linux_nat_stopped_data_address)
8078         (linux_nat_stopped_by_sw_breakpoint)
8079         (linux_nat_supports_stopped_by_sw_breakpoint)
8080         (linux_nat_stopped_by_hw_breakpoint)
8081         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
8082         (linux_nat_kill, linux_nat_mourn_inferior)
8083         (linux_nat_xfer_partial, linux_nat_thread_alive)
8084         (linux_nat_update_thread_list, linux_nat_pid_to_str)
8085         (linux_nat_thread_name, linux_child_pid_to_exec_file)
8086         (linux_child_static_tracepoint_markers_by_strid)
8087         (linux_nat_is_async_p, linux_nat_can_async_p)
8088         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
8089         (linux_nat_supports_multi_process)
8090         (linux_nat_supports_disable_randomization, linux_nat_async)
8091         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
8092         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
8093         (linux_nat_fileio_open, linux_nat_fileio_readlink)
8094         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
8095         methods of linux_nat_target.
8096         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
8097         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
8098         parameter.
8099         (check_stopped_by_watchpoint): Adjust.
8100         (linux_xfer_partial): Delete.
8101         (linux_target_install_ops, linux_target, linux_nat_add_target):
8102         Delete.
8103         (linux_nat_target::linux_nat_target): New.
8104         * linux-nat.h: Include "inf-ptrace.h".
8105         (linux_nat_target): New.
8106         (linux_target, linux_target_install_ops, linux_nat_add_target):
8107         Delete function declarations.
8108         (linux_target): Declare global.
8109         * linux-thread-db.c (thread_db_target): New.
8110         (thread_db_target::thread_db_target): New.
8111         (thread_db_ops): Delete.
8112         (the_thread_db_target): New.
8113         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
8114         (thread_db_update_thread_list, thread_db_pid_to_str)
8115         (thread_db_extra_thread_info)
8116         (thread_db_thread_handle_to_thread_info)
8117         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
8118         (thread_db_resume): Refactor as methods of thread_db_target.
8119         (init_thread_db_ops): Delete.
8120         (_initialize_thread_db): Remove reference to init_thread_db_ops.
8121         * x86-linux-nat.c: Don't include "linux-nat.h".
8122         (super_post_startup_inferior): Delete.
8123         (x86_linux_nat_target::~x86_linux_nat_target): New.
8124         (x86_linux_child_post_startup_inferior)
8125         (x86_linux_read_description, x86_linux_enable_btrace)
8126         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
8127         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
8128         methods of x86_linux_nat_target.
8129         (x86_linux_create_target): Delete.  Bits folded ...
8130         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
8131         pointer.
8132         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
8133         (x86_linux_nat_target): New class.
8134         (x86_linux_create_target): Delete.
8135         (x86_linux_add_target): Now takes a linux_nat_target pointer.
8136         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
8137         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
8138         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
8139         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
8140         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
8141         make extern.
8142         (x86_use_watchpoints): Delete.
8143         * x86-nat.h: Include "breakpoint.h" and "target.h".
8144         (x86_use_watchpoints): Delete.
8145         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
8146         (x86_stopped_by_watchpoint, x86_stopped_data_address)
8147         (x86_insert_watchpoint, x86_remove_watchpoint)
8148         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
8149         (x86_stopped_by_hw_breakpoint): New declarations.
8150         (x86_nat_target): New template class.
8151
8152         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
8153         (the_ppc_linux_nat_target): New.
8154         (ppc_linux_fetch_inferior_registers)
8155         (ppc_linux_can_use_hw_breakpoint)
8156         (ppc_linux_region_ok_for_hw_watchpoint)
8157         (ppc_linux_ranged_break_num_registers)
8158         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
8159         (ppc_linux_insert_mask_watchpoint)
8160         (ppc_linux_remove_mask_watchpoint)
8161         (ppc_linux_can_accel_watchpoint_condition)
8162         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
8163         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
8164         (ppc_linux_watchpoint_addr_within_range)
8165         (ppc_linux_masked_watch_num_registers)
8166         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
8167         (ppc_linux_read_description): Refactor as methods of
8168         ppc_linux_nat_target.
8169         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
8170
8171         * procfs.c (procfs_xfer_partial): Delete forward declaration.
8172         (procfs_target): New class.
8173         (the_procfs_target): New.
8174         (procfs_target): Delete function.
8175         (procfs_auxv_parse, procfs_attach, procfs_detach)
8176         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
8177         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
8178         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
8179         (procfs_create_inferior, procfs_update_thread_list)
8180         (procfs_thread_alive, procfs_pid_to_str)
8181         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
8182         (procfs_stopped_data_address, procfs_insert_watchpoint)
8183         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
8184         (proc_find_memory_regions, procfs_info_proc)
8185         (procfs_make_note_section): Refactor as methods of procfs_target.
8186         (_initialize_procfs): Adjust.
8187         * sol-thread.c (sol_thread_target): New class.
8188         (sol_thread_ops): Now a sol_thread_target.
8189         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
8190         (sol_thread_fetch_registers, sol_thread_store_registers)
8191         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
8192         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
8193         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
8194         (init_sol_thread_ops): Delete.
8195         (_initialize_sol_thread): Adjust.  Remove references to
8196         init_sol_thread_ops and complete_target_initialization.
8197
8198         * windows-nat.c (windows_nat_target): New class.
8199         (windows_fetch_inferior_registers)
8200         (windows_store_inferior_registers, windows_resume, windows_wait)
8201         (windows_attach, windows_detach, windows_pid_to_exec_file)
8202         (windows_files_info, windows_create_inferior)
8203         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
8204         (windows_close, windows_pid_to_str, windows_xfer_partial)
8205         (windows_get_tib_address, windows_get_ada_task_ptid)
8206         (windows_thread_name, windows_thread_alive): Refactor as
8207         windows_nat_target methods.
8208         (do_initial_windows_stuff): Adjust.
8209         (windows_target): Delete function.
8210         (_initialize_windows_nat): Adjust.
8211
8212         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
8213         (darwin_mourn_inferior, darwin_kill_inferior)
8214         (darwin_create_inferior, darwin_attach, darwin_detach)
8215         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
8216         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
8217         (darwin_supports_multi_process): Refactor as darwin_nat_target
8218         methods.
8219         (darwin_resume_to, darwin_files_info): Delete.
8220         (_initialize_darwin_inferior): Rename to ...
8221         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
8222         * darwin-nat.h: Include "inf-child.h".
8223         (darwin_nat_target): New class.
8224         (darwin_complete_target): Delete.
8225         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
8226         (darwin_target): New.
8227         (i386_darwin_fetch_inferior_registers)
8228         (i386_darwin_store_inferior_registers): Refactor as methods of
8229         darwin_nat_target.
8230         (darwin_complete_target): Delete, with ...
8231         (_initialize_i386_darwin_nat): ... bits factored out here.
8232
8233         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
8234         (the_alpha_linux_nat_target): New.
8235         (alpha_linux_register_u_offset): Refactor as
8236         alpha_linux_nat_target method.
8237         (_initialize_alpha_linux_nat): Adjust.
8238         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
8239         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
8240         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
8241         methods of linux_nat_trad_target.
8242         (linux_trad_target): Delete.
8243         * linux-nat-trad.h (linux_trad_target): Delete function.
8244         (linux_nat_trad_target): New class.
8245         * mips-linux-nat.c (mips_linux_nat_target): New class.
8246         (super_fetch_registers, super_store_registers, super_close):
8247         Delete.
8248         (the_mips_linux_nat_target): New.
8249         (mips64_linux_regsets_fetch_registers)
8250         (mips64_linux_regsets_store_registers)
8251         (mips64_linux_fetch_registers, mips64_linux_store_registers)
8252         (mips_linux_register_u_offset, mips_linux_read_description)
8253         (mips_linux_can_use_hw_breakpoint)
8254         (mips_linux_stopped_by_watchpoint)
8255         (mips_linux_stopped_data_address)
8256         (mips_linux_region_ok_for_hw_watchpoint)
8257         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
8258         (mips_linux_close): Refactor as methods of mips_linux_nat.
8259         (_initialize_mips_linux_nat): Adjust to C++ification.
8260
8261         * aix-thread.c (aix_thread_target): New class.
8262         (aix_thread_ops): Now an aix_thread_target.
8263         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
8264         (aix_thread_fetch_registers, aix_thread_store_registers)
8265         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
8266         (aix_thread_thread_alive, aix_thread_pid_to_str)
8267         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
8268         Refactor as methods of aix_thread_target.
8269         (init_aix_thread_ops): Delete.
8270         (_initialize_aix_thread): Remove references to init_aix_thread_ops
8271         and complete_target_initialization.
8272         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
8273         (rs6000_nat_target): New class.
8274         (the_rs6000_nat_target): New.
8275         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
8276         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
8277         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
8278         (super_create_inferior): Delete.
8279         (_initialize_rs6000_nat): Adjust to C++ification.
8280
8281         * arm-linux-nat.c (arm_linux_nat_target): New class.
8282         (the_arm_linux_nat_target): New.
8283         (arm_linux_fetch_inferior_registers)
8284         (arm_linux_store_inferior_registers, arm_linux_read_description)
8285         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
8286         (arm_linux_remove_hw_breakpoint)
8287         (arm_linux_region_ok_for_hw_watchpoint)
8288         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
8289         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
8290         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
8291         arm_linux_nat_target.
8292         (_initialize_arm_linux_nat): Adjust to C++ification.
8293
8294         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
8295         (the_aarch64_linux_nat_target): New.
8296         (aarch64_linux_fetch_inferior_registers)
8297         (aarch64_linux_store_inferior_registers)
8298         (aarch64_linux_child_post_startup_inferior)
8299         (aarch64_linux_read_description)
8300         (aarch64_linux_can_use_hw_breakpoint)
8301         (aarch64_linux_insert_hw_breakpoint)
8302         (aarch64_linux_remove_hw_breakpoint)
8303         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
8304         (aarch64_linux_region_ok_for_hw_watchpoint)
8305         (aarch64_linux_stopped_data_address)
8306         (aarch64_linux_stopped_by_watchpoint)
8307         (aarch64_linux_watchpoint_addr_within_range)
8308         (aarch64_linux_can_do_single_step): Refactor as methods of
8309         aarch64_linux_nat_target.
8310         (super_post_startup_inferior): Delete.
8311         (_initialize_aarch64_linux_nat): Adjust to C++ification.
8312
8313         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
8314         (the_hppa_linux_nat_target): New.
8315         (hppa_linux_fetch_inferior_registers)
8316         (hppa_linux_store_inferior_registers): Refactor as methods of
8317         hppa_linux_nat_target.
8318         (_initialize_hppa_linux_nat): Adjust to C++ification.
8319
8320         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
8321         (the_ia64_linux_nat_target): New.
8322         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
8323         (ia64_linux_stopped_data_address)
8324         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
8325         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
8326         ia64_linux_nat_target methods.
8327         (super_xfer_partial): Delete.
8328         (_initialize_ia64_linux_nat): Adjust to C++ification.
8329
8330         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
8331         (the_m32r_linux_nat_target): New.
8332         (m32r_linux_fetch_inferior_registers)
8333         (m32r_linux_store_inferior_registers): Refactor as
8334         m32r_linux_nat_target methods.
8335         (_initialize_m32r_linux_nat): Adjust to C++ification.
8336
8337         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
8338         (the_m68k_linux_nat_target): New.
8339         (m68k_linux_fetch_inferior_registers)
8340         (m68k_linux_store_inferior_registers): Refactor as
8341         m68k_linux_nat_target methods.
8342         (_initialize_m68k_linux_nat): Adjust to C++ification.
8343
8344         * s390-linux-nat.c (s390_linux_nat_target): New class.
8345         (the_s390_linux_nat_target): New.
8346         (s390_linux_fetch_inferior_registers)
8347         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
8348         (s390_insert_watchpoint, s390_remove_watchpoint)
8349         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
8350         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
8351         (s390_auxv_parse, s390_read_description): Refactor as methods of
8352         s390_linux_nat_target.
8353         (_initialize_s390_nat): Adjust to C++ification.
8354
8355         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
8356         (the_sparc_linux_nat_target): New.
8357         (_initialize_sparc_linux_nat): Adjust to C++ification.
8358         * sparc-nat.c (sparc_fetch_inferior_registers)
8359         (sparc_store_inferior_registers): Remove target_ops parameter.
8360         * sparc-nat.h (sparc_fetch_inferior_registers)
8361         (sparc_store_inferior_registers): Remove target_ops parameter.
8362         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
8363         (the_sparc64_linux_nat_target): New.
8364         (_initialize_sparc64_linux_nat): Adjust to C++ification.
8365
8366         * spu-linux-nat.c (spu_linux_nat_target): New class.
8367         (the_spu_linux_nat_target): New.
8368         (spu_child_post_startup_inferior, spu_child_post_attach)
8369         (spu_child_wait, spu_fetch_inferior_registers)
8370         (spu_store_inferior_registers, spu_xfer_partial)
8371         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
8372         methods.
8373         (_initialize_spu_nat): Adjust to C++ification.
8374
8375         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
8376         (the_tilegx_linux_nat_target): New.
8377         (fetch_inferior_registers, store_inferior_registers):
8378         Refactor as methods.
8379         (_initialize_tile_linux_nat): Adjust to C++ification.
8380
8381         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
8382         (the_xtensa_linux_nat_target): New.
8383         (xtensa_linux_fetch_inferior_registers)
8384         (xtensa_linux_store_inferior_registers): Refactor as
8385         xtensa_linux_nat_target methods.
8386         (_initialize_xtensa_linux_nat): Adjust to C++ification.
8387
8388         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
8389         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
8390         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
8391         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
8392         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
8393         (fbsd_stopped_by_sw_breakpoint)
8394         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
8395         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
8396         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
8397         (fbsd_post_startup_inferior, fbsd_post_attach)
8398         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
8399         (fbsd_set_syscall_catchpoint)
8400         (super_xfer_partial, super_resume, super_wait)
8401         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
8402         (fbsd_handle_debug_trap): Remove target_ops parameter.
8403         (fbsd_nat_add_target): Delete.
8404         * fbsd-nat.h: Include "inf-ptrace.h".
8405         (fbsd_nat_add_target): Delete.
8406         (USE_SIGTRAP_SIGINFO): Define.
8407         (fbsd_nat_target): New class.
8408
8409         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
8410         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
8411         (amd64bsd_target): Delete.
8412         * amd64-bsd-nat.h: New file.
8413         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
8414         "x86-bsd-nat.h".
8415         (amd64_fbsd_nat_target): New class.
8416         (the_amd64_fbsd_nat_target): New.
8417         (amd64fbsd_read_description): Refactor as method of
8418         amd64_fbsd_nat_target.
8419         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
8420         (_initialize_amd64fbsd_nat): Adjust to C++ification.
8421         * amd64-nat.h (amd64bsd_target): Delete function declaration.
8422         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
8423         (i386bsd_store_inferior_registers): Remove target_ops parameter.
8424         (i386bsd_target): Delete.
8425         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
8426         (i386bsd_fetch_inferior_registers)
8427         (i386bsd_store_inferior_registers): Declare.
8428         (i386_bsd_nat_target): New class.
8429         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
8430         (the_i386_fbsd_nat_target): New.
8431         (i386fbsd_resume, i386fbsd_read_description): Refactor as
8432         i386_fbsd_nat_target methods.
8433         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
8434         (_initialize_i386fbsd_nat): Adjust to C++ification.
8435         * x86-bsd-nat.c (super_mourn_inferior): Delete.
8436         (x86bsd_mourn_inferior, x86bsd_target): Delete.
8437         (_initialize_x86_bsd_nat): Adjust to C++ification.
8438         * x86-bsd-nat.h: Include "x86-nat.h".
8439         (x86bsd_target): Delete declaration.
8440         (x86bsd_nat_target): New class.
8441
8442         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
8443         (the_aarch64_fbsd_nat_target): New.
8444         (aarch64_fbsd_fetch_inferior_registers)
8445         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
8446         aarch64_fbsd_nat_target.
8447         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
8448         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
8449         (the_alpha_bsd_nat_target): New.
8450         (alphabsd_fetch_inferior_registers)
8451         (alphabsd_store_inferior_registers): Refactor as
8452         alpha_bsd_nat_target methods.
8453         (_initialize_alphabsd_nat): Refactor as methods of
8454         alpha_bsd_nat_target.
8455         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
8456         (the_amd64_nbsd_nat_target): New.
8457         (_initialize_amd64nbsd_nat): Adjust to C++ification.
8458         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
8459         (the_amd64_obsd_nat_target): New.
8460         (_initialize_amd64obsd_nat): Adjust to C++ification.
8461         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
8462         (the_arm_fbsd_nat_target): New.
8463         (arm_fbsd_fetch_inferior_registers)
8464         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
8465         (_initialize_arm_fbsd_nat): Refactor as methods of
8466         arm_fbsd_nat_target.
8467         (_initialize_arm_fbsd_nat): Adjust to C++ification.
8468         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
8469         (the_arm_netbsd_nat_target): New.
8470         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
8471         arm_netbsd_nat_target.
8472         (_initialize_arm_netbsd_nat): Adjust to C++ification.
8473         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
8474         (the_hppa_nbsd_nat_target): New.
8475         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
8476         hppa_nbsd_nat_target methods.
8477         (_initialize_hppanbsd_nat): Adjust to C++ification.
8478         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
8479         (the_hppa_obsd_nat_target): New.
8480         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
8481         methods of hppa_obsd_nat_target.
8482         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
8483         add_target.
8484         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
8485         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
8486         add_target.
8487         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
8488         (_initialize_i386obsd_nat): Use add_target.
8489         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
8490         (the_m68k_bsd_nat_target): New.
8491         (m68kbsd_fetch_inferior_registers)
8492         (m68kbsd_store_inferior_registers): Refactor as methods of
8493         m68k_bsd_nat_target.
8494         (_initialize_m68kbsd_nat): Adjust to C++ification.
8495         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
8496         (the_mips_fbsd_nat_target): New.
8497         (mips_fbsd_fetch_inferior_registers)
8498         (mips_fbsd_store_inferior_registers): Refactor as methods of
8499         mips_fbsd_nat_target.
8500         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
8501         add_target.
8502         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
8503         (the_mips_nbsd_nat_target): New.
8504         (mipsnbsd_fetch_inferior_registers)
8505         (mipsnbsd_store_inferior_registers): Refactor as methods of
8506         mips_nbsd_nat_target.
8507         (_initialize_mipsnbsd_nat): Adjust to C++ification.
8508         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
8509         (the_mips64_obsd_nat_target): New.
8510         (mips64obsd_fetch_inferior_registers)
8511         (mips64obsd_store_inferior_registers): Refactor as methods of
8512         mips64_obsd_nat_target.
8513         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
8514         add_target.
8515         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
8516         nbsd_nat_target.
8517         * nbsd-nat.h: Include "inf-ptrace.h".
8518         (nbsd_nat_target): New class.
8519         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
8520         (obsd_wait): Refactor as methods of obsd_nat_target.
8521         (obsd_add_target): Delete.
8522         * obsd-nat.h: Include "inf-ptrace.h".
8523         (obsd_nat_target): New class.
8524         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
8525         (the_ppc_fbsd_nat_target): New.
8526         (ppcfbsd_fetch_inferior_registers)
8527         (ppcfbsd_store_inferior_registers): Refactor as methods of
8528         ppc_fbsd_nat_target.
8529         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
8530         add_target.
8531         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
8532         (the_ppc_nbsd_nat_target): New.
8533         (ppcnbsd_fetch_inferior_registers)
8534         (ppcnbsd_store_inferior_registers): Refactor as methods of
8535         ppc_nbsd_nat_target.
8536         (_initialize_ppcnbsd_nat): Adjust to C++ification.
8537         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
8538         (the_ppc_obsd_nat_target): New.
8539         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
8540         methods of ppc_obsd_nat_target.
8541         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
8542         add_target.
8543         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
8544         (the_sh_nbsd_nat_target): New.
8545         (shnbsd_fetch_inferior_registers)
8546         (shnbsd_store_inferior_registers): Refactor as methods of
8547         sh_nbsd_nat_target.
8548         (_initialize_shnbsd_nat): Adjust to C++ification.
8549         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
8550         (inf_ptrace_xfer_partial): Delete.
8551         (sparc_xfer_partial, sparc_target): Delete.
8552         * sparc-nat.h (sparc_fetch_inferior_registers)
8553         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
8554         (sparc_target): Delete function declaration.
8555         (sparc_target): New template class.
8556         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
8557         (_initialize_sparcnbsd_nat): Adjust to C++ification.
8558         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
8559         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
8560         add_target.
8561         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
8562         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
8563         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
8564         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
8565         add_target.
8566         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
8567         (the_vax_bsd_nat_target): New.
8568         (vaxbsd_fetch_inferior_registers)
8569         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
8570         methods.
8571         (_initialize_vaxbsd_nat): Adjust to C++ification.
8572
8573         * bsd-kvm.c (bsd_kvm_target): New class.
8574         (bsd_kvm_ops): Now a bsd_kvm_target.
8575         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
8576         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
8577         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
8578         bsd_kvm_target.
8579         (bsd_kvm_return_one): Delete.
8580         (bsd_kvm_add_target): Adjust to C++ification.
8581
8582         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
8583         (nto_procfs_target_procfs): New classes.
8584         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
8585         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
8586         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
8587         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
8588         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
8589         (procfs_remove_hw_breakpoint, procfs_resume)
8590         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
8591         (procfs_kill_inferior, procfs_store_registers)
8592         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
8593         as methods of nto_procfs_target.
8594         (nto_procfs_ops): Now an nto_procfs_target_procfs.
8595         (nto_native_ops): Delete.
8596         (procfs_open, procfs_native_open): Delete.
8597         (nto_native_ops): Now an nto_procfs_target_native.
8598         (init_procfs_targets): Adjust to C++ification.
8599         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
8600         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
8601         Refactor as methods of nto_procfs_target.
8602
8603         * go32-nat.c (go32_nat_target): New class.
8604         (the_go32_nat_target): New.
8605         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
8606         (go32_store_registers, go32_xfer_partial, go32_files_info)
8607         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
8608         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
8609         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
8610         (go32_pid_to_str): Refactor as methods of go32_nat_target.
8611         (go32_target): Delete.
8612         (_initialize_go32_nat): Adjust to C++ification.
8613
8614         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
8615         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
8616         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
8617         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
8618         gnu_nat_target.
8619         (gnu_target): Delete.
8620         * gnu-nat.h (gnu_target): Delete.
8621         (gnu_nat_target): New class.
8622         * i386-gnu-nat.c (gnu_base_target): New.
8623         (i386_gnu_nat_target): New class.
8624         (the_i386_gnu_nat_target): New.
8625         (_initialize_i386gnu_nat): Adjust to C++ification.
8626
8627 2018-05-02  Pedro Alves  <palves@redhat.com>
8628
8629         * bfd-target.c (target_bfd_xclose): Rename to ...
8630         (target_bfd_close): ... this.
8631         (target_bfd_reopen): Adjust.
8632         * target.c (target_close): Remove references to to_xclose.
8633         * target.h (target_ops::to_xclose): Delete.
8634         (target_ops::to_close): Update comments.
8635
8636 2018-05-02  Pedro Alves  <palves@redhat.com>
8637
8638         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
8639         "linux-nat.h".
8640         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
8641         * inf-ptrace.c (inf_ptrace_register_u_offset)
8642         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
8643         (inf_ptrace_store_register, inf_ptrace_store_registers)
8644         (inf_ptrace_trad_target): Move to ...
8645         * linux-nat-trad.c: ... this new file.
8646         * linux-nat-trad.h: New file.
8647         * linux-nat.c (linux_target_install_ops): Make extern.
8648         (linux_trad_target): Delete.
8649         * linux-nat.h (linux_trad_target): Delete declaration.
8650         (linux_target_install_ops): Declare.
8651         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
8652         "linux-nat.h".
8653
8654 2018-05-02  Pedro Alves  <palves@redhat.com>
8655
8656         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
8657         procfs_target/add_target here.
8658         * procfs.c (procfs_target): Make static.
8659         (_initialize_procfs): Call add_target here.
8660         * procfs.h (struct target_ops): Remove forward declaration.
8661         (procfs_target): Remove declaration.
8662         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
8663
8664 2018-05-02  Pedro Alves  <palves@redhat.com>
8665
8666         * procfs.c (procfs_stopped_by_watchpoint)
8667         (procfs_insert_watchpoint, procfs_remove_watchpoint)
8668         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
8669         Forward declare.
8670         (procfs_use_watchpoints): Delete, move contents...
8671         (procfs_target): ... here.
8672         * procfs.h (procfs_use_watchpoints): Delete declaration.
8673         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
8674         procfs_use_watchpoints.
8675         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
8676         procfs_use_watchpoints.
8677
8678 2018-05-02  Tom Tromey  <tom@tromey.com>
8679
8680         PR python/20084:
8681         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
8682         and var_zuinteger_unlimited.
8683         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
8684         and PARAM_ZUINTEGER_UNLIMITED.
8685         (set_parameter_value): Handle var_zuinteger and
8686         var_zuinteger_unlimited.
8687         (add_setshow_generic): Likewise.
8688         (parmpy_init): Likewise.
8689
8690 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
8691
8692         PR rust/23124
8693         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
8694         pointer is not null before dereferencing it.
8695
8696 2018-04-30  Tom Tromey  <tom@tromey.com>
8697
8698         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
8699         is_mi_like_p.
8700
8701 2018-04-30  Tom Tromey  <tom@tromey.com>
8702
8703         * breakpoint.c (mention): Remove use of is_mi_like_p.
8704         (print_mention_ranged_breakpoint): Likewise.
8705         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
8706         of is_mi_like_p.
8707
8708 2018-04-30  Tom Tromey  <tom@tromey.com>
8709
8710         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
8711
8712 2018-04-30  Tom Tromey  <tom@tromey.com>
8713
8714         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
8715         (info_spu_event_command): Remove some uses of is_mi_like_p.
8716
8717 2018-04-30  Tom Tromey  <tom@tromey.com>
8718
8719         * python/py-framefilter.c (py_print_single_arg)
8720         (enumerate_locals, py_print_args, py_print_frame): Remove some
8721         uses of is_mi_like_p.
8722
8723 2018-04-30  Tom Tromey  <tom@tromey.com>
8724
8725         * ui-out.c: Update.
8726         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
8727         * ui-out.h (ui_out::is_mi_like_p): Now const.
8728         (ui_out::do_is_mi_like_p): Now const.
8729         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
8730
8731 2018-04-30  Tom Tromey  <tom@tromey.com>
8732
8733         * varobj.c (varobj_set_visualizer): Use new_reference.
8734         * python/python.c (gdbpy_decode_line): Use new_reference.
8735         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
8736         new_reference.
8737
8738 2018-04-30  Tom Tromey  <tom@tromey.com>
8739
8740         * varobj.c (install_new_value): Use new_reference.
8741         * value.h (value_incref): Return void.  Swap intro comment with
8742         value_decref.
8743         * value.c (set_value_parent): Use new_reference.
8744         (value_incref): Return void.  Update intro comment.
8745         (release_value): Use new_reference.
8746         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
8747
8748 2018-04-30  Tom Tromey  <tom@tromey.com>
8749
8750         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
8751         * gdb_bfd.h (new_bfd_ref): Remove.
8752         (gdb_bfd_open): Update comment.
8753         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
8754         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
8755         (gdb_bfd_fdopenr): Use new_reference.
8756         * exec.c (exec_file_attach): Use new_reference.
8757
8758 2018-04-30  Tom Tromey  <tom@tromey.com>
8759
8760         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
8761         method.
8762
8763 2018-04-30  Tom Tromey  <tom@tromey.com>
8764
8765         * jit.c (jit_read_code_entry): Use type_align.
8766         * i386-tdep.c (i386_gdbarch_init): Don't call
8767         set_gdbarch_long_long_align_bit.
8768         * gdbarch.sh: Remove long_long_align_bit.
8769         * gdbarch.c, gdbarch.h: Rebuild.
8770         * arc-tdep.c (arc_type_align): New function.
8771         (arc_gdbarch_init): Use arc_type_align.  Don't call
8772         set_gdbarch_long_long_align_bit.
8773
8774 2018-04-30  Tom Tromey  <tom@tromey.com>
8775
8776         * rust-lang.c (rust_type_alignment): Remove.
8777         (rust_composite_type): Use type_align.
8778
8779 2018-04-30  Tom Tromey  <tom@tromey.com>
8780
8781         * NEWS: Mention Type.align.
8782         * python/py-type.c (typy_get_alignof): New function.
8783         (type_object_getset): Add "alignof".
8784
8785 2018-04-30  Tom Tromey  <tom@tromey.com>
8786
8787         PR exp/17095:
8788         * NEWS: Update.
8789         * std-operator.def (UNOP_ALIGNOF): New operator.
8790         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
8791         New.
8792         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
8793         * c-lang.c (c_op_print_tab): Add alignof.
8794         * c-exp.y (ALIGNOF): New token.
8795         (exp): Add "ALIGNOF" production.
8796         (ident_tokens): Add _Alignof and alignof.
8797
8798 2018-04-30  Tom Tromey  <tom@tromey.com>
8799
8800         * i386-tdep.c (i386_type_align): New function.
8801         (i386_gdbarch_init): Update.
8802         * gdbarch.sh (type_align): New method.
8803         * gdbarch.c, gdbarch.h: Rebuild.
8804         * arch-utils.h (default_type_align): Declare.
8805         * arch-utils.c (default_type_align): New function.
8806         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
8807         (struct type) <align_log2>: New field.
8808         <instance_flags>: Now a bitfield.
8809         (TYPE_RAW_ALIGN): New macro.
8810         (type_align, type_raw_align, set_type_align): Declare.
8811         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
8812         functions.
8813         * dwarf2read.c (quirk_rust_enum): Set type alignment.
8814         (get_alignment, maybe_set_alignment): New functions.
8815         (read_structure_type, read_enumeration_type, read_array_type)
8816         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
8817         (read_subrange_type, read_base_type): Set type alignment.
8818
8819 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
8820
8821         * dwarf2read.c (read_index_from_section): Use bool.
8822
8823 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
8824
8825         PR gdb/22950
8826         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
8827         with #ifdef.
8828
8829 2018-04-29  John Reiser  <jreiser@BitWagon.com>
8830
8831         PR build/22873
8832         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
8833         last step, and do it atomically.
8834
8835 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
8836
8837         * compile/compile-c-types.c (convert_int, convert_float):
8838         Update for C FE v1.
8839
8840 2018-04-27  Tom Tromey  <tom@tromey.com>
8841
8842         PR rust/22545:
8843         * rust-lang.c (rust_inclusive_range_type_p): New function.
8844         (rust_range): Handle inclusive ranges.
8845         (rust_compute_range): Likewise.
8846         * rust-exp.y (struct rust_op) <inclusive>: New field.
8847         (DOTDOTEQ): New constant.
8848         (range_expr): Add "..=" productions.
8849         (operator_tokens): Add "..=" token.
8850         (ast_range): Add "inclusive" parameter.
8851         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
8852         ranges.
8853         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
8854         bounds values.
8855         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
8856         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
8857         Update comments.
8858         * expprint.c (print_subexp_standard): Handle new bounds values.
8859         (dump_subexp_body_standard): Likewise.
8860
8861 2018-04-27  Tom Tromey  <tom@tromey.com>
8862
8863         * configure: Rebuild.
8864         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
8865         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
8866         "OVERRIDE".
8867         (class symbol_needs_eval_context): Likewise.
8868         * dwarf2read.c (mock_mapped_index::symbol_name_count)
8869         (mock_mapped_index::symbol_name_at): Use "override".  Remove
8870         "virtual".
8871         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
8872         "override".
8873         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
8874         * aarch64-tdep.c (instruction_reader::read): Use "override".
8875         (instruction_reader_test::read): Likewise.
8876         * arm-tdep.c (instruction_reader::read): Use "override".
8877         (instruction_reader_thumb::read): Likewise.
8878
8879 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
8880
8881         PR remote/9665
8882         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
8883         instead of remote_send.
8884         (remote_send): Remove.
8885
8886 2018-04-26  Pedro Alves  <palves@redhat.com>
8887
8888         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
8889         find_function_start_sal instead of find_pc_line.
8890
8891 2018-04-26  Pedro Alves  <palves@redhat.com>
8892
8893         * breakpoint.c (set_breakpoint_location_function): Handle
8894         mst_data_gnu_ifunc.
8895         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
8896         * elfread.c (elf_symtab_read): Give data symbols with
8897         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
8898         (elf_rel_plt_read): Update comment.
8899         * linespec.c (convert_linespec_to_sals): Handle
8900         mst_data_gnu_ifunc.
8901         (minsym_found): Handle mst_data_gnu_ifunc.
8902         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
8903         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
8904         * parse.c (find_minsym_type_and_address): Handle
8905         mst_data_gnu_ifunc.
8906         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
8907         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
8908         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
8909         comment.
8910         <mst_data_gnu_ifunc>: New enumerator.
8911
8912 2018-04-26  Pedro Alves  <palves@redhat.com>
8913
8914         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
8915         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
8916         'want_trampoline' parameter by a lookup_msym_prefer parameter.
8917         Handle it.
8918         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
8919         (lookup_minimal_symbol_by_pc): Adjust.
8920         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
8921         (lookup_solib_trampoline_symbol_by_pc): Adjust.
8922         * minsyms.h (lookup_msym_prefer): New enum.
8923         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8924         parameter by a lookup_msym_prefer parameter.
8925
8926 2018-04-26  Pedro Alves  <palves@redhat.com>
8927
8928         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
8929         ends in "@plt" instead of looking at the symbol's section.
8930
8931 2018-04-26  Pedro Alves  <palves@redhat.com>
8932
8933         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
8934         all references.
8935         (find_pc_partial_function_gnu_ifunc): Rename to ...
8936         (find_pc_partial_function): ... this, and remove references to
8937         'is_gnu_ifunc_p'.
8938         (find_pc_partial_function): Delete old implementation.
8939         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
8940
8941 2018-04-26  Pedro Alves  <palves@redhat.com>
8942
8943         * linespec.c (struct bound_minimal_symbol_search_key): New.
8944         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
8945         skip first line if we found a GNU ifunc minimal symbol by name.
8946         (compare_msymbols): Change parameters to work with a destructured
8947         lhs minsym.
8948         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
8949         functions.
8950
8951 2018-04-26  Pedro Alves  <palves@redhat.com>
8952
8953         * breakpoint.c (set_breakpoint_location_function): Don't resolve
8954         ifunc targets here.  Instead, if we have an ifunc minsym, use its
8955         address/name.
8956         (add_location_to_breakpoint): Store the minsym and the objfile in
8957         the breakpoint location.
8958         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
8959         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
8960         Record the minsym in the sal.
8961         * symtab.h (symtab_and_line) <msymbol>: New field.
8962
8963 2018-04-26  Pedro Alves  <palves@redhat.com>
8964
8965         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
8966         unless we actually resolved the ifunc.
8967
8968 2018-04-26  Pedro Alves  <palves@redhat.com>
8969
8970         * c-exp.y (variable production): Prefer ifunc minsyms over
8971         regular function symbols.
8972         * symtab.c (find_gnu_ifunc): New function.
8973         * minsyms.h (lookup_msym_prefer): New enum.
8974         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8975         parameter by a lookup_msym_prefer parameter.
8976         * symtab.h (find_gnu_ifunc): New declaration.
8977
8978 2018-04-26  Pedro Alves  <palves@redhat.com>
8979
8980         * blockframe.c (find_gnu_ifunc_target_type): New function.
8981         (find_function_type): New.
8982         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
8983         return a value with a memory address.
8984         (eval_call): For calls to GNU ifunc functions, try to find the
8985         type of the target function from the type that the resolver
8986         returns.
8987         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
8988         symbols.
8989         * infcall.c (find_function_return_type): Delete.
8990         (find_function_addr): Add 'function_type' parameter.  For calls to
8991         GNU ifunc functions, try to find the type of the target function
8992         from the type that the resolver returns, and return it via
8993         FUNCTION_TYPE.
8994         (call_function_by_hand_dummy): Adjust to use the function type
8995         returned by find_function_addr.
8996         (find_function_addr): Add 'function_type' parameter and move
8997         description here.
8998         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
8999         declarations.
9000
9001 2018-04-26  Pedro Alves  <palves@redhat.com>
9002
9003         * c-exp.y (variable production): Skip finding an alias for ifunc
9004         symbols.
9005
9006 2018-04-26  Pedro Alves  <palves@redhat.com>
9007
9008         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
9009
9010 2018-04-25  Pedro Alves  <palves@redhat.com>
9011
9012         * infcmd.c (kill_command): Print the pid as string, not the whole
9013         thread's ptid.  Add comment.  s/has been killed/killed/ in output
9014         message.
9015         * remote.c (remote_detach_1): Print the pid as string, not the
9016         whole thread's ptid.
9017
9018 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
9019             Sergio Durigan Junior  <sergiodj@redhat.com>
9020             Pedro Alves  <palves@redhat.com>
9021
9022         * infcmd.c (kill_command): Print message when inferior has
9023         been killed.
9024         * inferior.c (print_inferior_events): Remove 'static'.  Set as
9025         '1'.
9026         (add_inferior): Improve message printed when
9027         'print_inferior_events' is on.
9028         (exit_inferior): Remove message printed when
9029         'print_inferior_events' is on.
9030         (detach_inferior): Improve message printed when
9031         'print_inferior_events' is on.
9032         (initialize_inferiors): Use 'add_inferior_silent' to set
9033         'current_inferior_'.
9034         * inferior.h (print_inferior_events): Declare here as
9035         'extern'.
9036         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
9037         '[Detaching...]' messages when 'print_inferior_events' is on.
9038         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
9039         as prefix/suffix for messages.  Remove periods.  Fix erroneous
9040         'Detaching after fork from child...', replace it by '... from
9041         parent...'.
9042         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
9043         prefix/suffix when printing 'Detaching...' messages.  Print
9044         them when 'print_inferior_events' is on.
9045         * remote.c (remote_detach_1): Print message when detaching
9046         from inferior and '!is_fork_parent'.
9047
9048 2018-04-24  Tom Tromey  <tom@tromey.com>
9049
9050         * cli-out.h: Reindent.
9051
9052 2018-04-24  Tom Tromey  <tom@tromey.com>
9053
9054         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
9055         (cli_ui_out::do_field_string): Use fputs_filtered.
9056         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
9057
9058 2018-04-23  Tom Tromey  <tom@tromey.com>
9059
9060         * guile/scm-frame.c (gdbscm_frame_read_var): Use
9061         gdb::unique_xmalloc_ptr.
9062
9063 2018-04-23  Tom Tromey  <tom@tromey.com>
9064
9065         * configure: Rebuild.
9066
9067 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
9068
9069         PR gdb/23095
9070         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
9071         prepare_for_testing.  Set normal_bp to r_debug_state if target
9072         is bsd.
9073
9074 2018-04-21  Pedro Alves  <palves@redhat.com>
9075             Rajendra SY  <rajendra.sy@gmail.com>
9076
9077         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
9078         * remote.c (extended_remote_attach): In all-stop mode, mark the
9079         thread as executing.
9080
9081 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
9082
9083         * thread.c (thread_apply_all_command): Fix comment.
9084         (thread_command): Fix comment.
9085
9086 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
9087
9088         * common/tdesc.h (tdesc_create_feature): Remove xml filename
9089         parameter.
9090         * features/aarch64-core.c (create_feature_aarch64_core):
9091         Regenerate.
9092         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
9093         Likewise.
9094         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
9095         Likewise.
9096         * features/i386/32bit-avx512.c
9097         (create_feature_i386_32bit_avx512): Likewise.
9098         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
9099         Likewise.
9100         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
9101         Likewise.
9102         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
9103         Likewise.
9104         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
9105         Likewise.
9106         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
9107         Likewise.
9108         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
9109         Likewise.
9110         * features/i386/64bit-avx512.c
9111         (create_feature_i386_64bit_avx512): Likewise.
9112         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
9113         Likewise.
9114         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
9115         Likewise.
9116         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
9117         Likewise.
9118         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
9119         Likewise.
9120         * features/i386/64bit-segments.c
9121         (create_feature_i386_64bit_segments): Likewise.
9122         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
9123         Likewise.
9124         * features/i386/x32-core.c
9125         (create_feature_i386_x32_core): Likewise.
9126         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
9127         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
9128         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
9129         * target-descriptions.c: In generated code, don't pass xml
9130         filename.
9131
9132 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9133
9134         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
9135         (print_xml_feature::visit_post): Likewise.
9136         (print_xml_feature::visit): Likewise.
9137         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
9138         (print_xml_feature): Add new class.
9139         * regformats/regdat.sh: Null xmltarget on feature targets.
9140         * target-descriptions.c (struct target_desc): Add xmltarget.
9141         (maintenance_check_tdesc_xml_convert): Add unittest function.
9142         (tdesc_get_features_xml): Add function to get xml.
9143         (maintenance_check_xml_descriptions): Test xml generation.
9144         * xml-tdesc.c (string_read_description_xml): Add function.
9145         * xml-tdesc.h (string_read_description_xml): Add declaration.
9146
9147 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9148
9149         * features/Makefile: Add feature marker to targets with new style
9150         target descriptions.
9151         * regformats/aarch64.dat: Regenerate.
9152         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
9153         * regformats/i386/amd64-avx-linux.dat: Likewise.
9154         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
9155         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
9156         * regformats/i386/amd64-linux.dat: Likewise.
9157         * regformats/i386/amd64-mpx-linux.dat: Likewise.
9158         * regformats/i386/amd64.dat: Likewise.
9159         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
9160         * regformats/i386/i386-avx-linux.dat: Likewise.
9161         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
9162         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
9163         * regformats/i386/i386-linux.dat: Likewise.
9164         * regformats/i386/i386-mmx-linux.dat: Likewise.
9165         * regformats/i386/i386-mpx-linux.dat: Likewise.
9166         * regformats/i386/i386.dat: Likewise.
9167         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
9168         * regformats/i386/x32-avx-linux.dat: Likewise.
9169         * regformats/i386/x32-linux.dat: Likewise.
9170         * regformats/tic6x-c62x-linux.dat: Likewise.
9171         * regformats/tic6x-c64x-linux.dat: Likewise.
9172         * regformats/tic6x-c64xp-linux.dat: Likewise.
9173         * regformats/regdat.sh: Parse feature marker.
9174
9175 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9176
9177         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
9178         (tdesc_osabi_name): Likewise.
9179         * target-descriptions.c (tdesc_architecture_name): Add new
9180         function.
9181         (tdesc_osabi_name): Likewise.
9182
9183 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9184
9185         * common/tdesc.c (tdesc_predefined_type): Move to here.
9186         (tdesc_named_type): Likewise.
9187         (tdesc_create_vector): Likewise.
9188         (tdesc_create_struct): Likewise.
9189         (tdesc_set_struct_size): Likewise.
9190         (tdesc_create_union): Likewise.
9191         (tdesc_create_flags): Likewise.
9192         (tdesc_create_enum): Likewise.
9193         (tdesc_add_field): Likewise.
9194         (tdesc_add_typed_bitfield): Likewise.
9195         (tdesc_add_bitfield): Likewise.
9196         (tdesc_add_flag): Likewise.
9197         (tdesc_add_enum_value): Likewise.
9198         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
9199         (struct tdesc_type_vector): Likewise.
9200         (struct tdesc_type_field): Likewise.
9201         (struct tdesc_type_with_fields): Likewise.
9202         (tdesc_create_enum): Add declaration.
9203         (tdesc_add_typed_bitfield): Likewise.
9204         (tdesc_add_enum_value): Likewise.
9205         * target-descriptions.c (tdesc_type_field): Move from here.
9206         (tdesc_type_builtin): Likewise.
9207         (tdesc_type_vector): Likewise.
9208         (tdesc_type_with_fields): Likewise.
9209         (tdesc_predefined_types): Likewise.
9210         (tdesc_named_type): Likewise.
9211         (tdesc_create_vector): Likewise.
9212         (tdesc_create_struct): Likewise.
9213         (tdesc_set_struct_size): Likewise.
9214         (tdesc_create_union): Likewise.
9215         (tdesc_create_flags): Likewise.
9216         (tdesc_create_enum): Likewise.
9217         (tdesc_add_field): Likewise.
9218         (tdesc_add_typed_bitfield): Likewise.
9219         (tdesc_add_bitfield): Likewise.
9220         (tdesc_add_flag): Likewise.
9221         (tdesc_add_enum_value): Likewise.
9222         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
9223         (tdesc_add_typed_bitfield): Likewise.
9224         (tdesc_add_enum_value): Likewise.
9225
9226 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9227
9228         * common/tdesc.c (tdesc_feature::accept): Move to here.
9229         (tdesc_feature::operator==): Likewise.
9230         (tdesc_create_reg): Likewise.
9231         * common/tdesc.h (tdesc_type_kind): Likewise.
9232         (struct tdesc_type): Likewise.
9233         (struct tdesc_feature): Likewise.
9234         * regformats/regdat.sh: Create a feature.
9235         * target-descriptions.c (tdesc_type_kind): Move from here.
9236         (tdesc_type): Likewise.
9237         (tdesc_type_up): Likewise.
9238         (tdesc_feature): Likewise.
9239         (tdesc_create_reg): Likewise.
9240
9241 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9242
9243         * Makefile.in: Add arch/tdesc.c
9244         * common/tdesc.c: New file.
9245         * common/tdesc.h (tdesc_element_visitor): Move to here.
9246         (tdesc_element): Likewise.
9247         (tdesc_reg): Likewise.
9248         (tdesc_reg_up): Likewise.
9249         * regformats/regdef.h (reg): Add offset to constructors.
9250         * target-descriptions.c (tdesc_element_visitor): Move from here.
9251         (tdesc_element): Likewise.
9252         (tdesc_reg): Likewise.
9253         (tdesc_reg_up): Likewise.
9254
9255 2018-04-17  Tom Tromey  <tom@tromey.com>
9256
9257         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
9258         discriminant field.
9259
9260 2018-04-17  Tom Tromey  <tom@tromey.com>
9261
9262         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
9263
9264 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9265
9266         * symtab.c (print_symbol_info): Skip printing filename and line
9267         number when `last' is NULL.
9268         (symtab_symbol_info): Use empty string instead of NULL for first
9269         invocation of print_symbol_info.
9270         (rbreak_command): Pass NULL to `last' parameter of
9271         print_symbol_info.
9272
9273 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
9274
9275         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
9276         instead of nullptr.
9277
9278 2018-04-16  Pedro Alves  <palves@redhat.com>
9279
9280         * MAINTAINERS (sh): Remove.
9281         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
9282         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
9283         (ALLDEPFILES): Remove sh64-tdep.c.
9284         * NEWS: Mentions that support for SH-5/SH64 is removed.
9285         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
9286         (sh*-*-openbsd*): Ditto.
9287         (sh64-*-elf*): Remove.
9288         (sh*): Remove.
9289         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
9290         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
9291         * sh-tdep.c: No longer include "sh64-tdep.h".
9292         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
9293         * sh64-tdep.c, sh64-tdep.h: Remove files.
9294
9295 2018-04-16  Pedro Alves  <palves@redhat.com>
9296
9297         * MAINTAINERS: Remove m88k.
9298         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
9299         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
9300         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
9301         * NEWS: Mention that support for m88k was removed.
9302         * configure.host (m88*-*-*): Remove support.
9303         * configure.nat (m88k-*-*): Remove support.
9304         * configure.tgt (m88*-*-openbsd*): Remove.
9305         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
9306
9307 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
9308
9309         * configure.tgt (x86_tobjs): New variable.
9310         (amd64_tobjs, i386_tobjs): Use it.
9311
9312 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9313
9314         * symtab.c (print_symbol_info): Precede the symbol definition by
9315         the line number when available.
9316         * NEWS: Advertise this enhancement.
9317
9318 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
9319
9320         * NEWS (New options): announce set/show record btrace cpu.
9321         * btrace.c: Include record-btrace.h.
9322         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
9323         the vendor is unknown.
9324         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
9325         Maybe overwrite the btrace configuration's cpu.
9326         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
9327         (btrace_fetch): Add cpu parameter.  Update callers.
9328         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
9329         Maybe overwrite the btrace configuration's cpu.  Skip enabling
9330         errata workarounds if the vendor is unknown.
9331         * python/py-record-btrace.c: Include record-btrace.h.
9332         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
9333         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
9334         * record-btrace.c (record_btrace_cpu_state_kind): New.
9335         (record_btrace_cpu): New.
9336         (set_record_btrace_cpu_cmdlist): New.
9337         (record_btrace_get_cpu): New.
9338         (require_btrace_thread, record_btrace_info)
9339         (record_btrace_resume_thread): Call record_btrace_get_cpu.
9340         (cmd_set_record_btrace_cpu_none): New.
9341         (cmd_set_record_btrace_cpu_auto): New.
9342         (cmd_set_record_btrace_cpu): New.
9343         (cmd_show_record_btrace_cpu): New.
9344         (_initialize_record_btrace): Initialize set/show record btrace cpu
9345         commands.
9346         * record-btrace.h (record_btrace_get_cpu): New.
9347
9348 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
9349
9350         * record.c (set_record_command): Fix typo in message.
9351
9352 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
9353
9354         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
9355
9356 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
9357
9358         * infrun.c (process_event_stop_test): Call
9359         gdbarch_in_indirect_branch_thunk.
9360         * gdbarch.sh (in_indirect_branch_thunk): New.
9361         * gdbarch.c: Regenerated.
9362         * gdbarch.h: Regenerated.
9363         * x86-tdep.h: New.
9364         * x86-tdep.c: New.
9365         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
9366         (HFILES_NO_SRCDIR): Add x86-tdep.h.
9367         (ALLDEPFILES): Add x86-tdep.c.
9368         * arch-utils.h (default_in_indirect_branch_thunk): New.
9369         * arch-utils.c (default_in_indirect_branch_thunk): New.
9370         * i386-tdep: Include x86-tdep.h.
9371         (i386_in_indirect_branch_thunk): New.
9372         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
9373         function.
9374         * amd64-tdep: Include x86-tdep.h.
9375         (amd64_in_indirect_branch_thunk): New.
9376         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
9377
9378 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
9379
9380         PR gdb/23053
9381         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
9382         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
9383         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
9384         regression.
9385
9386 2018-04-12  Tom Tromey  <tom@tromey.com>
9387
9388         * rust-lang.c (rust_print_struct_def): Remove univariant code.
9389         (rust_evaluate_subexp): Likewise.
9390
9391 2018-04-12  Pedro Alves  <palves@redhat.com>
9392
9393         * procfs.c (procfs_detach): Make forward declaration's prototype
9394         match definition's protototype.
9395         (proc_get_LDT_entry): Remove stale do_cleanups call.
9396
9397 2018-04-12  Pedro Alves  <palves@redhat.com>
9398
9399         * target.h (target_ops::to_has_exited): Delete.
9400         (target_has_exited): Delete.
9401         * target-delegates.c: Regenerate.
9402
9403 2018-04-11  Pedro Alves  <palves@redhat.com>
9404
9405         * target.c (fileio_fh_t::t): Add comment.
9406         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
9407         (target_fileio_close): Handle a NULL target.
9408         (invalidate_fileio_fh): New.
9409         (target_close): Call it.
9410         * remote.c (remote_hostio_send_command): No longer check whether
9411         remote_desc is open.
9412
9413 2018-04-11  Pedro Alves  <palves@redhat.com>
9414
9415         * target.c (fileio_fh_t): Make it a named struct instead of a
9416         typedef.
9417         (fileio_fh_t::is_closed): New method.
9418         (DEF_VEC_O (fileio_fh_t)): Remove.
9419         (fileio_fhandles): Now a std::vector.
9420         (is_closed_fileio_fh): Delete.
9421         (acquire_fileio_fd): Adjust.  Rename parameters.
9422         (release_fileio_fd): Adjust.
9423         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
9424         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
9425         (target_fileio_close): Adjust.
9426
9427 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
9428
9429         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
9430         index.
9431
9432 2018-04-10  Pedro Alves  <palves@redhat.com>
9433
9434         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
9435         (scoped_finish_thread_state): New class.
9436         * infcmd.c (run_command_1): Use it instead of finish_thread_state
9437         cleanup.
9438         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
9439         (fetch_inferior_event, normal_stop): Likewise.
9440         * thread.c (finish_thread_state_cleanup): Delete.
9441
9442 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9443             Pedro Alves  <palves@redhat.com>
9444
9445         * value.c: Include "selftest.h" and "common/array-view.h".
9446         (struct range) <operator ==>: New.
9447         (test_ranges_contain): New.
9448         (check_ranges_vector): New.
9449         (test_insert_into_bit_range_vector): New.
9450         (_initialize_values): Register selftests.
9451         * common/array-view.h (operator==, operator!=): New.
9452
9453 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9454
9455         * common/gdb_vecs.h (unordered_remove): Add overload that takes
9456         an iterator.
9457         * inline-frame.c: Include <algorithm>.
9458         (struct inline_state): Add constructor.
9459         (inline_state_s): Remove.
9460         (DEF_VEC_O(inline_state_s)): Remove.
9461         (inline_states): Change type to std::vector.
9462         (find_inline_frame_state): Adjust to std::vector.
9463         (allocate_inline_frame_state): Remove.
9464         (clear_inline_frame_state): Adjust to std::vector.
9465         (skip_inline_frames): Adjust to std::vector.
9466
9467 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9468
9469         * tracepoint.h (struct trace_state_variable): Add constructor.
9470         <name>: Change type to std::string.
9471         * tracepoint.c (tsv_s): Remove.
9472         (DEF_VEC_O(tsv_s)): Remove.
9473         (tvariables): Change to std::vector.
9474         (create_trace_state_variable): Adjust to std::vector.
9475         (find_trace_state_variable): Likewise.
9476         (find_trace_state_variable_by_number): Likewise.
9477         (delete_trace_state_variable): Likewise.
9478         (trace_variable_command): Adjust to std::string.
9479         (delete_trace_variable_command): Likewise.
9480         (tvariables_info_1): Adjust to std::vector.
9481         (save_trace_state_variables): Likewise.
9482         (start_tracing): Likewise.
9483         (merge_uploaded_trace_state_variables): Adjust to std::vector
9484         and std::string.
9485         * target.h (struct target_ops)
9486         <to_download_trace_state_variable>: Pass reference to
9487         trace_state_variable.
9488         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
9489         * target-delegates.c: Re-generate.
9490         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
9491         (mi_tsv_deleted): Likewise.
9492         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
9493         * remote.c (remote_download_trace_state_variable): Change
9494         pointer to reference and adjust.
9495         * make-target-delegates (parse_argtypes): Handle references.
9496         (write_function_header): Likewise.
9497         (munge_type): Likewise.
9498
9499 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9500
9501         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9502         string_view-selftests.c.
9503         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
9504         testsuite.
9505         * unittests/basic_string_view/cons/char/1.cc: Likewise.
9506         * unittests/basic_string_view/cons/char/2.cc: Likewise.
9507         * unittests/basic_string_view/cons/char/3.cc: Likewise.
9508         * unittests/basic_string_view/element_access/char/1.cc:
9509         Likewise.
9510         * unittests/basic_string_view/element_access/char/empty.cc:
9511         Likewise.
9512         * unittests/basic_string_view/element_access/char/front_back.cc:
9513         Likewise.
9514         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
9515         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
9516         Likewise.
9517         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
9518         Likewise.
9519         * unittests/basic_string_view/modifiers/swap/char/1.cc:
9520         Likewise.
9521         * unittests/basic_string_view/operations/compare/char/1.cc:
9522         Likewise.
9523         * unittests/basic_string_view/operations/compare/char/13650.cc:
9524         Likewise.
9525         * unittests/basic_string_view/operations/copy/char/1.cc:
9526         Likewise.
9527         * unittests/basic_string_view/operations/data/char/1.cc:
9528         Likewise.
9529         * unittests/basic_string_view/operations/find/char/1.cc:
9530         Likewise.
9531         * unittests/basic_string_view/operations/find/char/2.cc:
9532         Likewise.
9533         * unittests/basic_string_view/operations/find/char/3.cc:
9534         Likewise.
9535         * unittests/basic_string_view/operations/find/char/4.cc:
9536         Likewise.
9537         * unittests/basic_string_view/operations/rfind/char/1.cc:
9538         Likewise.
9539         * unittests/basic_string_view/operations/rfind/char/2.cc:
9540         Likewise.
9541         * unittests/basic_string_view/operations/rfind/char/3.cc:
9542         Likewise.
9543         * unittests/basic_string_view/operations/substr/char/1.cc:
9544         Likewise.
9545         * unittests/basic_string_view/operators/char/2.cc: Likewise.
9546         * unittests/string_view-selftests.c: New file.
9547
9548 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9549
9550         * unittests/basic_string_view/capacity/1.cc: New file.
9551         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
9552         * unittests/basic_string_view/cons/char/1.cc: New file.
9553         * unittests/basic_string_view/cons/char/2.cc: New file.
9554         * unittests/basic_string_view/cons/char/3.cc: New file.
9555         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
9556         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
9557         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
9558         * unittests/basic_string_view/element_access/char/1.cc: New file.
9559         * unittests/basic_string_view/element_access/char/2.cc: New file.
9560         * unittests/basic_string_view/element_access/char/empty.cc: New file.
9561         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
9562         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
9563         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
9564         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
9565         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
9566         * unittests/basic_string_view/include.cc: New file.
9567         * unittests/basic_string_view/inserters/char/1.cc: New file.
9568         * unittests/basic_string_view/inserters/char/2.cc: New file.
9569         * unittests/basic_string_view/inserters/char/3.cc: New file.
9570         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
9571         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
9572         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
9573         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
9574         * unittests/basic_string_view/literals/types.cc: New file.
9575         * unittests/basic_string_view/literals/values.cc: New file.
9576         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
9577         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
9578         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
9579         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
9580         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
9581         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
9582         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
9583         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
9584         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
9585         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
9586         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
9587         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
9588         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
9589         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
9590         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
9591         * unittests/basic_string_view/operations/data/char/1.cc: New file.
9592         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
9593         * unittests/basic_string_view/operations/find/char/1.cc: New file.
9594         * unittests/basic_string_view/operations/find/char/2.cc: New file.
9595         * unittests/basic_string_view/operations/find/char/3.cc: New file.
9596         * unittests/basic_string_view/operations/find/char/4.cc: New file.
9597         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
9598         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
9599         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
9600         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
9601         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
9602         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
9603         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
9604         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
9605         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
9606         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
9607         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
9608         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
9609         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
9610         * unittests/basic_string_view/operators/char/2.cc: New file.
9611         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
9612         * unittests/basic_string_view/range_access/char/1.cc: New file.
9613         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
9614         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
9615         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
9616         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
9617         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
9618         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
9619         * unittests/basic_string_view/requirements/typedefs.cc: New file.
9620         * unittests/basic_string_view/typedefs.cc: New file.
9621         * unittests/basic_string_view/types/1.cc: New file.
9622
9623 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9624
9625         * common/gdb_string_view.h: Remove libstdc++ implementation
9626         details, adjust to gdb reality.
9627         * common/gdb_string_view.tcc: Likewise.
9628         * cli/cli-script.c (struct string_view): Remove.
9629         (user_args) <m_args>: Change element type to gdb::string_view.
9630         (user_args::insert_args): Adjust.
9631
9632 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9633
9634         * common/gdb_string_view.h: New file.
9635         * common/gdb_string_view.tcc: New file.
9636
9637 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9638
9639         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
9640         * configure: Re-generate.
9641
9642 2018-04-09  Pedro Alves  <palves@redhat.com>
9643
9644         * gdbarch.sh: Include "observable.h" instead of "observer.h".
9645         (set_target_gdbarch): Call
9646         gdb::observers::architecture_changed.notify instead of
9647         observer_notify_architecture_changed.
9648
9649 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9650
9651         * tracepoint.c (struct current_traceframe_cleanup): Remove.
9652         (do_restore_current_traceframe_cleanup): Remove.
9653         (restore_current_traceframe_cleanup_dtor): Remove.
9654         (make_cleanup_restore_current_traceframe): Remove.
9655         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
9656         New.
9657         * tracepoint.h (struct scoped_restore_current_traceframe): New.
9658         * infrun.c (fetch_inferior_event): Use
9659         scoped_restore_current_traceframe.
9660
9661 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9662
9663         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
9664         Remove.
9665         <n_allocated_type_units>: Remove.
9666         <all_type_units>: Change to std::vector.
9667         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
9668         to std::vector change.
9669         (dwarf2_per_objfile::get_cutu): Likewise.
9670         (dwarf2_per_objfile::get_tu): Likewise.
9671         (create_signatured_type_table_from_index): Likewise.
9672         (create_signatured_type_table_from_debug_names): Likewise.
9673         (dw2_symtab_iter_next): Likewise.
9674         (dw2_print_stats): Likewise.
9675         (dw2_expand_all_symtabs): Likewise.
9676         (dw2_expand_marked_cus): Likewise.
9677         (dw2_debug_names_iterator::next): Likewise.
9678         (dwarf2_initialize_objfile): Likewise.
9679         (add_signatured_type_cu_to_table): Likewise.
9680         (create_all_type_units): Likewise.
9681         (add_type_unit): Likewise.
9682         (struct tu_abbrev_offset): Add constructor.
9683         (build_type_psymtabs_1): Adjust to std::vector change.
9684         (print_tu_stats): Likewise.
9685         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9686         (write_debug_names): Likewise.
9687
9688 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9689
9690         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
9691         Make an std::vector.
9692         <n_comp_units>: Remove.
9693         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
9694         to std::vector change.
9695         (dwarf2_per_objfile::get_cutu): Likewise.
9696         (dwarf2_per_objfile::get_cu): Likewise.
9697         (create_cus_from_index): Likewise.
9698         (create_addrmap_from_index): Likewise.
9699         (create_addrmap_from_aranges): Likewise.
9700         (dwarf2_read_index): Likewise.
9701         (dw2_find_last_source_symtab): Likewise.
9702         (dw2_map_symtabs_matching_filename): Likewise.
9703         (dw2_symtab_iter_next): Likewise.
9704         (dw2_print_stats): Likewise.
9705         (dw2_expand_all_symtabs): Likewise.
9706         (dw2_expand_symtabs_with_fullname): Likewise.
9707         (dw2_expand_marked_cus): Likewise.
9708         (dw2_map_symbol_filenames): Likewise.
9709         (create_cus_from_debug_names): Likewise.
9710         (dwarf2_read_debug_names): Likewise.
9711         (dw2_debug_names_iterator::next): Likewise.
9712         (dwarf2_initialize_objfile): Likewise.
9713         (set_partial_user): Likewise.
9714         (dwarf2_build_psymtabs_hard): Likewise.
9715         (read_comp_units_from_section): Remove arguments, adjust to
9716         std::vector change.
9717         (create_all_comp_units): Adjust to std::vector and
9718         read_comp_units_from_section changes.
9719         (dwarf2_find_containing_comp_unit): Adjust to std::vector
9720         change.
9721         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9722         (psyms_seen_size): Likewise.
9723         (write_gdbindex): Likewise.
9724         (write_debug_names): Likewise.
9725
9726 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9727
9728         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
9729         with dwarf2_per_objfile.
9730         (create_cus_from_index): Likewise.
9731         (create_signatured_type_table_from_index): Likewise.
9732         (dwarf2_read_index): Likewise.
9733         (dwarf2_initialize_objfile): Likewise.
9734         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
9735         per_cu rather than get_dwarf2_per_objfile.
9736
9737 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9738
9739         * dwarf2read.h (struct signatured_type): Forward declare.
9740         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
9741         New methods.
9742         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
9743         (dw2_get_cutu): ...this.
9744         (dwarf2_per_objfile::get_cu): Rename from...
9745         (dw2_get_cu): ...this.
9746         (dwarf2_per_objfile::get_tu): New.
9747         (create_addrmap_from_index): Adjust.
9748         (create_addrmap_from_aranges): Adjust.
9749         (dw2_find_last_source_symtab): Adjust.
9750         (dw2_map_symtabs_matching_filename): Adjust.
9751         (dw2_symtab_iter_next): Adjust.
9752         (dw2_print_stats): Adjust.
9753         (dw2_expand_all_symtabs): Adjust.
9754         (dw2_expand_symtabs_with_fullname): Adjust.
9755         (dw2_expand_marked_cus): Adjust.
9756         (dw_expand_symtabs_matching_file_matcher): Adjust.
9757         (dw2_map_symbol_filenames): Adjust.
9758         (dw2_debug_names_iterator::next): Adjust.
9759         (dwarf2_initialize_objfile): Adjust.
9760         (set_partial_user): Adjust.
9761         (dwarf2_build_psymtabs_hard): Adjust.
9762
9763 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9764
9765         * dwarf2read.c (create_signatured_type_table_from_debug_names):
9766         Remove unused variables.
9767         (dw2_map_symtabs_matching_filename): Likewise.
9768         (dwarf2_record_block_ranges): Likewise.
9769         (dwarf2_read_addr_index): Likewise.
9770         (follow_die_offset): Likewise.
9771
9772 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9773
9774         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
9775         to symbol_file_add_main.
9776
9777 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9778
9779         PR mi/22299
9780         * mi/mi-console.c (do_fputc_async_safe): New.
9781         (mi_console_file::write_async_safe): New.
9782         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
9783         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
9784         New.
9785         * ui-file.c (ui_file::putstrn): Adjust call to
9786         fputstrn_unfiltered.
9787         * utils.c (printchar): Replace do_fputs and do_fprintf
9788         parameters by do_fputc.
9789         (fputstr_filtered): Adjust call to printchar.
9790         (fputstr_unfiltered): Likewise.
9791         (fputstrn_filtered): Likewise.
9792         (fputstrn_unfiltered): Add do_fputc parameter, pass to
9793         printchar.
9794         * utils.h (do_fputc_ftype): New typedef.
9795         (fputstrn_unfiltered): Add do_fputc parameter.
9796
9797 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9798
9799         * regformats/i386/i386-avx.dat: Remove.
9800
9801 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
9802
9803         PR gdb/22979
9804         * amd64-tdep.c (amd64_none_init_abi): New function.
9805         (amd64_x32_none_init_abi): New function.
9806         (_initialize_amd64_tdep): Register handlers for x86-64 and
9807         x64_32 with GDB_OSABI_NONE.
9808         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
9809         GDB_OSABI_NONE osabi.
9810
9811 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
9812
9813         PR gdb/22980
9814         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
9815         GDB_OSABI_NONE.
9816         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
9817         * osabi.c (gdb_osabi_names): Add "unknown" entry.
9818
9819 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
9820
9821         * common/byte-vector.h (char_vector): New type.
9822         * target.h (target_read_alloc): Return
9823         gdb::optional<byte_vector>.
9824         (target_read_stralloc): Return gdb::optional<char_vector>.
9825         (target_get_osdata): Return gdb::optional<char_vector>.
9826         * target.c (target_read_alloc_1): Templatize.  Replacement
9827         manual memory management with vector.
9828         (target_read_alloc): Change return type, adjust.
9829         (target_read_stralloc): Change return type, adjust.
9830         (target_get_osdata): Change return type, adjust.
9831         * auxv.c (struct auxv_info) <length>: Remove.
9832         <data>: Change type to gdb::optional<byte_vector>.
9833         (auxv_inferior_data_cleanup): Free auxv_info with delete.
9834         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
9835         (target_auxv_search): Adjust.
9836         (fprint_target_auxv): Adjust.
9837         * avr-tdep.c (avr_io_reg_read_command): Adjust.
9838         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
9839         (linux_make_corefile_notes): Adjust.
9840         * osdata.c (get_osdata): Adjust.
9841         * remote.c (remote_get_threads_with_qxfer): Adjust.
9842         (remote_memory_map): Adjust.
9843         (remote_traceframe_info): Adjust.
9844         (btrace_read_config): Adjust.
9845         (remote_read_btrace): Adjust.
9846         (remote_pid_to_exec_file): Adjust.
9847         * solib-aix.c (solib_aix_get_library_list): Adjust.
9848         * solib-dsbt.c (decode_loadmap): Don't free buf.
9849         (dsbt_get_initial_loadmaps): Adjust.
9850         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
9851         * solib-target.c (solib_target_current_sos): Adjust.
9852         * tracepoint.c (sdata_make_value): Adjust.
9853         * xml-support.c (xinclude_start_include): Adjust.
9854         (xml_fetch_content_from_file): Adjust.
9855         * xml-support.h (xml_fetch_another): Change return type.
9856         (xml_fetch_content_from_file): Change return type.
9857         * xml-syscall.c (xml_init_syscalls_info): Adjust.
9858         * xml-tdesc.c (file_read_description_xml): Adjust.
9859         (fetch_available_features_from_target): Change return type.
9860         (target_fetch_description_xml): Adjust.
9861         (target_read_description_xml): Adjust.
9862
9863 2018-04-06  Tom Tromey  <tom@tromey.com>
9864
9865         * value.c (~value): Update.
9866         (struct value) <contents>: Now unique_xmalloc_ptr.
9867         (value_contents_bits_eq, allocate_value_contents)
9868         (value_contents_raw, value_contents_all_raw)
9869         (value_contents_for_printing, value_contents_for_printing_const)
9870         (set_value_enclosing_type): Update.
9871
9872 2018-04-06  Tom Tromey  <tom@tromey.com>
9873
9874         * value.c (range_s): Remove typedef, VEC.
9875         (struct range): Add operator<.
9876         (range_lessthan): Remove.
9877         (ranges_contain): Change type.
9878         (~value): Update.
9879         (struct value) <unavailable, optimized_out>: Now std::vector.
9880         (value_entirely_available)
9881         (value_entirely_covered_by_range_vector)
9882         (value_entirely_unavailable, value_entirely_optimized_out):
9883         Update.
9884         (insert_into_bit_range_vector): Change argument type.
9885         (find_first_range_overlap): Likewise.
9886         (struct ranges_and_idx, value_contents_bits_eq)
9887         (require_not_optimized_out, require_available): Update.
9888         (ranges_copy_adjusted): Change argument types.
9889         (value_optimized_out, value_copy, value_fetch_lazy): Update.
9890
9891 2018-04-06  Tom Tromey  <tom@tromey.com>
9892
9893         * value.c (~value): Update.
9894         (struct value) <parent>: Now a value_ref_ptr.
9895         (value_parent, set_value_parent, value_address, value_copy):
9896         Update.
9897
9898 2018-04-06  Tom Tromey  <tom@tromey.com>
9899
9900         * value.c (struct value): Add constructor, destructor, and member
9901         initializers.
9902         (allocate_value_lazy, value_decref): Update.
9903
9904 2018-04-06  Tom Tromey  <tom@tromey.com>
9905
9906         * value.c (struct value) <released, next>: Remove.
9907         (all_values): Now a std::vector.
9908         (allocate_value_lazy): Update.
9909         (value_next): Remove.
9910         (value_mark, value_free_to_mark, release_value)
9911         (value_release_to_mark): Update.
9912
9913 2018-04-06  Tom Tromey  <tom@tromey.com>
9914
9915         * value.h (fetch_subexp_value, value_release_to_mark): Update.
9916         (free_value_chain): Remove.
9917         * value.c (free_value_chain): Remove.
9918         (value_release_to_mark): Return a std::vector.
9919         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
9920         std::vector.
9921         (check_condition): Update.
9922         * eval.c (fetch_subexp_value): Change "val_chain" to a
9923         std::vector.
9924         * breakpoint.c (update_watchpoint): Update.
9925         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
9926
9927 2018-04-06  Tom Tromey  <tom@tromey.com>
9928
9929         * value.h (free_all_values): Remove.
9930         * value.c (free_all_values): Remove.
9931
9932 2018-04-06  Tom Tromey  <tom@tromey.com>
9933
9934         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
9935         (value_history_chain, value_history_count): Remove.
9936         (value_history): New global.
9937         (record_latest_value, access_value_history, show_values)
9938         (preserve_values): Update.
9939
9940 2018-04-06  Tom Tromey  <tom@tromey.com>
9941
9942         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
9943         * varobj.c (varobj_set_display_format, varobj_set_value)
9944         (install_default_visualizer, construct_visualizer)
9945         (install_new_value, ~varobj, varobj_get_value_type)
9946         (my_value_of_variable, varobj_editable_p): Update.
9947         * c-varobj.c (c_describe_child, c_value_of_variable)
9948         (cplus_number_of_children, cplus_describe_child): Update.
9949         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
9950         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
9951         (ada_value_of_variable, ada_value_is_changeable_p): Update.
9952
9953 2018-04-06  Tom Tromey  <tom@tromey.com>
9954
9955         * printcmd.c (last_examine_address): Change type to
9956         value_ref_ptr.
9957         (do_examine, x_command): Update.
9958
9959 2018-04-06  Tom Tromey  <tom@tromey.com>
9960
9961         * value.c (release_value): Update.
9962         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
9963         (struct bpstats) <val>: Now a value_ref_ptr.
9964         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9965         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9966         (~watchpoint, print_it_watchpoint, watch_command_1)
9967         (invalidate_bp_value_on_memory_change): Update.
9968
9969 2018-04-06  Tom Tromey  <tom@tromey.com>
9970
9971         * varobj.c (varobj_clear_saved_item)
9972         (update_dynamic_varobj_children, install_new_value, ~varobj):
9973         Update.
9974         * value.h (value_incref): Move declaration earlier.
9975         (value_decref): Rename from value_free.
9976         (struct value_ref_policy): New.
9977         (value_ref_ptr): New typedef.
9978         (struct value_deleter): Remove.
9979         (gdb_value_up): Remove typedef.
9980         (release_value): Change return type.
9981         (release_value_or_incref): Remove.
9982         * value.c (set_value_parent): Update.
9983         (value_incref): Change return type.
9984         (value_decref): Rename from value_free.
9985         (value_free_to_mark, free_all_values, free_value_chain): Update.
9986         (release_value): Return value_ref_ptr.
9987         (release_value_or_incref): Remove.
9988         (record_latest_value, set_internalvar, clear_internalvar):
9989         Update.
9990         * stack.c (info_frame_command): Don't call value_free.
9991         * python/py-value.c (valpy_dealloc, valpy_new)
9992         (value_to_value_object): Update.
9993         * printcmd.c (do_examine): Update.
9994         * opencl-lang.c (lval_func_free_closure): Update.
9995         * mi/mi-main.c (register_changed_p): Don't call value_free.
9996         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
9997         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
9998         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
9999         value_free.
10000         * guile/scm-value.c (vlscm_free_value_smob)
10001         (vlscm_scm_from_value): Update.
10002         * frame.c (frame_register_unwind, frame_unwind_register_signed)
10003         (frame_unwind_register_unsigned, get_frame_register_bytes)
10004         (put_frame_register_bytes): Don't call value_free.
10005         * findvar.c (address_from_register): Don't call value_free.
10006         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
10007         * dwarf2loc.c (entry_data_value_free_closure)
10008         (value_of_dwarf_reg_entry, free_pieced_value_closure)
10009         (dwarf2_evaluate_loc_desc_full): Update.
10010         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
10011         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
10012         (~watchpoint, watch_command_1)
10013         (invalidate_bp_value_on_memory_change): Update.
10014         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
10015
10016 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
10017
10018         PR gdb/23022
10019         * warning.m4: Add -Wno-error=deprecated-register.
10020         * configure: Re-generate.
10021
10022 2018-04-05  Tom Tromey  <tom@tromey.com>
10023
10024         * linespec.h: Remove include of "vec.h".
10025
10026 2018-04-05  Tom Tromey  <tom@tromey.com>
10027
10028         * linespec.c (typep): Remove typedef.
10029         (find_methods, find_superclass_methods): Take a std::vector.
10030         (find_method): Use std::vector.
10031
10032 2018-04-05  Tom Tromey  <tom@tromey.com>
10033
10034         * utils.c (compare_strings): Remove.
10035         * utils.h (compare_strings): Remove.
10036         * objc-lang.h (find_imps): Update.
10037         * objc-lang.c (find_methods): Take a std::vector.
10038         (uniquify_strings, find_imps): Likewise.
10039         * linespec.c (find_methods): Take a std::vector.
10040         (decode_objc): Use std::vector.
10041         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
10042         a std::vector.
10043         (find_method, find_function_symbols): Use std::vector.
10044
10045 2018-04-05  Tom Tromey  <tom@tromey.com>
10046
10047         * completer.c (completion_tracker::completion_tracker): Remove
10048         cast.
10049         (completion_tracker::discard_completions): Likewise.
10050         * breakpoint.c (ambiguous_names_p): Remove cast.
10051         * ada-lang.c (_initialize_ada_language): Remove cast.
10052         * utils.h (streq): Update.
10053         (streq_hash): Add new declaration.
10054         * utils.c (streq): Return bool.
10055         (streq_hash): New function.
10056
10057 2018-04-05  Tom Tromey  <tom@tromey.com>
10058
10059         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
10060         Remove a string copy.
10061
10062 2018-04-05  Tom Tromey  <tom@tromey.com>
10063
10064         * linespec.c (filter_results): Use std::vector.
10065         (decode_line_2, decode_line_full): Update.
10066
10067 2018-04-05  Tom Tromey  <tom@tromey.com>
10068
10069         * linespec.c (canonical_to_fullform): Return std::string.
10070         (filter_results): Update.
10071         (struct decode_line_2_item): Add constructor.
10072         <fullform, displayform>: Now std::string.
10073         (decode_line_2_compare_items): Now a std::sort comparator.
10074         (decode_line_2): Update.
10075
10076 2018-04-05  Tom Tromey  <tom@tromey.com>
10077
10078         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
10079         (unexpected_linespec_error): Update.
10080         (linespec_parse_basic, parse_linespec): Update.
10081
10082 2018-04-05  Tom Tromey  <tom@tromey.com>
10083
10084         * linespec.c (linespec_parse_basic): Reindent.
10085
10086 2018-04-05  Tom Tromey  <tom@tromey.com>
10087
10088         * minsyms.h (iterate_over_minimal_symbols): Update.
10089         * minsyms.c (iterate_over_minimal_symbols): Take a
10090         gdb::function_view.
10091         * linespec.c (struct collect_minsyms): Remove.
10092         (compare_msyms): Now a std::sort comparator.
10093         (add_minsym): Add parameters.
10094         (search_minsyms_for_name): Update.  Use std::vector.
10095
10096 2018-04-03  Tom Tromey  <tom@tromey.com>
10097
10098         * mipsread.c (read_alphacoff_dynamic_symtab): Use
10099         gdb::byte_vector.
10100
10101 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
10102
10103         * MAINTAINERS (Write After Approval): Add Weimin Pan.
10104
10105 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
10106
10107         PR gdb/16959
10108         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
10109         printing static type.
10110
10111 2018-04-01  Tom Tromey  <tom@tromey.com>
10112
10113         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
10114         (rs6000_xfer_shared_libraries): Update.
10115
10116 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
10117
10118         * common/gdb_vecs.h (char_ptr): Remove.
10119         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
10120
10121 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
10122
10123         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
10124         with std::vector.
10125         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
10126
10127 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
10128
10129         * tracepoint.h (struct uploaded_tp): Initialize fields.
10130         <actions, step_actions, cmd_strings>: Change type to
10131         std::vector<char *>.
10132         * tracepoint.c (get_uploaded_tp): Allocate with new.
10133         (free_uploaded_tps): Free with delete.
10134         (parse_tracepoint_definition): Adjust to std::vector change.
10135         * breakpoint.c (read_uploaded_action): Likewise.
10136         (create_tracepoint_from_upload): Likewise.
10137         * ctf.c (ctf_write_uploaded_tp): Likewise.
10138         (SET_ARRAY_FIELD): Likewise.
10139         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
10140
10141 2018-03-30  Tom Tromey  <tom@tromey.com>
10142
10143         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
10144         std::unique_ptr.
10145         (svr4_keep_data_in_core): Update.
10146         (svr4_read_so_list): Update.
10147
10148 2018-03-30  Tom Tromey  <tom@tromey.com>
10149
10150         * windows-nat.c (handle_output_debug_string, handle_exception):
10151         Update.
10152         * target.h (target_read_string): Update.
10153         * target.c (target_read_string): Change "string" to
10154         unique_xmalloc_ptr.
10155         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
10156         Update.
10157         * solib-frv.c (frv_current_sos): Update.
10158         * solib-dsbt.c (dsbt_current_sos): Update.
10159         * solib-darwin.c (darwin_current_sos): Update.
10160         * linux-thread-db.c (inferior_has_bug): Update.
10161         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
10162         Update.  Remove alloca.
10163         * ada-lang.c (ada_main_name): Update.
10164
10165 2018-03-30  Tom Tromey  <tom@tromey.com>
10166
10167         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
10168         (struct dwo_file_deleter): New.
10169         (dwo_file_up): New typedef.
10170         (open_and_init_dwo_file): Use dwo_file_up.
10171         (free_dwo_file_cleanup): Remove.
10172
10173 2018-03-30  Tom Tromey  <tom@tromey.com>
10174
10175         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
10176         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
10177
10178 2018-03-30  Tom Tromey  <tom@tromey.com>
10179
10180         * dwarf2read.c (class free_cached_comp_units): New class.
10181         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
10182         (free_cached_comp_units): Remove function.
10183
10184 2018-03-30  Tom Tromey  <tom@tromey.com>
10185
10186         * utils.h (make_cleanup_unpush_target): Remove.
10187         * inf-ptrace.c (struct target_unpusher): New.
10188         (target_unpush_up) New typedef.
10189         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
10190         target_unpush_up.
10191         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
10192
10193 2018-03-27  Tom Tromey  <tom@tromey.com>
10194
10195         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
10196
10197 2018-03-27  Pedro Alves  <palves@redhat.com>
10198             Tom Tromey  <tom@tromey.com>
10199
10200         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
10201         destructor.  Now a class.
10202         (gdb_readline_wrapper_cleanup): Remove function.
10203         (gdb_readline_wrapper): Remove cleanups.
10204
10205 2018-03-27  Tom Tromey  <tom@tromey.com>
10206
10207         * typeprint.h (struct type_print_options) <local_typedefs,
10208         global_typedefs>: Remove "struct" keyword.
10209         (class typedef_hash_table): New class.
10210         (recursively_update_typedef_hash, add_template_parameters)
10211         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
10212         (find_typedef_in_hash): Don't declare.
10213         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
10214         (typedef_hash_table::recursively_update): Rename from
10215         recursively_update_typedef_hash.  Now a member.
10216         (typedef_hash_table::add_template_parameters): Rename from
10217         add_template_parameters.  Now a member.
10218         (typedef_hash_table::typedef_hash_table): Now a constructor;
10219         rename from create_typedef_hash.
10220         (typedef_hash_table::~typedef_hash_table): Now a destructor;
10221         rename from free_typedef_hash.
10222         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
10223         (do_free_global_table): Remove.
10224         (typedef_hash_table::typedef_hash_table): New constructor; renamed
10225         from copy_type_recursive.
10226         (create_global_typedef_table): Remove.
10227         (typedef_hash_table::find_global_typedef): Now a member of
10228         typedef_hash_table.
10229         (typedef_hash_table::find_typedef): Rename from
10230         find_typedef_in_hash; now a member.
10231         (whatis_exp): Update.
10232         * extension.h (struct ext_lang_type_printers): Add constructor and
10233         destructor.
10234         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
10235         declare.
10236         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
10237         Now a constructor; rename from start_ext_lang_type_printers.
10238         (ext_lang_type_printers): Now a destructor; rename from
10239         free_ext_lang_type_printers.
10240         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
10241         Update.
10242         (c_type_print_base_struct_union): Update.  Remove cleanups.
10243
10244 2018-03-27  Tom Tromey  <tom@tromey.com>
10245
10246         * dwarf-index-write.c: Include <cmath>.
10247
10248 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
10249
10250         * NEWS: Add entry describing new "set|show varsize-limit" command.
10251         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
10252         command.
10253         * printcmd.c (_initialize_printcmd): Add "set var" alias of
10254         "set variable".
10255
10256 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
10257
10258         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
10259         dwarf-index-write.c
10260         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
10261         * dwarf-index-common.c: New file.
10262         * dwarf-index-common.h: New file.
10263         * dwarf-index-write.c: New file.
10264         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
10265         (struct dwarf2_section_info): Move from here.
10266         (dwarf2_section_info_def): Likewise.
10267         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
10268         (offset_type): Likewise.
10269         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
10270         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
10271         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
10272         (byte_swap): Likewise.
10273         (MAYBE_SWAP): Likewise.
10274         (dwarf2_per_cu_ptr): Likewise.
10275         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
10276         (struct tu_stats): Likewise.
10277         (struct dwarf2_per_objfile): Likewise.
10278         (struct dwarf2_per_cu_data): Likewise.
10279         (struct signatured_type): Likewise.
10280         (sig_type_ptr): Likewise.
10281         (DEF_VEC_P (sig_type_ptr)): Likewise.
10282         (INDEX4_SUFFIX): Likewise.
10283         (INDEX5_SUFFIX): Likewise.
10284         (DEBUG_STR_SUFFIX): Likewise.
10285         (dwarf2_read_section): Make non-static.
10286         (mapped_index_string_hash): Move from here.
10287         (dwarf5_djb_hash): Likewise.
10288         (file_write): Likewise.
10289         (class data_buf): Likewise.
10290         (struct symtab_index_entry): Likewise.
10291         (struct mapped_symtab): Likewise.
10292         (find_slot): Likewise.
10293         (hash_expand): Likewise.
10294         (add_index_entry): Likewise.
10295         (uniquify_cu_indices): Likewise.
10296         (class c_str_view): Likewise.
10297         (class c_str_view_hasher): Likewise.
10298         (class vector_hasher): Likewise.
10299         (write_hash_table): Likewise.
10300         (psym_index_map): Likewise.
10301         (struct addrmap_index_data): Likewise.
10302         (add_address_entry): Likewise.
10303         (add_address_entry_worker): Likewise.
10304         (write_address_map): Likewise.
10305         (symbol_kind): Likewise.
10306         (write_psymbols): Likewise.
10307         (struct signatured_type_index_data): Likewise.
10308         (write_one_signatured_type): Likewise.
10309         (recursively_count_psymbols): Likewise.
10310         (recursively_write_psymbols): Likewise.
10311         (class debug_names): Likewise.
10312         (check_dwarf64_offsets): Likewise.
10313         (psyms_seen_size): Likewise.
10314         (write_gdbindex): Likewise.
10315         (write_debug_names): Likewise.
10316         (assert_file_size): Likewise.
10317         (write_psymtabs_to_index): Likewise.
10318         (save_gdb_index_command): Likewise.
10319         (_initialize_dwarf2_read): Don't register the "save gdb-index"
10320         command.
10321         * dwarf2read.h: New file.
10322
10323 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
10324
10325         PR gdb/22670
10326         * dwarf2read.c (dwarf2_physname): Do not return the demangled
10327         symbol name if the CU's language stores symbol names in linkage
10328         format.
10329         * language.h (struct language_defn)
10330         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
10331         all instances of this struct.
10332
10333 2018-03-26  Tom Tromey  <tom@tromey.com>
10334
10335         * stack.c (backtrace_command_1): Remove verbose code.
10336
10337 2018-03-26  Tom Tromey  <tom@tromey.com>
10338
10339         * python/py-framefilter.c (py_print_type): Don't catch
10340         exceptions.  Return void.
10341         (py_print_value): Likewise.
10342         (py_print_single_arg): Likewise.
10343         (enumerate_args): Don't catch exceptions.
10344         (py_print_args): Likewise.
10345         (py_print_frame): Likewise.
10346         (gdbpy_apply_frame_filter): Catch exceptions here.
10347
10348 2018-03-26  Tom Tromey  <tom@tromey.com>
10349
10350         * stack.c (_initialize_stack): Remove trailing newlines from help
10351         text.  Add "Usage" line to "backtrace" help.
10352
10353 2018-03-26  Tom Tromey  <tom@tromey.com>
10354
10355         PR python/16486:
10356         * python/py-framefilter.c (py_print_args): Call wrap_hint.
10357
10358 2018-03-26  Tom Tromey  <tom@tromey.com>
10359
10360         * python/py-framefilter.c (py_print_single_arg): Return
10361         EXT_LANG_BT_ERROR from catch.
10362
10363 2018-03-26  Tom Tromey  <tom@tromey.com>
10364
10365         PR backtrace/15584:
10366         * stack.c (backtrace_command_1): Move some code into no-filters
10367         "if".
10368
10369 2018-03-26  Tom Tromey  <tom@tromey.com>
10370
10371         * python/py-framefilter.c (throw_quit_or_print_exception): New
10372         function.
10373         (gdbpy_apply_frame_filter): Use it.
10374
10375 2018-03-26  Tom Tromey  <tom@tromey.com>
10376
10377         PR cli/17716:
10378         * python/py-framefilter.c (py_print_type, py_print_value)
10379         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
10380         RETURN_MASK_ERROR.
10381
10382 2018-03-26  Tom Tromey  <tom@tromey.com>
10383
10384         * python/py-framefilter.c (enumerate_args): Use
10385         gdb::unique_xmalloc_ptr.
10386
10387 2018-03-26  Tom Tromey  <tom@tromey.com>
10388
10389         * python/py-framefilter.c (py_print_frame): Return
10390         EXT_LANG_BT_OK.
10391         (gdbpy_apply_frame_filter): Update comment.
10392         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
10393         Remove.
10394         <EXT_LANG_BT_NO_FILTERS>: Change value.
10395
10396 2018-03-26  Tom Tromey  <tom@tromey.com>
10397
10398         PR backtrace/15582:
10399         * stack.c (backtrace_command): Parse "hide" argument.
10400         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
10401         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
10402         constant.
10403
10404 2018-03-26  Tom Tromey  <tom@tromey.com>
10405
10406         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
10407         add "flags".
10408         (backtrace_command): Remove "fulltrace", add "flags".
10409
10410 2018-03-26  Tom Tromey  <tom@tromey.com>
10411
10412         * stack.c (backtrace_command): Rewrite command line parsing.
10413
10414 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
10415
10416         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
10417
10418 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
10419
10420         * filename-seen-cache.h: Add include guard.
10421
10422 2018-03-26  Keith Seitz  <keiths@redhat.com>
10423
10424         * symfile.c (place_section): Remove "struct" from section_addr_info
10425         in comment.
10426         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
10427         "struct" keyword from section_addr_info.
10428
10429 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
10430
10431         * regformats/regdef.h (reg): Add constructors.
10432
10433 2018-03-25  Pedro Alves  <palves@redhat.com>
10434
10435         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
10436         if then/else bodies in var_func_name extraction.
10437
10438 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
10439
10440         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
10441         lookup_minimal_symbol() to find symbol entry.
10442         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
10443
10444 2018-03-23  Keith Seitz  <keiths@redhat.com>
10445
10446         PR c++/22968
10447         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
10448         nested type definitions for C++, too.
10449
10450 2018-03-23  Tom Tromey  <tom@tromey.com>
10451
10452         * machoread.c (struct oso_el): Add a constructor.  Don't define as
10453         a typedef.
10454         (macho_register_oso): Remove.
10455         (macho_symtab_read): Take a std::vector.
10456         (oso_el_compare_name): Now a std::sort comparator.
10457         (macho_symfile_read_all_oso): Take a std::vector.
10458         (macho_symfile_read): Use std::vector.  Remove cleanups.
10459
10460 2018-03-22  Tom Tromey  <tom@tromey.com>
10461
10462         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
10463         (record_full_goto_bookmark): Use std::string.
10464
10465 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
10466
10467         PR tdep/18295
10468         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
10469         a single mask.
10470
10471 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
10472
10473         * rs6000-tdep.c (store_insn_p): New function.
10474         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
10475         and cr_reg to their unshifted values. Use store_insn_p to
10476         match LR saves using either R1 or fdata->alloca_reg. Use
10477         store_insn_p to match CR saves. Set alloca_reg_offset
10478         when alloca_reg and framep are set. Remove lr_reg shift
10479         when assigning to fdata->lr_register.
10480
10481 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10482
10483         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
10484         command line args instead of emitting a warning.
10485
10486 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
10487
10488         * tracepoint.h (struct static_tracepoint_marker): Initialize
10489         fields, define default constructor, move constructor and move
10490         assignment, disable the rest.
10491         <str_id, extra>: Make std::string.
10492         (release_static_tracepoint_marker): Remove.
10493         (free_current_marker): Remove.
10494         * tracepoint.c (free_current_marker): Remove.
10495         (parse_static_tracepoint_marker_definition): Adjust to
10496         std::string, use new hex2str overload.
10497         (release_static_tracepoint_marker): Remove.
10498         (print_one_static_tracepoint_marker): Get marker by reference
10499         and adjust to std::string.
10500         (info_static_tracepoint_markers_command): Adjust to std::vector
10501         changes
10502         * target.h (static_tracepoint_marker_p): Remove typedef.
10503         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
10504         (struct target_ops) <to_static_tracepoint_marker_at>: Return
10505         bool.
10506         <to_static_tracepoint_markers_by_strid>: Return std::vector.
10507         * target-debug.h
10508         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
10509         (target_debug_print_std_vector_static_tracepoint_marker): New.
10510         (target_debug_print_struct_static_tracepoint_marker_p): Rename
10511         to...
10512         (target_debug_print_static_tracepoint_marker_p): ... this.
10513         * target-delegates.c: Re-generate.
10514         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
10515         Make std::string.
10516         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
10517         (decode_static_tracepoint_spec): Adjust to std::vector.
10518         (tracepoint_print_one_detail): Adjust to std::string.
10519         (strace_marker_decode_location): Adjust to std::string.
10520         (update_static_tracepoint): Adjust to std::string, remove call
10521         to release_static_tracepoint_marker.
10522         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
10523         Adjust to std::vector.
10524         * remote.c (remote_static_tracepoint_marker_at): Return bool.
10525         (remote_static_tracepoint_markers_by_strid): Adjust to
10526         std::vector.
10527         * common/rsp-low.h (hex2str): New overload with explicit count
10528         of bytes.
10529         * common/rsp-low.c (hex2str): New overload with explicit count
10530         of bytes.
10531         * unittests/rsp-low-selftests.c (test_hex2str): New function.
10532         (_initialize_rsp_low_selftests): Add test_hex2str test.
10533         * unittests/tracepoint-selftests.c
10534         (test_parse_static_tracepoint_marker_definition): Adjust to
10535         std::string.
10536
10537 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
10538
10539         * tracepoint.c (parse_static_tracepoint_marker_definition):
10540         Consider case where the definition is followed by more
10541         definitions.
10542         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10543         tracepoint-selftests.c.
10544         * unittests/tracepoint-selftests.c: New.
10545
10546 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
10547
10548         * MAINTAINERS (Write After Approval): Add Pedro Franco de
10549         Carvalho.
10550
10551 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
10552
10553         * symtab.c (find_pc_sect_line): fixed indentation.
10554
10555 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
10556
10557         * symtab.c (find_pc_sect_line): now uses binary search.
10558
10559 2018-03-19  Tom Tromey  <tom@tromey.com>
10560
10561         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
10562         "IDENT" production.
10563
10564 2018-03-19  Pedro Alves  <palves@redhat.com>
10565             Tom Tromey  <tom@tromey.com>
10566
10567         * unittests/observable-selftests.c: New file.
10568         * common/observable.h: New file.
10569         * observable.h: New file.
10570         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
10571         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
10572         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
10573         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
10574         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
10575         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
10576         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
10577         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
10578         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
10579         python/py-breakpoint.c, python/py-finishbreakpoint.c,
10580         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
10581         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
10582         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
10583         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
10584         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
10585         tui/tui-interp.c, valops.c: Update all users.
10586         * tui/tui-hooks.c (tui_bp_created_observer)
10587         (tui_bp_deleted_observer, tui_bp_modified_observer)
10588         (tui_inferior_exit_observer, tui_before_prompt_observer)
10589         (tui_normal_stop_observer, tui_register_changed_observer):
10590         Remove.
10591         (tui_observers_token): New global.
10592         (attach_or_detach, tui_attach_detach_observers): New functions.
10593         (tui_install_hooks, tui_remove_hooks): Use
10594         tui_attach_detach_observers.
10595         * record-btrace.c (record_btrace_thread_observer): Remove.
10596         (record_btrace_thread_observer_token): New global.
10597         * observer.sh: Remove.
10598         * observer.c: Rename to observable.c.
10599         * observable.c (namespace gdb_observers): Define new objects.
10600         (observer_debug): Move into gdb_observers namespace.
10601         (struct observer, struct observer_list, xalloc_observer_list_node)
10602         (xfree_observer_list_node, generic_observer_attach)
10603         (generic_observer_detach, generic_observer_notify): Remove.
10604         (_initialize_observer): Update.
10605         Don't include observer.inc.
10606         * Makefile.in (generated_files): Remove observer.h, observer.inc.
10607         (clean mostlyclean): Likewise.
10608         (observer.h, observer.inc): Remove targets.
10609         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
10610         (COMMON_SFILES): Use observable.c, not observer.c.
10611         * .gitignore: Remove observer.h.
10612
10613 2018-03-18  Tom Tromey  <tom@tromey.com>
10614
10615         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
10616         gdb::def_vector.
10617         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
10618
10619 2018-03-17  Tom Tromey  <tom@tromey.com>
10620
10621         * auto-load.c (auto_load_objfile_script_1): Use std::string.
10622
10623 2018-03-17  Tom Tromey  <tom@tromey.com>
10624
10625         * target.c (class scoped_target_fd): New.
10626         (target_fileio_close_cleanup): Remove.
10627         (target_fileio_read_alloc_1): Use scoped_target_fd.
10628
10629 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
10630
10631         * silent-rules.mk: New.
10632         * Makefile.in: Include silent-rules.mk
10633         (srcdir, VPATH, top_srcdir): Move up.
10634         (COMPILE): Add ECHO_CXX.
10635         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
10636         (init.c): Add ECHO_INIT_C.
10637         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
10638         (version.c): Add ECHO_GEN.
10639         (printcmd.o): Add ECHO_CXX.
10640         (target-float.o): Add ECHO_CXX.
10641         (ada-exp.o): Add ECHO_CXX.
10642         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
10643         (insight$(EXEEXT)): Add ECHO_CXXLD.
10644         * gnulib/configure.ac: Add AM_SILENT_RULES.
10645         * gnulib/aclocal.m4: Re-generate.
10646         * gnulib/configure: Re-generate.
10647         * gnulib/import/Makefile.in: Re-generate.
10648
10649 2018-03-16  Tom Tromey  <tom@tromey.com>
10650
10651         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
10652         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
10653         * utils.c (do_free_section_addr_info)
10654         (make_cleanup_free_section_addr_info): Remove.
10655         * symfile.h (struct other_sections): Add constructor.
10656         (struct section_addr_info): Remove.
10657         (section_addr_info): New typedef.
10658         (struct sym_fns) <sym_offsets>: Change type of parameter.
10659         (build_section_addr_info_from_objfile)
10660         (relative_addr_info_to_section_offsets, addr_info_make_relative)
10661         (default_symfile_offsets, symbol_file_add)
10662         (symbol_file_add_from_bfd)
10663         (build_section_addr_info_from_section_table): Update.
10664         (alloc_section_addr_info, free_section_addr_info): Don't declare.
10665         * symfile.c (alloc_section_addr_info): Remove.
10666         (build_section_addr_info_from_section_table): Change return type.
10667         Update.
10668         (build_section_addr_info_from_bfd)
10669         (build_section_addr_info_from_objfile): Likewise.
10670         (free_section_addr_info): Remove.
10671         (relative_addr_info_to_section_offsets): Change type of "addrs".
10672         (addrs_section_compar): Now a std::sort comparator.
10673         (addrs_section_sort): Change return type.
10674         (addr_info_make_relative): Change type of "addrs".  Update.
10675         (default_symfile_offsets, syms_from_objfile_1)
10676         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
10677         (symbol_file_add_separate): Update.
10678         (symbol_file_add): Change type of "addrs".  Update.
10679         (add_symbol_file_command): Update.  Remove cleanups.
10680         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
10681         cleanups.
10682         * symfile-debug.c (debug_sym_offsets): Change type of "info".
10683         * solib.c (solib_read_symbols): Update.
10684         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
10685         * machoread.c (macho_symfile_offsets): Update.
10686         * jit.c (jit_bfd_try_read_symtab): Update.
10687
10688 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
10689
10690         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10691         unittests/utils-selftests.c.
10692         * unittests/utils-selftests.c: New file.
10693
10694 2018-03-14  Tom Tromey  <tom@tromey.com>
10695
10696         PR cli/14977:
10697         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
10698         for NULL.
10699
10700 2018-03-14  Tom Tromey  <tom@tromey.com>
10701
10702         PR cli/19918:
10703         * printcmd.c (printf_pointer): Allow "-" in format.
10704
10705 2018-03-14  Tom Tromey  <tom@tromey.com>
10706
10707         * printcmd.c (_initialize_printcmd): Add usage to printf.
10708
10709 2018-03-14  Yao Qi  <qiyao@sourceware.org>
10710
10711         * MAINTAINERS: Update my email address.
10712
10713 2018-03-13  Tom Tromey  <tom@tromey.com>
10714
10715         * machoread.c (macho_check_dsym): Change filenamep to a
10716         std::string*.
10717         (macho_symfile_read): Update.
10718         * symfile.c (load_command): Use std::string.
10719
10720 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
10721
10722         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
10723         to error message string.
10724         (riscv_register_name): Use xsnprintf instead of sprintf.
10725         (riscv_insn::fetch_instruction): Use gdb_assert instead of
10726         internal_error.
10727         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
10728         error.
10729         (riscv_push_dummy_call): Likewise.
10730
10731 2018-03-12  Tom Tromey  <tom@tromey.com>
10732
10733         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
10734         Use gdb::byte_vector.
10735         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
10736
10737 2018-03-12  Yao Qi  <yao.qi@linaro.org>
10738
10739         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
10740         parameter type to readable_regcache.
10741         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
10742         the declaration.
10743
10744 2018-03-11  Tom Tromey  <tom@tromey.com>
10745
10746         * dwarf2read.c (struct nextfield): Add initializers.
10747         (struct nextfnfield): Remove.
10748         (struct fnfieldlist): Add initializers.  Remove "length" and
10749         "head", use std::vector.
10750         (struct decl_field_list): Remove.
10751         (struct field_info): Add initializers.
10752         <fields, baseclasses>: Now std::vector.
10753         <nbaseclasses, nfnfields, typedef_field_list_count,
10754         nested_types_list_count>: Remove.
10755         (dwarf2_add_field, dwarf2_add_type_defn)
10756         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
10757         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
10758         (process_structure_scope): Update.
10759
10760 2018-03-11  Tom Tromey  <tom@tromey.com>
10761
10762         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
10763         for use by std::sort.
10764         (build_type_psymtabs_1): Use std::vector.
10765
10766 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
10767
10768         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
10769         and LIBMPFR in the printed configuration.
10770
10771 2018-03-08  Tom Tromey  <tom@tromey.com>
10772
10773         * source.c (get_filename_and_charpos): Use scoped_fd.
10774         * nto-procfs.c (procfs_open_1): Use scoped_fd.
10775         (procfs_pidlist): Likewise.
10776         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
10777         (iterate_over_mappings): Likewise.
10778
10779 2018-03-08  Tom Tromey  <tom@tromey.com>
10780
10781         * infcall.c (struct call_return_meta_info)
10782         <stack_temporaries_enabled>: Remove.
10783         (get_call_return_value, call_function_by_hand_dummy): Update.
10784         * thread.c (disable_thread_stack_temporaries): Remove.
10785         (enable_thread_stack_temporaries): Remove.
10786         (thread_stack_temporaries_enabled_p): Return bool.
10787         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
10788         (get_last_thread_stack_temporary): Update.
10789         * eval.c (evaluate_subexp): Update.
10790         * gdbthread.h (class enable_thread_stack_temporaries): Now a
10791         class, not a function.
10792         (value_ptr, value_vec): Remove typedefs.
10793         (class thread_info) <stack_temporaries_enabled>: Now bool.
10794         <stack_temporaries>: Now a std::vector.
10795         (thread_stack_temporaries_enabled_p)
10796         (value_in_thread_stack_temporaries): Return bool.
10797
10798 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
10799
10800         * remote.c (putpkt_binary): Fix omitted bytes reporting.
10801         (getpkt_or_notif_sane_1): Likewise.
10802
10803 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
10804
10805         * build-id.c (build_id_to_debug_bfd): Use std::string.
10806
10807 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
10808
10809         * build-id.c (find_separate_debug_file_by_buildid): Return
10810         std::string.
10811         * build-id.h (find_separate_debug_file_by_buildid): Return
10812         std::string.
10813         * coffread.c (coff_symfile_read): Adjust to std::string.
10814         * elfread.c (elf_symfile_read): Adjust to std::string.
10815         * symfile.c (separate_debug_file_exists): Change parameter to
10816         std::string.
10817         (find_separate_debug_file): Return std::string.
10818         (find_separate_debug_file_by_debuglink): Return std::string.
10819         * symfile.h (find_separate_debug_file_by_debuglink): Return
10820         std::string.
10821
10822 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
10823
10824         * common/xml-utils.c (xml_escape_text): Move code to...
10825         (xml_escape_text_append): ... this new function.
10826         * common/xml-utils.h (xml_escape_text_append): New declaration.
10827         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
10828         New function.
10829         (_initialize_xml_utils): register test_xml_escape_text_append as
10830         a selftest.
10831
10832 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
10833
10834         * defs.h: Remove MAX_REGISTER_SIZE.
10835         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
10836         asserts.
10837         * python/py-unwind.c (pyuw_sniffer): Likewise.
10838
10839 2018-03-07  Tom Tromey  <tom@tromey.com>
10840
10841         * linux-tdep.c (linux_info_proc): Update.
10842         * target.h (struct target_ops) <to_fileio_readlink>: Return
10843         optional<string>.
10844         (target_fileio_readlink): Return optional<string>.
10845         * remote.c (remote_hostio_readlink): Return optional<string>.
10846         * inf-child.c (inf_child_fileio_readlink): Return
10847         optional<string>.
10848         * target.c (target_fileio_readlink): Return optional<string>.
10849
10850 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
10851
10852         * regcache.c (cooked_read_test): Add riscv to the list of
10853         architectures that have a save_reggroup.
10854
10855 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10856
10857         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
10858         value is not a dynamic class object.
10859
10860 2018-03-06  Tom Tromey  <tom@tromey.com>
10861
10862         * rust-exp.y: Formatting fixes.
10863
10864 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10865
10866         * riscv-tdep.c (riscv_register_name): Remove target description
10867         support.
10868         (riscv_gdbarch_init): Remove target description check.
10869
10870 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10871
10872         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
10873         comment.
10874         * riscv-tdep.h: Likewise.
10875
10876 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10877
10878         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
10879         (riscv_pseudo_register_write): Delete.
10880         (riscv_gdbarch_init): Remove all use of pseudo registers.
10881
10882 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
10883
10884         * record-btrace.c (btrace_print_lines): Replace cleanup
10885         parameter with RAII equivalents.
10886         (btrace_insn_history): Replace cleanup with RAII equivalents.
10887         * ui-out.h (make_cleanup_ui_out_list_begin_end,
10888         make_cleanup_ui_out_tuple_begin_end): Remove.
10889         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
10890         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
10891         make_cleanup_ui_out_list_begin_end): Remove.
10892
10893 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
10894
10895         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
10896         parameter types to std::vector.  Use bool.
10897         (record_btrace_wait): Replace VEC(tp_t) with
10898         std::vector<thread_info *>.
10899         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
10900
10901 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
10902
10903         * record-btrace.c (record_btrace_disable_callback): Remove.
10904         (struct scoped_btrace_disable): New.
10905         (record_btrace_open): Use scoped_btrace_disable.
10906
10907 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10908
10909         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
10910         reading values from registers.
10911
10912 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10913
10914         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
10915         where appropriate.
10916
10917 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10918
10919         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
10920         change parameter type.  Use GDB's print functions, and use
10921         core_addr_to_string where appropriate.
10922         (riscv_push_dummy_call): Use core_addr_to_string where
10923         appropriate, update call to riscv_print_arg_location, and reindent
10924         a few lines.
10925         (riscv_return_value): Update call to riscv_print_arg_location.
10926
10927 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10928             Tim Newsome <tim@sifive.com>
10929             Albert Ou <a0u@eecs.berkeley.edu>
10930             Darius Rad <darius@bluespec.com>
10931
10932         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
10933         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
10934         (ALLDEPFILES): Add riscv-tdep.c
10935         * configure.tgt: Add riscv support.
10936         * riscv-tdep.c: New file.
10937         * riscv-tdep.h: New file.
10938         * NEWS: Mention new target.
10939         * MAINTAINERS: Add entry for riscv.
10940
10941 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10942
10943         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
10944         fields within aggregates.
10945
10946 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
10947
10948         * record-btrace.c (btrace_print_lines): Change type of flags to
10949         gdb_disassembly_flags.
10950
10951 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
10952
10953         * fbsd-nat.c: Include "inf-ptrace.h".
10954         (USE_SIGTRAP_SIGINFO): Conditionally define.
10955         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
10956         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
10957         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
10958         function.
10959         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
10960         Likewise.
10961         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
10962         Likewise.
10963         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
10964         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
10965         "supports_stopped_by_hw_breakpoint" target methods.
10966
10967 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
10968
10969         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
10970         * fbsd-nat.c (debug_fbsd_nat): New variable.
10971         (show_fbsd_nat_debug): New function.
10972         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
10973         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
10974
10975 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
10976
10977         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
10978         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
10979         prototype.
10980         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
10981         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
10982         method.
10983
10984 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10985
10986         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
10987         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
10988
10989 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10990
10991         * charset.c (struct charset_vector): New.
10992         (charsets): Change type to charset_vector.
10993         (find_charset_names): Adjust.
10994         (add_one): Adjust.
10995         (_initialize_charset): Adjust.
10996
10997 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10998
10999         * progspace.h (struct program_space) <deleted_solibs>: Change
11000         type to std::vector<std::string>.
11001         * progspace.c (clear_program_space_solib_cache): Adjust.
11002         * breakpoint.c (print_solib_event): Adjust.
11003         (check_status_catch_solib): Adjust.
11004         * solib.c (update_solib_list): Adjust.
11005         * ui-out.h (class ui_out) <field_string>: New overload.
11006         * ui-out.c (ui_out::field_string): New overload.
11007
11008 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
11009
11010         * progspace.h (struct program_space): Add constructor and
11011         destructor, initialize fields.
11012         (add_program_space): Remove.
11013         * progspace.c (add_program_space): Rename to...
11014         (program_space::program_space): ... this.
11015         (release_program_space): Rename to...
11016         (program_space::~program_space): ... this.
11017         (delete_program_space): Use delete to delete program_space.
11018         (initialize_progspace): Use new to allocate program_space.
11019         * inferior.c (add_inferior_with_spaces): Likewise.
11020         (clone_inferior_command): Likewise.
11021         * infrun.c (follow_fork_inferior): Likewise.
11022         (handle_vfork_child_exec_or_exit): Likewise.
11023
11024 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
11025
11026         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
11027         (delim_string_to_char_ptr_vec): Return std::vector of
11028         gdb::unique_xmalloc_ptr.
11029         (dirnames_to_char_ptr_vec_append): Take std::vector of
11030         gdb::unique_xmalloc_ptr.
11031         (dirnames_to_char_ptr_vec): Return std::vector of
11032         gdb::unique_xmalloc_ptr.
11033         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
11034         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
11035         (delim_string_to_char_ptr_vec): Return an std::vector of
11036         gdb::unique_xmalloc_ptr, adjust the code.
11037         (dirnames_to_char_ptr_vec_append): Take an std::vector of
11038         gdb::unique_xmalloc_ptr, adjust the code.
11039         (dirnames_to_char_ptr_vec): Return an std::vector of
11040         gdb::unique_xmalloc_ptr, adjust the code.
11041         * auto-load.c (auto_load_safe_path_vec): Change type to
11042         std::vector of gdb::unique_xmalloc_ptr.
11043         (auto_load_expand_dir_vars): Return an std::vector of
11044         gdb::unique_xmalloc_ptr, adjust the code.
11045         (auto_load_safe_path_vec_update): Adjust.
11046         (filename_is_in_auto_load_safe_path_vec): Adjust.
11047         (auto_load_objfile_script_1): Adjust.
11048         * build-id.c (build_id_to_debug_bfd): Adjust.
11049         * linux-thread-db.c (thread_db_load_search): Adjust.
11050         * source.c (add_path): Adjust.
11051         (openp): Adjust.
11052         * symfile.c (find_separate_debug_file): Adjust.
11053         * utils.c (do_free_char_ptr_vec): Remove.
11054         (make_cleanup_free_char_ptr_vec): Remove.
11055
11056 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
11057
11058         PR gdb/22907
11059         * common/pathstuff.c: Conditionally include "<windows.h>".
11060
11061 2018-03-01  Georg Sauthoff  <mail@georg.so>
11062
11063         PR gdb/22888
11064         * gcore.in: Quote variables and switch interpreter to bash.
11065
11066 2018-03-01  Tom Tromey  <tom@tromey.com>
11067
11068         * dwarf2read.c (alloc_discriminant_info): Fix default_index
11069         assertion.  Add assertion for discriminant_index.
11070         (quirk_rust_enum): Use correct base type name in univariant case.
11071
11072 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
11073
11074         * record.c (get_call_history_modifiers): Return a
11075         record_print_flags.
11076         (cmd_record_call_history): Adjust.
11077         * record-btrace.c (record_btrace_call_history): Adjust.
11078         (record_btrace_call_history_range): Adjust.
11079         (record_btrace_call_history_from): Adjust.
11080         * target-debug.h (target_debug_print_record_print_flags): New.
11081         * target-delegates.c: Re-generate.
11082         * target.c (target_call_history): Change flags type.
11083         (target_call_history_from): Likewise.
11084         (target_call_history_range): Likewise.
11085         * target.h (struct target_ops) <target_call_history>: Likewise.
11086         (target_call_history_from): Likewise.
11087         (target_call_history_range): Likewise.
11088
11089 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
11090             Simon Marchi  <simon.marchi@polymtl.ca>
11091
11092         * common/common-utils.c: Include "sys/stat.h".
11093         (is_regular_file): Move here from "source.c"; change return
11094         type to "bool".
11095         * common/common-utils.h (is_regular_file): New prototype.
11096         * common/pathstuff.c (contains_dir_separator): New function.
11097         * common/pathstuff.h (contains_dir_separator): New prototype.
11098         * source.c: Don't include "sys/stat.h".
11099         (is_regular_file): Move to "common/common-utils.c".
11100
11101 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
11102
11103         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
11104         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
11105         * auto-load.c: Include "common/pathstuff.h".
11106         * common/common-def.h (current_directory): Move here.
11107         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
11108         function.
11109         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
11110         prototype.
11111         * common/pathstuff.c: New file.
11112         * common/pathstuff.h: New file.
11113         * compile/compile.c: Include "common/pathstuff.h".
11114         * defs.h (current_directory): Move to "common/common-defs.h".
11115         * dwarf2read.c: Include "common/pathstuff.h".
11116         * exec.c: Likewise.
11117         * guile/scm-safe-call.c: Likewise.
11118         * linux-thread-db.c: Likewise.
11119         * main.c: Likewise.
11120         * nto-tdep.c: Likewise.
11121         * objfiles.c: Likewise.
11122         * source.c: Likewise.
11123         * symtab.c: Likewise.
11124         * utils.c: Include "common/pathstuff.h".
11125         (gdb_realpath): Move to "common/pathstuff.c".
11126         (gdb_realpath_keepfile): Likewise.
11127         (gdb_abspath): Likewise.
11128         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
11129         (gdb_realpath_keepfile): Likewise.
11130         (gdb_abspath): Likewise.
11131
11132 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
11133
11134         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
11135         wildcard process pid for super_resume for kernels with a
11136         specific bug.
11137
11138 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
11139
11140         * compile/compile.c (get_args): Add additional comments
11141         explaining function.
11142
11143 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
11144             Tom Tromey  <tom@tromey.com>
11145
11146         * target.h (memory_write_request_s): Remove typedef.  Don't define
11147         VEC.
11148         (target_write_memory_blocks): Change argument to std::vector.
11149         (struct memory_write_request): Add constructor.
11150         * target-memory.c (compare_block_starting_address): Return bool.
11151         Change argument types.
11152         (claim_memory): Change arguments to use std::vector.
11153         (split_regular_and_flash_blocks, blocks_to_erase)
11154         (compute_garbled_blocks): Likewise.
11155         (cleanup_request_data, cleanup_write_requests_vector): Remove.
11156         (target_write_memory_blocks): Change argument to std::vector.
11157         * symfile.c (struct load_section_data): Add constructor and
11158         destructor.  Use std::vector for "requests".
11159         (struct load_progress_data): Add initializers.
11160         (load_section_callback): Update.  Use "new".
11161         (clear_memory_write_data): Remove.
11162         (generic_load): Update.
11163
11164 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
11165
11166         * arch/aarch64.h: Use common/tdesc.h.
11167
11168 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
11169
11170         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
11171         architecture with a 64-bit ABI.
11172
11173 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
11174
11175         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
11176         ahead of target description loading.
11177
11178 2018-02-26  Tom Tromey  <tom@tromey.com>
11179
11180         * stack.c (backtrace_command_1): Update.
11181         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
11182         of "flags".
11183         * python/py-framefilter.c (py_print_frame)
11184         (gdbpy_apply_frame_filter): Change type of "flags".
11185         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
11186         of "flags".
11187         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
11188         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
11189         * extension.h (enum frame_filter_flag): Rename from
11190         frame_filter_flags.
11191         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
11192         (apply_ext_lang_frame_filter): Change type of "flags".
11193         * extension.c (apply_ext_lang_frame_filter): Change type of
11194         "flags".
11195         * extension-priv.h (struct extension_language_ops)
11196         <apply_frame_filter>: Change type of "flags".
11197
11198 2018-02-26  Tom Tromey  <tom@tromey.com>
11199
11200         PR python/16497:
11201         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
11202         off-by-one in py_end computation.
11203         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
11204         PRINT_MORE_FRAMES.
11205         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
11206         constant.
11207
11208 2018-02-26  Tom Tromey  <tom@tromey.com>
11209
11210         * dwarf2read.c (struct variant_field): New.
11211         (struct nextfield) <variant>: New field.
11212         (dwarf2_add_field): Handle DW_TAG_variant_part.
11213         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
11214         discriminated union.
11215         (read_structure_type): Handle DW_TAG_variant_part.
11216         (handle_struct_member_die): New function, extracted from
11217         process_structure_scope.  Handle DW_TAG_variant.
11218         (process_structure_scope): Handle discriminated unions.  Call
11219         handle_struct_member_die.
11220
11221 2018-02-26  Tom Tromey  <tom@tromey.com>
11222
11223         * rust-lang.h (rust_last_path_segment): Declare.
11224         * rust-lang.c (rust_last_path_segment): Now public.  Change
11225         contract.
11226         (struct disr_info): Remove.
11227         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
11228         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
11229         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
11230         (rust_enum_p, rust_enum_variant): New function.
11231         (rust_underscore_fields): Remove "offset" parameter.
11232         (rust_print_enum): New function.
11233         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
11234         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
11235         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
11236         enums.
11237         (rust_internal_print_type): New function, from rust_print_type.
11238         Remove enum code.
11239         (rust_print_type): Call rust_internal_print_type.
11240         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
11241         Update enum handling.
11242         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
11243         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
11244         (rust_union_quirks): New functions.
11245         (process_full_comp_unit, process_full_type_unit): Call
11246         rust_union_quirks.
11247         (process_structure_scope): Update rust_unions if necessary.
11248
11249 2018-02-26  Tom Tromey  <tom@tromey.com>
11250
11251         * value.h (value_union_variant): Declare.
11252         * valops.c (value_union_variant): New function.
11253         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
11254         (struct discriminant_info): New.
11255         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
11256         enumerator.
11257         (struct main_type) <flag_discriminated_union>: New field.
11258
11259 2018-02-26  Tom Tromey  <tom@tromey.com>
11260
11261         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11262         unittests/unpack-selftests.c.
11263         * unittests/unpack-selftests.c: New file.
11264         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
11265
11266 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11267
11268         * dwarf2read.c (struct partial_die_info) <read>: New method.
11269         (read_partial_die): Remove the declaration.
11270         (load_partial_dies): Update.
11271         (partial_die_info::partial_die_info):
11272         (read_partial_die): Change it to partial_die_info::read.
11273
11274 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11275
11276         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
11277         (fixup_partial_die): Remove declaration.
11278         (scan_partial_symbols): Update.
11279         (partial_die_parent_scope): Likewise.
11280         (partial_die_full_name): Likewise.
11281         (fixup_partial_die): Change it to partial_die_info::fixup.
11282
11283 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11284
11285         * dwarf2read.c (read_partial_die): Update the declaration.
11286         (load_partial_dies): Caller update.
11287         (read_partial_die): Remove one argument abbrev_len.
11288
11289 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11290
11291         * dwarf2read.c (struct partial_die_info): Add ctor, delete
11292         assignment operator.
11293         (load_partial_dies): Use ctor and copy ctor.
11294         (read_partial_die): Update.
11295         (dwarf2_cu::find_partial_die): Use ctor.
11296
11297 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11298
11299         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
11300         (find_partial_die_in_comp_unit): Change it to
11301         dwarf2_cu::find_partial_die.
11302         (find_partial_die): Update.
11303
11304 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11305
11306         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
11307         is NULL.
11308
11309 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11310
11311         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
11312
11313 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
11314
11315         * arch/amd64.h: Use common/tdesc.h.
11316         * arch/i386.c: Likewise.
11317         * arch/i386.h: Likewise.
11318         * arch/tic6x.c: Likewise.
11319         * arch/tdesc.h: Move file from here...
11320         * common/tdesc.h: ...to here.
11321         * features/aarch64-core.c: Regenerate.
11322         * features/aarch64-fpu.c: Regenerate.
11323         * features/i386/32bit-avx.c: Regenerate.
11324         * features/i386/32bit-avx512.c: Regenerate.
11325         * features/i386/32bit-core.c: Regenerate.
11326         * features/i386/32bit-linux.c: Regenerate.
11327         * features/i386/32bit-mpx.c: Regenerate.
11328         * features/i386/32bit-pkeys.c: Regenerate.
11329         * features/i386/32bit-sse.c: Regenerate.
11330         * features/i386/64bit-avx.c: Regenerate.
11331         * features/i386/64bit-avx512.c: Regenerate.
11332         * features/i386/64bit-core.c: Regenerate.
11333         * features/i386/64bit-linux.c: Regenerate.
11334         * features/i386/64bit-mpx.c: Regenerate.
11335         * features/i386/64bit-pkeys.c: Regenerate.
11336         * features/i386/64bit-segments.c: Regenerate.
11337         * features/i386/64bit-sse.c: Regenerate.
11338         * features/i386/x32-core.c: Regenerate.
11339         * features/tic6x-c6xp.c: Regenerate.
11340         * features/tic6x-core.c: Regenerate.
11341         * features/tic6x-gp.c: Regenerate.
11342         * target-descriptions.c: Use common/tdesc.h.
11343         * target-descriptions.h: Likewise.
11344
11345 2018-02-24  Tom Tromey  <tom@tromey.com>
11346
11347         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
11348         (try_thread_db_load_from_dir, thread_db_load_search): Use
11349         std::string.
11350         (info_auto_load_libthread_db_compare): Return bool.  Change
11351         argument types.
11352         (info_auto_load_libthread_db): Use std::vector, std::string.
11353         Remove cleanups.
11354
11355 2018-02-24  Tom Tromey  <tom@tromey.com>
11356
11357         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
11358         std::string.
11359         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
11360         std::string*.
11361         * gdbarch.c: Rebuild.
11362         * gdbarch.h: Rebuild.
11363         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
11364         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
11365         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
11366         std::string*.
11367
11368 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
11369
11370         * gdbtypes.h (sect_offset): Change type to uint64_t.
11371         (sect_offset_str): New function.
11372         * dwarf2read.c (create_addrmap_from_aranges): Use
11373         sect_offset_str.
11374         (error_check_comp_unit_head): Likewise.
11375         (create_debug_type_hash_table): Likewise.
11376         (read_cutu_die_from_dwo): Likewise.
11377         (init_cutu_and_read_dies): Likewise.
11378         (init_cutu_and_read_dies_no_follow): Likewise.
11379         (process_psymtab_comp_unit_reader): Likewise.
11380         (partial_die_parent_scope): Likewise.
11381         (peek_die_abbrev): Likewise.
11382         (process_queue): Likewise.
11383         (dwarf2_physname): Likewise.
11384         (read_namespace_alias): Likewise.
11385         (read_import_statement): Likewise.
11386         (create_dwo_cu_reader): Likewise.
11387         (create_cus_hash_table): Likewise.
11388         (lookup_dwo_cutu): Likewise.
11389         (inherit_abstract_dies): Likewise.
11390         (read_func_scope): Likewise.
11391         (read_call_site_scope): Likewise.
11392         (dwarf2_add_member_fn): Likewise.
11393         (read_common_block): Likewise.
11394         (read_module_type): Likewise.
11395         (read_typedef): Likewise.
11396         (read_subrange_type): Likewise.
11397         (load_partial_dies): Likewise.
11398         (read_partial_die): Likewise.
11399         (find_partial_die): Likewise.
11400         (read_str_index): Likewise.
11401         (dwarf2_string_attr): Likewise.
11402         (build_error_marker_type): Likewise.
11403         (lookup_die_type): Likewise.
11404         (dump_die_shallow): Likewise.
11405         (follow_die_ref): Likewise.
11406         (dwarf2_fetch_die_loc_sect_off): Likewise.
11407         (dwarf2_fetch_constant_bytes): Likewise.
11408         (follow_die_sig): Likewise.
11409         (get_signatured_type): Likewise.
11410         (get_DW_AT_signature_type): Likewise.
11411         (dwarf2_find_containing_comp_unit): Likewise.
11412         (set_die_type): Likewise.
11413
11414 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
11415
11416         * arch/aarch64.c: Include "common-defs.h".
11417         * arch/amd64.c: Likewise.
11418         * arch/i386.c: Likewise.
11419
11420 2018-02-21  Tom Tromey  <tom@tromey.com>
11421
11422         * value.h: (extract_field_op): Update.
11423         * eval.c (extract_field_op): Return a const char *.
11424         * expression.h (parse_expression_for_completion): Update.
11425         * completer.c (complete_expression): Update.
11426         (add_struct_fields): Make fieldname const.
11427         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
11428         (mark_completion_tag, parse_exp_in_context_1): Update.
11429         (parse_expression_for_completion): Change "name" to
11430         unique_xmalloc_ptr*.
11431
11432 2018-02-21  Tom Tromey  <tom@tromey.com>
11433
11434         * infcall.c (call_function_by_hand_dummy): Use std::vector.
11435
11436 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11437
11438         * avr-tdep.c (avr_read_pc): Change parameter type to
11439         readable_regcache.
11440         * gdbarch.sh (read_pc): Likewise.
11441         * gdbarch.c: Re-generated.
11442         * gdbarch.h: Re-generated.
11443         * hppa-tdep.c (hppa_read_pc): Change parameter type to
11444         readable_regcache.
11445         * ia64-tdep.c (ia64_read_pc): Likewise.
11446         * mips-tdep.c (mips_read_pc): Likewise.
11447         * spu-tdep.c (spu_read_pc): Likewise.
11448
11449 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11450
11451         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
11452         * regcache-dump.c: New file.
11453         * regcache.c: Move register_dump to regcache-dump.c.
11454         (maintenance_print_registers): Likewise.
11455         (maintenance_print_raw_registers): Likewise.
11456         (maintenance_print_cooked_registers): Likewise.
11457         (maintenance_print_register_groups): Likewise.
11458         (maintenance_print_remote_registers): Likewise.
11459         (_initialize_regcache): Likewise.
11460         * regcache.h (register_dump): Moved from regcache.c.
11461
11462 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11463
11464         * regcache.c (regcache::regcache): Update.
11465         (regcache::invalidate): Move it to detached_regcache::invalidate.
11466         (get_thread_arch_aspace_regcache): Update.
11467         (regcache::raw_update): Update.
11468         (regcache::cooked_read): Remove some code.
11469         (regcache::cooked_read_value): Likewise.
11470         (regcache::raw_write): Remove assert on m_readonly_p.
11471         (regcache::raw_supply_integer): Move it to
11472         detached_regcache::raw_supply_integer.
11473         (regcache::raw_supply_zeroed): Likewise.
11474         * regcache.h (detached_regcache) <raw_supply_integer>: New
11475         declaration.
11476         <raw_supply_zeroed, invalidate>: Likewise.
11477         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
11478         <invalidate>: Likewise.
11479         <m_readonly_p>: Removed.
11480
11481 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11482
11483         * infcmd.c (get_return_value): Let stop_regs point to
11484         get_current_regcache.
11485         * regcache.c (regcache::regcache): Remove.
11486         (register_dump_reg_buffer): New class.
11487         (regcache_print): Adjust.
11488         * regcache.h (regcache): Remove constructors.
11489
11490 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11491
11492         * regcache.c (class register_dump): New class.
11493         (register_dump_regcache, register_dump_none): New class.
11494         (register_dump_remote, register_dump_groups): New class.
11495         (regcache_print): Update.
11496         * regcache.h (regcache_dump_what): Move it to regcache.c.
11497         (regcache) <dump>: Remove.
11498
11499 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11500
11501         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
11502          reg_buffer_rw *.
11503         (jit_unwind_reg_set_impl): Call raw_supply.
11504         (jit_frame_sniffer): Use reg_buffer_rw.
11505         * record-full.c (record_full_core_regbuf): Change its type.
11506         (record_full_core_open_1): Use reg_buffer_rw.
11507         (record_full_close): Likewise.
11508         (record_full_core_fetch_registers): Use regcache->raw_supply.
11509         (record_full_core_store_registers): Likewise.
11510         * regcache.c (regcache::get_register_status): Move it to
11511         reg_buffer.
11512         (regcache_raw_set_cached_value): Remove.
11513         (regcache::raw_set_cached_value): Remove.
11514         (regcache::raw_write): Call raw_supply.
11515         (regcache::raw_supply): Move it to reg_buffer_rw.
11516         * regcache.h (regcache_raw_set_cached_value): Remove.
11517         (reg_buffer_rw): New class.
11518
11519 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11520
11521         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
11522         readonly_detached_regcache.
11523         (dummy_frame_prev_register): Use regcache->cooked_read.
11524         * frame.c (frame_save_as_regcache): Change return type.
11525         (frame_pop): Update.
11526         * frame.h (frame_save_as_regcache): Update declaration.
11527         * inferior.h (get_infcall_suspend_state_regcache): Update
11528         declaration.
11529         * infrun.c (infcall_suspend_state) <registers>: use
11530         readonly_detached_regcache.
11531         (save_infcall_suspend_state): Don't use regcache_dup.
11532         (get_infcall_suspend_state_regcache): Change return type.
11533         * linux-fork.c (struct fork_info) <savedregs>: Change to
11534         readonly_detached_regcache.
11535         <pc>: New field.
11536         (fork_save_infrun_state): Don't use regcache_dup.
11537         (info_checkpoints_command): Adjust.
11538         * mi/mi-main.c (register_changed_p): Update declaration.
11539         (mi_cmd_data_list_changed_registers): Use
11540         readonly_detached_regcache.
11541         (register_changed_p): Change parameter type to
11542         readonly_detached_regcache.
11543         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
11544         readonly_detached_regcache.
11545         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
11546         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
11547         New.
11548         (regcache::save): Move it to reg_buffer.
11549         (regcache::restore): Change parameter type.
11550         (regcache_dup): Remove.
11551         * regcache.h (reg_buffer) <save>: New method.
11552         (readonly_detached_regcache): New class.
11553         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
11554         readonly_detached_regcache.
11555         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
11556
11557 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11558
11559         * frame.c (frame_save_as_regcache): Use regcache method save.
11560         (frame_pop): Use regcache method restore.
11561         * infrun.c (restore_infcall_suspend_state): Likewise.
11562         * linux-fork.c (fork_load_infrun_state): Likewise.
11563         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
11564         save.
11565         * regcache.c (regcache_save): Remove.
11566         (regcache::restore): More asserts.
11567         (regcache_cpy): Remove.
11568         * regcache.h (regcache_save): Remove the declaration.
11569         (regcache::restore): Move from private to public.
11570         Remove the friend declaration of regcache_cpy.
11571         (regcache_cpy): Remove declaration.
11572
11573 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11574
11575         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
11576         parameter type to 'readable_regcache *'.
11577         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
11578         * arm-tdep.c (arm_neon_quad_read): Likewise.
11579         (arm_pseudo_read): Likewise.
11580         * avr-tdep.c (avr_pseudo_register_read): Likewise.
11581         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
11582         * frv-tdep.c (frv_pseudo_register_read): Likewise.
11583         * gdbarch.c: Re-generated.
11584         * gdbarch.h: Re-generated.
11585         * gdbarch.sh (pseudo_register_read): Change parameter type to
11586         'readable_regcache *'.
11587         (pseudo_register_read_value): Likewise.
11588         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
11589         (h8300_pseudo_register_read): Likewise.
11590         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
11591         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
11592         (i386_pseudo_register_read_into_value): Likewise.
11593         (i386_pseudo_register_read_value): Likewise.
11594         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
11595         declaration.
11596         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
11597         * m32c-tdep.c (m32c_raw_read): Likewise.
11598         (m32c_read_flg): Likewise.
11599         (m32c_banked_register): Likewise.
11600         (m32c_banked_read): Likewise.
11601         (m32c_sb_read): Likewise.
11602         (m32c_part_read): Likewise.
11603         (m32c_cat_read): Likewise.
11604         (m32c_r3r2r1r0_read): Likewise.
11605         (m32c_pseudo_register_read): Likewise.
11606         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
11607         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
11608         (mep_pseudo_cr64_read): Likewise.
11609         (mep_pseudo_register_read): Likewise.
11610         * mips-tdep.c (mips_pseudo_register_read): Likewise.
11611         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
11612         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
11613         * regcache.c (regcache::raw_read): Move it to readable_regcache.
11614         (regcache::cooked_read): Likewise.
11615         (regcache::cooked_read_value): Likewise.
11616         (regcache_cooked_read_signed):
11617         (regcache::cooked_read): Likewise.
11618         * regcache.h (readable_regcache): New class.
11619         (regcache): Inherit readable_regcache.  Move some methods to
11620         readable_regcache.
11621         * rl78-tdep.c (rl78_pseudo_register_read): Change
11622         parameter type to 'readable_regcache *'.
11623         * rs6000-tdep.c (do_regcache_raw_read): Remove.
11624         (e500_pseudo_register_read): Change parameter type to
11625         'readable_regcache *'.
11626         (dfp_pseudo_register_read): Likewise.
11627         (vsx_pseudo_register_read): Likewise.
11628         (efpr_pseudo_register_read): Likewise.
11629         * s390-tdep.c (s390_pseudo_register_read): Likewise.
11630         * sh-tdep.c (sh_pseudo_register_read): Likewise.
11631         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
11632         (sh64_pseudo_register_read): Likewise.
11633         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
11634         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
11635         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
11636         (spu_pseudo_register_read): Likewise.
11637         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
11638         (xtensa_pseudo_register_read): Likewise.
11639
11640 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11641
11642         * regcache.c (regcache::regcache): Call reg_buffer ctor.
11643         (regcache::arch): Move it to reg_buffer::arch.
11644         (regcache::register_buffer): Likewise.
11645         (regcache::assert_regnum): Likewise.
11646         (regcache::num_raw_registers): Likewise.
11647         * regcache.h (reg_buffer): New class.
11648         (regcache): Inherit reg_buffer.
11649
11650 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
11651
11652         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
11653         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
11654
11655 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
11656
11657         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
11658
11659 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
11660
11661         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
11662         (SFILES): Remove common/*.c files.
11663         (COMMON_OBS): Remove some *.o files built from common/*.c files.
11664         * common/common.host: Add common reference.
11665         * configure.ac: Likewise.
11666         * configure: Regenerate.
11667
11668 2018-02-16  Yao Qi  <yao.qi@linaro.org>
11669
11670         * block.c (block_namespace_info): Inherit allocate_on_obstack.
11671         (block_initialize_namespace): Use new.
11672         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
11673         (dwarf2_free_objfile): Use delete.
11674         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
11675         (copy_type_recursive): Use new.
11676         * gdb_obstack.h (allocate_on_obstack): New.
11677
11678 2018-02-15  Yao Qi  <yao.qi@linaro.org>
11679
11680         PR gdb/22849
11681         * inferior.c (exit_inferior_1): Reset inf->control.
11682
11683 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
11684
11685         * ada-lang.c (ada_to_fixed_value_create): Delete advance
11686         declaration.
11687
11688 2018-02-14  Pedro Alves  <palves@redhat.com>
11689
11690         * frame-unwind.c (frame_unwind_try_unwinder): Always call
11691         frame_cleanup_after_sniffer on exception.
11692
11693 2018-02-14  Tom Tromey  <tom@tromey.com>
11694
11695         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
11696         const.
11697         (solib_bfd_open): Make pathname const.
11698         * solib.c (solib_bfd_open): Make pathname const.
11699         * solib-spu.c (spu_bfd_fopen): Make name const.
11700         (spu_bfd_open): Make pathname const.
11701         * solib-darwin.c (darwin_bfd_open): Make pathname const.
11702         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
11703
11704 2018-02-14  Tom Tromey  <tom@tromey.com>
11705
11706         * symfile.c (symfile_bfd_open): Update.
11707         * source.h (openp, source_full_path_of, find_and_open_source):
11708         Change argument type to unique_xmalloc_ptr.
11709         * source.c (openp): Take a unique_xmalloc_ptr.
11710         (source_full_path_of, find_and_open_source): Likewise.
11711         (open_source_file, symtab_to_fullname): Update.
11712         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
11713         unique_xmalloc_ptr.
11714         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
11715         (exec_file_find): Update.
11716         * psymtab.c (psymtab_to_fullname): Update.
11717         * nto-tdep.h (nto_find_and_open_solib): Update.
11718         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
11719         unique_xmalloc_ptr.
11720         * exec.c (exec_file_attach): Update.
11721         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
11722         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
11723
11724 2018-02-14  Tom Tromey  <tom@tromey.com>
11725
11726         * solib.c: Include source.h.
11727         * nto-tdep.c: Include source.h.
11728         * mi/mi-cmd-env.c: Include source.h.
11729         * infcmd.c: Include source.h.
11730         * exec.c: Include source.h.
11731         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
11732         (add_path, directory_switch, source_path, init_source_path): Move
11733         declarations...
11734         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
11735         (add_path, directory_switch, source_path, init_source_path):
11736         ...here.
11737
11738 2018-02-14  Tom Tromey  <tom@tromey.com>
11739
11740         * solist.h (exec_file_find, solib_find): Return
11741         unique_xmalloc_ptr.
11742         (solib_bfd_fopen): Take a const char *.
11743         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
11744         (exec_file_find, solib_find): Likewise.
11745         (solib_bfd_fopen): Do not take ownership of "pathname".
11746         (solib_bfd_open): Use unique_xmalloc_ptr.
11747         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
11748         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
11749         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
11750         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
11751
11752 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
11753
11754         * ada-lang.c (name_match_type_from_name): Remove reference to
11755         ada_name_for_lookup in function's documentation.
11756         * ada-lang.h (ada_name_for_lookup): Delete declaration.
11757
11758 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
11759
11760         * defs.h (enum openp_flags): New enum.
11761         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
11762         Move to enum openp_flags.
11763         (openp_flags): New enum flags.
11764         (openp): Change parameter type to openp_flags.
11765         * source.c (openp): Change parameter type to openp_flags.
11766         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
11767         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
11768
11769 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
11770
11771         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
11772         per-command.
11773
11774 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
11775
11776         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
11777         into...
11778         (class dwarf2_queue_guard): ...the destructor of this new class.
11779         (dw2_do_instantiate_symtab): Create instance of the new class
11780         dwarf2_queue_guard, remove cleanup.
11781
11782 2018-02-09  Tom Tromey  <tom@tromey.com>
11783
11784         * source.c (find_source_lines): Don't reference past the end of
11785         the vector.
11786
11787 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11788
11789         * remote.c (remote_btrace_maybe_reopen): Change error message.
11790         * btrace.c (btrace_enable): Likewise.
11791         (parse_xml_btrace): Likewise.
11792         (parse_xml_btrace_conf): Likewise.
11793
11794 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11795
11796         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
11797         (linux_enable_pt, linux_enable_bts): Call
11798         diagnose_perf_event_open_fail.
11799
11800 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11801
11802         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
11803         Remove parameter and change return type.  Update callers.  Move it.
11804         (linux_enable_bts, linux_enable_pt): Improve error message.
11805         (linux_enable_pt): Remove zero buffer size check.
11806         (linux_enable_btrace): Improve error messages.  Remove NULL return
11807         check.
11808
11809 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11810
11811         * btrace.c (btrace_enable): Remove target_supports_btrace call.
11812         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
11813         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
11814         (linux_supports_pt, linux_supports_btrace): Remove.
11815         (linux_enable_bts): Call cpu_supports_bts.
11816         * nat/linux-btrace.h (linux_supports_btrace): Remove.
11817         * remote.c (remote_supports_btrace): Remove.
11818         (init_remote_ops): Remove remote_supports_btrace.
11819         * target-delegates.c: Regenerated.
11820         * target.c (target_supports_btrace): Remove.
11821         * target.h (target_ops) <to_supports_btrace>: Remove
11822         (target_supports_btrace): Remove.
11823         * x86-linux-nat.c (x86_linux_create_target): Remove
11824         linux_supports_btrace.
11825
11826 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11827
11828         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
11829         btrace failed.
11830         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
11831         exception and use message in own exception.
11832
11833 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11834
11835         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
11836         (perf_event_pt_event_type): Use gdb_file_up.
11837         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
11838         scoped_fd, and scoped_mmap.
11839
11840 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11841
11842         * common/scoped_mmap.h: New.
11843         * unittests/scoped_mmap-selftest.c: New.
11844         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11845         unittests/scoped_mmap-selftest.c.
11846
11847 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11848
11849         * common/scoped_fd.h: New.
11850         * unittests/scoped_fd-selftest.c: New.
11851         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11852         unittests/scoped_fd-selftest.c.
11853
11854 2018-02-09  Tom Tromey  <tom@tromey.com>
11855
11856         * auto-load.c (auto_load_section_scripts): Use
11857         gdb::unique_xmalloc_ptr.
11858
11859 2018-02-09  Tom Tromey  <tom@tromey.com>
11860
11861         * auto-load.c (execute_script_contents): Use std::string.
11862
11863 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
11864
11865         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
11866         Python function, rather than a new command.
11867
11868 2018-02-08  Tom Tromey  <tom@tromey.com>
11869
11870         * solib.c (solib_find_1): Use std::string.
11871         (solib_bfd_fopen): Use unique_xmalloc_ptr.
11872
11873 2018-02-08  Tom Tromey  <tom@tromey.com>
11874
11875         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
11876
11877 2018-02-08  Tom Tromey  <tom@tromey.com>
11878
11879         * source.c (find_source_lines): Use gdb::def_vector.
11880
11881 2018-02-08  Tom Tromey  <tom@tromey.com>
11882
11883         * macrocmd.c (struct temporary_macro_definition): New.
11884         (macro_define_command): Use temporary_macro_definition.  Remove
11885         cleanups.
11886         (free_macro_definition_ptr): Remove.
11887
11888 2018-02-08  Tom Tromey  <tom@tromey.com>
11889
11890         * macroexp.c (maybe_expand): Use std::string.
11891
11892 2018-02-08  Tom Tromey  <tom@tromey.com>
11893
11894         * macroexp.c (struct macro_buffer): Add initializers for some
11895         members.
11896         (init_buffer, init_shared_buffer, free_buffer)
11897         (free_buffer_return_text): Remove.
11898         (macro_buffer): New constructors.
11899         (~macro_buffer): New destructor.
11900         (macro_buffer::set_shared): New method.
11901         (macro_buffer::resize_buffer, macro_buffer::appendc)
11902         (macro_buffer::appendmem): Now methods, not free functions.
11903         (set_token, append_tokens_without_splicing, stringify)
11904         (macro_stringify): Update.
11905         (gather_arguments): Change return type.  Remove argc_p argument,
11906         add args_ptr argument.  Use std::vector.
11907         (substitute_args): Remove argc argument.  Accept std::vector.
11908         (expand): Update.  Use std::vector.
11909         (scan, macro_expand, macro_expand_next): Update.
11910
11911 2018-02-08  Tom Tromey  <tom@tromey.com>
11912
11913         * symtab.c (default_collect_symbol_completion_matches_break_on):
11914         Use unique_xmalloc_ptr.
11915         * macroscope.h: (sal_macro_scope, user_macro_scope)
11916         (default_macro_scope): Return unique_xmalloc_ptr.
11917         * macroscope.c (sal_macro_scope, user_macro_scope)
11918         (default_macro_scope): Return unique_xmalloc_ptr.
11919         * macroexp.h (macro_expand, macro_expand_once): Return
11920         unique_xmalloc_ptr.
11921         * macroexp.c (macro_expand, macro_expand_once): Return
11922         unique_xmalloc_ptr.
11923         * macrocmd.c (macro_expand_command, macro_expand_once_command)
11924         (info_macro_command, info_macros_command): Use
11925         unique_xmalloc_ptr.
11926         * compile/compile-c-support.c (write_macro_definitions): Use
11927         unique_xmalloc_ptr.
11928         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
11929
11930 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
11931
11932         * value.c (value_static_field): Assign field type instead of
11933         containing type when returning an optimized out value.
11934
11935 2018-02-06  Yao Qi  <yao.qi@linaro.org>
11936
11937         * ft32-tdep.c (ft32_read_pc): Remove.
11938         (ft32_write_pc): Remove.
11939         (ft32_gdbarch_init): Update.
11940         * m32r-tdep.c (m32r_read_pc): Remove.
11941         (m32r_gdbarch_init): Update.
11942         * mep-tdep.c (mep_read_pc): Remove.
11943         (mep_gdbarch_init): Update.
11944         * microblaze-tdep.c (microblaze_write_pc): Remove.
11945         (microblaze_gdbarch_init): Update.
11946         * mn10300-tdep.c (mn10300_read_pc): Remove.
11947         (mn10300_write_pc): Remove.
11948         (mn10300_gdbarch_init): Update.
11949         * moxie-tdep.c (moxie_read_pc): Remove.
11950         (moxie_write_pc): Remove.
11951         (moxie_gdbarch_init): Update.
11952
11953 2018-02-06  Yao Qi  <yao.qi@linaro.org>
11954
11955         * expprint.c (print_subexp_standard): Handle
11956         OP_F77_UNDETERMINED_ARGLIST.
11957         (dump_subexp_body_standard): Likewise.
11958
11959 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
11960
11961         * target-descriptions.c (tdesc_element_visitor) Add empty
11962         implementations.
11963         (tdesc_type): Move make_gdb_type from here.
11964         (tdesc_type_builtin): Likewise.
11965         (tdesc_type_vector): Likewise.
11966         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
11967         (make_gdb_type_struct): Move from tdesc_type_with_fields.
11968         (make_gdb_type_union): Likewise.
11969         (make_gdb_type_flags): Likewise.
11970         (make_gdb_type_enum): Likewise.
11971         (make_gdb_type): New function.
11972         (tdesc_register_type): Use static make_gdb_type.
11973
11974 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
11975
11976         * infcmd.c (default_print_one_register_info): Align natural-format
11977         column values consistently one under another.
11978         (pad_to_column): New function.
11979
11980 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
11981
11982         * dwarf2read.c (dwarf2_physname): Move commment.
11983
11984 2018-02-01  Leszek Swirski  <leszeks@google.com>
11985
11986         * varobj.c (varobj_formatted_print_options): Allow recursive
11987         pretty printing if pretty printing is enabled.
11988
11989 2018-02-01  Leszek Swirski  <leszeks@google.com>
11990
11991         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
11992         names after a structop as a filename.
11993
11994 2018-02-01  Yao Qi  <yao.qi@linaro.org>
11995
11996         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
11997         (arm_record_coproc_data_proc): Likewise.
11998
11999 2018-02-01  Yao Qi  <yao.qi@linaro.org>
12000
12001         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
12002
12003 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
12004
12005         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
12006         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
12007
12008 2018-01-31  Pedro Alves  <palves@redhat.com>
12009
12010         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
12011         * inflow.c (child_terminal_save_inferior): Wrap reference to
12012         tcgetpgrp in HAVE_TERMIOS_H.
12013         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
12014         _WIN32.
12015         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
12016         always iterate over all inferiors.
12017         (gdbsim_cntrl_c): Adjust.
12018         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
12019
12020 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
12021
12022         * gdbtypes.c (lookup_array_range_type): Make sure the array's
12023         index type is objfile-owned if the element type is as well.
12024
12025 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
12026
12027         GDB 8.1 released.
12028
12029 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12030
12031         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
12032         "features/s390x-linux64.c".
12033         (_initialize_s390_linux_tdep): Remove initialization of tdescs
12034         s390_linux32 and s390x_linux64.
12035         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
12036         default tdesc.
12037         * s390-tdep.c: Include "features/s390-linux32.c" and
12038         "features/s390x-linux64.c".
12039         (s390_tdesc_valid): Add check for tdesc_has_registers.
12040         (s390_gdbarch_init): Make sure there is always a valid tdesc.
12041         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
12042         tdesc_s390x_linux64.
12043         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
12044         tdesc_s390x_linux64 to...
12045         * s390-tdep.h: ...here.
12046
12047 2018-01-30  Pedro Alves  <palves@redhat.com>
12048
12049         PR gdb/13211
12050         * config.in, configure: Regenerate.
12051         * configure.ac: Check for getpgid.
12052         * go32-nat.c (go32_pass_ctrlc): New.
12053         (go32_target): Install it.
12054         * inf-child.c (inf_child_target): Install
12055         child_terminal_save_inferior, child_pass_ctrlc and
12056         child_interrupt.
12057         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
12058         (inf_ptrace_target): No longer install it.
12059         * infcmd.c (interrupt_target_1): Adjust.
12060         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
12061         (child_interrupt): Declare.
12062         (inferior::terminal_state): New.
12063         * inflow.c (struct terminal_info): Update comments.
12064         (inferior_process_group): Delete.
12065         (terminal_is_ours): Delete.
12066         (gdb_tty_state): New.
12067         (child_terminal_init): Adjust.
12068         (is_gdb_terminal, sharing_input_terminal_1)
12069         (sharing_input_terminal): New functions.
12070         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
12071         Set the process's actual process group in the foreground if
12072         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
12073         mark terminal as the inferior's if not sharing GDB's terminal.
12074         Don't check attach_flag.
12075         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
12076         pass down a target_terminal_state.
12077         (child_terminal_save_inferior): New, factored out from ...
12078         (child_terminal_ours_1): ... this.  Handle
12079         target_terminal_state::is_ours_for_output.
12080         (child_interrupt, child_pass_ctrlc): New.
12081         (inflow_inferior_exit): Clear the inferior's terminal_state.
12082         (copy_terminal_info): Copy the inferior's terminal state.
12083         (_initialize_inflow): Remove reference to terminal_is_ours.
12084         * inflow.h (inferior_process_group): Delete.
12085         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
12086         * procfs.c (procfs_target): Don't install procfs_interrupt.
12087         (procfs_interrupt): Delete.
12088         * remote.c (remote_serial_quit_handler): Adjust.
12089         (remote_interrupt): Remove ptid parameter.  Adjust.
12090         * target-delegates.c: Regenerate.
12091         * target.c: Include "terminal.h".
12092         (target_terminal::terminal_state): Rename to ...
12093         (target_terminal::m_terminal_state): ... this.
12094         (target_terminal::init): Adjust.
12095         (target_terminal::inferior): Adjust to per-inferior
12096         terminal_state.
12097         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
12098         (target_terminal::ours, target_terminal::ours_for_output): Use
12099         target_terminal_is_ours_kind.
12100         (target_interrupt): Remove ptid parameter.  Adjust.
12101         (default_target_pass_ctrlc): Adjust.
12102         * target.h (target_ops::to_terminal_save_inferior): New field.
12103         (target_ops::to_interrupt): Remove ptid_t parameter.
12104         (target_interrupt): Remove ptid_t parameter.  Update comment.
12105         (target_pass_ctrlc): Update comment.
12106         * target/target.h (target_terminal_state): New scoped enum,
12107         factored out of ...
12108         (target_terminal::terminal_state): ... here.
12109         (target_terminal::inferior): Update comments.
12110         (target_terminal::restore_inferior): New.
12111         (target_terminal::is_inferior, target_terminal::is_ours)
12112         (target_terminal::is_ours_for_output): Adjust.
12113         (target_terminal::scoped_restore_terminal_state): Adjust to
12114         rename, and call restore_inferior() instead of inferior().
12115         (target_terminal::scoped_restore_terminal_state::m_state): Change
12116         type.
12117         (target_terminal::terminal_state): Rename to ...
12118         (target_terminal::m_terminal_state): ... this and change type.
12119
12120 2018-01-30  Pedro Alves  <palves@redhat.com>
12121
12122         * linux-nat.c (wait_for_signal): New function.
12123         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
12124         directly.
12125         (async_terminal_is_ours)
12126         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
12127         (linux_nat_add_target): Don't override
12128         to_terminal_inferior/to_terminal_ours.
12129
12130 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
12131
12132         * remote.c (remote_follow_fork): Don't call "detach_inferior".
12133
12134 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
12135
12136         * dwarf2read.c (free_dwo_files): Add forward-declaration.
12137         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
12138         dwarf2_per_objfile_free here.
12139         (dwarf2_per_objfile_free): Remove.
12140         (_initialize_dwarf2_read): Don't register
12141         dwarf2_per_objfile_free as a registry cleanup.
12142
12143 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
12144
12145         Avoid compilation errors in MinGW native builds
12146
12147         The error is triggered by including python-internal.h, and the
12148         error message is:
12149
12150              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
12151                       from build-gnulib/import/math.h:27,
12152                       from d:/usr/Python26/include/pyport.h:235,
12153                       from d:/usr/Python26/include/Python.h:58,
12154                       from python/python-internal.h:94,
12155                       from python/py-arch.c:24:
12156              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
12157         using ::hypot;
12158                 ^~~~~
12159
12160         This happens because Python headers define 'hypot' to expand t
12161         '_hypot' in the Windows builds.
12162         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
12163         'hypoth'.  This avoids a compilation error.
12164
12165 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
12166
12167         * MAINTAINERS (Write After Approval): Fix ordering.
12168
12169 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
12170
12171         * MAINTAINERS (Write After Approval): Add Alan Hayward.
12172
12173 2018-01-26  Alan Modra  <amodra@gmail.com>
12174
12175         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
12176         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
12177         Remove nop.  Make const.  Comment.
12178         (powerpc32_plt_stub_so_2): New.
12179         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
12180         Correct count.  Update uses.
12181         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
12182         Move common code reading PLT entry word.  Correct
12183         powerpc32_plt_stub PLT address calculation.
12184         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
12185         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
12186         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
12187         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
12188         (ppc64_standard_linkage8): Likewise.
12189         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
12190         Correct insns description.
12191         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
12192
12193 2018-01-24  Pedro Alves  <palves@redhat.com>
12194
12195         GCC PR libstdc++/83906
12196         * gdbtypes.c (operator==(const dynamic_prop &,
12197         const dynamic_prop &)): New.
12198         (operator==(const range_bounds &, const range_bounds &)): New.
12199         (check_types_equal): Use them instead of memcmp.
12200         * gdbtypes.h (operator==(const dynamic_prop &,
12201         const dynamic_prop &)): Declare.
12202         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
12203         (operator==(const range_bounds &, const range_bounds &)): Declare.
12204         (operator!=(const range_bounds &, const range_bounds &)): Declare.
12205
12206 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12207
12208         * s390-linux-tdep.c (s390_record_address_mask)
12209         (s390_record_calc_disp_common, s390_record_calc_disp)
12210         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12211         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12212         (s390_process_record): Move to s390-tdep.c.
12213         (s390_linux_init_abi_any): Adjust.
12214         * s390-tdep.c (s390_record_address_mask)
12215         (s390_record_calc_disp_common, s390_record_calc_disp)
12216         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12217         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12218         (s390_process_record): Moved from s390-linux-tdep.c
12219         (s390_gdbarch_init): Adjust.
12220
12221 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12222
12223         * s390-linux-nat.c (s390-tdep.h): New include.
12224         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
12225         (HFILES_NO_SRCDIR): Add s390-tdep.h.
12226         (ALLDEPFILES): Add s390-tdep.c.
12227         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
12228         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
12229         * s390-tdep.h: ...this.  New file.
12230         * s390-linux-tdep.c (s390-tdep.h): New include.
12231         (_initialize_s390_tdep): Rename to...
12232         (_initialize_s390_linux_tdep): ...this and adjust.
12233         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
12234         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
12235         s390-tdep.h.
12236         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
12237         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
12238         (s390_is_partial_instruction, s390_software_single_step)
12239         (is_non_branch_ril, s390_displaced_step_copy_insn)
12240         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
12241         (s390_prologue_data, s390_addr, s390_store, s390_load)
12242         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
12243         (s390_register_call_saved, s390_guess_tracepoint_registers)
12244         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
12245         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
12246         (s390_pseudo_register_name, s390_pseudo_register_type)
12247         (s390_pseudo_register_read, s390_pseudo_register_write)
12248         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
12249         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
12250         (s390_addr_bits_remove, s390_address_class_type_flags)
12251         (s390_address_class_type_flags_to_name)
12252         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
12253         (s390_function_arg_float, s390_function_arg_vector)
12254         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
12255         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
12256         (s390_frame_align, s390_register_return_value, s390_return_value)
12257         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
12258         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
12259         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
12260         (s390_trad_frame_prev_register, s390_unwind_cache)
12261         (s390_prologue_frame_unwind_cache)
12262         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
12263         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
12264         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
12265         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
12266         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
12267         (s390_frame_base_address, s390_local_base_address)
12268         (s390_frame_base, s390_gcc_target_options)
12269         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
12270         (s390_validate_reg_range, s390_tdesc_valid)
12271         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
12272         * s390-tdep.c: ...this.  New file.
12273
12274 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12275
12276         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
12277         (s390_process_record, s390_gdbarch_tdep_alloc)
12278         (s390_linux_init_abi_any): Use/set new hook.
12279
12280 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12281
12282         * s390-linux-tdep.c (osabi.h): New include.
12283         (s390_linux_init_abi_31, s390_linux_init_abi_64)
12284         (s390_linux_init_abi_any): New functions.
12285         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
12286
12287 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12288
12289         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
12290         tdesc_has_registers check
12291
12292 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12293
12294         * s390-linux-tdep.c (s390_tdesc_valid): New function.
12295         (s390_validate_reg_range): New macro.
12296         (s390_gdbarch_init): Adjust.
12297
12298 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12299
12300         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
12301         (s390_gdbarch_tdep_alloc): Adjust.
12302         (s390_gdbarch_init): Adjust.
12303
12304 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12305
12306         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
12307         <have_tdb>: Change type to bool.
12308         (s390_gdbarch_tdep_alloc): Adjust.
12309         (s390_gdbarch_init): Adjust.
12310
12311 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12312
12313         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
12314         (gdbarch_tdep) <have_upper, have_vx>: New fields.
12315         (s390_gdbarch_tdep_alloc): New function.
12316         (s390_gdbarch_init): Allocate tdep at start and use its fields
12317         instead of separate variables.
12318
12319 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12320
12321         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
12322         when looking for cached gdbarch and add comment for remaining.
12323
12324 2018-01-22  Pedro Alves  <palves@redhat.com>
12325             Sergio Durigan Junior  <sergiodj@redhat.com>
12326
12327         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
12328         case.
12329
12330 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
12331
12332         * MAINTAINERS: Update my company e-mail address.
12333
12334 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12335
12336         * regcache.c (cooked_write_test): New function.
12337         (_initialize_regcache): Register the test.
12338
12339 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12340
12341         * ia64-tdep.c (ia64_pseudo_register_read): Call
12342         regcache->cooked_read instead of regcache_cooked_read_unsigned.
12343         * m32c-tdep.c (m32c_cat_read): Likewise.
12344         (m32c_r3r2r1r0_read): Likewise.
12345         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
12346         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
12347
12348 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12349
12350         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
12351         method raw_read instead of regcache_raw_read.
12352         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
12353         * arm-tdep.c (arm_neon_quad_read): Likewise.
12354         * avr-tdep.c (avr_pseudo_register_read): Likewise.
12355         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
12356         * frv-tdep.c (frv_pseudo_register_read): Likewise.
12357         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
12358         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
12359         (i386_pseudo_register_read_into_value): Likewise.
12360         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
12361         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
12362         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
12363         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
12364         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
12365         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
12366         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
12367         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
12368         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
12369
12370 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12371
12372         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
12373         * configure.tgt: Remove target mt.
12374         * mt-tdep.c: Remove.
12375         * regcache.c (cooked_read_test): Remove the check for mt.
12376
12377 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12378
12379         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
12380         instead of gdbarch_pseudo_register_read_value.
12381
12382 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
12383
12384         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
12385         language is Ada.
12386
12387 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
12388
12389         * linespec.c (create_sals_line_offset): Remove code that preserved
12390         the symtab_and_line's line number.
12391
12392 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12393
12394         * varobj.c (varobj_create): Don't set valid_block when creating a
12395         floating varobj.
12396
12397 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12398
12399         * varobj.c (varobj_create): Remove out of date comment.
12400
12401 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12402
12403         PR mi/20395
12404         * ada-exp.y (write_var_from_sym): Pass extra parameter when
12405         updating innermost block.
12406         * parse.c (innermost_block_tracker::update): Take extra type
12407         parameter, and check types match before updating innermost block.
12408         (write_dollar_variable): Update innermost block for registers.
12409         * parser-defs.h (enum innermost_block_tracker_type): New enum.
12410         (innermost_block_tracker::innermost_block_tracker): Initialise
12411         m_types member.
12412         (innermost_block_tracker::reset): Take type parameter.
12413         (innermost_block_tracker::update): Take type parameter, and pass
12414         type through as needed.
12415         (innermost_block_tracker::m_types): New member.
12416         * varobj.c (varobj_create): Pass type when reseting innermost
12417         block.
12418
12419 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12420
12421         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
12422         * ada-lang.c (resolve_subexp): Likewise.
12423         * breakpoint.c (set_breakpoint_condition) Likewise.
12424         (watch_command_1) Likewise.
12425         * c-exp.y (variable): Likewise.
12426         * d-exp.y (PrimaryExpression): Likewise.
12427         * f-exp.y (variable): Likewise.
12428         * go-exp.y (variable): Likewise.
12429         * m2-exp.y (variable): Likewise.
12430         * objfiles.c (objfile::~objfile): Likewise.
12431         * p-exp.y (variable): Likewise.
12432         * parse.c (innermost_block): Change type.
12433         * parser-defs.h (class innermost_block_tracker): New.
12434         (innermost_block): Change to innermost_block_tracker.
12435         * printcmd.c (display_command): Switch to innermost_block API.
12436         (do_one_display): Likewise.
12437         * rust-exp.y (do_one_display): Likewise.
12438         * symfile.c (clear_symtab_users): Likewise.
12439         * varobj.c (varobj_create): Switch to innermost_block API, replace
12440         use of innermost_block with block stored on varobj object.
12441
12442 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12443
12444         * expression.h (innermost_block): Remove declaration.
12445         * varobj.c: Add 'parser-defs.h' include.
12446
12447 2018-01-19  Tom Tromey  <tom@tromey.com>
12448
12449         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
12450         symbols in the static and global blocks.
12451
12452 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
12453
12454         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
12455         gdb_ptrace.h, and move including gdb_wait.h ...
12456         * nat/linux-ptrace.h: ... to here.
12457
12458 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
12459
12460         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
12461         inf_ptrace_detach_success.
12462         (inf_ptrace_detach_success): Add inferior parameter, use it
12463         instead of inferior_ptid, pass it to detach_inferior.
12464         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
12465         parameter.
12466         * inferior.c (detach_inferior): Add overload that takes an
12467         inferior object.
12468         * inferior.h (detach_inferior): Likewise.
12469         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
12470         use inferior_ptid, adjust call to inf_ptrace_detach_success.
12471         * linux-thread-db.c (thread_db_detach): Use inf parameter.
12472
12473 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
12474
12475         * target.h (struct target_ops) <to_detach>: Add inferior
12476         parameter.
12477         (target_detach): Likewise.
12478         * target.c (dispose_inferior): Pass inferior down.
12479         (target_detach): Pass inferior down.  Assert that it is equal to
12480         the current inferior.
12481         * aix-thread.c (aix_thread_detach): Pass inferior down.
12482         * corefile.c (core_file_command): Pass current_inferior() down.
12483         * corelow.c (core_detach): Add inferior parameter.
12484         * darwin-nat.c (darwin_detach): Likewise.
12485         * gnu-nat.c (gnu_detach): Likewise.
12486         * inf-ptrace.c (inf_ptrace_detach): Likewise.
12487         * infcmd.c (detach_command): Pass current_inferior() down to
12488         target_detach.
12489         * infrun.c (follow_fork_inferior): Pass parent_inf to
12490         target_detach.
12491         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
12492         target_detach.
12493         * linux-nat.c (linux_nat_detach): Add inferior parameter.
12494         * linux-thread-db.c (thread_db_detach): Likewise.
12495         * nto-procfs.c (procfs_detach): Likewise.
12496         * procfs.c (procfs_detach): Likewise.
12497         * record.c (record_detach): Likewise.
12498         * record.h (struct inferior): Forward-declare.
12499         (record_detach): Add inferior parameter.
12500         * remote-sim.c (gdbsim_detach): Likewise.
12501         * remote.c (remote_detach_1): Likewise.
12502         (remote_detach): Likewise.
12503         (extended_remote_detach): Likewise.
12504         * sol-thread.c (sol_thread_detach): Likewise.
12505         * target-debug.h (target_debug_print_inferior_p): New macro.
12506         * target-delegates.c: Re-generate.
12507         * top.c (kill_or_detach): Pass inferior down to target_detach.
12508         * windows-nat.c (windows_detach): Add inferior parameter.
12509
12510 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
12511
12512         * target.h (struct target_ops) <to_detach>: Remove args
12513         parameter.
12514         (target_detach): Likewise.
12515         * target.c (dispose_inferior): Adjust.
12516         (target_detach): Remove args parameter, adjust.
12517         * aix-thread.c (aix_thread_detach): Adjust.
12518         * corefile.c (core_file_command): Adjust.
12519         * corelow.c (core_detach): Adjust.
12520         * darwin-nat.c (darwin_detach): Adjust.
12521         * gnu-nat.c (gnu_detach): Adjust.
12522         * inf-ptrace.c (inf_ptrace_detach): Adjust.
12523         * infcmd.c (detach_command): Adjust
12524         * infrun.c (follow_fork_inferior): Adjust.
12525         (handle_vfork_child_exec_or_exit): Adjust.
12526         * linux-fork.c (linux_fork_detach): Remove args parameter.
12527         * linux-fork.h (linux_fork_detach): Likewise.
12528         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
12529         * linux-thread-db.c (thread_db_detach): Likewise.
12530         * nto-procfs.c (procfs_detach): Likewise.
12531         * procfs.c (procfs_detach): Likewise.
12532         (do_detach): Remove signo parameter.
12533         * record.c (record_detach): Remove args parameter.
12534         * record.h (record_detach): Likewise.
12535         * remote-sim.c (gdbsim_detach): Likewise.
12536         * remote.c (remote_detach_1): Likewise.
12537         (remote_detach): Likewise.
12538         (extended_remote_detach): Likewise.
12539         * sol-thread.c (sol_thread_detach): Likewise.
12540         * target-delegates.c: Re-generate.
12541         * top.c (struct qt_args) <args>: Remove field.
12542         (kill_or_detach): Don't pass args.
12543         (quit_force): Don't set args.
12544         * windows-nat.c (windows_detach): Remove args parameter.
12545
12546 2018-01-19  Yao Qi  <yao.qi@linaro.org>
12547
12548         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
12549         (arm_linux_init_abi): Install it.
12550
12551 2018-01-19  Yao Qi  <yao.qi@linaro.org>
12552
12553         * osabi.c (gdb_osabi_names): Extend the regexp for
12554         arm-linux-gnueabihf.
12555
12556 2018-01-18  Yao Qi  <yao.qi@linaro.org>
12557
12558         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
12559         m_abbrevs.
12560         (abbrev_table::add_abbrev): Update.
12561         (abbrev_table::lookup_abbrev): Update.
12562
12563 2018-01-18  Yao Qi  <yao.qi@linaro.org>
12564
12565         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
12566
12567 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
12568
12569         * compile/compile.c (compile_to_object): Convert "triplet_rx"
12570         to "std::string".
12571
12572 2018-01-17  Tom Tromey  <tom@tromey.com>
12573
12574         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
12575
12576 2018-01-17  Tom Tromey  <tom@tromey.com>
12577
12578         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
12579         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
12580         (create_array_type_with_stride): Update.
12581         * dwarf2read.c (set_die_type): Update.
12582
12583 2018-01-17  Tom Tromey  <tom@tromey.com>
12584
12585         * dwarf2read.c (delayed_method_info): Remove typedef.
12586         (dwarf2_cu::method_info): Now a std::vector.
12587         (add_to_method_list): Update.
12588         (free_delayed_list): Remove.
12589         (compute_delayed_physnames): Update.
12590         (process_full_comp_unit, process_full_type_unit): Clear the method
12591         list.  Remove cleanups.
12592         (psymtab_include_file_name): Add name_holder parameter.  Use
12593         unique_xmalloc_ptr.
12594         (dwarf_decode_lines): Update.
12595
12596 2018-01-17  Tom Tromey  <tom@tromey.com>
12597             Simon Marchi  <simon.marchi@ericsson.com>
12598
12599         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
12600         (dwarf2_per_objfile::free_cached_comp_units)
12601         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
12602         (init_cutu_and_read_dies_no_follow): Update.
12603         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
12604         (dwarf2_cu::~dwarf2_cu): New.
12605         (free_heap_comp_unit, free_stack_comp_unit): Remove.
12606         (age_cached_comp_units, free_one_cached_comp_unit): Update.
12607
12608 2018-01-17  Tom Tromey  <tom@tromey.com>
12609             Simon Marchi  <simon.marchi@ericsson.com>
12610
12611         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
12612         (struct die_reader_specs) <abbrev_table>: New member.
12613         (struct abbrev_table): Add constructor.
12614         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
12615         <abbrev_obstack>: Now an auto_obstack.
12616         (abbrev_table_up): New typedef.
12617         (init_cu_die_reader): Add abbrev_table parameter.
12618         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
12619         Add result_dwo_abbrev_table.
12620         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
12621         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
12622         Update.
12623         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
12624         parameter.
12625         (skip_children): Update.
12626         (abbrev_table::alloc_abbrev): Rename from
12627         abbrev_table_alloc_abbrev.
12628         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
12629         (abbrev_table::lookup_abbrev): Rename from
12630         abbrev_table_lookup_abbrev.
12631         (abbrev_table_read_table): Return abbrev_table_up.
12632         (abbrev_table_free, abbrev_table_free_cleanup)
12633         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
12634         (load_partial_dies): Update.
12635
12636 2018-01-17  Tom Tromey  <tom@tromey.com>
12637
12638         * dwarf2read.c (dwarf2_compute_name): Update comment.
12639         (read_func_scope, read_variable): Update.
12640         (new_symbol): Remove.
12641         (new_symbol_full): Rename to new_symbol.
12642
12643 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
12644
12645         PR gdb/16577
12646         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
12647         a warning instead of throwing an error, set section size to 0 and return
12648         NULL.
12649         * gdb_bfd.h (gdb_bfd_map_section): Update description.
12650
12651 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
12652
12653         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
12654         std::string.
12655         (linux_ptrace_attach_fail_reason_string): Likewise.
12656         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
12657         Likewise.
12658         (linux_ptrace_attach_fail_reason_string): Likewise.
12659         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
12660
12661 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
12662
12663         * linux-nat.c (linux_nat_attach): Remove xstrdup.
12664
12665 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
12666
12667         PR gdb/21559
12668         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
12669         checking for fs_base/gs_base fields in struct user_regs_struct.
12670         * configure: Regenerate.
12671
12672 2018-01-17  Yao Qi  <yao.qi@linaro.org>
12673
12674         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
12675         function.
12676         (aarch64_linux_init_abi): Install it to gdbarch hook
12677         gcc_target_options.
12678
12679 2018-01-15  Pedro Alves  <palves@redhat.com>
12680
12681         * common/signals-state-save-restore.c
12682         (save_original_signals_state): Fix typos.
12683
12684 2017-01-12  Tom Tromey  <tom@tromey.com>
12685             Sergio Durigan Junior  <sergiodj@redhat.com>
12686
12687         * Makefile.in (install-only): Install gdb-add-index.
12688
12689 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
12690
12691         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
12692
12693 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12694
12695         * infrun.c (keep_going_pass_signal): Clear step-over info when
12696         insert_breakpoints fails.
12697
12698 2018-01-11  Pedro Alves  <palves@redhat.com>
12699
12700         PR gdb/22583
12701         * infrun.c (resume): Rename to ...
12702         (resume_1): ... this.
12703         (resume): Reimplement as wrapper around resume_1.
12704
12705 2018-01-11  Pedro Alves  <palves@redhat.com>
12706
12707         PR remote/22597
12708         * remote.c (remote_parse_stop_reply): Default to the last-set
12709         general thread instead of to 'magic_null_ptid'.
12710
12711 2018-01-10  Pedro Alves  <palves@redhat.com>
12712
12713         * language.h (language_get_symbol_name_matcher): Rename ...
12714         (get_symbol_name_matcher): ... this.
12715         * language.c (language_get_symbol_name_matcher): Ditto.
12716         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
12717         callers adjusted.
12718
12719 2018-01-10  Pedro Alves  <palves@redhat.com>
12720
12721         PR gdb/22670
12722         * dwarf2read.c
12723         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
12724         Adjust to use language_get_symbol_name_matcher instead of
12725         language_defn::la_get_symbol_name_matcher.
12726         * language.c (language_get_symbol_name_matcher): If in Ada mode
12727         and the lookup name is a verbatim match, return Ada's matcher.
12728         * language.h (language_get_symbol_name_matcher): Adjust comment.
12729         (ada_lookup_name_info::verbatim_p):: New method.
12730
12731 2018-01-10  Pedro Alves  <palves@redhat.com>
12732
12733         PR gdb/22670
12734         * ada-lang.c (ada_collect_symbol_completion_matches): If the
12735         minsym's language is language_auto or language_cplus, pass down
12736         language_ada instead.
12737         * symtab.c (compare_symbol_name): Don't frob symbol language here.
12738
12739 2018-01-10  Pedro Alves  <palves@redhat.com>
12740
12741         PR gdb/22670
12742         * minsyms.c (linkage_name_str): New function.
12743         (iterate_over_minimal_symbols): Use it.
12744
12745 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12746
12747         * NEWS: Document that 'info proc' now works on FreeBSD.
12748
12749 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12750
12751         * configure.ac: Check for kinfo_getfile in libutil.
12752         * configure: Regenerate.
12753         * config.in: Regenerate.
12754         * fbsd-nat.c: Include "fbsd-tdep.h".
12755         (fbsd_fetch_cmdline): New.
12756         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
12757         rather than calling error.
12758         (fbsd_info_proc): New.
12759         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
12760         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
12761         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
12762
12763 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12764
12765         * fbsd-nat.c (struct free_deleter): Remove.
12766         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
12767
12768 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12769
12770         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
12771         NULL for an empty pathname.
12772
12773 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12774
12775         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
12776         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
12777         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
12778         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
12779         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
12780         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
12781         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
12782         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
12783         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
12784         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
12785         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
12786         (fbsd_core_fetch_timeval, fbsd_print_sigset)
12787         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
12788         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
12789         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
12790
12791 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
12792
12793         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
12794         (gnu_xfer_auxv): New function.
12795         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
12796         TARGET_OBJECT_AUXV.
12797
12798 2018-01-08  Yao Qi  <yao.qi@linaro.org>
12799             Simon Marchi  <simon.marchi@ericsson.com>
12800
12801         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
12802         common/selftest.c.
12803         (COMMON_OBS): Remove selftest.o.
12804         * configure.ac: Append selftest-arch.c and common/selftest.c to
12805         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
12806         * configure: Re-generated.
12807         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
12808         GDB_SELF_TEST.
12809         (maintenance_info_selftests): Likewise.
12810
12811 2018-01-08  Xavier Roirand  <roirand@adacore.com>
12812
12813         * ada-valprint.c (val_print_packed_array_elements): Use
12814         proper number of elements when printing an array indexed
12815         by an enumeration type.
12816
12817 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12818
12819         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
12820         (dw2_get_file_names_reader): Adjust.
12821         (lookup_dwo_signatured_type): Adjust.
12822         (lookup_dwp_signatured_type): Adjust.
12823         (lookup_signatured_type): Adjust.
12824         (create_type_unit_group): Adjust.
12825         (get_type_unit_group): Adjust.
12826         (process_psymtab_comp_unit_reader): Adjust.
12827         (build_type_psymtabs_reader): Adjust.
12828         (scan_partial_symbols): Adjust.
12829         (add_partial_symbol): Adjust.
12830         (add_partial_subprogram): Adjust.
12831         (peek_die_abbrev): Adjust.
12832         (fixup_go_packaging): Adjust.
12833         (process_imported_unit_die): Adjust.
12834         (dwarf2_compute_name): Adjust.
12835         (dwarf2_physname): Adjust.
12836         (read_import_statement): Adjust.
12837         (handle_DW_AT_stmt_list): Adjust.
12838         (read_file_scope): Adjust.
12839         (read_func_scope): Adjust.
12840         (read_lexical_block_scope): Adjust.
12841         (read_call_site_scope): Adjust.
12842         (read_variable): Adjust.
12843         (dwarf2_rnglists_process): Adjust.
12844         (dwarf2_ranges_process): Adjust.
12845         (dwarf2_ranges_read): Adjust.
12846         (dwarf2_get_pc_bounds): Adjust.
12847         (dwarf2_record_block_ranges): Adjust.
12848         (dwarf2_add_field): Adjust.
12849         (dwarf2_add_member_fn): Adjust.
12850         (read_structure_type): Adjust.
12851         (process_structure_scope): Adjust.
12852         (read_enumeration_type): Adjust.
12853         (read_array_type): Adjust.
12854         (mark_common_block_symbol_computed): Adjust.
12855         (read_common_block): Adjust.
12856         (read_namespace_type): Adjust.
12857         (read_namespace): Adjust.
12858         (read_module_type): Adjust.
12859         (read_tag_pointer_type): Adjust.
12860         (read_tag_ptr_to_member_type): Adjust.
12861         (read_tag_string_type): Adjust.
12862         (read_subroutine_type): Adjust.
12863         (read_typedef): Adjust.
12864         (read_base_type): Adjust.
12865         (attr_to_dynamic_prop): Adjust.
12866         (read_subrange_type): Adjust.
12867         (read_unspecified_type): Adjust.
12868         (dwarf2_read_abbrevs): Adjust.
12869         (load_partial_dies): Adjust.
12870         (read_partial_die): Adjust.
12871         (find_partial_die): Adjust.
12872         (guess_partial_die_structure_name): Adjust.
12873         (fixup_partial_die): Adjust.
12874         (read_attribute_value): Adjust.
12875         (read_addr_index): Adjust.
12876         (read_addr_index_from_leb128): Adjust.
12877         (read_str_index): Adjust.
12878         (dwarf2_string_attr): Adjust.
12879         (get_debug_line_section): Adjust.
12880         (dwarf_decode_line_header): Adjust.
12881         (lnp_state_machine::check_line_address): Adjust.
12882         (dwarf_decode_lines_1): Adjust.
12883         (dwarf_decode_lines): Adjust.
12884         (dwarf2_start_symtab): Adjust.
12885         (var_decode_location): Adjust.
12886         (new_symbol_full): Adjust.
12887         (dwarf2_const_value_data): Adjust.
12888         (dwarf2_const_value_attr): Adjust.
12889         (dwarf2_const_value): Adjust.
12890         (die_type): Adjust.
12891         (die_containing_type): Adjust.
12892         (build_error_marker_type): Adjust.
12893         (lookup_die_type): Adjust.
12894         (guess_full_die_structure_name): Adjust.
12895         (anonymous_struct_prefix): Adjust.
12896         (determine_prefix): Adjust.
12897         (dwarf2_name): Adjust.
12898         (follow_die_ref_or_sig): Adjust.
12899         (follow_die_offset): Adjust.
12900         (follow_die_ref): Adjust.
12901         (follow_die_sig_1): Adjust.
12902         (follow_die_sig): Adjust.
12903         (get_signatured_type): Adjust.
12904         (get_DW_AT_signature_type): Adjust.
12905         (decode_locdesc): Adjust.
12906         (dwarf_decode_macros): Adjust.
12907         (cu_debug_loc_section): Adjust.
12908         (fill_in_loclist_baton): Adjust.
12909         (dwarf2_symbol_mark_computed): Adjust.
12910         (init_one_comp_unit): Don't assign
12911         dwarf2_cu::dwarf2_per_objfile.
12912         (set_die_type): Adjust.
12913
12914 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
12915
12916         * dwarf2read.c (struct mapped_debug_names): Add constructor.
12917         <dwarf2_per_objfile>: New field.
12918         (dwarf2_per_objfile): Remove global.
12919         (get_dwarf2_per_objfile): New function.
12920         (set_dwarf2_per_objfile): New function.
12921         (dwarf2_build_psymtabs_hard): Change objfile parameter to
12922         dwarf2_per_objfile.
12923         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12924         (read_abbrev_offset): Likewise.
12925         (read_indirect_string): Likewise.
12926         (read_indirect_line_string): Likewise.
12927         (read_indirect_string_at_offset): Likewise.
12928         (read_indirect_string_from_dwz): Likewise.
12929         (dwarf2_find_containing_comp_unit): Change objfile parameter to
12930         dwarf2_per_objfile.
12931         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12932         (create_all_comp_units): Change objfile parameter to
12933         dwarf2_per_objfile.
12934         (create_all_type_units): Likewise.
12935         (process_queue): Add dwarf2_per_objfile parameter.
12936         (read_and_check_comp_unit_head): Likewise.
12937         (lookup_dwo_unit_in_dwp): Likewise.
12938         (get_dwp_file): Likewise.
12939         (process_cu_includes): Likewise.
12940         (struct free_dwo_file_cleanup_data): New struct.
12941         (dwarf2_has_info): Use get_dwarf2_per_objfile and
12942         set_dwarf2_per_objfile.
12943         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
12944         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
12945         context, adjust calls.
12946         (dw2_instantiate_symtab): Likewise.
12947         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
12948         (dw2_get_cu): Likewise.
12949         (create_cu_from_index_list): Change objfile parameter to
12950         dwarf2_per_objfile.
12951         (create_cus_from_index_list): Get dwarf2_per_objfile from
12952         context, adjust calls.
12953         (create_cus_from_index): Likewise.
12954         (create_signatured_type_table_from_index): Change objfile
12955         parameter to dwarf2_per_objfile.
12956         (create_signatured_type_table_from_debug_names): Change objfile
12957         parameter to dwarf2_per_objfile.
12958         (create_addrmap_from_index): Likewise.
12959         (create_addrmap_from_aranges): Likewise.
12960         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
12961         (dw2_setup): Remove.
12962         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
12963         context.
12964         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
12965         get_dwarf2_per_objfile.
12966         (dw2_forget_cached_source_info): Likewise.
12967         (dw2_map_symtabs_matching_filename): Likewise.
12968         (struct dw2_symtab_iterator) <index>: Remove.
12969         <dwarf2_per_objfile>: New field.
12970         (dw2_symtab_iter_init): Replace index parameter with
12971         dwarf2_per_objfile.
12972         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
12973         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
12974         (dw2_print_stats): Likewise.
12975         (dw2_dump): Likewise.
12976         (dw2_expand_symtabs_for_function): Likewise.
12977         (dw2_expand_all_symtabs): Likewise.
12978         (dw2_expand_symtabs_with_fullname): Likewise.
12979         (dw2_expand_marked_cus): Replace index and objfile parameters
12980         with dwarf2_per_objfile.
12981         (dw_expand_symtabs_matching_file_matcher): Add
12982         dwarf2_per_objfile parameter and adjust calls.
12983         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
12984         adjust calls.
12985         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
12986         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
12987         adjust calls.
12988         (create_cus_from_debug_names_list): Replace objfile parameter
12989         with dwarf2_per_objfile and adjust calls.
12990         (create_cus_from_debug_names): Likewise.
12991         (dwarf2_read_debug_names): Likewise.
12992         (mapped_debug_names::namei_to_name): Adjust call.
12993         (dw2_debug_names_iterator::next): Likewise.
12994         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
12995         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
12996         (dw2_debug_names_dump): Likewise.
12997         (dw2_debug_names_expand_symtabs_for_function): Likewise.
12998         (dw2_debug_names_expand_symtabs_matching): Likewise.
12999         (dwarf2_initialize_objfile): Likewise.
13000         (dwarf2_build_psymtabs): Likewise.
13001         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
13002         this_cu.
13003         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
13004         (read_and_check_comp_unit_head): Likewise.
13005         (read_abbrev_offset): Likewise.
13006         (create_debug_type_hash_table): Likewise.
13007         (create_debug_types_hash_table): Likewise.
13008         (create_all_type_units): Replace objfile parameter with
13009         dwarf2_per_objfile.
13010         (add_type_unit): Add dwarf2_per_objfile parameter.
13011         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
13012         with dwarf2_per_objfile.
13013         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
13014         (lookup_dwp_signatured_type): Likewise.
13015         (lookup_signatured_type): Likewise.
13016         (read_cutu_die_from_dwo): Likewise.
13017         (init_tu_and_read_dwo_dies): Likewise.
13018         (init_cutu_and_read_dies): Likewise.
13019         (init_cutu_and_read_dies_no_follow): Likewise.
13020         (allocate_type_unit_groups_table): Add objfile parameter.
13021         (create_type_unit_group): Use dwarf2_per_objfile from cu.
13022         (get_type_unit_group): Likewise.
13023         (process_psymtab_comp_unit): Update call.
13024         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
13025         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
13026         (print_tu_stats): Likewise.
13027         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
13028         in void* parameter.
13029         (build_type_psymtabs): Change objfile parameter to
13030         dwarf2_per_objfile.
13031         (process_skeletonless_type_unit): Use dwarf2_per_objfile
13032         passed in void* parameter.
13033         (process_skeletonless_type_units): Change objfile parameter to
13034         dwarf2_per_objfile.
13035         (set_partial_user): Likewise.
13036         (dwarf2_build_psymtabs_hard): Likewise.
13037         (read_comp_units_from_section): Likewise.
13038         (create_all_comp_units): Likewise.
13039         (scan_partial_symbols): Update calls.
13040         (add_partial_symbol): Likewise.
13041         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
13042         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
13043         (process_queue): Add dwarf2_per_objfile parameter.
13044         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
13045         (compute_compunit_symtab_includes): Likewise.
13046         (process_cu_includes): Add dwarf2_per_objfile parameter.
13047         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
13048         (process_full_type_unit): Likewise.
13049         (process_imported_unit_die): Update call.
13050         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
13051         (read_file_scope): Likewise.
13052         (allocate_dwo_file_hash_table): Add objfile parameter.
13053         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
13054         (create_cus_hash_table): Likewise.
13055         (create_dwp_hash_table): Likewise.
13056         (create_dwo_unit_in_dwp_v1): Likewise.
13057         (create_dwp_v2_section): Likewise.
13058         (create_dwo_unit_in_dwp_v2): Likewise.
13059         (lookup_dwo_unit_in_dwp): Likewise.
13060         (try_open_dwop_file): Likewise.
13061         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
13062         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
13063         cleanup to include a reference to dwarf2_per_objfile.
13064         (open_dwp_file): Add dwarf2_per_objfile parameter.
13065         (open_and_init_dwp_file): Likewise.
13066         (get_dwp_file): Likewise.
13067         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
13068         (queue_and_load_all_dwo_tus): Update call.
13069         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
13070         data.
13071         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
13072         (dwarf2_ranges_process): Likewise.
13073         (dwarf2_get_pc_bounds): Likewise.
13074         (mark_common_block_symbol_computed): Likewise.
13075         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
13076         (dwarf2_read_abbrevs): Update call.
13077         (read_partial_die): Use dwarf2_per_objfile from cu.
13078         (find_partial_die): Likewise.
13079         (fixup_partial_die): Likewise.
13080         (read_attribute_value): Likewise.
13081         (read_indirect_string_at_offset_from): Add objfile parameter.
13082         (read_indirect_string_at_offset): Add dwarf2_per_objfile
13083         parameter.
13084         (read_indirect_string_from_dwz): Add objfile parameter.
13085         (read_indirect_string): Add objfile parameter.
13086         (read_addr_index_1): Add dwarf2_per_objfile parameter.
13087         (read_addr_index): Use dwarf2_per_objfile from cu.
13088         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
13089         call dw2_setup.
13090         (read_str_index): Use dwarf2_per_objfile from cu.
13091         (get_debug_line_section): Likewise.
13092         (read_formatted_entries): Add dwarf2_per_objfile parameter.
13093         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
13094         (new_symbol_full): Use dwarf2_per_objfile from cu.
13095         (build_error_marker_type): Likewise.
13096         (lookup_die_type): Likewise.
13097         (determine_prefix): Likewise.
13098         (follow_die_offset): Likewise.
13099         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
13100         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
13101         (dwarf2_fetch_die_type_sect_off): Likewise.
13102         (dwarf2_get_die_type): Likewise.
13103         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
13104         (get_signatured_type): Likewise.
13105         (get_DW_AT_signature_type): Likewise.
13106         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
13107         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
13108         (cu_debug_loc_section): Likewise.
13109         (fill_in_loclist_baton): Likewise.
13110         (dwarf2_symbol_mark_computed): Likewise.
13111         (dwarf2_find_containing_comp_unit): Change objfile parameter to
13112         dwarf2_per_objfile.
13113         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
13114         parameter.
13115         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
13116         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
13117         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
13118         (set_die_type): Use dwarf2_free_objfile from cu.
13119         (get_die_type_at_offset): Likewise.
13120         (dwarf2_per_objfile_free): Don't assign global variable.
13121         (debug_names) <constructor>: Add dwarf2_per_objfile
13122         parameter, update m_debugstrlookup construction.
13123         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
13124         parameter.
13125         <m_dwarf2_per_objfile>: New field.
13126         <lookup>: Use m_dwarf2_per_objfile.
13127         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
13128         (psyms_seen_size): Likewise.
13129         (write_gdbindex): Replace objfile parameter with
13130         dwarf2_per_objfile.
13131         (write_debug_names): Likewise.
13132         (write_psymtabs_to_index): Likewise.
13133         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
13134         calls.
13135
13136 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
13137
13138         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
13139         <dwarf2_per_objfile>: New field.
13140         (struct dwarf2_per_cu_data) <objfile>: Remove.
13141         <dwarf2_per_objfile>: New field.
13142         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
13143         of objfile.
13144         (create_signatured_type_table_from_index): Likewise.
13145         (create_debug_type_hash_table): Likewise.
13146         (fill_in_sig_entry_from_dwo_entry): Likewise.
13147         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
13148         (create_type_unit_group): Assign dwarf2_per_objfile instead of
13149         objfile.
13150         (create_partial_symtab): Access objfile through
13151         dwarf2_per_objfile.
13152         (process_psymtab_comp_unit_reader): Likewise.
13153         (read_comp_units_from_section): Likewise.
13154         (scan_partial_symbols): Likewise.
13155         (add_partial_symbol): Likewise.
13156         (add_partial_subprogram): Likewise.
13157         (peek_die_abbrev): Likewise.
13158         (fixup_go_packaging): Likewise.
13159         (process_full_comp_unit): Likewise.
13160         (process_full_type_unit): Likewise.
13161         (process_imported_unit_die): Likewise.
13162         (dwarf2_compute_name): Likewise.
13163         (dwarf2_physname): Likewise.
13164         (read_import_statement): Likewise.
13165         (create_cus_hash_table): Assign dwarf2_physname instead of
13166         objfile.
13167         (read_func_scope): Access objfile through dwarf2_per_objfile.
13168         (read_lexical_block_scope): Likewise.
13169         (read_call_site_scope): Likewise.
13170         (read_variable): Likewise.
13171         (dwarf2_rnglists_process): Likewise.
13172         (dwarf2_ranges_process): Likewise.
13173         (dwarf2_ranges_read): Likewise.
13174         (dwarf2_record_block_ranges): Likewise.
13175         (dwarf2_add_field): Likewise.
13176         (dwarf2_add_member_fn): Likewise.
13177         (read_structure_type): Likewise.
13178         (process_structure_scope): Likewise.
13179         (read_enumeration_type): Likewise.
13180         (read_array_type): Likewise.
13181         (read_common_block): Likewise.
13182         (read_namespace_type): Likewise.
13183         (read_namespace): Likewise.
13184         (read_module_type): Likewise.
13185         (read_tag_pointer_type): Likewise.
13186         (read_tag_ptr_to_member_type): Likewise.
13187         (read_tag_string_type): Likewise.
13188         (read_subroutine_type): Likewise.
13189         (read_typedef): Likewise.
13190         (read_base_type): Likewise.
13191         (attr_to_dynamic_prop): Likewise.
13192         (read_subrange_type): Likewise.
13193         (read_unspecified_type): Likewise.
13194         (load_partial_dies): Likewise.
13195         (read_partial_die): Likewise.
13196         (find_partial_die): Likewise.
13197         (guess_partial_die_structure_name): Likewise.
13198         (fixup_partial_die): Likewise.
13199         (read_attribute_value): Likewise.
13200         (read_addr_index_from_leb128): Likewise.
13201         (dwarf2_read_addr_index): Likewise.
13202         (dwarf2_string_attr): Likewise.
13203         (lnp_state_machine::check_line_address): Likewise.
13204         (dwarf_decode_lines_1): Likewise.
13205         (dwarf_decode_lines): Likewise.
13206         (dwarf2_start_symtab): Likewise.
13207         (var_decode_location): Likewise.
13208         (new_symbol_full): Likewise.
13209         (dwarf2_const_value_data): Likewise.
13210         (dwarf2_const_value_attr): Likewise.
13211         (dwarf2_const_value): Likewise.
13212         (die_type): Likewise.
13213         (die_containing_type): Likewise.
13214         (lookup_die_type): Likewise.
13215         (guess_full_die_structure_name): Likewise.
13216         (anonymous_struct_prefix): Likewise.
13217         (dwarf2_name): Likewise.
13218         (follow_die_ref_or_sig): Likewise.
13219         (follow_die_offset): Likewise.
13220         (follow_die_ref): Likewise.
13221         (dwarf2_fetch_die_loc_sect_off): Likewise.
13222         (dwarf2_fetch_constant_bytes): Likewise.
13223         (dwarf2_fetch_die_type_sect_off): Likewise.
13224         (dwarf2_get_die_type): Likewise.
13225         (follow_die_sig): Likewise.
13226         (decode_locdesc): Likewise.
13227         (dwarf2_per_cu_objfile): Likewise.
13228         (dwarf2_per_cu_text_offset): Likewise.
13229         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
13230         objfile.
13231         (set_die_type): Access objfile through
13232         dwarf2_per_objfile.
13233
13234 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
13235
13236         * valprint.c (converted_character_d): Remove typedef.
13237         (DEF_VEC_O (converted_character_d)): Remove.
13238         (count_next_character): Use std::vector.
13239         (print_converted_chars_to_obstack): Likewise.
13240         (generic_printstr): Likewise.
13241
13242 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
13243
13244         * xml-support.h (struct gdb_xml_value): Add constructor.
13245         <value>: Change type to unique_xmalloc_ptr.
13246         (gdb_xml_value_s): Remove typedef.
13247         (DEF_VEC_O (gdb_xml_value_s)): Remove.
13248         (gdb_xml_element_start_handler): Change parameter type to
13249         std::vector.
13250         (xml_find_attribute): Likewise.
13251         * xml-support.c (xml_find_attribute): Change parameter type to
13252         std::vector and adjust.
13253         (gdb_xml_values_cleanup): Remove.
13254         (gdb_xml_parser::start_element): Adjust to std::vector.
13255         (xinclude_start_include): Change paraeter type to std::vector
13256         and adjust.
13257         * btrace.c (check_xml_btrace_version): Likewise.
13258         (parse_xml_btrace_block): Likewise.
13259         (parse_xml_btrace_pt_config_cpu): Likewise.
13260         (parse_xml_btrace_pt): Likewise.
13261         (parse_xml_btrace_conf_bts): Likewise.
13262         (parse_xml_btrace_conf_pt): Likewise.
13263         * memory-map.c (memory_map_start_memory): Likewise.
13264         (memory_map_start_property): Likewise.
13265         * osdata.c (osdata_start_osdata): Likewise.
13266         (osdata_start_item): Likewise.
13267         (osdata_start_column): Likewise.
13268         * remote.c (start_thread): Likewise.
13269         * solib-aix.c (library_list_start_library): Likewise.
13270         (library_list_start_list): Likewise.
13271         * solib-svr4.c (library_list_start_library): Likewise.
13272         (svr4_library_list_start_list): Likewise.
13273         * solib-target.c (library_list_start_segment): Likewise.
13274         (library_list_start_section): Likewise.
13275         (library_list_start_library): Likewise.
13276         (library_list_start_list): Likewise.
13277         * tracepoint.c (traceframe_info_start_memory): Likewise.
13278         (traceframe_info_start_tvar): Likewise.
13279         * xml-syscall.c (syscall_start_syscall): Likewise.
13280         * xml-tdesc.c (tdesc_start_target): Likewise.
13281         (tdesc_start_feature): Likewise.
13282         (tdesc_start_reg): Likewise.
13283         (tdesc_start_union): Likewise.
13284         (tdesc_start_struct): Likewise.
13285         (tdesc_start_flags): Likewise.
13286         (tdesc_start_enum): Likewise.
13287         (tdesc_start_field): Likewise.
13288         (tdesc_start_enum_value): Likewise.
13289         (tdesc_start_vector): Likewise.
13290
13291 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
13292
13293         * extension.h (struct xmethod_worker) <clone>: Remove.
13294         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
13295         Remove.
13296         (python_xmethod_worker::clone): Remove.
13297         * valops.c (find_overload_match): Use std::move instead of
13298         clone.
13299
13300 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
13301
13302         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
13303         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
13304         <free_xmethod_worker_data>: Remove.
13305         <get_matching_xmethod_workers>: Chance VEC to std::vector.
13306         <get_xmethod_arg_types>: Remove.
13307         <get_xmethod_result_type>: Remove.
13308         <invoke_xmethod>: Remove.
13309         * extension.c (new_xmethod_worker): Remove.
13310         (clone_xmethod_worker): Remove.
13311         (get_matching_xmethod_workers): Return void, pass std::vector by
13312         pointer.
13313         (get_xmethod_arg_types): Rename to...
13314         (xmethod_worker::get_arg_types): ... this, and adjust.
13315         (get_xmethod_result_type): Rename to...
13316         (xmethod_worker::get_result_type): ... this, and adjust.
13317         (invoke_xmethod): Remove.
13318         (free_xmethod_worker): Remove.
13319         (free_xmethod_worker_vec): Remove.
13320         * extension.h (enum ext_lang_rc): Move here from
13321         extension-priv.h.
13322         (struct xmethod_worker): Add constructor and destructor.
13323         <data>: Remove.
13324         <value>: Remove.
13325         <invoke, clone, do_get_result_type, do_get_arg_types>: New
13326         virtual pure methods.
13327         <get_arg_types, get_result_type>: New methods.
13328         (xmethod_worker_ptr): Remove typedef.
13329         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
13330         (xmethod_worker_vec): Remove typedef.
13331         (xmethod_worker_up): New typedef.
13332         (invoke_xmethod): Remove.
13333         (clone_xmethod_worker): Remove.
13334         (free_xmethod_worker): Remove.
13335         (free_xmethod_worker_vec): Remove.
13336         (get_xmethod_arg_types): Remove.
13337         (get_xmethod_result_type): Remove.
13338         * valops.c (find_method_list): Use std::vector, don't use
13339         intermediate vector.
13340         (value_find_oload_method_list): Use std::vector.
13341         (find_overload_match): Use std::vector.
13342         (find_oload_champ): Use std::vector.
13343         * value.c (value_free): Use operator delete.
13344         (value_of_xmethod): Rename to...
13345         (value_from_xmethod): ... this.  Don't assign
13346         xmethod_worker::value, take rvalue-reference.
13347         (result_type_of_xmethod): Adjust.
13348         (call_xmethod): Adjust.
13349         * value.h: Include extension.h.
13350         (struct xmethod_worker): Don't forward-declare.
13351         (value_of_xmethod): Rename to...
13352         (value_from_xmethod): ... this, take rvalue-reference.
13353         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
13354         (struct python_xmethod_worker): ... this, add constructor and
13355         destructor.
13356         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
13357         (gdbpy_free_xmethod_worker_data): Rename to...
13358         (python_xmethod_worker::~python_xmethod_worker): ... this and
13359         adjust.
13360         (gdbpy_clone_xmethod_worker_data): Rename to...
13361         (python_xmethod_worker::clone): ... this and adjust.
13362         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
13363         temporary vector.
13364         (gdbpy_get_xmethod_arg_types): Rename to...
13365         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
13366         (gdbpy_get_xmethod_result_type): Rename to...
13367         (python_xmethod_worker::do_get_result_type): ... this and
13368         adjust.
13369         (gdbpy_invoke_xmethod): Rename to...
13370         (python_xmethod_worker::invoke): ... this and adjust.
13371         (new_python_xmethod_worker): Rename to...
13372         (python_xmethod_worker::python_xmethod_worker): ... this and
13373         adjust.
13374         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
13375         Remove.
13376         (gdbpy_free_xmethod_worker_data): Remove.
13377         (gdbpy_get_matching_xmethod_workers): Use std::vector.
13378         (gdbpy_get_xmethod_arg_types): Remove.
13379         (gdbpy_get_xmethod_result_type): Remove.
13380         (gdbpy_invoke_xmethod): Remove.
13381         * python/python.c (python_extension_ops): Remove obsolete
13382         callbacks.
13383
13384 2018-01-05  Pedro Alves  <palves@redhat.com>
13385
13386         PR gdb/18653
13387         * common/signals-state-save-restore.c
13388         (save_original_signals_state): New parameter 'quiet'.  Warn if we
13389         find a custom handler preinstalled, instead of internal erroring.
13390         But only warn if !quiet.
13391         * common/signals-state-save-restore.h
13392         (save_original_signals_state): New parameter 'quiet'.
13393         * main.c (captured_main_1): Move save_original_signals_state call
13394         after option handling, and pass QUIET.
13395
13396 2018-01-05  Pedro Alves  <palves@redhat.com>
13397
13398         * spu-tdep.c (spu_catch_start): Pass
13399         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
13400
13401 2018-01-05  Pedro Alves  <palves@redhat.com>
13402
13403         PR gdb/22670
13404         * ada-lang.c (literal_symbol_name_matcher): New function.
13405         (ada_get_symbol_name_matcher): Use it for
13406         symbol_name_match_type::SEARCH_NAME.
13407         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
13408         it down instead of assuming symbol_name_match_type::FULL.
13409         * block.h (block_lookup_symbol): New parameter 'match_type'.
13410         * c-valprint.c (print_unpacked_pointer): Use
13411         lookup_symbol_search_name instead of lookup_symbol.
13412         * compile/compile-object-load.c (get_out_value_type): Pass down
13413         symbol_name_match_type::SEARCH_NAME.
13414         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
13415         symbol_name_match_type::FULL.
13416         * cp-support.c (cp_get_symbol_name_matcher): Handle
13417         symbol_name_match_type::SEARCH_NAME.
13418         * infrun.c (insert_exception_resume_breakpoint): Use
13419         lookup_symbol_search_name.
13420         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
13421         * psymtab.c (maintenance_check_psymtabs): Use
13422         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
13423         * stack.c (print_frame_args): Use lookup_symbol_search_name and
13424         SYMBOL_SEARCH_NAME.
13425         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
13426         if symbol_name_match_type::SEARCH_NAME.
13427         (lookup_symbol_in_language): Pass down
13428         symbol_name_match_type::FULL.
13429         (lookup_symbol_search_name): New.
13430         (lookup_language_this): Pass down
13431         symbol_name_match_type::SEARCH_NAME.
13432         (lookup_symbol_aux, lookup_local_symbol): New parameter
13433         'match_type'.  Pass it down.
13434         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
13435         (lookup_symbol_search_name): New declaration.
13436         (lookup_symbol_in_block): New 'match_type' parameter.
13437
13438 2018-01-05  Pedro Alves  <palves@redhat.com>
13439
13440         PR gdb/22670
13441         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
13442         ada_lookup_symbol.
13443         (ada_lookup_symbol): Reimplement in terms of
13444         ada_lookup_symbol_list, bits factored out from
13445         ada_lookup_encoded_symbol.
13446
13447 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
13448
13449         * ada-exp.y (write_object_renaming): When subscripting an array
13450         using a symbol as the index, pass the block in call to
13451         ada_lookup_encoded_symbol when looking that symbol up.
13452
13453 2018-01-05  Jerome Guitton  <guitton@adacore.com>
13454
13455         * ada-lang.c (ada_array_length): Use ada_index_type instead of
13456         TYPE_INDEX_TYPE.
13457
13458 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
13459
13460         * ada-lang.c (ada_to_fixed_value_create): Add handling of
13461         the case where VALUE_LVAL (val0) is not lval_memory.
13462
13463 2018-01-05  Xavier Roirand  <roirand@adacore.com>
13464
13465         * ada-valprint.c (print_optional_low_bound): Handle
13466         character-indexed array printing like boolean-indexed array
13467         printing.
13468
13469 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
13470
13471         * NEWS: Create a new section for the next release branch.
13472         Rename the section of the current branch, now that it has
13473         been cut.
13474
13475 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
13476
13477         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
13478         * version.in: Bump version to 8.1.50.DATE-git.
13479
13480 2018-01-03  Xavier Roirand  <roirand@adacore.com>
13481
13482         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
13483         Add field.
13484         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
13485         Add field.
13486         (default_exception_support_info) <catch_handlers_sym>: Add field.
13487         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
13488         (ada_exception_name_addr_1): Add "catch handlers" handling.
13489         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
13490         Update all callers.
13491         (create_excep_cond_exprs) <ex>: Add parameter.
13492         (re_set_exception): Update create_excep_cond_exprs call.
13493         (print_it_exception, print_one_exception, print_mention_exception)
13494         (print_recreate_exception): Add "catch handler" handling.
13495         (allocate_location_catch_handlers, re_set_catch_handlers)
13496         (check_status_catch_handlers, print_it_catch_handlers)
13497         (print_one_catch_handlers, print_mention_catch_handlers)
13498         (print_recreate_catch_handlers): New function.
13499         (catch_handlers_breakpoint_ops): New variable.
13500         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
13501         Add parameter.  Add "catch handler" handling.
13502         (ada_exception_sym_name, ada_exception_breakpoint_ops):
13503         Add "catch handler" handling.
13504         (ada_exception_catchpoint_cond_string): Add "catch handler"
13505         handling.
13506         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
13507         call.
13508         (catch_ada_handlers_command): New function.
13509         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
13510         operations structure.
13511         (_initialize_ada_language): Add "catch handlers" command entry.
13512         * NEWS: Document "catch handlers" feature.
13513
13514 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
13515
13516         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
13517         account when creating the array type of the slice.
13518         (ada_value_slice): Likewise.
13519
13520 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
13521
13522         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
13523         New enum value.
13524         (create_array_type_with_stride): Add byte_stride_prop parameter.
13525         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
13526         New parameter.  Update all callers in this file.
13527         (array_type_has_dynamic_stride): New function.
13528         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
13529         of arrays with dynamic byte strides.
13530         * dwarf2read.c (read_array_type): Add support for dynamic
13531         DW_AT_byte_stride attributes.
13532
13533 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
13534
13535         * dwarf2read.c (read_unspecified_type): Treat
13536         DW_TAG_enumeration_type DIEs from Ada units as stubs.
13537
13538 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
13539
13540         Update copyright year range in all GDB files.
13541
13542 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
13543
13544         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
13545         and gdb/testsuite/gdb.base/step-line.c.
13546
13547 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
13548
13549         * copyright.py (main): Dump the contents of
13550         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
13551         even if BY_HAND is empty.
13552
13553 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
13554
13555         * top.c (print_gdb_version): Update Copyright year in version
13556         message.
13557
13558 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
13559
13560         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
13561
13562 For older changes see ChangeLog-2017.
13563 \f
13564 Local Variables:
13565 mode: change-log
13566 left-margin: 8
13567 fill-column: 74
13568 version-control: never
13569 coding: utf-8
13570 End: