Remove release_stop_context_cleanup
[external/binutils.git] / gdb / ChangeLog
1 2018-09-17  Tom Tromey  <tom@tromey.com>
2
3         * infrun.c (struct stop_context): Declare constructor,
4         destructor, "changed" method.
5         (stop_context::stop_context): Rename from save_stop_context.
6         (stop_context::~stop_context): Rename from
7         release_stop_context_cleanup.
8         (normal_stop): Update.
9         (stop_context::changed): Rename from stop_context_changed.  Return
10         bool.
11
12 2018-09-17  Tom Tromey  <tom@tromey.com>
13
14         * inferior.h (struct infcall_suspend_state_deleter): New.
15         (infcall_suspend_state_up): New typedef.
16         (struct infcall_control_state_deleter): New.
17         (infcall_control_state_up): New typedef.
18         (make_cleanup_restore_infcall_suspend_state)
19         (make_cleanup_restore_infcall_control_state): Don't declare.
20         * infcall.c (call_function_by_hand_dummy): Update.
21         * infrun.c (do_restore_infcall_suspend_state_cleanup)
22         (make_cleanup_restore_infcall_suspend_state): Remove.
23         (do_restore_infcall_control_state_cleanup)
24         (make_cleanup_restore_infcall_control_state): Remove.
25
26 2018-09-17  Tom Tromey  <tom@tromey.com>
27
28         * gdbthread.h (struct thread_control_state): Add initializer.
29         (class thread_info) <control>: Remove initializer.
30         * inferior.h (struct inferior_control_state): Add initializer.
31         (class inferior) <control>: Remove initializer.
32         (exit_inferior_1): Update.
33         * infrun.c (struct infcall_control_state): Add constructors.
34         (save_infcall_control_state): Use new.
35         (restore_infcall_control_state, discard_infcall_control_state):
36         Use delete.
37
38 2018-09-17  Tom Tromey  <tom@tromey.com>
39
40         * infrun.c (struct infcall_suspend_state) <registers>: Now a
41         unique_ptr.
42         <siginfo_data>: Now a unique_xmalloc_ptr.
43         (save_infcall_suspend_state, restore_infcall_suspend_state)
44         (discard_infcall_suspend_state)
45         (get_infcall_suspend_state_regcache): Update.
46
47 2018-09-17  Tom Tromey  <tom@tromey.com>
48
49         * gdbthread.h (struct thread_suspend_state): Add initializers.
50         (class thread_info) <suspend>: Remove initializer.
51         * infrun.c (struct infcall_suspend_state): Add initializers.
52         (save_infcall_suspend_state): Use new.
53         (discard_infcall_suspend_state): Use delete.
54
55 2018-09-16  Tom Tromey  <tom@tromey.com>
56
57         * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
58         Remove.
59         * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
60         rvalue reference.  Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
61         (py_varobj_iter_new): Likewise.
62         (py_varobj_get_iterator): Use gdbpy_ref.
63
64 2018-09-16  Tom Tromey  <tom@tromey.com>
65
66         * python/py-threadevent.c (py_get_event_thread): Simplify.
67         * python/py-inferior.c (infpy_thread_from_thread_handle):
68         Return immediately after calling thread_to_thread_object.  Use
69         Py_RETURN_NONE.
70         (thread_to_thread_object): Set the exception on a NULL return.
71
72 2018-09-16  Simon Marchi  <simon.marchi@polymtl.ca>
73
74         * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
75
76 2018-09-16  Tom Tromey  <tom@tromey.com>
77
78         * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
79         Remove.
80
81 2018-09-16  Tom Tromey  <tom@tromey.com>
82
83         * python/python-internal.h (thread_to_thread_object): Change
84         return type.
85         * python/py-inferior.c (thread_to_thread_object): Return a new
86         reference.
87         (infpy_thread_from_thread_handle): Update.
88         * python/py-infthread.c (gdbpy_selected_thread): Update.
89         * python/py-stopevent.c (create_stop_event_object): Update.
90         * python/py-threadevent.c (py_get_event_thread): Return a new
91         reference.
92         (py_get_event_thread): Update.
93         * python/py-event.h (py_get_event_thread): Change return type.
94         * python/py-continueevent.c (create_continue_event_object):
95         Update.
96
97 2018-09-16  Tom Tromey  <tom@tromey.com>
98
99         * python/py-progspace.c (pspy_get_objfiles): Update.
100         * python/python-internal.h (objfile_to_objfile_object): Change
101         return type.
102         * python/py-newobjfileevent.c (create_new_objfile_event_object):
103         Update.
104         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
105         Update.
106         * python/python.c (gdbpy_get_current_objfile): Update.
107         (gdbpy_objfiles): Update.
108         * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
109         Update.
110         (objfile_to_objfile_object): Return a new reference.
111         * python/py-symtab.c (stpy_get_objfile): Update.
112         * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
113         Update.
114
115 2018-09-16  Tom Tromey  <tom@tromey.com>
116
117         * python/py-inferior.c (infpy_get_progspace): Update.
118         * python/python-internal.h (pspace_to_pspace_object): Change
119         return type.
120         * python/py-newobjfileevent.c
121         (create_clear_objfiles_event_object): Update.
122         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
123         Update.
124         * python/python.c (gdbpy_get_current_progspace): Update.
125         (gdbpy_progspaces): Update.
126         * python/py-progspace.c (pspace_to_pspace_object): Return a new
127         reference.
128         * python/py-objfile.c (objfpy_get_progspace): Update.
129         * python/py-prettyprint.c (find_pretty_printer_from_progspace):
130         Update.
131
132 2018-09-16  Tom Tromey  <tom@tromey.com>
133
134         * python/lib/gdb/__init__.py (current_progspace, objfiles)
135         (solib_name, block_for_pc, find_pc_line): New functions.
136         (execute_unwinders): Update.
137         * python/py-block.c (gdbpy_block_for_pc): Remove.
138         * python/py-inferior.c (infpy_get_progspace): New function.
139         (inferior_object_getset) <progspace>: Add.
140         * python/py-progspace.c (pspy_objfiles): Rewrite.
141         (pspy_solib_name, pspy_block_for_pc)
142         (pspy_find_pc_line, pspy_is_valid): New functions.
143         (progspace_object_methods): Add entries for solib_name,
144         block_for_pc, find_pc_line, is_valid.
145         * python/python-internal.h (gdbpy_block_for_pc)
146         (build_objfiles_list): Don't declare.
147         * python/python.c: Don't include solib.h.
148         (gdbpy_solib_name, gdbpy_find_pc_line)
149         (gdbpy_get_current_progspace, build_objfiles_list)
150         (gdbpy_objfiles): Remove.
151         (GdbMethods) <current_progspace, objfiles, block_for_pc,
152         solib_name, find_pc_line>: Remove entries.
153
154 2018-09-16  Tom Tromey  <tom@tromey.com>
155
156         * top.c (new_ui_command): Use GNU style for metasyntactic
157         variables.
158         * breakpoint.c (stopat_command): Use GNU style for metasyntactic
159         variables.
160         * maint.c (maintenance_translate_address): Remove "<>" around
161         text.
162         * interps.c (interpreter_exec_cmd): Use GNU style for
163         metasyntactic variables.
164         * nto-procfs.c (nto_procfs_target_info): Use GNU style for
165         metasyntactic variables.
166         * tracepoint.c (tfind_range_command): Use GNU style for
167         metasyntactic variables.
168         (tfind_outside_command): Likewise.
169         (_initialize_tracepoint): Likewise.
170         * remote.c (extended_remote_target::create_inferior): Use GNU
171         style for metasyntactic variables.
172         * sparc64-tdep.c (adi_examine_command): Use GNU style for
173         metasyntactic variables.
174         (adi_assign_command): Likewise.
175
176 2018-09-16  Tom Tromey  <tom@tromey.com>
177
178         * disasm.c (show_disassembler_options_sfunc): Use GNU style for
179         metasyntactic variables.  Print message if no disassembler options
180         are available.
181
182 2018-09-15  Tom Tromey  <tom@tromey.com>
183
184         * infcmd.c (get_inferior_args): Return const char *.
185         * inferior.h (get_inferior_args): Return type now const.
186         * linux-tdep.c (linux_fill_prpsinfo): Update.
187         * procfs.c (procfs_target::make_corefile_notes): Update.
188
189 2018-09-07  Tom Tromey  <tom@tromey.com>
190
191         * python/python.c (execute_gdb_command): Call bpstat_do_actions
192         inside the TRY.
193
194 2018-09-14  Sandra Loosemore  <sandra@codesourcery.com>
195
196         * nios2-tdep.c (nios2_type_align): New.
197         (nios2_gdb_arch_init): Install type_align hook.
198
199 2018-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
200
201         * eval.c (fake_method::fake_method): Call xzalloc directly for a
202         type that is neither object file owned, nor gdbarch owned.
203         * gdbtypes.c (get_type_gdbarch): Add an assert that returned
204         gdbarch is non-NULL.
205         (alloc_type_instance): Allocate non-objfile owned types on the
206         gdbarch obstack.
207         (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
208         using TYPE_ALLOC to ensure memory is allocated on the correct
209         obstack.
210         * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
211         obstack, or the gdbarch obstack.
212         (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
213
214 2018-09-14  Tom Tromey  <tom@tromey.com>
215
216         * infcall.c (call_function_by_hand_dummy): Remove unnecessary
217         block.
218
219 2018-09-14  Tom Tromey  <tom@tromey.com>
220
221         * nat/fork-inferior.c (get_startup_shell): Remove "static".
222
223 2018-09-13  Tom Tromey  <tom@tromey.com>
224
225         * python/py-inferior.c (infpy_thread_from_thread_handle): Now
226         static.
227
228 2018-09-13  Tom Tromey  <tom@tromey.com>
229
230         * exec.c (try_open_exec_file): Use std::string.
231
232 2018-09-13  Tom Tromey  <tom@tromey.com>
233
234         * utils.h (gdb_bfd_errmsg): Return std::string.
235         * exec.c (exec_file_attach): Update.
236         * compile/compile-object-load.c (compile_object_load): Update.
237         * utils.c (gdb_bfd_errmsg): Return std::string.
238
239 2018-09-13  Tom Tromey  <tom@tromey.com>
240
241         * procfs.c (struct procinfo_deleter): New.
242         (procinfo_up): New typedef.
243         (do_destroy_procinfo_cleanup): Remove.
244         (procfs_target::info_proc): Use procinfo_up.  Remove cleanups.
245
246 2018-09-13  Tom Tromey  <tom@tromey.com>
247
248         * source.c (add_path): Use gdb::unique_xmalloc_ptr.
249
250 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
251 2018-09-13  Tom Tromey  <tom@tromey.com>
252
253         * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
254         (pspy_get_objfiles): New function.
255         (progspace_object_methods): New.
256         (pspace_object_type): Add tp_methods callback.
257         * python/python-internal.h (build_objfiles_list): New
258         declaration.
259         * python/python.c (build_objfiles_list): New function.
260         (gdbpy_objfiles): Implement using build_objfiles_list.
261         * NEWS: Mention the Progspace.objfiles method.
262
263 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
264
265         * python/py-inferior.c (infpy_get_progspace): New function.
266         (inferior_object_getset): Add progspace property.
267         * NEWS: Mention the new property.
268
269 2018-09-13  Tom Tromey  <tom@tromey.com>
270
271         PR rust/23650:
272         * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
273
274 2018-09-13  Tom Tromey  <tom@tromey.com>
275
276         PR rust/23626:
277         * rust-lang.c (rust_enum_variant): Now static.
278         (rust_empty_enum_p): New function.
279         (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
280         Handle empty enum.
281
282 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
283
284         * python/py-inferior.c (infpy_repr): New.
285         (inferior_object_type): Register infpy_repr.
286         * python/py-objfile.c (objfpy_repr): New.
287         (objfile_object_type): Register objfpy_repr.
288
289 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
290
291         * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
292
293 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
294
295         * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
296         typo.
297
298 2018-09-12  Sergio Durigan Junior  <sergiodj@redhat.com>
299
300         * common/common-utils.c: Don't include '<sys/stat.h>'.
301         (is_regular_file): Move to...
302         * common/filestuff.c (is_regular_file): ... here.
303         * common/common-utils.h (is_regular_file): Move to...
304         * common/filestuff.h (is_regular_file): ... here.
305
306 2018-09-12  Simon Marchi  <simon.marchi@ericsson.com>
307
308         * skip.c (debug_skip): New variable.
309         (skiplist_entry::do_skip_file_p): Add debug output.
310         (skiplist_entry::do_skip_gfile_p): Likewise.
311         (skiplist_entry::skip_function_p): Likewise.
312         (_initialize_step_skip): Create debug command.
313         * NEWS: Mention set/show debug skip.
314
315 2018-09-11  Xavier Roirand  <roirand@adacore.com>
316
317         * darwin-nat.c (should_disable_startup_with_shell):
318         New function.
319         (darwin_nat_target::create_inferior): Add call.
320
321 2018-09-11  Xavier Roirand  <roirand@adacore.com>
322
323         * darwin-nat.h (struct darwin_thread_info) <gdb_port,
324         inf_port, msg_state>: Initialize.
325         (struct darwin_thread_info) <signaled, single_step>: Change
326         type and initialize.
327         (struct darwin_thread_info) <event>: Initialize.
328
329 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
330
331         PR gdb/23555
332         PR gdb/23558
333         * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
334         guesses.
335
336 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
337
338         Revert:
339         2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
340
341         PR gdb/23555
342         PR gdb/23558
343         * gnulib/aclocal.m4: Regenerate.
344         * gnulib/config.in: Regenerate.
345         * gnulib/configure: Regenerate.
346         * gnulib/import/Makefile.am: Update.
347         * gnulib/import/Makefile.in: Update.
348         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
349         * gnulib/import/_Noreturn.h: ... this.
350         * gnulib/import/alloca.in.h: Update.
351         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
352         * gnulib/import/arg-nonnull.h: ... this.
353         * gnulib/import/assure.h: Update.
354         * gnulib/import/at-func.c: Update.
355         * gnulib/import/basename-lgpl.c: Update.
356         * gnulib/import/extra/snippet/c++defs.h: Rename to...
357         * gnulib/import/c++defs.h: ... this.
358         * gnulib/import/canonicalize-lgpl.c: Update.
359         * gnulib/import/cdefs.h: Update.
360         * gnulib/import/chdir-long.c: Update.
361         * gnulib/import/chdir-long.h: Update.
362         * gnulib/import/cloexec.c: Update.
363         * gnulib/import/cloexec.h: Update.
364         * gnulib/import/close.c: Update.
365         * gnulib/import/closedir.c: Update.
366         * gnulib/import/config.charset: Update.
367         * gnulib/import/dirent-private.h: Update.
368         * gnulib/import/dirent.in.h: Update.
369         * gnulib/import/dirfd.c: Update.
370         * gnulib/import/dirname-lgpl.c: Update.
371         * gnulib/import/dirname.h: Update.
372         * gnulib/import/dosname.h: Update.
373         * gnulib/import/dup-safer-flag.c: Update.
374         * gnulib/import/dup-safer.c: Update.
375         * gnulib/import/dup.c: Update.
376         * gnulib/import/dup2.c: Update.
377         * gnulib/import/errno.in.h: Update.
378         * gnulib/import/error.c: Update.
379         * gnulib/import/error.h: Update.
380         * gnulib/import/exitfail.c: Update.
381         * gnulib/import/exitfail.h: Update.
382         * gnulib/import/extra/update-copyright: Update.
383         * gnulib/import/fchdir.c: Update.
384         * gnulib/import/fcntl.c: Update.
385         * gnulib/import/fcntl.in.h: Update.
386         * gnulib/import/fd-hook.c: Update.
387         * gnulib/import/fd-hook.h: Update.
388         * gnulib/import/fd-safer-flag.c: Update.
389         * gnulib/import/fd-safer.c: Update.
390         * gnulib/import/fdopendir.c: Update.
391         * gnulib/import/filename.h: Update.
392         * gnulib/import/filenamecat-lgpl.c: Update.
393         * gnulib/import/filenamecat.h: Update.
394         * gnulib/import/flexmember.h: Update.
395         * gnulib/import/float+.h: Update.
396         * gnulib/import/float.c: Update.
397         * gnulib/import/float.in.h: Update.
398         * gnulib/import/fnmatch.c: Update.
399         * gnulib/import/fnmatch.in.h: Update.
400         * gnulib/import/fnmatch_loop.c: Update.
401         * gnulib/import/fpucw.h: Update.
402         * gnulib/import/frexp.c: Update.
403         * gnulib/import/frexpl.c: Update.
404         * gnulib/import/fstat.c: Update.
405         * gnulib/import/fstatat.c: Update.
406         * gnulib/import/getcwd-lgpl.c: Update.
407         * gnulib/import/getcwd.c: Update.
408         * gnulib/import/getdtablesize.c: Update.
409         * gnulib/import/getlogin_r.c: Update.
410         * gnulib/import/getprogname.c: Update.
411         * gnulib/import/getprogname.h: Update.
412         * gnulib/import/gettext.h: Update.
413         * gnulib/import/gettimeofday.c: Update.
414         * gnulib/import/glob-libc.h: Update.
415         * gnulib/import/glob.c: Update.
416         * gnulib/import/glob.in.h: Update.
417         * gnulib/import/glob_internal.h: Update.
418         * gnulib/import/glob_pattern_p.c: Update.
419         * gnulib/import/globfree.c: Update.
420         * gnulib/import/hard-locale.c: Update.
421         * gnulib/import/hard-locale.h: Update.
422         * gnulib/import/intprops.h: Update.
423         * gnulib/import/inttypes.in.h: Update.
424         * gnulib/import/isnan.c: Update.
425         * gnulib/import/isnand-nolibm.h: Update.
426         * gnulib/import/isnand.c: Update.
427         * gnulib/import/isnanl-nolibm.h: Update.
428         * gnulib/import/isnanl.c: Update.
429         * gnulib/import/itold.c: Update.
430         * gnulib/import/libc-config.h: Update.
431         * gnulib/import/limits.in.h: Update.
432         * gnulib/import/localcharset.c: Update.
433         * gnulib/import/localcharset.h: Update.
434         * gnulib/import/localtime-buffer.c: Update.
435         * gnulib/import/localtime-buffer.h: Update.
436         * gnulib/import/lstat.c: Update.
437         * gnulib/import/m4/00gnulib.m4: Update.
438         * gnulib/import/m4/__inline.m4: Update.
439         * gnulib/import/m4/absolute-header.m4: Update.
440         * gnulib/import/m4/alloca.m4: Update.
441         * gnulib/import/m4/builtin-expect.m4: Update.
442         * gnulib/import/m4/canonicalize.m4: Update.
443         * gnulib/import/m4/chdir-long.m4: Update.
444         * gnulib/import/m4/close.m4: Update.
445         * gnulib/import/m4/closedir.m4: Update.
446         * gnulib/import/m4/configmake.m4: Update.
447         * gnulib/import/m4/d-ino.m4: Update.
448         * gnulib/import/m4/d-type.m4: Update.
449         * gnulib/import/m4/dirent_h.m4: Update.
450         * gnulib/import/m4/dirfd.m4: Update.
451         * gnulib/import/m4/dirname.m4: Update.
452         * gnulib/import/m4/double-slash-root.m4: Update.
453         * gnulib/import/m4/dup.m4: Update.
454         * gnulib/import/m4/dup2.m4: Update.
455         * gnulib/import/m4/eealloc.m4: Update.
456         * gnulib/import/m4/environ.m4: Update.
457         * gnulib/import/m4/errno_h.m4: Update.
458         * gnulib/import/m4/error.m4: Update.
459         * gnulib/import/m4/exponentd.m4: Update.
460         * gnulib/import/m4/exponentl.m4: Update.
461         * gnulib/import/m4/extensions.m4: Update.
462         * gnulib/import/m4/extern-inline.m4: Update.
463         * gnulib/import/m4/fchdir.m4: Update.
464         * gnulib/import/m4/fcntl-o.m4: Update.
465         * gnulib/import/m4/fcntl.m4: Update.
466         * gnulib/import/m4/fcntl_h.m4: Update.
467         * gnulib/import/m4/fdopendir.m4: Update.
468         * gnulib/import/m4/filenamecat.m4: Update.
469         * gnulib/import/m4/flexmember.m4: Update.
470         * gnulib/import/m4/float_h.m4: Update.
471         * gnulib/import/m4/fnmatch.m4: Update.
472         * gnulib/import/m4/fnmatch_h.m4: Update.
473         * gnulib/import/m4/fpieee.m4: Update.
474         * gnulib/import/m4/frexp.m4: Update.
475         * gnulib/import/m4/frexpl.m4: Update.
476         * gnulib/import/m4/fstat.m4: Update.
477         * gnulib/import/m4/fstatat.m4: Update.
478         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
479         * gnulib/import/m4/getcwd-path-max.m4: Update.
480         * gnulib/import/m4/getcwd.m4: Update.
481         * gnulib/import/m4/getdtablesize.m4: Update.
482         * gnulib/import/m4/getlogin.m4: Update.
483         * gnulib/import/m4/getlogin_r.m4: Update.
484         * gnulib/import/m4/getpagesize.m4: Update.
485         * gnulib/import/m4/getprogname.m4: Update.
486         * gnulib/import/m4/gettimeofday.m4: Update.
487         * gnulib/import/m4/glibc21.m4: Update.
488         * gnulib/import/m4/glob.m4: Update.
489         * gnulib/import/m4/glob_h.m4: Update.
490         * gnulib/import/m4/gnulib-cache.m4: Update.
491         * gnulib/import/m4/gnulib-common.m4: Update.
492         * gnulib/import/m4/gnulib-comp.m4: Update.
493         * gnulib/import/m4/gnulib-tool.m4: Update.
494         * gnulib/import/m4/hard-locale.m4: Update.
495         * gnulib/import/m4/include_next.m4: Update.
496         * gnulib/import/m4/inttypes-pri.m4: Update.
497         * gnulib/import/m4/inttypes.m4: Update.
498         * gnulib/import/m4/isnand.m4: Update.
499         * gnulib/import/m4/isnanl.m4: Update.
500         * gnulib/import/m4/largefile.m4: Update.
501         * gnulib/import/m4/limits-h.m4: Update.
502         * gnulib/import/m4/localcharset.m4: Update.
503         * gnulib/import/m4/locale-fr.m4: Update.
504         * gnulib/import/m4/locale-ja.m4: Update.
505         * gnulib/import/m4/locale-zh.m4: Update.
506         * gnulib/import/m4/localtime-buffer.m4: Update.
507         * gnulib/import/m4/longlong.m4: Update.
508         * gnulib/import/m4/lstat.m4: Update.
509         * gnulib/import/m4/malloc.m4: Update.
510         * gnulib/import/m4/malloca.m4: Update.
511         * gnulib/import/m4/math_h.m4: Update.
512         * gnulib/import/m4/mbrtowc.m4: Update.
513         * gnulib/import/m4/mbsinit.m4: Update.
514         * gnulib/import/m4/mbsrtowcs.m4: Update.
515         * gnulib/import/m4/mbstate_t.m4: Update.
516         * gnulib/import/m4/memchr.m4: Update.
517         * gnulib/import/m4/memmem.m4: Update.
518         * gnulib/import/m4/mempcpy.m4: Update.
519         * gnulib/import/m4/memrchr.m4: Update.
520         * gnulib/import/m4/mkdir.m4: Update.
521         * gnulib/import/m4/mkstemp.m4: Update.
522         * gnulib/import/m4/mmap-anon.m4: Update.
523         * gnulib/import/m4/mode_t.m4: Update.
524         * gnulib/import/m4/msvc-inval.m4: Update.
525         * gnulib/import/m4/msvc-nothrow.m4: Update.
526         * gnulib/import/m4/multiarch.m4: Update.
527         * gnulib/import/m4/nocrash.m4: Update.
528         * gnulib/import/m4/off_t.m4: Update.
529         * gnulib/import/m4/onceonly.m4: Update.
530         * gnulib/import/m4/open-cloexec.m4: Update.
531         * gnulib/import/m4/open.m4: Update.
532         * gnulib/import/m4/openat.m4: Update.
533         * gnulib/import/m4/opendir.m4: Update.
534         * gnulib/import/m4/pathmax.m4: Update.
535         * gnulib/import/m4/rawmemchr.m4: Update.
536         * gnulib/import/m4/readdir.m4: Update.
537         * gnulib/import/m4/readlink.m4: Update.
538         * gnulib/import/m4/realloc.m4: Update.
539         * gnulib/import/m4/rename.m4: Update.
540         * gnulib/import/m4/rewinddir.m4: Update.
541         * gnulib/import/m4/rmdir.m4: Update.
542         * gnulib/import/m4/save-cwd.m4: Update.
543         * gnulib/import/m4/secure_getenv.m4: Update.
544         * gnulib/import/m4/setenv.m4: Update.
545         * gnulib/import/m4/signal_h.m4: Update.
546         * gnulib/import/m4/ssize_t.m4: Update.
547         * gnulib/import/m4/stat-time.m4: Update.
548         * gnulib/import/m4/stat.m4: Update.
549         * gnulib/import/m4/std-gnu11.m4: Update.
550         * gnulib/import/m4/stdbool.m4: Update.
551         * gnulib/import/m4/stddef_h.m4: Update.
552         * gnulib/import/m4/stdint.m4: Update.
553         * gnulib/import/m4/stdio_h.m4: Update.
554         * gnulib/import/m4/stdlib_h.m4: Update.
555         * gnulib/import/m4/strchrnul.m4: Update.
556         * gnulib/import/m4/strdup.m4: Update.
557         * gnulib/import/m4/strerror.m4: Update.
558         * gnulib/import/m4/string_h.m4: Update.
559         * gnulib/import/m4/strstr.m4: Update.
560         * gnulib/import/m4/strtok_r.m4: Update.
561         * gnulib/import/m4/sys_socket_h.m4: Update.
562         * gnulib/import/m4/sys_stat_h.m4: Update.
563         * gnulib/import/m4/sys_time_h.m4: Update.
564         * gnulib/import/m4/sys_types_h.m4: Update.
565         * gnulib/import/m4/tempname.m4: Update.
566         * gnulib/import/m4/time_h.m4: Update.
567         * gnulib/import/m4/unistd-safer.m4: Update.
568         * gnulib/import/m4/unistd_h.m4: Update.
569         * gnulib/import/m4/warn-on-use.m4: Update.
570         * gnulib/import/m4/wchar_h.m4: Update.
571         * gnulib/import/m4/wchar_t.m4: Update.
572         * gnulib/import/m4/wctype_h.m4: Update.
573         * gnulib/import/m4/wint_t.m4: Update.
574         * gnulib/import/malloc.c: Update.
575         * gnulib/import/malloc/scratch_buffer.h: Update.
576         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
577         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
578         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
579         * gnulib/import/malloca.c: Update.
580         * gnulib/import/malloca.h: Update.
581         * gnulib/import/malloca.valgrind: Update.
582         * gnulib/import/math.in.h: Update.
583         * gnulib/import/mbrtowc.c: Update.
584         * gnulib/import/mbsinit.c: Update.
585         * gnulib/import/mbsrtowcs-impl.h: Update.
586         * gnulib/import/mbsrtowcs-state.c: Update.
587         * gnulib/import/mbsrtowcs.c: Update.
588         * gnulib/import/memchr.c: Update.
589         * gnulib/import/memmem.c: Update.
590         * gnulib/import/mempcpy.c: Update.
591         * gnulib/import/memrchr.c: Update.
592         * gnulib/import/mkdir.c: Update.
593         * gnulib/import/mkstemp.c: Update.
594         * gnulib/import/msvc-inval.c: Update.
595         * gnulib/import/msvc-inval.h: Update.
596         * gnulib/import/msvc-nothrow.c: Update.
597         * gnulib/import/msvc-nothrow.h: Update.
598         * gnulib/import/open.c: Update.
599         * gnulib/import/openat-die.c: Update.
600         * gnulib/import/openat-priv.h: Update.
601         * gnulib/import/openat-proc.c: Update.
602         * gnulib/import/openat.c: Update.
603         * gnulib/import/openat.h: Update.
604         * gnulib/import/opendir.c: Update.
605         * gnulib/import/pathmax.h: Update.
606         * gnulib/import/pipe-safer.c: Update.
607         * gnulib/import/rawmemchr.c: Update.
608         * gnulib/import/readdir.c: Update.
609         * gnulib/import/readlink.c: Update.
610         * gnulib/import/realloc.c: Update.
611         * gnulib/import/ref-add.sin: Update.
612         * gnulib/import/ref-del.sin: Update.
613         * gnulib/import/rename.c: Update.
614         * gnulib/import/rewinddir.c: Update.
615         * gnulib/import/rmdir.c: Update.
616         * gnulib/import/same-inode.h: Update.
617         * gnulib/import/save-cwd.c: Update.
618         * gnulib/import/save-cwd.h: Update.
619         * gnulib/import/scratch_buffer.h: Update.
620         * gnulib/import/secure_getenv.c: Update.
621         * gnulib/import/setenv.c: Update.
622         * gnulib/import/signal.in.h: Update.
623         * gnulib/import/stat-time.c: Update.
624         * gnulib/import/stat-time.h: Update.
625         * gnulib/import/stat-w32.c: Update.
626         * gnulib/import/stat-w32.h: Update.
627         * gnulib/import/stat.c: Update.
628         * gnulib/import/stdbool.in.h: Update.
629         * gnulib/import/stddef.in.h: Update.
630         * gnulib/import/stdint.in.h: Update.
631         * gnulib/import/stdio.in.h: Update.
632         * gnulib/import/stdlib.in.h: Update.
633         * gnulib/import/str-two-way.h: Update.
634         * gnulib/import/strchrnul.c: Update.
635         * gnulib/import/strdup.c: Update.
636         * gnulib/import/streq.h: Update.
637         * gnulib/import/strerror-override.c: Update.
638         * gnulib/import/strerror-override.h: Update.
639         * gnulib/import/strerror.c: Update.
640         * gnulib/import/string.in.h: Update.
641         * gnulib/import/stripslash.c: Update.
642         * gnulib/import/strnlen1.c: Update.
643         * gnulib/import/strnlen1.h: Update.
644         * gnulib/import/strstr.c: Update.
645         * gnulib/import/strtok_r.c: Update.
646         * gnulib/import/sys_stat.in.h: Update.
647         * gnulib/import/sys_time.in.h: Update.
648         * gnulib/import/sys_types.in.h: Update.
649         * gnulib/import/tempname.c: Update.
650         * gnulib/import/tempname.h: Update.
651         * gnulib/import/time.in.h: Update.
652         * gnulib/import/unistd--.h: Update.
653         * gnulib/import/unistd-safer.h: Update.
654         * gnulib/import/unistd.in.h: Update.
655         * gnulib/import/unsetenv.c: Update.
656         * gnulib/import/verify.h: Update.
657         * gnulib/import/extra/snippet/warn-on-use.h: Update.
658         * gnulib/import/wchar.in.h: Update.
659         * gnulib/import/wctype.in.h: Update.
660         * gnulib/import/xalloc-oversized.h: Update.
661         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
662         "53e2c179f26a890fa6685af4b6c1397ee370433b".
663
664 2018-09-10  Simon Marchi  <simon.marchi@ericsson.com>
665
666         * record-btrace.c (get_thread_current_frame): Remove
667         old_inferior_ptid.
668
669 2018-09-10  Jerome Guitton  <guitton@adacore.com>
670
671         * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
672         with check_tag to 1 if and only if the type is tagged and the
673         component being searched cannot been found in the current
674         view. Otherwise, always call ada_to_fixed_type with
675         check_tag to 0.
676
677 2018-09-10  Xavier Roirand  <roirand@adacore.com>
678
679         * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
680         declaration.
681         * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
682         * ada-varobj.c (ada_varobj_get_number_of_children,
683         ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
684
685 2018-09-10  Xavier Roirand  <roirand@adacore.com>
686
687         * ada-valprint.c (ada_value_print): Use type instead of
688         enclosing type.
689
690 2018-09-10  Xavier Roirand  <roirand@adacore.com>
691
692         * ada-lang.c (ada_value_subscript): Handle case when parameter is
693         an array of access to unconstrained array.
694
695 2018-09-10  Xavier Roirand  <roirand@adacore.com>
696
697         * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
698         (ada_check_typedef): Use it.
699
700 2018-09-10  Xavier Roirand  <roirand@adacore.com>
701
702         * ada-varobj.c (ada_varobj_describe_struct_child)
703         (ada_varobj_describe_child): Handle union case like struct one.
704
705 2018-09-10  Tom Tromey  <tom@tromey.com>
706
707         PR python/18380:
708         * python/python.c (_initialize_python): Make example in "python"
709         help work in Python 3.
710
711 2018-09-10  Eli Zaretskii  <eliz@gnu.org>
712
713         * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
714         INSTALL_PROGRAM to install gdb-add-index.sh.  Don't append
715         $(EXEEXT) to the script, as it is not a program.
716
717 2018-09-09  Simon Marchi  <simon.marchi@ericsson.com>
718
719         * python/py-prettyprint.c (pretty_print_one_value): Return
720         gdbpy_ref<>.
721         (print_string_repr): Adjust.
722         (apply_varobj_pretty_printer): Return gdbpy_ref<>.
723         * python/python-internal.h (apply_varobj_pretty_printer): Return
724         gdbpy_ref<>.
725         * varobj.c (varobj_value_get_print_value): Adjust.
726
727 2018-09-08  Tom Tromey  <tom@tromey.com>
728
729         PR python/16047:
730         * python/py-prettyprint.c (pretty_print_one_value): Check for
731         to_string method.
732
733 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
734
735         * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
736         replace_operator_with_call.
737
738 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
739
740         * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
741
742 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
743
744         * ada-typeprint.c (print_range): Print the bounds using TYPE
745         rather than its TYPE_TARGET_TYPE.
746
747 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
748
749         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
750         call to ada_to_fixed_value_create.
751
752 2018-09-08  Jerome Guitton  <guitton@adacore.com>
753
754         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
755
756 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
757
758         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
759         by calls to error.
760
761 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
762
763         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
764         Move update of loop variable "fi".
765
766 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
767
768         * ada-lang.c (value_assign_to_component): In the case of
769         big-endian targets, extract the bits of the given VAL
770         using an src_offset of zero if container is not a scalar.
771
772 2018-09-06  Simon Ser  <contact@emersion.fr>
773
774         PR gdb/23105
775         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
776         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
777         * fbsd-tdep.c (fbsd_make_note_desc): New.
778         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
779         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
780         * target.h (enum target_object) Add FreeBSD-specific
781         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
782
783 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
784
785         * compile/compile-c.h (generate_c_for_variable_locations):
786         Change reference to pointer.
787         * compile/compile-c-support.c (compile_program) <compute>:
788         Likewise.
789         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
790         (generate_c_for_for_one_variable): Likewise
791         (generate_c_for_variable_locations): Likewise
792         * compile/compile-c-types.c (compile_c_instance::convert_type):
793         Likewise
794         * compile/compile-cplus-symbols.c (convert_one_symbol):
795         std::move the scope passed to enter_scope.
796         * compile/compile-cplus-types.c
797         (compile_cplus_instance::enter_scope): Make parameter
798         rvalue-reference.
799         (compile_cplus_instance::new_scope): Change reference to
800         pointer.
801         (compile_cplus_instance::convert_type): Likewise
802         (compile_cplus_convert_typedef): std::move the scope passed to
803         enter_scope.
804         (compile_cplus_convert_struct_or_union): Likewise.
805         (compile_cplus_convert_enum): Likewise.
806         (compile_cplus_convert_namespace): Likewise.
807         * compile/compile-cplus.h (compile_cplus_instance)
808         <enter_scope>: Make parameter rvalue-reference.
809         * compile/compile-internal.h (compile_instance)
810         <get_cached_type>: Likewise
811         * compile/compile-loc2c.c (push): Likewise
812         (pushf): Likewise
813         (unary): Likewise
814         (binary): Likewise
815         (print_label): Likewise
816         (pushf_register_address): Likewise
817         (pushf_register): Likewise
818         (do_compile_dwarf_expr_to_c): Likewise
819         (compile_dwarf_expr_to_c): Likewise
820         (compile_dwarf_bounds_to_c): Likewise
821         * compile/compile.c (compile_instance::get_cached_type):
822         Likewise
823         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
824         (compile_dwarf_bounds_to_c): Likewise
825         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
826         (dwarf2_compile_property_to_c): Likewise
827         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
828         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
829         Likewise
830
831 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
832
833         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
834         * tui/tui-data.c (init_content_element): Don't initialize it.
835
836 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
837
838         * tui/tui-data.h (struct tui_win_info)
839         <detail::opaque>: Remove.
840         * tui/tui-data.c (init_win_info): Remove assignment.
841
842 2018-09-05  Tom Tromey  <tom@tromey.com>
843
844         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
845         -Wformat-nonliteral.
846         * target-float.c (host_float_ops<T>::to_string)
847         (host_float_ops<T>::from_string): Use
848         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
849         * configure: Rebuild.
850
851 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
852
853         * printcmd.c (printf_c_string): Use
854         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
855         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
856
857 2018-09-05  Tom Tromey  <tom@tromey.com>
858
859         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
860
861 2018-09-05  Tom de Vries  <tdevries@suse.de>
862
863         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
864         with resolve_abstract_p == true.
865         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
866         defaulting to false. Propagate resolve_abstract_p to
867         dwarf2_fetch_die_loc_sect_off.
868         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
869         parameter, defaulting to false.
870         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
871         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
872         parameter.
873         * dwarf2read.h (struct die_info): Forward-declare.
874         (die_info_ptr): New typedef.
875         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
876
877 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
878
879         GDB 8.2 released.
880
881 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
882             Pedro Alves  <palves@redhat.com>
883
884         * gnulib/Makefile.in (aclocal_m4_deps): Move to
885         "aclocal-m4-deps.mk".  Include file here.
886         $(srcdir)/aclocal.m4: Add "configure.ac".
887         * gnulib/aclocal-m4-deps.mk: New file.
888         * gnulib/update-gnulib.sh: Automatically update
889         "aclocal-m4-deps.mk".
890
891 2018-09-04  Tom Tromey  <tom@tromey.com>
892
893         * configure: Rebuild.
894         * configure.ac: Remove multi-ice code.
895
896 2018-09-04  Tom Tromey  <tom@tromey.com>
897
898         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
899         (ada-exp.o): Update.
900
901 2018-09-04  Tom Tromey  <tom@tromey.com>
902
903         * Makefile.in (printcmd.o, target-float.o): Remove.
904         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
905
906 2018-09-04  Tom Tromey  <tom@tromey.com>
907
908         * gnulib/Makefile.in: Remove obsolete comment.
909         * Makefile.in: Remove obsolete comment.
910
911 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
912
913         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
914         line with '+'.
915
916 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
917
918         * riscv-tdep.c: Add 'prologue-value.h' include.
919         (struct riscv_unwind_cache): New struct.
920         (riscv_debug_unwinder): New global.
921         (riscv_scan_prologue): Update arguments, capture register details
922         from prologue scan.
923         (riscv_skip_prologue): Reformat arguments line, move end of
924         prologue calculation into riscv_scan_prologue.
925         (riscv_frame_cache): Update return type, create
926         riscv_unwind_cache, scan the prologue, and fill in remaining cache
927         details.
928         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
929         (riscv_frame_prev_register): Use the trad_frame within the
930         riscv_unwind_cache.
931         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
932         flag.
933
934 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
935
936         * trad-frame.h (trad_frame_set_realreg): Declare.
937         (trad_frame_set_addr): Declare.
938         * trad-frame.c (trad_frame_set_realreg): Define new function.
939         (trad_frame_set_addr): Define new function.
940         (trad_frame_set_reg_realreg): Use new function.
941         (trad_frame_set_reg_addr): Use new function.
942
943 2018-09-01  Keith Seitz  <keiths@redhat.com>
944
945         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
946         pulongest instead of "%lld".
947         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
948         ATTRIBUTE_UNUSED.
949
950 2018-08-31  Tom Tromey  <tom@tromey.com>
951
952         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
953         variant part type.
954
955 2018-08-31  Pedro Alves  <palves@redhat.com>
956
957         * gdbarch.h: Regenerate.
958
959 2018-08-31  Pedro Alves  <palves@redhat.com>
960
961         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
962         * target.h (Hardware watchpoint interfaces): Describe
963         continuable/steppable/non-steppable watchpoints.
964         * gdbarch.h, gdbarch.c: Regenerate.
965
966 2018-08-31  Pedro Alves  <palves@redhat.com>
967
968         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
969         Delete.
970         * s390-linux-nat.c
971         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
972         * target.h (target_ops::have_continuable_watchpoint): Delete.
973         (target_have_continuable_watchpoint): Delete.
974         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
975         * target-delegates.c: Regenerate.
976
977 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
978
979         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
980         the files present in "gnulib/import/m4/".
981
982 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
983
984         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
985         c.sw, c.swsp, and c.sdsp.
986
987 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
988
989         * riscv-tdep.c (struct riscv_inferior_data): Delete.
990         (riscv_read_misa_reg): Don't cache value read into inferior data.
991         (riscv_new_inferior_data): Delete.
992         (riscv_inferior_data_cleanup): Delete.
993         (riscv_inferior_data): Delete.
994         (riscv_invalidate_inferior_data): Delete.
995         (_initialize_riscv_tdep): Remove initialisation of inferior data.
996
997 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
998
999         * compile/compile-cplus-types.c
1000         (compile_cplus_instance::leave_scope): Take the address of scope
1001         object.
1002         (compile_cplus_instance::convert_qualified_base): Compare quals
1003         to 0.
1004
1005 2018-08-30  Keith Seitz  <keiths@redhat.com>
1006
1007         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
1008         Use "%s" and host_address_to_string instead of "%p" in printf.
1009
1010 2018-08-29  Keith Seitz  <keiths@redhat.com>
1011
1012         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
1013         and compile-cplus-types.c.
1014         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
1015         * c-lang.c (cplus_language_defn): Set C++ compile functions.
1016         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
1017         Declare.
1018         * compile/compile-c-support.c: Include compile-cplus.h.
1019         (load_libcompile): Templatize.
1020         (get_compile_context): "New" function.
1021         (c_get_compile_context): Use get_compile_context.
1022         (cplus_get_compile_context): New function.
1023         (cplus_push_user_expression, cplus_pop_user_expression)
1024         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
1025         (cplus_compute_program): Define new structs/functions.
1026         * compile/compile-cplus-symmbols.c: New file.
1027         * compile/compile-cplus-types.c: New file.
1028         * compile/compile-cplus.h: New file.
1029         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
1030         Declare.
1031         * compile/compile-object-load.c (get_out_value_type): Use
1032         strncmp_iw when comparing symbol names.
1033         (compile_object_load): Add mst_bss and mst_data.
1034         * compile/compile.c (_initialize_compile): Remove
1035         -Wno-implicit-function-declaration from `compile_args'.
1036         * compile/gcc-cp-plugin.h: New file.
1037         * NEWS: Mention C++ compile support and new debug options.
1038
1039 2018-08-29  Keith Seitz  <keiths@redhat.com>
1040
1041         * linespec.c (collect_info::add_symbol): Make virtual.
1042         (struct symbol_searcher_collect_info): New struct.
1043         (symbol_searcher::find_all_symbols): New method.
1044         * symtab.h (class symbol_searcher): New class.
1045
1046 2018-08-29  Keith Seitz  <keiths@redhat.com>
1047
1048         * linespec.c (struct linespec) <function_symbols, label_symbols>:
1049         Change to vector of block_symbol.  Update all users.
1050         (struct collect_info) <symbols>: Likewise.
1051         (collect_info::add_symbol): Take block_symbol as argument.
1052         Update all callers.
1053         (decode_compound_collector) <m_symbols>: Change type to vector
1054         of block_symbol.  Update all users.
1055         (decode_compound_collector::operator ()): Change parameter type
1056         to block_symbol.
1057         (find_method, find_function_symbols, find_linespec_symbols)
1058         (find_label_symbols_in_block, find_label_symbols): Change symbol
1059         vectors to block_symbol vectors.
1060         * symtab.h (symbol_found_callback_ftype): Change parameter type to
1061         block_symbol.
1062
1063 2018-08-29  Keith Seitz  <keiths@redhat.com>
1064
1065         * linespec.c (symbolp): Remove typedef and VEC definitions.
1066         (bound_minimal_symbol_d): Likewise.
1067
1068 2018-08-29  Keith Seitz  <keiths@redhat.com>
1069
1070         * linespec.c (decode_compound_collector::decode_compound_collector):
1071         Remove initialization for `m_symtabs'.
1072         (decode_compound_collector::release_symbols): Change return type
1073         to std::vector.  Update all callers.
1074         (class decode_compound_collector) <m_symbols>: Change type to
1075         std::vector.
1076         (lookup_prefix_sym): Change return type to std::vector.  Update all
1077         callers.
1078         (compare_symbols): Remove.
1079         (std_compare_symbols): Rename to `compare_symbols'.
1080         (find_method): Change `sym_classes' parameter to std::vector.
1081         Update all callers.  Use std::sort to sort sym_classes.
1082         (find_linespec_symbols): Remove cleanup.
1083
1084 2018-08-29  Keith Seitz  <keiths@redhat.com>
1085
1086         * linespec.c (struct linespec) <minimal_symbols>: Change type to
1087         std::vector.  Update all users.
1088         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
1089         (struct collect_info) <minimal_symbols>: Likewise.
1090         (compare_msymbols): Return bool.  Change parameters to const
1091         bound_minimal_symbol references.
1092         (find_method, find_function_symbols, find_linespec_symbols): Change
1093         `minsyms' parameter to std::vector.  Update all callers.
1094
1095 2018-08-29  Keith Seitz  <keiths@redhat.com>
1096
1097         * linespec.c (struct linespec) <label_symbols>: Change type to
1098         std::vector.  Update all users.
1099         (find_label_symbols_in_block): Change `result' parameter to
1100         std::vector.  Update all callers.
1101         (find_label_symbols): Return std::vector.  Update all callers.
1102
1103 2018-08-29  Keith Seitz  <keiths@redhat.com>
1104
1105         * linespec.c (struct linespec) <function_symbols>: Change type to
1106         std::vector.  Update all users.
1107         (struct collect_info) <function_symbols>: Likewise.
1108         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
1109         (std_compare_symbols): New function.
1110         (find_method, find_function_symbols, find_linespec_symbols)
1111         (find_label_symbols_in_block): Change `symbols' parameter to
1112         std::vector.  Update all callers.
1113         (find_label_symbols): Likewise for `function_symbols' and
1114         `label_funcs_ret'.
1115
1116 2018-08-29  Keith Seitz  <keiths@redhat.com>
1117
1118         * linespec.c (symtab_vector_up): Define.
1119         (struct linespec) <file_symtabs>: Change type to std::vector *.
1120         Update all uses.
1121         (struct collect_info) <file_symtabs>: Likewise.
1122         (collect_symtabs_from_filename): Return symtab_vector_up.
1123         Update all callers.
1124         (decode_objc): Remove cleanup.
1125         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
1126         (symtab_collector::release_symtabs): Return symtab_vector_up.
1127         Update all callers.
1128         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
1129         Update all users.
1130         (collect_symtabs_from_filename, symtabs_from_filename): Return
1131         symtab_vector_up.  Update all callers.
1132
1133 2018-08-29  Tom Tromey  <tom@tromey.com>
1134
1135         * csky-tdep.c (csky_analyze_prologue): Use
1136         core_addr_to_string_nz.
1137
1138 2018-08-29  Tom Tromey  <tom@tromey.com>
1139
1140         * windows-nat.c (struct xlate_exception) <them>: Change type to
1141         DWORD.
1142         (xlate): Fix formatting.  Remove last entry.
1143         (struct xlate_exception, xlate): Comment out.
1144         (windows_nat_target::resume): Use ranged for.
1145
1146 2018-08-29  Jim Wilson  <jimw@sifive.com>
1147
1148         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
1149         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
1150         of NT_PRFPREG.
1151         (riscv_linux_nat_target::store_registers): Likewise.
1152
1153 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
1154
1155         PR gdb/23555
1156         PR gdb/23558
1157         * gnulib/aclocal.m4: Regenerate.
1158         * gnulib/config.in: Regenerate.
1159         * gnulib/configure: Regenerate.
1160         * gnulib/import/Makefile.am: Update.
1161         * gnulib/import/Makefile.in: Update.
1162         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
1163         * gnulib/import/_Noreturn.h: ... this.
1164         * gnulib/import/alloca.in.h: Update.
1165         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
1166         * gnulib/import/arg-nonnull.h: ... this.
1167         * gnulib/import/assure.h: Update.
1168         * gnulib/import/at-func.c: Update.
1169         * gnulib/import/basename-lgpl.c: Update.
1170         * gnulib/import/extra/snippet/c++defs.h: Rename to...
1171         * gnulib/import/c++defs.h: ... this.
1172         * gnulib/import/canonicalize-lgpl.c: Update.
1173         * gnulib/import/cdefs.h: Update.
1174         * gnulib/import/chdir-long.c: Update.
1175         * gnulib/import/chdir-long.h: Update.
1176         * gnulib/import/cloexec.c: Update.
1177         * gnulib/import/cloexec.h: Update.
1178         * gnulib/import/close.c: Update.
1179         * gnulib/import/closedir.c: Update.
1180         * gnulib/import/config.charset: Update.
1181         * gnulib/import/dirent-private.h: Update.
1182         * gnulib/import/dirent.in.h: Update.
1183         * gnulib/import/dirfd.c: Update.
1184         * gnulib/import/dirname-lgpl.c: Update.
1185         * gnulib/import/dirname.h: Update.
1186         * gnulib/import/dosname.h: Update.
1187         * gnulib/import/dup-safer-flag.c: Update.
1188         * gnulib/import/dup-safer.c: Update.
1189         * gnulib/import/dup.c: Update.
1190         * gnulib/import/dup2.c: Update.
1191         * gnulib/import/errno.in.h: Update.
1192         * gnulib/import/error.c: Update.
1193         * gnulib/import/error.h: Update.
1194         * gnulib/import/exitfail.c: Update.
1195         * gnulib/import/exitfail.h: Update.
1196         * gnulib/import/extra/update-copyright: Update.
1197         * gnulib/import/fchdir.c: Update.
1198         * gnulib/import/fcntl.c: Update.
1199         * gnulib/import/fcntl.in.h: Update.
1200         * gnulib/import/fd-hook.c: Update.
1201         * gnulib/import/fd-hook.h: Update.
1202         * gnulib/import/fd-safer-flag.c: Update.
1203         * gnulib/import/fd-safer.c: Update.
1204         * gnulib/import/fdopendir.c: Update.
1205         * gnulib/import/filename.h: Update.
1206         * gnulib/import/filenamecat-lgpl.c: Update.
1207         * gnulib/import/filenamecat.h: Update.
1208         * gnulib/import/flexmember.h: Update.
1209         * gnulib/import/float+.h: Update.
1210         * gnulib/import/float.c: Update.
1211         * gnulib/import/float.in.h: Update.
1212         * gnulib/import/fnmatch.c: Update.
1213         * gnulib/import/fnmatch.in.h: Update.
1214         * gnulib/import/fnmatch_loop.c: Update.
1215         * gnulib/import/fpucw.h: Update.
1216         * gnulib/import/frexp.c: Update.
1217         * gnulib/import/frexpl.c: Update.
1218         * gnulib/import/fstat.c: Update.
1219         * gnulib/import/fstatat.c: Update.
1220         * gnulib/import/getcwd-lgpl.c: Update.
1221         * gnulib/import/getcwd.c: Update.
1222         * gnulib/import/getdtablesize.c: Update.
1223         * gnulib/import/getlogin_r.c: Update.
1224         * gnulib/import/getprogname.c: Update.
1225         * gnulib/import/getprogname.h: Update.
1226         * gnulib/import/gettext.h: Update.
1227         * gnulib/import/gettimeofday.c: Update.
1228         * gnulib/import/glob-libc.h: Update.
1229         * gnulib/import/glob.c: Update.
1230         * gnulib/import/glob.in.h: Update.
1231         * gnulib/import/glob_internal.h: Update.
1232         * gnulib/import/glob_pattern_p.c: Update.
1233         * gnulib/import/globfree.c: Update.
1234         * gnulib/import/hard-locale.c: Update.
1235         * gnulib/import/hard-locale.h: Update.
1236         * gnulib/import/intprops.h: Update.
1237         * gnulib/import/inttypes.in.h: Update.
1238         * gnulib/import/isnan.c: Update.
1239         * gnulib/import/isnand-nolibm.h: Update.
1240         * gnulib/import/isnand.c: Update.
1241         * gnulib/import/isnanl-nolibm.h: Update.
1242         * gnulib/import/isnanl.c: Update.
1243         * gnulib/import/itold.c: Update.
1244         * gnulib/import/libc-config.h: Update.
1245         * gnulib/import/limits.in.h: Update.
1246         * gnulib/import/localcharset.c: Update.
1247         * gnulib/import/localcharset.h: Update.
1248         * gnulib/import/localtime-buffer.c: Update.
1249         * gnulib/import/localtime-buffer.h: Update.
1250         * gnulib/import/lstat.c: Update.
1251         * gnulib/import/m4/00gnulib.m4: Update.
1252         * gnulib/import/m4/__inline.m4: Update.
1253         * gnulib/import/m4/absolute-header.m4: Update.
1254         * gnulib/import/m4/alloca.m4: Update.
1255         * gnulib/import/m4/builtin-expect.m4: Update.
1256         * gnulib/import/m4/canonicalize.m4: Update.
1257         * gnulib/import/m4/chdir-long.m4: Update.
1258         * gnulib/import/m4/close.m4: Update.
1259         * gnulib/import/m4/closedir.m4: Update.
1260         * gnulib/import/m4/configmake.m4: Update.
1261         * gnulib/import/m4/d-ino.m4: Update.
1262         * gnulib/import/m4/d-type.m4: Update.
1263         * gnulib/import/m4/dirent_h.m4: Update.
1264         * gnulib/import/m4/dirfd.m4: Update.
1265         * gnulib/import/m4/dirname.m4: Update.
1266         * gnulib/import/m4/double-slash-root.m4: Update.
1267         * gnulib/import/m4/dup.m4: Update.
1268         * gnulib/import/m4/dup2.m4: Update.
1269         * gnulib/import/m4/eealloc.m4: Update.
1270         * gnulib/import/m4/environ.m4: Update.
1271         * gnulib/import/m4/errno_h.m4: Update.
1272         * gnulib/import/m4/error.m4: Update.
1273         * gnulib/import/m4/exponentd.m4: Update.
1274         * gnulib/import/m4/exponentl.m4: Update.
1275         * gnulib/import/m4/extensions.m4: Update.
1276         * gnulib/import/m4/extern-inline.m4: Update.
1277         * gnulib/import/m4/fchdir.m4: Update.
1278         * gnulib/import/m4/fcntl-o.m4: Update.
1279         * gnulib/import/m4/fcntl.m4: Update.
1280         * gnulib/import/m4/fcntl_h.m4: Update.
1281         * gnulib/import/m4/fdopendir.m4: Update.
1282         * gnulib/import/m4/filenamecat.m4: Update.
1283         * gnulib/import/m4/flexmember.m4: Update.
1284         * gnulib/import/m4/float_h.m4: Update.
1285         * gnulib/import/m4/fnmatch.m4: Update.
1286         * gnulib/import/m4/fnmatch_h.m4: Update.
1287         * gnulib/import/m4/fpieee.m4: Update.
1288         * gnulib/import/m4/frexp.m4: Update.
1289         * gnulib/import/m4/frexpl.m4: Update.
1290         * gnulib/import/m4/fstat.m4: Update.
1291         * gnulib/import/m4/fstatat.m4: Update.
1292         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
1293         * gnulib/import/m4/getcwd-path-max.m4: Update.
1294         * gnulib/import/m4/getcwd.m4: Update.
1295         * gnulib/import/m4/getdtablesize.m4: Update.
1296         * gnulib/import/m4/getlogin.m4: Update.
1297         * gnulib/import/m4/getlogin_r.m4: Update.
1298         * gnulib/import/m4/getpagesize.m4: Update.
1299         * gnulib/import/m4/getprogname.m4: Update.
1300         * gnulib/import/m4/gettimeofday.m4: Update.
1301         * gnulib/import/m4/glibc21.m4: Update.
1302         * gnulib/import/m4/glob.m4: Update.
1303         * gnulib/import/m4/glob_h.m4: Update.
1304         * gnulib/import/m4/gnulib-cache.m4: Update.
1305         * gnulib/import/m4/gnulib-common.m4: Update.
1306         * gnulib/import/m4/gnulib-comp.m4: Update.
1307         * gnulib/import/m4/gnulib-tool.m4: Update.
1308         * gnulib/import/m4/hard-locale.m4: Update.
1309         * gnulib/import/m4/include_next.m4: Update.
1310         * gnulib/import/m4/inttypes-pri.m4: Update.
1311         * gnulib/import/m4/inttypes.m4: Update.
1312         * gnulib/import/m4/isnand.m4: Update.
1313         * gnulib/import/m4/isnanl.m4: Update.
1314         * gnulib/import/m4/largefile.m4: Update.
1315         * gnulib/import/m4/limits-h.m4: Update.
1316         * gnulib/import/m4/localcharset.m4: Update.
1317         * gnulib/import/m4/locale-fr.m4: Update.
1318         * gnulib/import/m4/locale-ja.m4: Update.
1319         * gnulib/import/m4/locale-zh.m4: Update.
1320         * gnulib/import/m4/localtime-buffer.m4: Update.
1321         * gnulib/import/m4/longlong.m4: Update.
1322         * gnulib/import/m4/lstat.m4: Update.
1323         * gnulib/import/m4/malloc.m4: Update.
1324         * gnulib/import/m4/malloca.m4: Update.
1325         * gnulib/import/m4/math_h.m4: Update.
1326         * gnulib/import/m4/mbrtowc.m4: Update.
1327         * gnulib/import/m4/mbsinit.m4: Update.
1328         * gnulib/import/m4/mbsrtowcs.m4: Update.
1329         * gnulib/import/m4/mbstate_t.m4: Update.
1330         * gnulib/import/m4/memchr.m4: Update.
1331         * gnulib/import/m4/memmem.m4: Update.
1332         * gnulib/import/m4/mempcpy.m4: Update.
1333         * gnulib/import/m4/memrchr.m4: Update.
1334         * gnulib/import/m4/mkdir.m4: Update.
1335         * gnulib/import/m4/mkstemp.m4: Update.
1336         * gnulib/import/m4/mmap-anon.m4: Update.
1337         * gnulib/import/m4/mode_t.m4: Update.
1338         * gnulib/import/m4/msvc-inval.m4: Update.
1339         * gnulib/import/m4/msvc-nothrow.m4: Update.
1340         * gnulib/import/m4/multiarch.m4: Update.
1341         * gnulib/import/m4/nocrash.m4: Update.
1342         * gnulib/import/m4/off_t.m4: Update.
1343         * gnulib/import/m4/onceonly.m4: Update.
1344         * gnulib/import/m4/open-cloexec.m4: Update.
1345         * gnulib/import/m4/open.m4: Update.
1346         * gnulib/import/m4/openat.m4: Update.
1347         * gnulib/import/m4/opendir.m4: Update.
1348         * gnulib/import/m4/pathmax.m4: Update.
1349         * gnulib/import/m4/rawmemchr.m4: Update.
1350         * gnulib/import/m4/readdir.m4: Update.
1351         * gnulib/import/m4/readlink.m4: Update.
1352         * gnulib/import/m4/realloc.m4: Update.
1353         * gnulib/import/m4/rename.m4: Update.
1354         * gnulib/import/m4/rewinddir.m4: Update.
1355         * gnulib/import/m4/rmdir.m4: Update.
1356         * gnulib/import/m4/save-cwd.m4: Update.
1357         * gnulib/import/m4/secure_getenv.m4: Update.
1358         * gnulib/import/m4/setenv.m4: Update.
1359         * gnulib/import/m4/signal_h.m4: Update.
1360         * gnulib/import/m4/ssize_t.m4: Update.
1361         * gnulib/import/m4/stat-time.m4: Update.
1362         * gnulib/import/m4/stat.m4: Update.
1363         * gnulib/import/m4/std-gnu11.m4: Update.
1364         * gnulib/import/m4/stdbool.m4: Update.
1365         * gnulib/import/m4/stddef_h.m4: Update.
1366         * gnulib/import/m4/stdint.m4: Update.
1367         * gnulib/import/m4/stdio_h.m4: Update.
1368         * gnulib/import/m4/stdlib_h.m4: Update.
1369         * gnulib/import/m4/strchrnul.m4: Update.
1370         * gnulib/import/m4/strdup.m4: Update.
1371         * gnulib/import/m4/strerror.m4: Update.
1372         * gnulib/import/m4/string_h.m4: Update.
1373         * gnulib/import/m4/strstr.m4: Update.
1374         * gnulib/import/m4/strtok_r.m4: Update.
1375         * gnulib/import/m4/sys_socket_h.m4: Update.
1376         * gnulib/import/m4/sys_stat_h.m4: Update.
1377         * gnulib/import/m4/sys_time_h.m4: Update.
1378         * gnulib/import/m4/sys_types_h.m4: Update.
1379         * gnulib/import/m4/tempname.m4: Update.
1380         * gnulib/import/m4/time_h.m4: Update.
1381         * gnulib/import/m4/unistd-safer.m4: Update.
1382         * gnulib/import/m4/unistd_h.m4: Update.
1383         * gnulib/import/m4/warn-on-use.m4: Update.
1384         * gnulib/import/m4/wchar_h.m4: Update.
1385         * gnulib/import/m4/wchar_t.m4: Update.
1386         * gnulib/import/m4/wctype_h.m4: Update.
1387         * gnulib/import/m4/wint_t.m4: Update.
1388         * gnulib/import/malloc.c: Update.
1389         * gnulib/import/malloc/scratch_buffer.h: Update.
1390         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
1391         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
1392         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
1393         * gnulib/import/malloca.c: Update.
1394         * gnulib/import/malloca.h: Update.
1395         * gnulib/import/malloca.valgrind: Update.
1396         * gnulib/import/math.in.h: Update.
1397         * gnulib/import/mbrtowc.c: Update.
1398         * gnulib/import/mbsinit.c: Update.
1399         * gnulib/import/mbsrtowcs-impl.h: Update.
1400         * gnulib/import/mbsrtowcs-state.c: Update.
1401         * gnulib/import/mbsrtowcs.c: Update.
1402         * gnulib/import/memchr.c: Update.
1403         * gnulib/import/memmem.c: Update.
1404         * gnulib/import/mempcpy.c: Update.
1405         * gnulib/import/memrchr.c: Update.
1406         * gnulib/import/mkdir.c: Update.
1407         * gnulib/import/mkstemp.c: Update.
1408         * gnulib/import/msvc-inval.c: Update.
1409         * gnulib/import/msvc-inval.h: Update.
1410         * gnulib/import/msvc-nothrow.c: Update.
1411         * gnulib/import/msvc-nothrow.h: Update.
1412         * gnulib/import/open.c: Update.
1413         * gnulib/import/openat-die.c: Update.
1414         * gnulib/import/openat-priv.h: Update.
1415         * gnulib/import/openat-proc.c: Update.
1416         * gnulib/import/openat.c: Update.
1417         * gnulib/import/openat.h: Update.
1418         * gnulib/import/opendir.c: Update.
1419         * gnulib/import/pathmax.h: Update.
1420         * gnulib/import/pipe-safer.c: Update.
1421         * gnulib/import/rawmemchr.c: Update.
1422         * gnulib/import/readdir.c: Update.
1423         * gnulib/import/readlink.c: Update.
1424         * gnulib/import/realloc.c: Update.
1425         * gnulib/import/ref-add.sin: Update.
1426         * gnulib/import/ref-del.sin: Update.
1427         * gnulib/import/rename.c: Update.
1428         * gnulib/import/rewinddir.c: Update.
1429         * gnulib/import/rmdir.c: Update.
1430         * gnulib/import/same-inode.h: Update.
1431         * gnulib/import/save-cwd.c: Update.
1432         * gnulib/import/save-cwd.h: Update.
1433         * gnulib/import/scratch_buffer.h: Update.
1434         * gnulib/import/secure_getenv.c: Update.
1435         * gnulib/import/setenv.c: Update.
1436         * gnulib/import/signal.in.h: Update.
1437         * gnulib/import/stat-time.c: Update.
1438         * gnulib/import/stat-time.h: Update.
1439         * gnulib/import/stat-w32.c: Update.
1440         * gnulib/import/stat-w32.h: Update.
1441         * gnulib/import/stat.c: Update.
1442         * gnulib/import/stdbool.in.h: Update.
1443         * gnulib/import/stddef.in.h: Update.
1444         * gnulib/import/stdint.in.h: Update.
1445         * gnulib/import/stdio.in.h: Update.
1446         * gnulib/import/stdlib.in.h: Update.
1447         * gnulib/import/str-two-way.h: Update.
1448         * gnulib/import/strchrnul.c: Update.
1449         * gnulib/import/strdup.c: Update.
1450         * gnulib/import/streq.h: Update.
1451         * gnulib/import/strerror-override.c: Update.
1452         * gnulib/import/strerror-override.h: Update.
1453         * gnulib/import/strerror.c: Update.
1454         * gnulib/import/string.in.h: Update.
1455         * gnulib/import/stripslash.c: Update.
1456         * gnulib/import/strnlen1.c: Update.
1457         * gnulib/import/strnlen1.h: Update.
1458         * gnulib/import/strstr.c: Update.
1459         * gnulib/import/strtok_r.c: Update.
1460         * gnulib/import/sys_stat.in.h: Update.
1461         * gnulib/import/sys_time.in.h: Update.
1462         * gnulib/import/sys_types.in.h: Update.
1463         * gnulib/import/tempname.c: Update.
1464         * gnulib/import/tempname.h: Update.
1465         * gnulib/import/time.in.h: Update.
1466         * gnulib/import/unistd--.h: Update.
1467         * gnulib/import/unistd-safer.h: Update.
1468         * gnulib/import/unistd.in.h: Update.
1469         * gnulib/import/unsetenv.c: Update.
1470         * gnulib/import/verify.h: Update.
1471         * gnulib/import/extra/snippet/warn-on-use.h: Update.
1472         * gnulib/import/wchar.in.h: Update.
1473         * gnulib/import/wctype.in.h: Update.
1474         * gnulib/import/xalloc-oversized.h: Update.
1475         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
1476         "53e2c179f26a890fa6685af4b6c1397ee370433b".
1477
1478 2018-08-16  Gary Benson <gbenson@redhat.com>
1479
1480         PR gdb/13000:
1481         * gdb/main.c (captured_main_1): Exit with nonzero status
1482         in batch mode if the last command to be executed failed.
1483         * NEWS: Mention the above.
1484
1485 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
1486
1487         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
1488         end of warning message.
1489
1490 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
1491
1492         PR gdb/22943:
1493         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
1494         (aarch64_extract_return_value): Use
1495         aapcs_is_vfp_call_or_return_candidate.
1496         (aarch64_return_in_memory): Likewise.
1497         (aarch64_store_return_value): Likewise.
1498
1499 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
1500
1501         * aarch64-tdep.c
1502         (aapcs_is_vfp_call_or_return_candidate): Make static
1503         (pass_in_v_or_stack): Remove function.
1504         (pass_in_v_vfp_candidate): New function.
1505         (aarch64_push_dummy_call): Check for float register candidates.
1506
1507 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
1508
1509         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
1510         (aapcs_is_vfp_call_or_return_candidate_1): New function.
1511         (aapcs_is_vfp_call_or_return_candidate): Likewise.
1512
1513 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
1514
1515         PR build/23399
1516         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
1517         (struct ipa_sym_addresses): Rename to...
1518         (struct ipa_sym_addresses_common): ... this.
1519         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
1520
1521 2018-08-28  Tom Tromey  <tom@tromey.com>
1522
1523         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1524         (token_fifo): Now a std::vector.
1525         (yylex, c_parse): Update.
1526         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1527         (token_fifo): Now a std::vector.
1528         (yylex, d_parse): Update.
1529         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1530         (token_fifo): Now a std::vector.
1531         (yylex, go_parse): Update.
1532
1533 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
1534
1535         * parser-defs.h (struct type_stack) <elements>: Change type to
1536         std::vector<union type_stack_elt>.
1537         <depth, size>: Remove.
1538         * parse.c (parse_exp_in_context_1): Adjust.
1539         (type_stack_reserve): Remove.
1540         (check_type_stack_depth): Remove.
1541         (insert_into_type_stack): Adjust to std::vector.
1542         (insert_type): Likewise.
1543         (push_type): Likewise.
1544         (push_type_int): Likewise.
1545         (insert_type_address_space): Likewise.
1546         (pop_type): Likewise.
1547         (pop_type_int): Likewise.
1548         (pop_typelist): Likewise.
1549         (pop_type_stack): Likewise.
1550         (append_type_stack): Likewise.
1551         (push_type_stack): Likewise.
1552         (get_type_stack): Likewise.
1553         (type_stack_cleanup): Likewise.
1554         (push_typelist): Likewise.
1555         (follow_types): Likewise.
1556         (_initialize_parse): Likewise.
1557
1558 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
1559
1560         * NEWS: Mention csky target.
1561
1562 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
1563             Hafiz Abid Qadeer  <abidh@codesourcery.com>
1564             Don Breazeal  <donb@codesourcery.com>
1565
1566         * csky-linux-tdep.c: New file.
1567         * csky-tdep.c: Likewise.
1568         * csky-tdep.h: Likewise.
1569         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
1570         csky-tdep.o.
1571         (HFILES_NO_SRCDIR): Add csky-tdep.h.
1572         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
1573         * configure.tgt: Add csky support.
1574
1575 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
1576
1577         * python/py-framefilter.c (py_print_frame): Print frame architecture
1578         when printing on an MI output.
1579
1580 2018-08-27  Tom Tromey  <tom@tromey.com>
1581
1582         PR build/23087:
1583         * configure: Rebuild.
1584         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
1585
1586 2018-08-27  Tom Tromey  <tom@tromey.com>
1587
1588         * aarch64-linux-tdep.c
1589         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
1590         casts to int.
1591
1592 2018-08-27  Tom Tromey  <tom@tromey.com>
1593
1594         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
1595         unsigned.
1596         (ppc64_standard_linkage1, ppc64_standard_linkage2)
1597         (ppc64_standard_linkage3, ppc64_standard_linkage4)
1598         (ppc64_standard_linkage5, ppc64_standard_linkage6)
1599         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
1600         unsigned.
1601
1602 2018-08-27  Tom Tromey  <tom@tromey.com>
1603
1604         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
1605         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
1606
1607 2018-08-27  Tom Tromey  <tom@tromey.com>
1608
1609         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
1610         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
1611         ULONGEST_MAX.
1612         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
1613         ULONGEST_MAX.
1614         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
1615         ULONGEST_MAX.
1616         * sparc-linux-tdep.c (sparc32_linux_sigframe)
1617         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
1618         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
1619         ULONGEST_MAX.
1620         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
1621         (ppc64_linux_sigaction_tramp_frame)
1622         (ppc32_linux_sighandler_tramp_frame)
1623         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
1624         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
1625         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
1626         * mn10300-linux-tdep.c (am33_linux_sigframe)
1627         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
1628         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
1629         * mips-linux-tdep.c (mips_linux_o32_sigframe)
1630         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
1631         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
1632         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
1633         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
1634         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
1635         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
1636         * microblaze-linux-tdep.c
1637         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
1638         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
1639         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
1640         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
1641         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
1642         * common/common-types.h (ULONGEST_MAX): New define.
1643         (CORE_ADDR_MAX): Fix formatting.
1644         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
1645         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
1646         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
1647         (arm_linux_rt_sigreturn_tramp_frame)
1648         (arm_eabi_linux_sigreturn_tramp_frame)
1649         (arm_eabi_linux_rt_sigreturn_tramp_frame)
1650         (thumb2_eabi_linux_sigreturn_tramp_frame)
1651         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
1652         (arm_linux_restart_syscall_tramp_frame)
1653         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
1654         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
1655         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
1656         ULONGEST_MAX.
1657         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
1658
1659 2018-08-27  Tom Tromey  <tom@tromey.com>
1660
1661         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
1662         CORE_ADDR_MAX.
1663         * mips-tdep.c (mips_deal_with_atomic_sequence)
1664         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
1665         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
1666         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
1667         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
1668         CORE_ADDR_MAX.
1669         * aarch64-tdep.c (aarch64_software_single_step): Use
1670         CORE_ADDR_MAX.
1671
1672 2018-08-27  Tom Tromey  <tom@tromey.com>
1673
1674         * linespec.c (complete_linespec_component): Add cast to "char".
1675         * completer.c (completion_tracker::build_completion_result): Add
1676         cast to "char".
1677
1678 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
1679
1680         * solist.h (struct solist, struct target_so_ops): Fix
1681         indentation.
1682
1683 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
1684
1685         * ada-tasks.c (ada_task_info_s): Remove typedef.
1686         (DEF_VEC_O(ada_task_info_s)): Remove.
1687         (struct ada_tasks_inferior_data): Initialize fields.
1688         <task_list>: Make an std::vector.
1689         (get_ada_tasks_inferior_data): Allocate with new.
1690         (ada_get_task_number): Adjust.
1691         (get_task_number_from_id): Likewise.
1692         (valid_task_id): Likewise.
1693         (ada_get_task_info_from_ptid): Likewise.
1694         (iterate_over_live_ada_tasks): Likewise.
1695         (add_ada_task): Likewise.
1696         (read_known_tasks): Likewise.
1697         (ada_build_task_list): Likewise.
1698         (print_ada_task_info): Likewise.
1699         (info_task): Likewise.
1700         (task_command_1): Likewise.
1701
1702 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
1703
1704         * ada-lang.c (add_angle_brackets): Return std::string.
1705
1706 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
1707
1708         * python/py-threadevent.c (py_get_event_thread): Initialize
1709         pythread.
1710
1711 2018-08-24  Pedro Alves  <palves@redhat.com>
1712
1713         * python/py-bpevent.c (create_breakpoint_event_object): Use
1714         copy-initialization.
1715         * python/py-continueevent.c (emit_continue_event): Use
1716         copy-initialization.
1717         * python/py-exitedevent.c (create_exited_event_object): Return a
1718         gdbpy_ref<>.
1719         (emit_exited_event): Use copy-initialization.
1720         * python/py-inferior.c (python_new_inferior)
1721         (python_inferior_deleted, add_thread_object): Use
1722         copy-initialization.
1723         * python/py-infevents.c (create_inferior_call_event_object)
1724         (create_register_changed_event_object)
1725         (create_memory_changed_event_object): Return a gdbpy_ref<>.
1726         (emit_inferior_call_event, emit_memory_changed_event)
1727         (emit_register_changed_event): Use copy-initialization.
1728         * python/py-newobjfileevent.c (create_new_objfile_event_object):
1729         Return a gdbpy_ref<>.
1730         (emit_new_objfile_event): Use copy-initialization.
1731         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
1732         (emit_clear_objfiles_event): Use copy-initialization.
1733         * python/py-signalevent.c (create_signal_event_object): Use
1734         copy-initialization.
1735         * python/py-threadevent.c (create_thread_event_object): Use
1736         copy-initialization.
1737
1738 2018-08-24  Pedro Alves  <palves@redhat.com>
1739             Simon Marchi  <simon.marchi@ericsson.com>
1740
1741         PR gdb/23379
1742         * python/py-continueevent.c: Include "gdbthread.h".
1743         (create_continue_event_object): Add intro comment.  Add 'ptid'
1744         parameter.  Use it to find thread to pass to
1745         create_thread_event_object.
1746         (emit_continue_event): Pass PTID down to
1747         create_continue_event_object.
1748         * python/py-event.h (py_get_event_thread): Declare.
1749         (create_thread_event_object): Remove default from 'thread'
1750         parameter.
1751         * python/py-stopevent.c (create_stop_event_object): Use
1752         py_get_event_thread.
1753         * python/py-threadevent.c (get_event_thread): Rename to ...
1754         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
1755         and use it to find the thread.
1756         (create_thread_event_object): Assert that THREAD isn't null.
1757         Don't find the event thread here.
1758
1759 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
1760
1761         * block.h (blockrange, blockranges): New struct declarations.
1762         (struct block): Add new field named `ranges'.
1763         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
1764         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
1765         macros for accessing ranges in struct block.
1766         (make_blockranges): New declaration.
1767         block.c (make_blockranges): New function.
1768         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
1769         for block.
1770         * symtab.h (find_pc_partial_function): Add new parameter `block'.
1771         * blockframe.c (cache_pc_function_block): New static global.
1772         (clear_pc_function_cache): Clear cache_pc_function_block.
1773         (find_pc_partial_function): Move comment to symtab.h.  Add
1774         support for non-contiguous blocks.
1775         * cli/cli-cmds.c (block.h): Include.
1776         (print_disassembly): Handle printing of non-contiguous blocks.
1777         (disassemble_current_function): Likewise.
1778         (disassemble_command): Likewise.
1779
1780         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
1781         BLOCK_START.
1782         * blockframe.c (get_pc_function_start): Likewise.
1783         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
1784         (gcc_symbol_address): Likewise.
1785         * compile/compile-object-run.c (compile_object_run): Likewise.
1786         * compile/compile.c (get_expr_block_and_pc): Likewise.
1787         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
1788         (func_addr_to_tail_call_list): Likewise.
1789         * findvar.c (default_read_var_value): Likewise.
1790         * inline-frame.c (inline_frame_this_id): Likewise.
1791         (skip-inline_frames): Likewise.
1792         * infcmd.c (until_next_command): Likewise.
1793         * linespec.c (convert_linespec_to_sals): Likewise.
1794         * parse.c (parse_exp_in_context_1): Likewise.
1795         * printcmd.c (build_address_symbolic): likewise.
1796         (info_address_command): Likewise.
1797         symtab.c (find_function_start_sal): Likewise.
1798         (skip_prologue_sal): Likewise.
1799         (find_function_alias_target): Likewise.
1800         (find_gnu_ifunc): Likewise.
1801         * stack.c (find_frame_funname): Likewise.
1802         * symtab.c (fixup_symbol_section): Likewise.
1803         (find_function_start_sal): Likewise.
1804         (skip_prologue_sal): Likewsie.
1805         (find_function_alias_target): Likewise.
1806         (find_gnu_ifunc): Likewise.
1807         * tracepoint.c (info_scope_command): Likewise.
1808         * value.c (value_fn_field): Likewise.
1809
1810         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
1811         in place of find_pc_partial_function.
1812         * blockframe.c (find_function_entry_range_from_pc): New function.
1813         * symtab.h (find_function_entry_range_from_pc): Declare and document.
1814         * objfiles.c (objfile_relocate1): Relocate start and end addresses
1815         for each range in a block.
1816
1817
1818 2018-08-23  Xavier Roirand  <roirand@adacore.com>
1819
1820         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
1821         incrementation.
1822
1823 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
1824
1825         * solib-svr4.c (read_program_headers_from_bfd): Return
1826         gdb::optional<gdb::byte_vector>.
1827         (svr4_exec_displacement): Adjust.
1828
1829 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
1830
1831         * solib-svr4.c (read_program_header): Return
1832         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
1833         (find_program_interpreter): Return
1834         gdb::optional<gdb::byte_vector>.
1835         (scan_dyntag_auxv): Adjust.
1836         (enable_break): Adjust.
1837         (svr4_exec_displacement): Adjust.
1838
1839 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
1840
1841         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
1842         * inf-child.c (inf_child_target::terminal_save_inferior): New.
1843
1844 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
1845
1846         * guile/scm-string.c (gdbscm_scm_from_printf): Use
1847         string_vprintf.
1848         * guile/scm-utils.c (gdbscm_printf): Likewise.
1849         * serial.c (serial_printf): Likewise.
1850         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
1851
1852 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
1853
1854         * stack.c (print_frame): Print frame architecture when printing on
1855         an MI output.
1856         * NEWS: Mention new "arch" attribute in frame output.
1857
1858 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
1859
1860         * arch/aarch64.h (aarch64_regnum): Update comment.
1861
1862 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
1863
1864         * NEWS: Add SVE to 8.2 section.
1865
1866 2018-08-21  Pedro Alves  <palves@redhat.com>
1867
1868         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
1869         out from gdbscm_parse_function_args.
1870         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
1871         gdbscm_parse_function_args_1.
1872
1873 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
1874
1875         PR gdb/17816
1876         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
1877         operator.
1878
1879 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
1880
1881         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
1882
1883 2018-08-19  Michael Spang  <spang@google.com>
1884
1885         PR gdb/11786
1886         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
1887         for PT_TLS segments.
1888
1889 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
1890
1891         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
1892         dwarf_variable_value.
1893         * dwarf2-frame.c (class dwarf_expr_executor):
1894         Add override for dwarf_variable_value.
1895         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
1896         (class symbol_needs_eval_context): Likewise.
1897         (indirect_synthetic_pointer): Add forward declaration.
1898         (sect_variable_value): New function.
1899         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
1900         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
1901         for DW_OP_GNU_variable_value.
1902
1903 2018-08-16  Tom Tromey  <tom@tromey.com>
1904
1905         * top.c (read_command_file): Update.
1906         (command_line_input): Remove "repeat" argument.
1907         * ada-lang.c (get_selections): Update.
1908         * linespec.c (decode_line_2): Update.
1909         * defs.h (command_line_input): Remove argument.
1910         * cli/cli-script.c (read_next_line): Update.
1911         * python/py-gdb-readline.c: Update.
1912
1913 2018-08-17  Tom Tromey  <tom@tromey.com>
1914
1915         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
1916         command_line_input.
1917
1918 2018-08-15  Tom Tromey  <tom@tromey.com>
1919
1920         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
1921
1922 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
1923
1924         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
1925         If used, use find_pc_partial_function to find address range
1926         to disassemble.
1927         * mi/mi-main.c (mi_cmd_list_features): Report
1928         "data-disassemble-a-option" feature.
1929         * NEWS: Mention new -data-disassemble option -a.
1930
1931 2018-08-13  Tom Tromey  <tom@tromey.com>
1932
1933         * common/common-defs.h (_FORTIFY_SOURCE): Define.
1934
1935 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
1936
1937         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
1938         (aarch64_linux_collect_sve_regset): Likewise.
1939         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
1940         * regcache.h (regcache_map_entry_size): New function.
1941
1942 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
1943
1944         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
1945         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
1946         (SVE_HEADER_VL_LENGTH): Likewise.
1947         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
1948         (SVE_HEADER_FLAGS_LENGTH): Likewise.
1949         (SVE_HEADER_RESERVED_LENGTH): Likewise.
1950         (SVE_HEADER_SIZE_OFFSET): Likewise.
1951         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
1952         (SVE_HEADER_VL_OFFSET): Likewise.
1953         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
1954         (SVE_HEADER_FLAGS_OFFSET): Likewise.
1955         (SVE_HEADER_RESERVED_OFFSET): Likewise.
1956         (SVE_HEADER_SIZE): Likewise.
1957         (aarch64_linux_core_read_vq): Add function.
1958         (aarch64_linux_core_read_description): Check for SVE section.
1959
1960 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
1961
1962         * aarch64-fbsd-tdep.c
1963         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
1964         collect_size.
1965         * aarch64-linux-tdep.c
1966         (aarch64_linux_iterate_over_regset_sections): Likewise.
1967         * alpha-linux-tdep.c
1968         (alpha_linux_iterate_over_regset_sections):
1969         * alpha-nbsd-tdep.c
1970         (alphanbsd_iterate_over_regset_sections): Likewise.
1971         * amd64-fbsd-tdep.c
1972         (amd64fbsd_iterate_over_regset_sections): Likewise.
1973         * amd64-linux-tdep.c
1974         (amd64_linux_iterate_over_regset_sections): Likewise.
1975         * arm-bsd-tdep.c
1976         (armbsd_iterate_over_regset_sections): Likewise.
1977         * arm-fbsd-tdep.c
1978         (arm_fbsd_iterate_over_regset_sections): Likewise.
1979         * arm-linux-tdep.c
1980         (arm_linux_iterate_over_regset_sections): Likewise.
1981         * corelow.c (get_core_registers_cb): Likewise.
1982         (core_target::fetch_registers): Likewise.
1983         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
1984         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
1985         * gdbarch.h (void): Regenerate.
1986         * gdbarch.sh: Add supply_size and collect_size.
1987         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
1988         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
1989         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
1990         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
1991         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
1992         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
1993         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
1994         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
1995         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
1996         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
1997         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
1998         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
1999         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
2000         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
2001         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
2002         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
2003         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
2004         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
2005         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
2006         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
2007         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
2008         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
2009         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
2010         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
2011         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
2012         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
2013         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
2014         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
2015         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
2016         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
2017
2018 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
2019
2020         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
2021         with string_printf.
2022
2023 2018-08-10  Keith Seitz  <keiths@redhat.com>
2024
2025         * compile/compile-c-support.c (add_code_header, add_code_footer):
2026         Move into policy class.
2027         (c_push_user_expression, pop_user_expression_nop)
2028         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
2029         (compile_program): New host class.
2030         (c_compile_program): New typedef.
2031         (c_compute_porgram): Use c_compile_program.
2032
2033 2018-08-10  Keith Seitz  <keiths@redhat.com>
2034
2035         * compile/compile-internal.h (compile_instance::~compile_instance):
2036         Remove calls to htab_delete.
2037         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
2038         * compile.c (compile_instance::compile_instance): Initialize
2039         htab unique pointers.
2040         (compile_instance::get_cached_type, compile_instance::insert_type)
2041         (compile_instance::error_symbol_once): Update for unique_ptr.
2042
2043 2018-08-10  Keith Seitz  <keiths@redhat.com>
2044
2045         * compile/compile-c-symbols.c (struct symbol_error)
2046         (hash_symbol_error, eq_symbol_error, del_symbol_error)
2047         (compile_instance::insert_symbol_error)
2048         (compile_instance::error_symbol_once): Move to ...
2049         * compile/compile.c: ... here.
2050
2051 2018-08-10  Keith Seitz  <keiths@redhat.com>
2052
2053         * compile/compile-c-support.c (c_get_compile_context): Use `new'
2054         instead of `new_compile_instance'.
2055         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
2056         Update description.
2057         If the symbol error map is not initialized, create it.
2058         (generate_c_for_for_one_symbol): Do not check/initialize
2059         the symbol error map.
2060         * compile/compile-c-types.c (compile_c_instance): Make a class.
2061         Update all callers.
2062         (compile_instance::compile_instance): Initialize the type cache.
2063         (get_cached_type): New function.
2064         (insert_type): Update description.
2065         (compile_c_instance::m_default_cflags): Define.
2066         (convert_type): Update description.  Use get_cached_type.
2067         (delete_instance): Moved to destructor.
2068         (new_compile_instance): Moved to constructor.
2069         * compile/compile-c.h (compile_c_instance): Make class inheriting
2070         from compile_instance.
2071         <base>: Remove field.
2072         <type_map, symbol_err_map>: Move to base class.
2073         <c_plugin>: Rename to `m_plugin' and remove pointer type.
2074         * compile/compile-internal.h (compile_instance): Make class.
2075         <type_map_t, symbol_err_map_t>: Define.
2076         <fe>: Rename to `m_gcc_fe'.
2077         <scope, block, gcc_target_options>: Add `m_' prefix.
2078         <m_type_map, m_symbol_err_map>: New fields, moved from
2079         compile_c_instance.
2080         <destroy>: Remove.
2081         (convert_type, new_compile_instance): Remove.
2082         * compile/compile.c (cleanup_compile_instance): Remove.
2083         (compile_to_object): Use unique_ptr to eliminate cleanups.
2084         (compile_instance::set_print_callback, compile_instance::version)
2085         (compile_instance::set_verbose)
2086         (compile_instance::set_driver_filename)
2087         (compile_instance::set_triplet_regexp)
2088         (compile_instance::set_arguments)
2089         (compile_instance::set_source_file)
2090         (compile_instance::compile): Define.
2091
2092 2018-08-10  Keith Seitz  <keiths@redhat.com>
2093
2094         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
2095         * compile/compile-c-types.c: Define GCC_METHODN macros and include
2096         gcc-c-fe.def to define C plugin.
2097         (delete_instance): Delete `c_plugin'.
2098         (new_compile_instance): Initialize `c_plugin'.
2099         * compile/compile-c.h: Include gcc_c_plugin.h.
2100         (struct compile_c_instance) <c_plugin>: New member.
2101         * gcc-c-plugin.h: New file.
2102         Update all callers with API change.
2103
2104 2018-08-10  Keith Seitz  <keiths@redhat.com>
2105
2106         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
2107         (HFILES_NO_SRCDIR): ... to here.
2108         Add compile-internal.h and compile-c.h.
2109         * compile/compile-c-support.c: Include compile-c.h.
2110         * compile/compile-c-symbols.c: Include compile-c.h.
2111         (generate_c_for_variable_locations): Update comment.
2112         * compile/compile-c-types.c: Include compile-c.h.
2113         * compile/compile-c.h: New file -- moved C language declarations
2114         from other files here.
2115         * compile/compile-internal.h: Do not include hashtab.h or
2116         common/enum-flags.h.
2117         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
2118         (gcc_convert_symbol, gcc_symbol_address)
2119         (generate_c_for_variable_locations, c_get_mode_for_size)
2120         (c_get_range_decl_name): Definitions moved to compile-c.h.
2121         * compile/compile-loc2c.c: Include compile-c.h.
2122
2123 2018-08-10  Keith Seitz  <keiths@redhat.com>
2124
2125         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
2126         (c_symbol_substitution_name): ... this.
2127         Update all callers.
2128
2129 2018-08-10  Keith Seitz  <keiths@redhat.com>
2130
2131         * compile/compile-c-support.c (c_compute_program): Use
2132         unique_xmalloc_ptr to eliminate cleanup.
2133         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
2134         Return a unique_xmalloc_ptr and eliminate cleanup.
2135         * compile/compile-internal.h (generate_c_for_variable_locations):
2136         Return unique_xmalloc_ptr and update description.
2137
2138 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
2139
2140         * corelow.c (core_target::get_core_register_section): Rename
2141         min_size to section_min_size.
2142
2143 2018-08-09  Jim Wilson  <jimw@sifive.com>
2144
2145         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
2146         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
2147         * NEWS: Mention new GNU/Linux RISC-V target.
2148         * configure.host: Add riscv*-*-linux*.
2149         * configure.nat: Add riscv*.
2150         * configure.tgt: Add riscv*-*-linux*.
2151         * riscv-linux-nat.c: New file.
2152         * riscv-linux-tdep.c: New file.
2153
2154 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
2155
2156         * infrun.c (resume): Make static, add forward declaration.
2157         (proceed): Update header comment.
2158         * infrun.h (resume): Delete declaration.
2159
2160 2018-08-09  Tom Tromey  <tom@tromey.com>
2161
2162         * riscv-tdep.h: Minor formatting fixes.
2163
2164 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
2165
2166         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
2167         * dwarf-index-cache.c (create_dir_and_check): Likewise.
2168         (test_mkdir_recursive): Likewise.
2169         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
2170
2171 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
2172
2173         * valarith.c (value_subscripted_rvalue): If an array is not in
2174         memory, and we don't know the upper bound, then we can't know that
2175         the requested element exists or not.
2176
2177 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
2178
2179         * target.c (str_comma_list_concat_elem): Fix typo in comment.
2180         (target_options_to_string): Add comment.
2181
2182 2018-08-08  Tom Tromey  <tom@tromey.com>
2183
2184         * unittests/scoped_mmap-selftests.c: Check result of "write".
2185
2186 2018-08-08  Jim Wilson  <jimw@sifive.com>
2187
2188         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
2189         (decode_register_index_short): New.
2190         (decode_j_type_insn, decode_cj_type_insn): New.
2191         (decode_b_type_insn, decode_cb_type_insn): New.
2192         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
2193         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
2194         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
2195         is_c_sw_insn instead of is_sw_insn.
2196         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
2197         (riscv_software_single_step): New.
2198         * riscv-tdep.h (riscv_software_single_step): Declare.
2199
2200         * riscv-tdep.c (riscv_isa_xlen): Drop static.
2201         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
2202
2203 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
2204
2205         PR gdb/18050:
2206         * target.c (dispose_inferior): Don't dispose of inferiors that are
2207         already killed.
2208
2209 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
2210
2211         * remote.c (remote_target::download_tracepoint): Change char* to
2212         const char*.
2213
2214 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
2215
2216         * target.h (target_options_to_string): Return an std::string.
2217         * target.c (str_comma_list_concat_elem): Return void, use
2218         std::string.
2219         (do_option): Likewise.
2220         (target_options_to_string): Return an std::string.
2221         * linux-nat.c (linux_nat_target::wait): Adjust.
2222         * target-debug.h (target_debug_print_options): Adjust.
2223
2224 2018-08-07  Tom Tromey  <tom@tromey.com>
2225
2226         * Makefile.in (CPPFLAGS): New variable.
2227         (INTERNAL_CPPFLAGS): Use it.
2228
2229 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2230
2231         * NEWS: Mention the index cache.
2232
2233 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2234
2235         * common/pathstuff.h (get_standard_cache_dir): New.
2236         * common/pathstuff.c (get_standard_cache_dir): New.
2237         * build-id.h (build_id_to_string): New.
2238         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
2239         DEBUG_STR_SUFFIX): Move to here.
2240         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
2241         DEBUG_STR_SUFFIX): Move from there.
2242         (write_psymtabs_to_index): Make non-static, add basename
2243         parameter.  Write to temporary files, rename when done.
2244         (save_gdb_index_command): Adjust call to
2245         write_psymtabs_to_index.
2246         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
2247         field.
2248         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
2249         (get_gdb_index_contents_from_cache): New.
2250         (get_gdb_index_contents_from_cache_dwz): New.
2251         (dwarf2_initialize_objfile): Read index from cache.
2252         (dwarf2_build_psymtabs): Save to index.
2253         * dwarf-index-cache.h: New file.
2254         * dwarf-index-cache.c: New file.
2255         * dwarf-index-write.h: New file.
2256
2257 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2258
2259         * gnulib/aclocal.m4: Re-generate.
2260         * gnulib/config.in: Re-generate.
2261         * gnulib/configure: Re-generate.
2262         * gnulib/import/Makefile.am: Re-generate.
2263         * gnulib/import/Makefile.in: Re-generate.
2264         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
2265         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2266         * gnulib/import/m4/mkdir.m4: New file.
2267         * gnulib/import/mkdir.c: New file.
2268         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
2269         module.
2270
2271 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2272
2273         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
2274         * common/scoped_mmap.c: New file.
2275         * common/scoped_mmap.h (destroy): New method.
2276         (~scoped_mmap, reset): Use destroy.
2277         (scoped_mmap): New move constructor.
2278         (mmap_file): New declaration.
2279         * unittests/scoped_mmap-selftests.c (test_normal,
2280         test_invalid_filename, run_tests): New functions.
2281         (_initialize_scoped_mmap_selftests): Register selftest.
2282
2283 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2284
2285         * dwarf2read.c (read_gdb_index_from_section): Rename to...
2286         (read_gdb_index_from_buffer): ... this.  Remove section
2287         parameter, add buffer parameter.
2288         (get_gdb_index_contents_ftype,
2289         get_gdb_index_contents_dwz_ftype): New typedefs.
2290         (dwarf2_read_gdb_index): Add callback parameters to get the
2291         index contents.
2292         (get_gdb_index_contents_from_section): New.
2293         (dwarf2_initialize_objfile): Update call to
2294         dwarf2_read_gdb_index.
2295
2296 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2297
2298         * common/filestuff.h (gdb_fopen_cloexec): New overload.
2299         (gdb_open_cloexec): Likewise.
2300         * nat/linux-osdata.c (command_from_pid): Use string_printf.
2301         (commandline_from_pid): Likewise.
2302         (linux_xfer_osdata_threads): Likewise.
2303         (linux_xfer_osdata_fds): Likewise.
2304         * ada-lang.c (is_package_name): Likewise.
2305         * auxv.c (procfs_xfer_auxv): Likewise.
2306         * breakpoint.c (print_one_breakpoint_location): Use
2307         uiout::field_fmt.
2308         (print_one_catch_solib): Use string_printf.
2309         * coff-pe-read.c (add_pe_exported_sym): Likewise.
2310         (add_pe_forwarded_sym): Likewise.
2311         * dwarf2read.c (create_type_unit_group): Likewise.
2312         (build_error_marker_type): Likewise.
2313         * infcall.c (get_function_name): Likewise.
2314         * valprint.c (print_converted_chars_to_obstack): Likewise.
2315         * xtensa-tdep.c (xtensa_register_type): Likewise.
2316
2317 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
2318
2319         * remote.c (remote_target::download_tracepoint): Fix format
2320         string errors.
2321
2322 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2323
2324         * tracefile.c: Include common/byte-vector.h.
2325         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
2326         with trace_regblock_size if needed.  Update uses of buf.
2327
2328 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2329
2330         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
2331         std::vector<unsigned char>.
2332         * tracepoint.c (collection_list::collection_list): Remove
2333         m_regs_mask initializer from initializer list.  Resize
2334         m_regs_mask using the largest remote register number.
2335         (collection_list::add_remote_register): Remove size check on
2336         m_regs_mask.  Use at to access element.
2337         (collection_list::stringify): Change type of temp_buf to
2338         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
2339         stringify the register mask.  Use pack_hex_byte for the register
2340         mask.
2341
2342 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2343
2344         * tracepoint.h (class collection_list) <add_register>: Remove.
2345         <add_remote_register, add_ax_registers, add_local_register>:
2346         Declare.
2347         <add_memrange>: Add scope parameter.
2348         * tracepoint.c (encode_actions_1): Likewise.
2349         (collection_list::add_register): Rename to ...
2350         (collection_list::add_remote_register): ... this.  Update
2351         comment.
2352         (collection_list::add_ax_registers, add_local_register): New
2353         methods.
2354         (collection_list::add_memrange): Add scope parameter.  Call
2355         add_local_register instead of add_register.
2356         (finalize_tracepoint_aexpr): New function.
2357         (collection_list::collect_symbol): Update calls to add_memrange.
2358         Call add_local_register instead of add_register.  Call
2359         add_ax_registers.  Call finalize_tracepoint_aexpr.
2360         (encode_actions_1): Get remote regnos for $reg action.  Call
2361         add_remote_register, add_ax_registers, and add_local_register.
2362         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
2363         (validate_actionline): Call finalize_tracepoint_aexpr.
2364
2365 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2366
2367         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
2368         Replace array buf with gdb::char_vector buf, of size
2369         get_remote_packet_size ().  Replace references to buf and
2370         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
2371         and xsnprintf with snprintf.  Raise errors if the buffer is too
2372         small.
2373
2374 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2375
2376         * remote.c (remote_target::download_tracepoint): Fix the has_more
2377         predicate in the QTDP action list iteration.
2378
2379 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2380
2381         * remote.c (remote_target::download_tracepoint): Fix indentation
2382         in for block.
2383
2384 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2385
2386         * proc-api.c (_initialize_proc_api): Remove c, unused.
2387         * procfs.c (procfs_init_inferior): Remove signals, unused.
2388         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
2389         unused.
2390
2391 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
2392             Andrew Burgess  <andrew.burgess@embecosm.com>
2393
2394         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
2395         'W_STOPCODE (0)' as this could be ambiguous.
2396
2397 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
2398
2399         * ser-tcp.c (net_open): Fix thinko when deciding whether to
2400         disable TCP's Nagle algorithm (use "ai_protocol" instead of
2401         "ai_socktype").
2402
2403 2018-08-02  Tom Tromey  <tom@tromey.com>
2404
2405         PR symtab/16842.
2406         * dwarf2read.c (read_func_scope): Set symtab on template parameter
2407         symbols.
2408         (process_structure_scope): Likewise.
2409
2410 2018-08-02  Xavier Roirand  <roirand@adacore.com>
2411
2412         PR gdb/22629:
2413         * darwin-nat.c (darwin_kill_inferior): Fix handling of
2414         kill inferior.
2415
2416 2018-08-02  Tom Tromey  <tom@tromey.com>
2417
2418         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
2419         (darwin_suspend_inferior, darwin_resume_inferior)
2420         (darwin_decode_notify_message, darwin_resume_inferior_threads)
2421         (darwin_check_new_threads): Check result of get_darwin_inferior.
2422
2423 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
2424
2425         GDB 8.1.1 released.
2426
2427 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
2428
2429         * varobj.c (varobj_get_path_expr_parent): Report an error if
2430         parent is a dynamic varobj.
2431
2432 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
2433
2434         * gnulib/aclocal.m4: Re-generate.
2435         * gnulib/config.in: Re-generate.
2436         * gnulib/configure: Re-generate.
2437         * gnulib/import/Makefile.in: Re-generate.
2438         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2439         * gnulib/import/m4/onceonly.m4: Re-generate.
2440
2441 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
2442
2443         * target-descriptions.c (struct xml_test_tdesc): New.
2444         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
2445         (record_xml_tdesc): Update.
2446         (maintenance_check_xml_descriptions): Update.
2447         * target-descriptions.h (record_xml_tdesc): Update comment.
2448
2449 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
2450
2451         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
2452         checking array bounds are defined.
2453
2454 2018-07-30  Tom Tromey  <tom@tromey.com>
2455
2456         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
2457         irreflexivity violation.
2458
2459 2018-07-30  Tom Tromey  <tom@tromey.com>
2460
2461         * cli/cli-decode.c (lookup_cmd): Remove lint code.
2462         * value.c (unpack_long): Remove lint code.
2463         * valops.c (value_ind): Remove lint code.
2464         * valarith.c (value_x_binop, value_x_unop, value_equal)
2465         (value_pos): Remove lint code.
2466
2467 2018-07-28  Tom de Vries  <tdevries@suse.de>
2468
2469         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
2470         with undefined upper bound as <optimized out>.
2471
2472 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
2473
2474         * gcore.in: Rename variable "name" to "prefix".  Expand
2475         "usage" text.
2476
2477 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
2478
2479         * windows-nat.c (windows_nat_target::create_inferior): Update to
2480         call close() in global namespace.
2481
2482 2018-07-26  Tom Tromey  <tom@tromey.com>
2483
2484         * dwarf-index-write.c (add_address_entry): Don't add objfile
2485         offsets.
2486         * dbxread.c (find_stab_function): Rename from
2487         find_stab_function_addr.  Return a bound_minimal_symbol.
2488         (read_dbx_symtab): Use raw_text_low, raw_text_high.
2489         Don't add objfile offsets.
2490         (end_psymtab): Use raw_text_low, raw_text_high,
2491         MSYMBOL_VALUE_RAW_ADDRESS.
2492         (read_ofile_symtab): Update.
2493         (process_one_symbol): Update.
2494         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
2495         offsets.
2496         (dw2_relocate): Remove.
2497         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
2498         searching addrmap.
2499         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
2500         Update.
2501         (process_psymtab_comp_unit_reader, add_partial_symbol)
2502         (add_partial_subprogram, dwarf2_ranges_read): Update.
2503         (load_partial_dies): Update.
2504         (add_address_entry): Don't add objfile offsets.
2505         (dwarf2_build_include_psymtabs): Update.
2506         (create_addrmap_from_aranges): Don't add objfile offsets.
2507         (dw2_find_pc_sect_compunit_symtab): Update.
2508         * mdebugread.c (parse_symbol): Don't add objfile offsets.
2509         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
2510         Update.
2511         (parse_partial_symbols): Don't add objfile offsets.  Use
2512         raw_text_low, raw_text_high.  Update.
2513         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
2514         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
2515         or call 'relocate' quick function.  Clear psymbol_map.
2516         * psympriv.h (struct partial_symbol) <address>: Add section
2517         offset.
2518         <set_unrelocated_address>: Rename from set_address.
2519         <raw_text_low, raw_text_high>: New methods.
2520         <text_low, text_high>: Add objfile parameter.
2521         (add_psymbol_to_bcache): Add 'section' parameter.  Call
2522         set_unrelocated_address.
2523         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2524         (find_pc_psymbol): Update.
2525         (fixup_psymbol_section, relocate_psymtabs): Remove.
2526         (dump_psymtab, psym_functions): Update.
2527         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
2528         parameter.
2529         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
2530         (start_psymtab_common): Update.
2531         * symfile-debug.c (debug_qf_relocate): Remove.
2532         (debug_sym_quick_functions): Update.
2533         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
2534         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
2535         Update.
2536
2537 2018-07-26  Tom Tromey  <tromey@redhat.com>
2538
2539         * dbxread.c (end_psymtab): Use text_high_valid and
2540         text_low_valid.
2541         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
2542         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
2543         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
2544         Update comment.
2545         <text_low_valid, text_high_valid>: New fields.
2546         <set_text_low, set_text_high>: Update.
2547         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
2548
2549 2018-07-26  Tom Tromey  <tom@tromey.com>
2550
2551         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
2552         Update.
2553         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
2554         textlow and texthigh fields.
2555         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
2556         Update.
2557         * mdebugread.c (parse_lines, parse_partial_symbols)
2558         (psymtab_to_symtab_1): Update.
2559         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
2560         Rename fields.  Update comment.  Now private.
2561         <text_low, text_high, set_text_low, set_text_high>: New methods.
2562         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2563         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
2564         (start_psymtab_common, maintenance_info_psymtabs)
2565         (maintenance_check_psymtabs): Update.
2566         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
2567         texthigh fields.
2568         (scan_xcoff_symtab): Update.
2569
2570 2018-07-26  Tom Tromey  <tromey@redhat.com>
2571
2572         * psympriv.h (struct partial_symbol) <unrelocated_address,
2573         address, set_address>: New methods.
2574         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
2575         (fixup_psymbol_section, relocate_psymtabs): Update.
2576         (print_partial_symbols): Add 'objfile' parameter.  Update.
2577         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
2578         Update.
2579
2580 2018-07-26  Tom Tromey  <tom@tromey.com>
2581
2582         * dwarf-index-write.c (write_psymbols, debug_names::insert)
2583         (debug_names::write_psymbols): Update.
2584         * psympriv.h (struct partial_symbol): Derive from
2585         general_symbol_info.
2586         <obj_section>: New method.
2587         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
2588         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2589         (find_pc_sect_psymbol, fixup_psymbol_section)
2590         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
2591         (print_partial_symbols, recursively_search_psymtabs)
2592         (compare_psymbols, psymbol_hash, psymbol_compare)
2593         (add_psymbol_to_bcache, maintenance_check_psymtabs)
2594         (psymbol_name_matches, psym_fill_psymbol_map): Update.
2595
2596 2018-07-26  Tom Tromey  <tromey@redhat.com>
2597
2598         * dbxread.c (end_psymtab): Remove dead code.
2599
2600 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
2601
2602         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
2603         DWARF unwinders are disabled.
2604         * dwarf2-frame.c: Add dwarf2read.h include.
2605         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
2606         disabled.
2607         (dwarf2_frame_unwinders_enabled_p): Define.
2608         (show_dwarf_unwinders_enabled_p): New function.
2609         (_initialize_dwarf2_frame): Register switch to control DWARF
2610         unwinder use.
2611         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
2612         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
2613         (show_dwarf_cmdlist): Remove static keyword.
2614         * dwarf2read.h (set_dwarf_cmdlist): Declare.
2615         (show_dwarf_cmdlist): Declare.
2616         * NEWS: Document new feature.
2617
2618 2018-07-26  Tom de Vries  <tdevries@suse.de>
2619
2620         PR breakpoints/23366
2621         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
2622
2623 2018-07-26  Tom de Vries  <tdevries@suse.de>
2624
2625         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
2626         DW_AT_count can't be translated to a dynamic prop.
2627
2628 2018-07-25  Tom de Vries  <tdevries@suse.de>
2629
2630         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
2631         try/catch.
2632
2633 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
2634
2635         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
2636
2637 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
2638
2639         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
2640
2641 2018-07-24  Keith Seitz  <keiths@redhat.comt
2642
2643         PR symtab/23010
2644         * dwarf2read.c (dw2_add_symbol_to_list): New function.
2645         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
2646         instead of add_symbol_to_list.
2647         (read_file_scope): Call prepare_one_comp_unit before reading
2648         any other DIEs.
2649
2650 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
2651
2652         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
2653
2654 2018-07-24  Tom Tromey  <tom@tromey.com>
2655
2656         * utils.c (malloc, realloc, free): Don't declare.
2657         * configure, config.in: Rebuild.
2658         * configure.ac: Don't check for declarations of free, malloc, or
2659         realloc.
2660
2661 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
2662
2663         * aarch64-linux-nat.c
2664         (aarch64_linux_nat_target::stopped_data_address): Remove unused
2665         variable.
2666         * arm-linux-nat.c (fetch_regs): Likewise.
2667         (store_regs): Likewise.
2668         (fetch_vfp_regs): Likewise.
2669         (store_vfp_regs): Likewise.
2670         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
2671         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
2672         (arm_linux_nat_target::insert_watchpoint): Likewise.
2673         (arm_linux_nat_target::remove_watchpoint): Likewise.
2674         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
2675         Likewise.
2676         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
2677         Likewise.
2678         * ppc-linux-nat.c (fetch_register): Likewise.
2679         (fetch_all_gp_regs): Likewise.
2680         (fetch_ppc_registers): Likewise.
2681         (store_all_gp_regs): Likewise.
2682         (store_ppc_registers): Likewise.
2683         (hwdebug_insert_point): Likewise.
2684         (can_use_watchpoint_cond_accel): Likewise.
2685         * remote-sim.c (gdb_os_write_stdout): Likewise.
2686
2687 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
2688             Tom Tromey  <tom@tromey.com>
2689
2690         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
2691         test for it.
2692         * configure: Rebuild.
2693
2694 2018-07-22  Tom Tromey  <tom@tromey.com>
2695
2696         * regformats/regdat.sh: Define xmltarget_${name} inside
2697         #ifndef IN_PROCESS_AGENT.
2698
2699 2018-07-22  Tom Tromey  <tom@tromey.com>
2700
2701         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
2702
2703 2018-07-22  Tom Tromey  <tom@tromey.com>
2704
2705         * symfile.c (reread_symbols): Notify iter, not objfile.
2706
2707 2018-07-22  Tom Tromey  <tom@tromey.com>
2708
2709         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
2710         Use arch_ops.
2711         (ravenscar_thread_target::prepare_to_store): Likewise.
2712
2713 2018-07-22  Tom Tromey  <tom@tromey.com>
2714
2715         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
2716         unused variable.  Call value_fetch_lazy when needed.
2717         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
2718         Remove unused variable.  Call value_fetch_lazy when needed.
2719
2720 2018-07-22  Tom Tromey  <tom@tromey.com>
2721
2722         * m32c-tdep.c (mark_dma): Return void.
2723         (make_regs): Remove unused declarations.
2724
2725 2018-07-22  Tom Tromey  <tom@tromey.com>
2726
2727         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
2728         cmdscm_get_valid_command_smob_arg_unsafe for effect.
2729         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
2730         bkscm_get_valid_block_smob_arg_unsafe for effect.
2731
2732 2018-07-22  Tom Tromey  <tom@tromey.com>
2733
2734         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
2735         value_type.
2736
2737 2018-07-22  Tom Tromey  <tom@tromey.com>
2738
2739         * windows-nat.c (saved_context): Conditionally define.
2740         * remote.c (remote_target::remote_btrace_maybe_reopen):
2741         Conditionally declare "warned".
2742         * inflow.c (sigquit_ours): Conditionally define.
2743         (new_tty): Move "tty" declaration inside #if.
2744         * guile/guile.c (guile_datadir): Conditionally define.
2745         * charset.c (set_be_le_names): Move some declarations inside #if.
2746         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
2747         #if.
2748         (parse_xml_btrace_conf): Likewise.
2749
2750 2018-07-22  Tom Tromey  <tom@tromey.com>
2751
2752         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
2753
2754 2018-07-22  Tom Tromey  <tom@tromey.com>
2755
2756         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
2757         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
2758         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
2759         * buildsym-legacy.c (get_macro_table): Remove unused variable.
2760         * stack.c (frame_apply_level_command): Remove unused variable.
2761         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
2762         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
2763         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
2764         unused variable.
2765         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
2766         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
2767         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
2768         variable.
2769         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
2770         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
2771         variable.
2772         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
2773         Remove unused variable.
2774         * cli/cli-script.c (recurse_read_control_structure): Remove unused
2775         variable.
2776         * common/tdesc.c (print_xml_feature::visit): Remove unused
2777         variable.
2778         * compile/compile-object-load.c (store_regs): Remove unused
2779         variables.
2780         * complaints.c (clear_complaints): Remove unused variable.
2781         * corelow.c (core_target_open): Remove unused variable.
2782         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
2783         variable.
2784         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
2785         variable.
2786         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
2787         variable.
2788         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
2789         variable.
2790         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
2791         variable.
2792         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
2793         variable.
2794         * ia64-tdep.c (examine_prologue): Remove unused variable.
2795         * infcall.c (run_inferior_call): Remove unused variable.
2796         * inferior.c (exit_inferior): Remove unused variable.
2797         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
2798         * linespec.c (decode_line_2): Remove unused variable.
2799         * linux-nat.c (super_close): Remove.
2800         * linux-tdep.c (linux_info_proc): Remove unused variable.
2801         * mi/mi-main.c (mi_execute_command): Remove unused variable.
2802         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
2803         Remove unused variable.
2804         * parse.c (find_minsym_type_and_address): Remove unused variable.
2805         * printcmd.c (info_symbol_command, printf_floating): Remove unused
2806         variable.
2807         * python/py-breakpoint.c (bppy_set_commands): Remove unused
2808         variable.
2809         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
2810         variables.
2811         * record-btrace.c (record_btrace_target::store_registers): Remove
2812         unused variable.
2813         (cmd_show_record_btrace_cpu): Remove unused variable.
2814         * riscv-tdep.c (riscv_register_reggroup_p)
2815         (riscv_push_dummy_call, riscv_return_value): Remove unused
2816         variable.
2817         * rust-exp.y (literal): Remove unused variable.
2818         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
2819         unused variable.
2820         <STRUCTOP_ANONYMOUS>: Likewise.
2821         * s390-linux-tdep.c (s390_linux_init_abi_31)
2822         (s390_linux_init_abi_64): Remove unused variable.
2823         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
2824         (file_select_thread, net_windows_open, _initialize_ser_windows):
2825         Remove unused variables.
2826         * symtab.c (find_pc_sect_line): Remove unused variable.
2827         * target-memory.c (compute_garbled_blocks): Remove unused
2828         variable.
2829         (target_write_memory_blocks): Remove unused variable.
2830         * target.c (target_stack::unpush): Remove unused variables.
2831         * tracepoint.c (start_tracing, all_tracepoint_actions)
2832         (merge_uploaded_trace_state_variables)
2833         (print_one_static_tracepoint_marker): Remove unused variable.
2834         * unittests/basic_string_view/element_access/char/1.cc (test01):
2835         Remove unused variable.
2836         * windows-nat.c (windows_continue, windows_add_all_dlls)
2837         (do_initial_windows_stuff, windows_nat_target::create_inferior):
2838         Remove unused variables.
2839
2840 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
2841
2842         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
2843         attr_profile in HAVE_ELF.
2844         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
2845         HAVE_ELF.
2846
2847 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
2848
2849         * frame.c (frame_register_unwind): Change parameter name.
2850         (frame_unwind_register): Likewise.
2851         (frame_unwind_register_value): Likewise.
2852         (frame_unwind_register_signed): Likewise.
2853         (frame_unwind_register_unsigned): Likewise.
2854         * frame.h (frame_register_unwind): Likewise.
2855         (frame_unwind_register): Likewise.
2856         (frame_unwind_register_value): Likewise.
2857         (frame_unwind_register_signed): Likewise.
2858         (frame_unwind_register_unsigned): Likewise.
2859         (frame_unwind_arch): Likewise.
2860
2861 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
2862
2863         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
2864         ISA maintenance.
2865
2866 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
2867
2868         * mips-linux-nat.c (mips_linux_nat_target::read_description):
2869         Call `get_ptrace_pid' rather than extracting the ptrace PID by
2870         hand.
2871
2872 2018-07-20  Keith Seitz  <keiths@redhat.com>
2873
2874         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
2875         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
2876         m_compunit_symtab, m_language>: Add "m_" prefix.
2877         Update all uses.
2878         * buildsym.c: Update all uses.
2879
2880 2018-07-20  Tom Tromey  <tom@tromey.com>
2881
2882         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
2883         * buildsym.h (record_line_ftype): Remove typedef.
2884
2885 2018-07-20  Tom Tromey  <tom@tromey.com>
2886
2887         * buildsym-legacy.h (augment_type_symtab): Don't declare.
2888         (end_expandable_symtab): Likewise.
2889         (end_symtab_get_static_block): Likewise.
2890         (end_symtab_from_static_block): Likewise.
2891         * buildsym-legacy.c (augment_type_symtab): Remove.
2892         (end_expandable_symtab): Remove.
2893         (end_symtab_get_static_block): Remove.
2894         (end_symtab_from_static_block): Remove.
2895
2896 2018-07-20  Tom Tromey  <tom@tromey.com>
2897
2898         * dwarf2read.c: Include buildsym.h.
2899         (struct dwarf2_cu) <builder>: New method.
2900         (fixup_go_packaging): Update.
2901         (process_full_comp_unit, process_full_type_unit): Update.  Don't
2902         use scoped_free_pendings.
2903         (using_directives): Add "cu" parameter, remove "language".
2904         (read_import_statement, setup_type_unit_groups, )
2905         (read_func_scope, read_lexical_block_scope)
2906         (dwarf2_record_block_ranges, read_namespace): Update.
2907         (lnp_state_machine::lnp_state_machine): Add cu parameter.
2908         (lnp_state_machine::handle_end_sequence): Update.
2909         (class lnp_state_machine) <m_cu>: New member.
2910         <m_record_line_callback>: Remove.
2911         <m_currently_recording_lines>: New member.
2912         (lnp_state_machine::handle_set_file): Update.
2913         (noop_record_line): Remove.
2914         (dwarf_record_line_p): Add cu parameter.
2915         (dwarf_record_line_1, dwarf_finish_line): Likewise.
2916         (lnp_state_machine::record_line)
2917         (lnp_state_machine::lnp_state_machine)
2918         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
2919         (dwarf_decode_lines): Update.
2920         (dwarf2_start_subfile): Add cu parameter.
2921         (dwarf2_start_symtab, new_symbol): Update.
2922         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
2923         Remove dwarf2_per_objfile parameter.
2924         (dwarf_decode_macros): Update.
2925
2926 2018-07-20  Tom Tromey  <tom@tromey.com>
2927
2928         * stabsread.c (define_symbol): Update.
2929         * buildsym-legacy.h (get_buildsym_compunit): Declare.
2930         * dwarf2read.c (new_symbol): Update.
2931         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
2932         * cp-namespace.c: Include buildsym.h.
2933         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
2934         * buildsym-legacy.c (get_buildsym_compunit): New function.
2935
2936 2018-07-20  Tom Tromey  <tom@tromey.com>
2937
2938         * xcoffread.c: Include buildsym-legacy.h.
2939         * windows-nat.c: Include buildsym-legacy.h.
2940         * stabsread.c: Include buildsym-legacy.h.
2941         * mdebugread.c: Include buildsym-legacy.h.
2942         * buildsym-legacy.h: New file.
2943         * buildsym-legacy.c: New file, from buildsym.c.
2944         * go32-nat.c: Include buildsym-legacy.h.
2945         * dwarf2read.c: Include buildsym-legacy.h.
2946         * dbxread.c: Include buildsym-legacy.h.
2947         * cp-namespace.c: Include buildsym-legacy.h.
2948         * coffread.c: Include buildsym-legacy.h.
2949         * buildsym.h: Move some contents to buildsym-legacy.h.
2950         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
2951         buildsym-legacy.c.
2952         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
2953
2954 2018-07-20  Tom Tromey  <tom@tromey.com>
2955
2956         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
2957         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
2958         (buildsym_compunit::buildsym_compunit)
2959         (buildsym_compunit::~buildsym_compunit)
2960         (buildsym_compunit::get_macro_table): Define.
2961
2962 2018-07-20  Tom Tromey  <tom@tromey.com>
2963
2964         * buildsym.c (reset_symtab_globals): Remove.
2965         (buildsym_compunit::end_symtab_from_static_block): Update.
2966         (buildsym_compunit::augment_type_symtab): Update.
2967         (end_symtab_from_static_block): Call free_buildsym_compunit.
2968         (augment_type_symtab, end_symtab, end_expandable_symtab):
2969         Likewise.
2970
2971 2018-07-20  Tom Tromey  <tom@tromey.com>
2972
2973         * arch-utils.c: Do not include buildsym.h.
2974         * mipsread.c: Do not include buildsym.h.
2975         * machoread.c: Do not include buildsym.h.
2976         * elfread.c: Do not include buildsym.h.
2977
2978 2018-07-20  Tom Tromey  <tom@tromey.com>
2979
2980         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
2981         initialization.
2982         (buildsym_compunit): Add new constructor.
2983         (struct buildsym_compunit) <get_last_source_file, finish_block,
2984         record_block_range, start_subfile, patch_subfile_names,
2985         push_subfile, pop_subfile, record_line, get_compunit_symtab,
2986         set_last_source_start_addr, get_last_source_start_addr,
2987         get_local_using_directives, set_local_using_directives,
2988         get_global_using_directives, outermost_context_p,
2989         get_current_context_stack, get_context_stack_depth,
2990         get_current_subfile, get_local_symbols, get_file_symbols,
2991         get_global_symbols, record_debugformat, record_producer,
2992         push_context, pop_context, end_symtab_get_static_block,
2993         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
2994         New public methods.
2995         <record_pending_block, finish_block_internal, make_blockvector,
2996         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
2997         private methods.
2998         Update all users.
2999
3000 2018-05-22  Tom Tromey  <tom@tromey.com>
3001
3002         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
3003         parameter.
3004         (finish_block_internal): Update.
3005
3006 2018-07-20  Tom Tromey  <tom@tromey.com>
3007
3008         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
3009         parameter.
3010         (finish_block_internal): Update.
3011
3012 2018-07-20  Tom Tromey  <tom@tromey.com>
3013
3014         * buildsym.h (EXTERN): Don't define or undef.
3015         * buildsym.c (EXTERN): Don't define.
3016
3017 2018-07-20  Tom Tromey  <tom@tromey.com>
3018
3019         * buildsym.c: Remove TODO comment.
3020
3021 2018-07-20  Tom Tromey  <tom@tromey.com>
3022
3023         * coffread.c (coff_symtab_read): Update.
3024         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
3025         (xcoff_new_init): Update.
3026         * mipsread.c (mipscoff_new_init): Update.
3027         * mdebugread.c (mdebug_build_psymtabs): Update.
3028         * elfread.c (elf_new_init): Update.
3029         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
3030         Update.
3031         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
3032         (coffstab_build_psymtabs, elfstab_build_psymtabs)
3033         (stabsect_build_psymtabs): Update.
3034         * buildsym.h (buildsym_init): Don't declare.
3035         * buildsym.c: Update comment.
3036         (prepare_for_building): Remove.
3037         (start_symtab, restart_symtab): Update.
3038         (reset_symtab_globals): Update comment.
3039         (buildsym_init): Remove.
3040
3041 2018-07-20  Tom Tromey  <tom@tromey.com>
3042
3043         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
3044         * stabsread.c (patch_block_stabs, define_symbol, read_type)
3045         (read_enum_type, common_block_start, common_block_end)
3046         (cleanup_undefined_types_1, finish_global_stabs): Update.
3047         * mdebugread.c (psymtab_to_symtab_1): Update.
3048         * dwarf2read.c (fixup_go_packaging, read_func_scope)
3049         (read_lexical_block_scope, new_symbol): Update.
3050         * dbxread.c (process_one_symbol): Update.
3051         * coffread.c (coff_symtab_read, process_coff_symbol)
3052         (coff_read_enum_type): Update.
3053         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
3054         declare.
3055         (get_local_symbols, get_file_symbols, get_global_symbols): New
3056         functions.
3057         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
3058         m_global_symbols.
3059         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
3060         (~scoped_free_pendings): Update.
3061         (finish_block, prepare_for_building, reset_symtab_globals)
3062         (end_symtab_get_static_block, end_symtab_with_blockvector)
3063         (augment_type_symtab, push_context): Update.
3064         (get_local_symbols, get_file_symbols, get_global_symbols): New
3065         functions.
3066         (buildsym_init): Update.
3067
3068 2018-07-20  Tom Tromey  <tom@tromey.com>
3069
3070         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
3071         (process_full_type_unit): Likewise.
3072         (dwarf2_start_symtab): Set list_in_scope.
3073
3074 2018-07-20  Tom Tromey  <tom@tromey.com>
3075
3076         * dwarf2read.c (process_psymtab_comp_unit_reader)
3077         (build_type_psymtabs_reader): Do not set list_in_scope.
3078
3079 2018-07-20  Tom Tromey  <tom@tromey.com>
3080
3081         * buildsym.c (free_pendings): Remove.
3082         (add_symbol_to_list, scoped_free_pendings)
3083         (finish_block_internal, buildsym_init): Update.
3084
3085 2018-07-20  Tom Tromey  <tom@tromey.com>
3086
3087         * xcoffread.c (read_xcoff_symtab): Update.
3088         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
3089         Update.
3090         * dbxread.c (process_one_symbol): Update.
3091         * coffread.c (coff_symtab_read): Update.
3092         * buildsym.h (finish_block): Update.
3093         * buildsym.c (finish_block): Remove "listhead" argument.
3094         (end_symtab_get_static_block): Update.
3095
3096 2018-07-20  Tom Tromey  <tom@tromey.com>
3097
3098         * buildsym.h (class scoped_free_pendings): Remove constructor.
3099         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
3100         method.
3101         <m_pending_block_obstack, m_pending_blocks>: New members.
3102         (pending_block_obstack, pending_blocks): Remove.
3103         (scoped_free_pendings::scoped_free_pendings): Default.
3104         (~scoped_free_pendings): Update.
3105         (free_pending_blocks): Remove.
3106         (finish_block_internal, record_pending_block, make_blockvector)
3107         (end_symtab_get_static_block, augment_type_symtab, push_context)
3108         (buildsym_init): Update.
3109
3110 2018-07-20  Tom Tromey  <tom@tromey.com>
3111
3112         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
3113         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
3114         members.
3115         (pending_addrmap, pending_addrmap_obstack)
3116         (pending_addrmap_interesting): Remove.
3117         (scoped_free_pendings, record_block_range, make_blockvector)
3118         (prepare_for_building, reset_symtab_globals, buildsym_init):
3119         Update.
3120
3121 2018-07-20  Tom Tromey  <tom@tromey.com>
3122
3123         * xcoffread.c (process_linenos): Update.
3124         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
3125         * mdebugread.c (psymtab_to_symtab_1): Update.
3126         * dwarf2read.c (setup_type_unit_groups)
3127         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
3128         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
3129         * dbxread.c (process_one_symbol): Update.
3130         * coffread.c (coff_symtab_read, enter_linenos)
3131         (process_coff_symbol): Update.
3132         * buildsym.h (current_subfile): Don't declare.
3133         (get_current_subfile): Declare.
3134         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
3135         member.
3136         (start_subfile, free_buildsym_compunit, push_subfile)
3137         (prepare_for_building, start_symtab): Update.
3138         (get_current_subfile): New function.
3139
3140 2018-07-20  Tom Tromey  <tom@tromey.com>
3141
3142         * coffread.c (coff_symtab_read): Update.
3143         * xcoffread.c (read_xcoff_symtab): Update.
3144         * dwarf2read.c (new_symbol): Update.
3145         (read_func_scope, read_lexical_block_scope): Update.
3146         * dbxread.c (process_one_symbol): Update.
3147         * buildsym.h (context_stack, context_stack_depth): Don't declare.
3148         (outermost_context_p): Remove macro.
3149         (outermost_context_p, get_current_context_stack)
3150         (get_context_stack_depth): Declare.
3151         (pop_context): Return struct context_stack.
3152         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
3153         member.
3154         (context_stack_size): Remove.
3155         (INITIAL_CONTEXT_STACK_SIZE): Remove.
3156         (prepare_for_building, end_symtab_get_static_block)
3157         (augment_type_symtab, push_context): Update.
3158         (pop_context): Return struct context_stack.
3159         (outermost_context_p, get_current_context_stack)
3160         (get_context_stack_depth): New functions.
3161         (buildsym_init): Update.
3162
3163 2018-07-20  Tom Tromey  <tom@tromey.com>
3164
3165         * rust-exp.y: Now a pure parser.  Update all rules.
3166         (%union): Move earlier.
3167         (current_parser, work_obstack): Remove globals.
3168         (rust_parser, ~rust_parser): Update.
3169         (class rust_parser) <copy_name, concat3, crate_name, super_name,
3170         lex_character, lex_number, lex_string, lex_identifier,
3171         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
3172         convert_name, convert_params_to_expression,
3173         convert_ast_to_expression, ast_basic_type, ast_operation,
3174         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
3175         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
3176         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
3177         ast_array_type, ast_slice_type, ast_reference_type,
3178         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
3179         (rust_parse): Update.
3180         (rustyyerror, rustyylex): Add parser parameter.
3181         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
3182         (rust_lex_stringish_test, rust_lex_test_sequence)
3183         (rust_lex_test_trailing_dot, rust_lex_test_completion)
3184         (rust_lex_test_push_back, rust_lex_tests): Update.
3185
3186 2018-07-19  Pedro Alves  <palves@redhat.com>
3187
3188         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
3189         gdb::unique_xmalloc_ptr.
3190         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
3191         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
3192         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
3193         copy-initialization.
3194         * guile/scm-pretty-print.c (ppscm_print_children): Use
3195         gdb::unique_xmalloc_ptr instead of cleanups.
3196         (gdbscm_apply_val_pretty_printer): Remove cleanups.
3197         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
3198         gdb::unique_xmalloc_ptr.
3199         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
3200         Adjust to use gdb::unique_xmalloc_ptr.
3201         * guile/scm-utils.c (extract_arg): Adjust.
3202         * guile/scm-value.c (gdbscm_value_field): Adjust to use
3203         gdb::unique_xmalloc_ptr instead of a cleanup.
3204
3205 2018-07-19  Tom Tromey  <tom@tromey.com>
3206
3207         * utils.c (do_value_free_to_mark)
3208         (make_cleanup_value_free_to_mark): Remove.
3209         * utils.h (make_cleanup_value_free_to_mark): Remove.
3210
3211 2018-07-19  Pedro Alves  <palves@redhat.com>
3212
3213         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
3214         forwarding reference.
3215
3216 2018-07-18  Pedro Alves  <palves@redhat.com>
3217
3218         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
3219         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
3220         cleanup.
3221
3222 2018-07-18  Pedro Alves  <palves@redhat.com>
3223
3224         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
3225         exceptions.
3226         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
3227         (gdbscm_wrap): New.
3228         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
3229         directly instead of a cleanup.
3230         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
3231         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
3232         (vlscm_binop_gdbthrow): New, factored out from ...
3233         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
3234         (vlscm_rich_compare): Use gdbscm_wrap.
3235         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
3236         instead of a cleanup.
3237         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
3238         cleanup.
3239         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
3240         Use xfree directly instead of a cleanup.
3241         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
3242         Adjust to use gdbscm_wrap and scoped_value_mark.
3243         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
3244         (gdbscm_value_address, gdbscm_value_dereference)
3245         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
3246         scoped_value_mark.
3247         (gdbscm_value_dynamic_type): Use scoped_value_mark.
3248         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
3249         scoped_value_mark.
3250         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
3251         gdbscm_wrap and scoped_value_mark.
3252         (gdbscm_value_to_string): Use xfree directly instead of a
3253         cleanup.  Move 'buffer' unique_ptr to TRY scope.
3254         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
3255         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
3256         scoped_value_mark.
3257         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
3258         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
3259         scoped_value_mark.
3260         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
3261         gdbscm_wrap.
3262
3263 2018-07-18  Tom de Vries  <tdevries@suse.de>
3264
3265         * findvar.c (default_read_var_value): Also resolve dynamic type for
3266         LOC_OPTIMIZED_OUT vars.
3267
3268 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
3269
3270         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
3271         decoding.
3272
3273 2018-07-17  Tom Tromey  <tom@tromey.com>
3274
3275         * guile/scm-param.c (pascm_set_func, pascm_show_func)
3276         (compute_enum_list, pascm_set_param_value_x)
3277         (gdbscm_parameter_value): Update.
3278         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
3279         (gdbscm_scm_to_host_string): Update.
3280         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
3281         Update.
3282         * guile/scm-cmd.c (cmdscm_add_completion): Update.
3283         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
3284         * guile/scm-string.c (gdbscm_scm_to_string): Return
3285         unique_xmalloc_ptr.
3286         (gdbscm_scm_to_host_string): Likewise.
3287
3288 2018-07-17  Tom Tromey  <tom@tromey.com>
3289
3290         * guile/guile.c (gdbscm_eval_from_control_command): Update.
3291         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
3292         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
3293         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
3294         unique_xmalloc_ptr.
3295
3296 2018-07-17  Tom Tromey  <tom@tromey.com>
3297
3298         * guile/scm-param.c (pascm_signal_setshow_error): Update.
3299         * guile/guile-internal.h (gdbscm_exception_message_to_string):
3300         Update.
3301         * guile/scm-cmd.c (cmdscm_function): Update.
3302         * guile/scm-pretty-print.c
3303         (ppscm_print_exception_unless_memory_error): Update.
3304         * guile/scm-exception.c (gdbscm_exception_message_to_string):
3305         Return unique_xmalloc_ptr.
3306
3307 2018-07-17  Tom Tromey  <tom@tromey.com>
3308
3309         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
3310         Use string_printf.
3311
3312 2018-07-17  Jim Wilson  <jimw@sifive.com>
3313
3314         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
3315         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
3316         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
3317         unecessary braces after EF_RISCV_RVC test.  Delete call to
3318         set_gdbarch_decr_pc_after_break.
3319
3320         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
3321         RISCV_LAST_FP_REGNUM + 1.
3322         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
3323
3324 2018-07-17  Tom Tromey  <tom@tromey.com>
3325
3326         * configure.ac: Remove --disable-gdbcli.
3327         * configure: Rebuild.
3328         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
3329         (SUBDIR_CLI_CFLAGS): Remove.
3330         (SFILES): Use SUBDIR_CLI_SRCS.
3331         (COMMON_OBS): Use SUBDIR_CLI_OBS.
3332
3333 2018-07-17  Tom Tromey  <tom@tromey.com>
3334
3335         PR gdb/18624:
3336         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
3337
3338 2018-07-16  Jim Wilson  <jimw@sifive.com>
3339
3340         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
3341
3342 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
3343
3344         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
3345         variable.
3346         (libunwind_frame_sniffer): Likewise.
3347         (libunwind_frame_prev_register): Likewise.
3348         (libunwind_sigtramp_frame_sniffer): Likewise.
3349         * ia64-tdep.c (ia64_access_reg): Likewise.
3350         (ia64_access_rse_reg): Likewise.
3351         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
3352         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
3353
3354 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
3355
3356         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
3357
3358 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
3359
3360         * remote-sim.c (gdbsim_target::close,
3361         gdbsim_target::mourn_inferior): Remove unused variables.
3362
3363 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
3364
3365         * ia64-tdep.c (ktab_buf): New global.
3366         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
3367         (get_kernel_table): Adjust.
3368
3369 2018-07-16  Tom Tromey  <tom@tromey.com>
3370
3371         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
3372         * dwarf2read.c (using_directives, new_symbol): Use
3373         outermost_context_p.
3374         * dbxread.c (process_one_symbol): Use outermost_context_p.
3375         * coffread.c (coff_symtab_read): Use outermost_context_p.
3376
3377 2018-07-16  Tom Tromey  <tom@tromey.com>
3378
3379         * dwarf2read.c (using_directives, read_func_scope)
3380         (read_lexical_block_scope): Update.
3381         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
3382         * buildsym.h (local_using_directives, global_using_directives):
3383         Don't declare.
3384         (get_local_using_directives, set_local_using_directives)
3385         (get_global_using_directives): Declare.
3386         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
3387         m_global_using_directives>: New members.
3388         (finish_block_internal, prepare_for_building)
3389         (reset_symtab_globals, end_symtab_get_static_block)
3390         (push_context): Update.
3391         (get_local_using_directives, set_local_using_directives)
3392         (get_global_using_directives): New functions.
3393         (buildsym_init): Update.
3394
3395 2018-07-16  Tom Tromey  <tom@tromey.com>
3396
3397         * xcoffread.c (xcoff_initial_scan): Don't call
3398         free_pending_blocks.
3399         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
3400         * buildsym.h (class scoped_free_pendings): Add constructor.
3401         (free_pending_blocks): Don't declare.
3402         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
3403         (free_pending_blocks): Now static.
3404
3405 2018-07-16  Tom Tromey  <tom@tromey.com>
3406
3407         * buildsym.h (push_subfile, pop_subfile): Update declarations.
3408         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
3409         member.
3410         (struct subfile_stack): Remove.
3411         (subfile_stack): Remove.
3412         (push_subfile, pop_subfile, buildsym_init): Update.
3413
3414 2018-07-16  Tom Tromey  <tom@tromey.com>
3415
3416         * buildsym.c (push_subfile): Use gdb_assert.
3417         (pop_subfile): Use gdb_assert.
3418
3419 2018-07-16  Tom Tromey  <tom@tromey.com>
3420
3421         * buildsym.h (merge_symbol_lists): Remove.
3422         * buildsym.c (merge_symbol_lists): Remove.
3423
3424 2018-07-16  Tom Tromey  <tom@tromey.com>
3425
3426         * stabsread.c (scan_file_globals): Update comment.
3427         * stabsread.h (scan_file_globals): Move from buildsym.h.
3428         * buildsym.h (scan_file_globals): Move to stabsread.h.
3429
3430 2018-07-16  Tom Tromey  <tom@tromey.com>
3431
3432         * xcoffread.c (xcoff_new_init): Update.
3433         * mipsread.c (mipscoff_new_init): Update.
3434         * mdebugread.c (mdebug_build_psymtabs): Update.
3435         * elfread.c (elf_new_init): Update.
3436         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
3437         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
3438         * buildsym.h (buildsym_new_init): Don't declare.
3439         * buildsym.c (buildsym_new_init): Remove.
3440
3441 2018-07-16  Tom Tromey  <tom@tromey.com>
3442
3443         * stabsread.h (within_function): Move from buildsym.h.
3444         * stabsread.c (start_stabs): Clear within_function.
3445         * coffread.c (coff_start_symtab): Clear within_function.
3446         * buildsym.h (within_function): Move to stabsread.h.
3447         * buildsym.c (prepare_for_building): Update.
3448
3449 2018-07-16  Tom Tromey  <tom@tromey.com>
3450
3451         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
3452         * dwarf2read.c (dwarf2_start_symtab): Don't set
3453         processing_gcc_compilation.
3454         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
3455
3456 2018-07-16  Tom Tromey  <tom@tromey.com>
3457
3458         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
3459         (next_symbol_text_func): Move from buildsym.h.
3460         * stabsread.c (hashname): Move from buildsym.c.
3461         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
3462         (next_symbol_text_func, hashname): Move to stabsread.h.
3463         * buildsym.c: Don't include bcache.h
3464         (hashname): Move to stasbread.c.
3465
3466 2018-07-16  Tom Tromey  <tom@tromey.com>
3467
3468         * buildsym.h (context_stack_size): Don't declare.
3469         * buildsym.c (context_stack_size): New global.
3470
3471 2018-07-16  Tom Tromey  <tom@tromey.com>
3472
3473         * dbxread.c (processing_acc_compilation): New global.
3474         * buildsym.h (processing_acc_compilation): Don't declare.
3475
3476 2018-07-16  Tom Tromey  <tom@tromey.com>
3477
3478         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
3479         * dbxread.c (read_ofile_symtab): Update.
3480         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
3481         * buildsym.h (last_source_start_addr): Remove.
3482         (set_last_source_start_addr, get_last_source_start_addr):
3483         Declare.
3484         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
3485         parameter.
3486         (struct buildsym_compunit) <m_last_source_start_addr>: New
3487         member.
3488         (prepare_for_building): Remove start_addr parameter.
3489         (start_symtab, restart_symtab, end_symtab_get_static_block)
3490         (end_symtab_with_blockvector): Update.
3491         (set_last_source_start_addr, get_last_source_start_addr): New
3492         functions.
3493
3494 2018-07-16  Tom Tromey  <tom@tromey.com>
3495
3496         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
3497         member.
3498         (have_line_numbers): Remove.
3499         (record_line, prepare_for_building, end_symtab_get_static_block)
3500         (augment_type_symtab): Update.
3501
3502 2018-07-16  Tom Tromey  <tom@tromey.com>
3503
3504         * buildsym.c (~buildsym_compunit): Free the macro table.
3505         (struct buildsym_compunit) <get_macro_table, release_macros>: New
3506         methods.
3507         <m_pending_macros>: New member.
3508         (pending_macros): Remove.
3509         (~scoped_free_pendings, get_macro_table, prepare_for_building)
3510         (reset_symtab_globals, end_symtab_get_static_block)
3511         (end_symtab_with_blockvector, augment_type_symtab)
3512         (buildsym_init): Update.
3513
3514 2018-07-16  Tom Tromey  <tom@tromey.com>
3515
3516         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
3517         parameter.
3518         (buildsym_compunit::set_last_source_file): New method.
3519         <m_last_source_file>: New member.
3520         (prepare_for_building): Remove "name" parameter.
3521         (start_symtab, restart_symtab, reset_symtab_globals): Update.
3522         (last_source_file): Remove.
3523         (set_last_source_file, get_last_source_file): Update.
3524
3525 2018-07-16  Tom Tromey  <tom@tromey.com>
3526
3527         * buildsym.c (prepare_for_building): Add assert.
3528
3529 2018-07-16  Tom Tromey  <tom@tromey.com>
3530
3531         * buildsym.c (~buildsym_compunit): Update.
3532         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
3533         (start_subfile, patch_subfile_names)
3534         (end_symtab_with_blockvector): Update.
3535
3536 2018-07-16  Tom Tromey  <tom@tromey.com>
3537
3538         * buildsym.c (struct buildsym_compunit): Add constructor,
3539         destructor, initializers.
3540         (start_buildsym_compunit): Remove.
3541         (free_buildsym_compunit): Use "delete".
3542         (start_symtab, restart_symtab): Use "new".
3543
3544 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
3545
3546         * symfile.c (set_objfile_default_section_offset): Remove struct
3547         keyword.
3548
3549 2018-07-14  Stafford Horne  <shorne@gmail.com>
3550
3551         * (Responsible Maintainers): Add myself as or1k maintainer.
3552
3553 2018-07-13  Tom Tromey  <tom@tromey.com>
3554
3555         * symfile.c (set_objfile_default_section_offset): Use extra braces
3556         around initializer.
3557
3558 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3559
3560         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
3561         non-branching basr.
3562
3563 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3564
3565         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3566         unittests/cli-utils-selftests.c
3567         * unittests/cli-utils-selftests.c: New file.
3568
3569 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3570
3571         * NEWS: Mention new commands. Mention change to 'thread apply'.
3572
3573 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3574
3575         * thread.c (thr_try_catch_cmd): New function.
3576         (thread_apply_all_command): Handle qcs flags.
3577         (thread_apply_command): Handle qcs flags.
3578         (taas_command): New function.
3579         (tfaas_command): New function.
3580         (_initialize_thread): Update to setup the new commands 'taas
3581         and 'tfaas'. Change doc string for 'thread apply'.
3582
3583 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3584
3585         * stack.c: (trailing_outermost_frame): New function, mostly
3586         extracted from backtrace_command_1.
3587         (leading_innermost_frame): New function.
3588         (backtrace_command_1): Update to call trailing_outermost_frame.
3589         (frame_apply_command_count): New function.
3590         (frame_apply_level_command): New function.
3591         (frame_apply_all_command): New function.
3592         (frame_apply_command): New function.
3593         (faas_command): New function.
3594         (frame_cmd_list): New variable.
3595         (_initialize_stack): Update to setup the new commands 'frame apply'
3596         and 'faas'.
3597
3598 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3599
3600         * cli-utils.c (number_or_range_parser::get_number): Only handle
3601         numbers or convenience var as numbers.
3602         (parse_flags): New function.
3603         (parse_flags_qcs): New function.
3604         (number_or_range_parser::finished): Ensure parsing end is detected
3605         before end of string.
3606         * cli-utils.h (parse_flags): New function.
3607         (parse_flags_qcs): New function.
3608         (number_or_range_parser): Remove m_finished bool.
3609         (number_or_range_parser::skip_range): Set m_in_range to false.
3610
3611 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
3612
3613         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
3614         on Windows.
3615
3616 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
3617             Jan Kratochvil  <jan.kratochvil@redhat.com>
3618             Paul Fertser  <fercerpav@gmail.com>
3619             Tsutomu Seki  <sekiriki@gmail.com>
3620             Pedro Alves  <palves@redhat.com>
3621
3622         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3623         'unittests/parse-connection-spec-selftests.c'.
3624         (COMMON_SFILES): Add 'common/netstuff.c'.
3625         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
3626         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
3627         * common/netstuff.c: New file.
3628         * common/netstuff.h: New file.
3629         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
3630         (wait_for_connect): Update comment.  New parameter
3631         'gdb::optional<int> sock' instead of 'struct serial *scb'.
3632         Use 'sock' directly instead of 'scb->fd'.
3633         (try_connect): New function, with code from 'net_open'.
3634         (net_open): Rewrite main loop to deal with multiple
3635         sockets/addresses.  Handle IPv6-style hostnames; implement
3636         support for IPv6 connections.
3637         * unittests/parse-connection-spec-selftests.c: New file.
3638
3639 2018-07-11  Pedro Alves  <palves@redhat.com>
3640
3641         PR gdb/23377
3642         * remote.c (remote_target::remote_detach_pid): Call
3643         set_current_process.
3644
3645 2018-07-11  Pedro Alves  <palves@redhat.com>
3646
3647         * h8300-tdep.c (h8300_gdbarch_init): Remove
3648         set_gdbarch_ecoff_reg_to_regnum calls.
3649
3650 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
3651
3652         PR c++/23373
3653         * c-typeprint.c (c_type_print_base_struct_union): Don't print
3654         offsets/sizes for static members of a class/struct.
3655
3656 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
3657
3658         * target-descriptions.c (tdesc_register_bitsize): Rename.
3659         * target-descriptions.h (tdesc_register_bitsize): Likewise.
3660         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
3661         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
3662
3663 2018-07-10  Tom Tromey  <tom@tromey.com>
3664
3665         * breakpoint.c (moribund_locations): Now static and a
3666         std::vector.
3667         (breakpoint_init_inferior, moribund_breakpoint_here_p)
3668         (build_bpstat_chain, update_global_location_list)
3669         (breakpoint_retire_moribund): Update.
3670         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
3671         VEC.
3672
3673 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
3674
3675         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
3676         (riscv_register_reggroup_p): Use new function, remove unneeded
3677         parenthesis.
3678         (riscv_push_dummy_call): Extend assert to compare against xlen or
3679         flen based on register type.
3680
3681 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
3682
3683         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
3684
3685 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
3686
3687         * remote.c (show_hardware_watchpoint_limit): New function.
3688         (show_hardware_watchpoint_length_limit): New function.
3689         (show_hardware_breakpoint_limit): New function.
3690         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
3691         where appropriate, update help text.
3692
3693 2018-07-09  Tom Tromey  <tom@tromey.com>
3694
3695         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
3696         (CLIBS): Don't mention NAT_CLIBS.
3697
3698 2018-07-09  Tom Tromey  <tom@tromey.com>
3699
3700         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
3701         (LIBGDB_OBS, clean mostlyclean): Update.
3702         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
3703
3704 2018-07-09  Tom Tromey  <tom@tromey.com>
3705
3706         * Makefile.in (%.c: %.y): Use ECHO_YACC.
3707         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
3708         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
3709
3710 2018-07-09  Tom Tromey  <tom@tromey.com>
3711
3712         * Makefile.in (ALLDEPFILES): Remove exec.c.
3713         (COMMON_OBS): Remove exec.o.
3714         (COMMON_SFILES): Add exec.c.
3715
3716 2018-07-09  Tom Tromey  <tom@tromey.com>
3717
3718         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
3719
3720 2018-07-09  Tom Tromey  <tom@tromey.com>
3721
3722         * Makefile.in (clean mostlyclean): Remove stamp-version.
3723         (version.c): Depend on stamp-version.
3724         (stamp-version): New rule, from version.c rule.
3725
3726 2018-07-09  Tom Tromey  <tom@tromey.com>
3727
3728         * Makefile.in (init.c): Depend on stamp-init.
3729         (stamp-init): New rule, from init.c rule.
3730         (clean mostlyclean): Remove stamp-init.
3731
3732 2018-07-09  Tom Tromey  <tom@tromey.com>
3733
3734         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
3735         SUBDIR_GCC_COMPILE_SRCS.
3736
3737 2018-07-09  Tom Tromey  <tom@tromey.com>
3738
3739         * Makefile.in (init.c): Remove some unused sed rules.
3740
3741 2018-07-09  Tom Tromey  <tom@tromey.com>
3742
3743         * Makefile.in (TSOBS): Remove.
3744         (INIT_FILES): Update.
3745         (LIBGDB_OBS): Update.
3746         (COMMON_SFILES): Add inflow.c.
3747         (SFILES): Remove inflow.c.
3748
3749 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
3750
3751         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
3752
3753 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
3754
3755         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
3756         get_saveloc_name, is_signal_frame_name, step_name,
3757         init_remote_name, create_addr_space_name,
3758         destroy_addr_space_name, search_unwind_table_name,
3759         find_dyn_list_name): Constify.
3760
3761 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
3762
3763         * darwin-nat.c (darwin_pthread_kill): New function.
3764         (darwin_resume_thread): Use darwin_pthread_kill.
3765
3766 2018-07-05  Tom de Vries  <tdevries@suse.de>
3767
3768         * macroexp.c (macro_buffer) <operator=>: New member function.
3769
3770 2018-07-04  Tom Tromey  <tom@tromey.com>
3771
3772         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
3773
3774 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
3775
3776         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
3777         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
3778         * maint.c: Likewise.
3779         * top.c: Likewise.
3780
3781 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
3782
3783         * NEWS: Create a new section for the next release branch.
3784         Rename the section of the current branch, now that it has
3785         been cut.
3786
3787 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
3788
3789         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
3790         * version.in: Bump version to 8.2.50.DATE-git.
3791
3792 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
3793             Pedro Alves  <palves@redhat.com>
3794
3795         * linux-nat.c (linux_init_ptrace): Rename to ...
3796         (linux_init_ptrace_procfs): ... this.  Call
3797         linux_proc_init_warnings.
3798         (linux_nat_target::post_attach)
3799         (linux_nat_target::post_startup_inferior): Adjust.
3800         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
3801         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
3802
3803 2018-07-04  Tom de Vries  <tdevries@suse.de>
3804
3805         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
3806         check ...
3807         (read_comp_unit_head): ... here.
3808
3809 2018-07-03  Tom Tromey  <tom@tromey.com>
3810
3811         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
3812         (stop_tracing, tstatus_command)
3813         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
3814         (print_one_static_tracepoint_marker): Update.
3815         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
3816         std::vector.
3817         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
3818         VEC.
3819         (all_tracepoints, static_tracepoints_here): Return std::vector.
3820
3821 2018-07-03  Tom Tromey  <tom@tromey.com>
3822
3823         * common/ptid.c (ptid_equal): Remove.
3824         * common/ptid.h (ptid_equal): Don't declare.
3825         * ada-tasks.c: Update.
3826         * breakpoint.c: Update.
3827         * common/agent.c: Update.
3828         * corelow.c: Update.
3829         * darwin-nat-info.c: Update.
3830         * darwin-nat.c: Update.
3831         * dcache.c: Update.
3832         * dtrace-probe.c: Update.
3833         * dummy-frame.c: Update.
3834         * fbsd-nat.c: Update.
3835         * frame.c: Update.
3836         * gdbthread.h: Update.
3837         * gnu-nat.c: Update.
3838         * go32-nat.c: Update.
3839         * inf-loop.c: Update.
3840         * inf-ptrace.c: Update.
3841         * infcall.c: Update.
3842         * infcmd.c: Update.
3843         * inflow.c: Update.
3844         * infrun.c: Update.
3845         * linux-fork.c: Update.
3846         * linux-nat.c: Update.
3847         * linux-thread-db.c: Update.
3848         * mi/mi-cmd-var.c: Update.
3849         * mi/mi-interp.c: Update.
3850         * mi/mi-main.c: Update.
3851         * nto-procfs.c: Update.
3852         * ppc-linux-tdep.c: Update.
3853         * procfs.c: Update.
3854         * python/py-inferior.c: Update.
3855         * python/py-record-btrace.c: Update.
3856         * python/py-record.c: Update.
3857         * ravenscar-thread.c: Update.
3858         * regcache.c: Update.
3859         * remote-sim.c: Update.
3860         * remote.c: Update.
3861         * sol-thread.c: Update.
3862         * solib.c: Update.
3863         * target.c: Update.
3864         * tui/tui-stack.c: Update.
3865         * varobj.c: Update.
3866         * windows-nat.c: Update.
3867         * windows-tdep.c: Update.
3868
3869 2018-07-03  Tom Tromey  <tom@tromey.com>
3870
3871         * common/ptid.c (ptid_match): Remove.
3872         * common/ptid.h (ptid_match): Don't declare.
3873         * fbsd-nat.c: Update.
3874         * infcmd.c: Update.
3875         * infrun.c: Update.
3876         * linux-nat.c: Update.
3877         * record-btrace.c: Update.
3878         * regcache.c: Update.
3879         * remote.c: Update.
3880
3881 2018-07-03  Tom Tromey  <tom@tromey.com>
3882
3883         * common/ptid.c (ptid_tid_p): Remove.
3884         * common/ptid.h (ptid_tid_p): Don't declare.
3885         * sol-thread.c: Update.
3886
3887 2018-07-03  Tom Tromey  <tom@tromey.com>
3888
3889         * common/ptid.c (ptid_lwp_p): Remove.
3890         * common/ptid.h (ptid_lwp_p): Don't declare.
3891         * fbsd-nat.c: Update.
3892         * linux-nat.c: Update.
3893         * nat/linux-procfs.c: Update.
3894         * nat/x86-linux-dregs.c: Update.
3895         * sol-thread.c: Update.
3896
3897 2018-07-03  Tom Tromey  <tom@tromey.com>
3898
3899         * common/ptid.c (ptid_is_pid): Remove.
3900         * common/ptid.h (ptid_is_pid): Don't declare.
3901         * infrun.c: Update.
3902         * linux-nat.c: Update.
3903         * mi/mi-interp.c: Update.
3904         * remote.c: Update.
3905         * thread.c: Update.
3906
3907 2018-07-03  Tom Tromey  <tom@tromey.com>
3908
3909         * common/ptid.c (ptid_get_tid): Remove.
3910         * common/ptid.h (ptid_get_tid): Don't declare.
3911         * ada-tasks.c: Update.
3912         * aix-thread.c: Update.
3913         * bsd-uthread.c: Update.
3914         * darwin-nat.c: Update.
3915         * fbsd-nat.c: Update.
3916         * i386-darwin-nat.c: Update.
3917         * infrun.c: Update.
3918         * linux-tdep.c: Update.
3919         * nto-procfs.c: Update.
3920         * ppc-ravenscar-thread.c: Update.
3921         * python/py-infthread.c: Update.
3922         * ravenscar-thread.c: Update.
3923         * sol-thread.c: Update.
3924         * sparc-ravenscar-thread.c: Update.
3925         * windows-nat.c: Update.
3926
3927 2018-07-03  Tom Tromey  <tom@tromey.com>
3928
3929         * common/ptid.c (ptid_get_lwp): Remove.
3930         * common/ptid.h (ptid_get_lwp): Don't declare.
3931         * aarch64-linux-nat.c: Update.
3932         * ada-tasks.c: Update.
3933         * aix-thread.c: Update.
3934         * amd64-linux-nat.c: Update.
3935         * arm-linux-nat.c: Update.
3936         * corelow.c: Update.
3937         * fbsd-nat.c: Update.
3938         * fbsd-tdep.c: Update.
3939         * gnu-nat.c: Update.
3940         * i386-cygwin-tdep.c: Update.
3941         * i386-gnu-nat.c: Update.
3942         * i386-linux-nat.c: Update.
3943         * ia64-linux-nat.c: Update.
3944         * inf-ptrace.c: Update.
3945         * infrun.c: Update.
3946         * linux-fork.c: Update.
3947         * linux-nat.c: Update.
3948         * linux-tdep.c: Update.
3949         * linux-thread-db.c: Update.
3950         * mips-linux-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         * obsd-nat.c: Update.
3958         * ppc-fbsd-nat.c: Update.
3959         * ppc-linux-nat.c: Update.
3960         * procfs.c: Update.
3961         * python/py-infthread.c: Update.
3962         * ravenscar-thread.c: Update.
3963         * remote.c: Update.
3964         * s390-linux-nat.c: Update.
3965         * sol-thread.c: Update.
3966         * sol2-tdep.c: Update.
3967         * spu-linux-nat.c: Update.
3968         * x86-linux-nat.c: Update.
3969         * xtensa-linux-nat.c: Update.
3970
3971 2018-07-03  Tom Tromey  <tom@tromey.com>
3972
3973         * common/ptid.c (ptid_get_pid): Remove.
3974         * common/ptid.h (ptid_get_pid): Don't declare.
3975         * aarch64-linux-nat.c: Update.
3976         * ada-lang.c: Update.
3977         * aix-thread.c: Update.
3978         * alpha-bsd-nat.c: Update.
3979         * amd64-fbsd-nat.c: Update.
3980         * amd64-linux-nat.c: Update.
3981         * arm-linux-nat.c: Update.
3982         * arm-nbsd-nat.c: Update.
3983         * auxv.c: Update.
3984         * break-catch-syscall.c: Update.
3985         * breakpoint.c: Update.
3986         * bsd-uthread.c: Update.
3987         * corelow.c: Update.
3988         * ctf.c: Update.
3989         * darwin-nat.c: Update.
3990         * fbsd-nat.c: Update.
3991         * fbsd-tdep.c: Update.
3992         * gcore.c: Update.
3993         * gnu-nat.c: Update.
3994         * hppa-nbsd-nat.c: Update.
3995         * hppa-obsd-nat.c: Update.
3996         * i386-fbsd-nat.c: Update.
3997         * ia64-linux-nat.c: Update.
3998         * inf-ptrace.c: Update.
3999         * infcmd.c: Update.
4000         * inferior.c: Update.
4001         * inferior.h: Update.
4002         * inflow.c: Update.
4003         * infrun.c: Update.
4004         * linux-fork.c: Update.
4005         * linux-nat.c: Update.
4006         * linux-tdep.c: Update.
4007         * linux-thread-db.c: Update.
4008         * m68k-bsd-nat.c: Update.
4009         * mi/mi-interp.c: Update.
4010         * mi/mi-main.c: Update.
4011         * mips-linux-nat.c: Update.
4012         * mips-nbsd-nat.c: Update.
4013         * mips64-obsd-nat.c: Update.
4014         * nat/aarch64-linux-hw-point.c: Update.
4015         * nat/aarch64-linux.c: Update.
4016         * nat/linux-btrace.c: Update.
4017         * nat/linux-osdata.c: Update.
4018         * nat/linux-procfs.c: Update.
4019         * nat/x86-linux-dregs.c: Update.
4020         * nto-procfs.c: Update.
4021         * obsd-nat.c: Update.
4022         * ppc-linux-nat.c: Update.
4023         * ppc-nbsd-nat.c: Update.
4024         * ppc-obsd-nat.c: Update.
4025         * proc-service.c: Update.
4026         * procfs.c: Update.
4027         * python/py-inferior.c: Update.
4028         * python/py-infthread.c: Update.
4029         * ravenscar-thread.c: Update.
4030         * record.c: Update.
4031         * remote-sim.c: Update.
4032         * remote.c: Update.
4033         * rs6000-nat.c: Update.
4034         * s390-linux-nat.c: Update.
4035         * sh-nbsd-nat.c: Update.
4036         * sol-thread.c: Update.
4037         * sparc-nat.c: Update.
4038         * sparc64-tdep.c: Update.
4039         * spu-linux-nat.c: Update.
4040         * spu-tdep.c: Update.
4041         * target-debug.h: Update.
4042         * target.c: Update.
4043         * thread.c: Update.
4044         * tid-parse.c: Update.
4045         * tracefile-tfile.c: Update.
4046         * vax-bsd-nat.c: Update.
4047         * windows-nat.c: Update.
4048         * x86-linux-nat.c: Update.
4049         * x86-nat.c: Update.
4050
4051 2018-07-03  Tom Tromey  <tom@tromey.com>
4052
4053         * common/ptid.c (pid_to_ptid): Remove.
4054         * common/ptid.h (pid_to_ptid): Don't declare.
4055         * aix-thread.c: Update.
4056         * arm-linux-nat.c: Update.
4057         * common/ptid.c: Update.
4058         * common/ptid.h: Update.
4059         * corelow.c: Update.
4060         * ctf.c: Update.
4061         * darwin-nat.c: Update.
4062         * fbsd-nat.c: Update.
4063         * fork-child.c: Update.
4064         * gnu-nat.c: Update.
4065         * go32-nat.c: Update.
4066         * inf-ptrace.c: Update.
4067         * infcmd.c: Update.
4068         * inferior.c: Update.
4069         * infrun.c: Update.
4070         * linux-fork.c: Update.
4071         * linux-nat.c: Update.
4072         * nat/aarch64-linux-hw-point.c: Update.
4073         * nat/fork-inferior.c: Update.
4074         * nat/x86-linux-dregs.c: Update.
4075         * nto-procfs.c: Update.
4076         * obsd-nat.c: Update.
4077         * procfs.c: Update.
4078         * progspace.c: Update.
4079         * remote.c: Update.
4080         * rs6000-nat.c: Update.
4081         * s390-linux-nat.c: Update.
4082         * sol-thread.c: Update.
4083         * spu-linux-nat.c: Update.
4084         * target.c: Update.
4085         * top.c: Update.
4086         * tracefile-tfile.c: Update.
4087         * windows-nat.c: Update.
4088
4089 2018-07-03  Tom Tromey  <tom@tromey.com>
4090
4091         * common/ptid.h (ptid_build): Don't declare.
4092         * common/ptid.c (ptid_build): Remove.
4093         * aix-thread.c: Update.
4094         * bsd-kvm.c: Update.
4095         * bsd-uthread.c: Update.
4096         * common/agent.c: Update.
4097         * common/ptid.c: Update.
4098         * common/ptid.h: Update.
4099         * corelow.c: Update.
4100         * darwin-nat.c: Update.
4101         * fbsd-nat.c: Update.
4102         * gnu-nat.c: Update.
4103         * linux-fork.c: Update.
4104         * linux-nat.c: Update.
4105         * linux-thread-db.c: Update.
4106         * nat/linux-osdata.c: Update.
4107         * nat/linux-procfs.c: Update.
4108         * nto-procfs.c: Update.
4109         * obsd-nat.c: Update.
4110         * proc-service.c: Update.
4111         * procfs.c: Update.
4112         * ravenscar-thread.c: Update.
4113         * remote-sim.c: Update.
4114         * remote.c: Update.
4115         * sol-thread.c: Update.
4116         * target.c: Update.
4117         * windows-nat.c: Update.
4118
4119 2018-07-03  Tom Tromey  <tom@tromey.com>
4120
4121         * infrun.c (follow_exec): Use exit_inferior_silent.
4122         * inferior.c (exit_inferior_num_silent): Remove.
4123         * inferior.h (exit_inferior_num_silent): Don't declare.
4124
4125 2018-07-03  Tom Tromey  <tom@tromey.com>
4126
4127         PR cli/23340:
4128         * darwin-nat.c (darwin_attach_pid): Reset inferior and
4129         inferior_ptid on error.
4130
4131 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
4132             Simon Marchi  <simon.marchi@polymtl.ca>
4133
4134         PR tdep/8282
4135         * disasm.h (gdb_disassembler): Add
4136         `m_disassembler_options_holder'. member
4137         * disasm.c (get_all_disassembler_options): New function.
4138         (gdb_disassembler::gdb_disassembler): Use it.
4139         (gdb_buffered_insn_length_init_dis): Likewise.
4140         (gdb_buffered_insn_length): Adjust accordingly.
4141         (set_disassembler_options): Handle options with arguments.
4142         (show_disassembler_options_sfunc): Likewise.  Add a leading new
4143         line if showing options with descriptions.
4144         (disassembler_options_completer): Adapt to using the
4145         `disasm_options_and_args_t' structure.
4146         * mips-tdep.c (mips_disassembler_options): New variable.
4147         (mips_disassembler_options_o32): Likewise.
4148         (mips_disassembler_options_n32): Likewise.
4149         (mips_disassembler_options_n64): Likewise.
4150         (gdb_print_insn_mips): Don't set `disassembler_options'.
4151         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
4152         functions.
4153         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
4154         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
4155         `gdbarch_disassembler_options_implicit' and
4156         `gdbarch_valid_disassembler_options'.
4157         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
4158         `disasm_options_and_args_t' structure.
4159         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
4160         method.
4161         (valid_disassembler_options): Switch from `disasm_options_t' to
4162         the `disasm_options_and_args_t' structure.
4163         * NEWS: Document `set disassembler-options' support for the MIPS
4164         target.
4165         * gdbarch.h: Regenerate.
4166         * gdbarch.c: Regenerate.
4167
4168 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
4169
4170         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
4171
4172 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
4173
4174         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
4175         parameter in call to amd64_target_description.
4176         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
4177         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
4178         (amd64fbsd_init_abi): Likewise.
4179         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
4180         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
4181         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
4182         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
4183
4184 2018-06-29  Pedro Alves  <palves@redhat.com>
4185
4186         * gdb/amd64-tdep.h (amd64_create_target_description): Add
4187         "segments" parameter.
4188         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
4189         (_initialize_amd64_tdep): Update call to
4190         amd64_create_target_description.
4191         (amd64_target_description): Add "segments" parameter.  Adjust
4192         the implementation to use it.
4193         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
4194         call to amd64_create_target_description.
4195         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
4196         * gdb/arch/amd64.h (amd64_create_target_description): Add
4197         "segments" register.
4198         * gdb/arch/amd64.c (amd64_create_target_description): Add
4199         "segments" parameter.  Call create_feature_i386_64bit_segments
4200         only if SEGMENTS is true.
4201         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
4202         call to amd64_create_target_description.
4203
4204 2018-06-29  Pedro Alves  <palves@redhat.com>
4205
4206         * thread.c (thread_target_id_str): New, factored out from ...
4207         (print_thread_info_1): ... here.  Use it to compute the max
4208         "Target Id" column width.
4209
4210 2018-06-29  Pedro Alves  <palves@redhat.com>
4211
4212         * remote.c (remote_target::extra_thread_info): Delete
4213         'display_buf' and 'n' locals.  from the cache, regardless of
4214         packet mechanims is in use.  Use cache for qThreadExtra and qP
4215         methods too.
4216
4217 2018-06-29  Pedro Alves  <palves@redhat.com>
4218
4219         * blockframe.c (find_pc_sect_containing_function): New function.
4220         * breakpoint.c (print_breakpoint_location): Don't call
4221         find_pc_sect_function.
4222         * linespec.c (create_sals_line_offset): Record the location's
4223         symbol in the sal.
4224         * linespec.c (convert_address_location_to_sals): Fill in sal's
4225         symbol with find_pc_sect_containing_function.
4226         * symtab.c (find_function_start_sal): Rename to ...
4227         (find_function_start_sal_1): ... this.
4228         (find_function_start_sal): Reimplement as wrapper around
4229         find_function_start_sal_1, and use
4230         find_pc_sect_containing_function to fill in the sal's symbol.
4231         (find_function_start_sal(symbol*, bool)): Adjust.
4232         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
4233         comments.
4234         (find_pc_sect_containing_function): Declare.
4235
4236 2018-06-29  Pedro Alves  <palves@redhat.com>
4237
4238         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
4239         true if the the location has no symbol.
4240
4241 2018-06-28  Tom Tromey  <tom@tromey.com>
4242
4243         * NEWS: Mention --enable-codesign.
4244         * silent-rules.mk (ECHO_SIGN): New variable.
4245         * configure.ac: Add --enable-codesign.
4246         * configure: Rebuild.
4247         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
4248         (gdb$(EXEEXT)): Optionally invoke codesign.
4249
4250 2018-06-28  Pedro Alves  <palves@redhat.com>
4251
4252         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
4253         comments.
4254         (switch_to_thread_no_regs): Adjust comment.
4255         * infcmd.c (stop_pc): Delete.
4256         (post_create_inferior, info_program_command): Replace references
4257         to stop_pc with references to thread_info->suspend.stop_pc.
4258         * inferior.h (stop_pc): Delete declaration.
4259         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
4260         (handle_inferior_event_1, handle_signal_stop)
4261         (process_event_stop_test, keep_going_stepped_thread)
4262         (handle_step_into_function, handle_step_into_function_backward)
4263         (print_stop_location): Replace references to stop_pc with
4264         references to thread_info->suspend.stop_pc.
4265         (struct infcall_suspend_state) <stop_pc>: Delete field.
4266         (save_infcall_suspend_state, restore_infcall_suspend_state):
4267         Remove references to inf_stat->stop_pc.
4268         * linux-fork.c (fork_load_infrun_state): Likewise.
4269         * record-btrace.c (record_btrace_set_replay): Likewise.
4270         * record-full.c (record_full_goto_entry): Likewise.
4271         * remote.c (print_one_stopped_thread): Likewise.
4272         * target.c (target_resume): Extend comment.
4273         * thread.c (set_executing_thread): New.
4274         (set_executing): Use it.
4275         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
4276         Remove references to stop_pc.
4277
4278 2018-06-28  Pedro Alves  <palves@redhat.com>
4279
4280         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
4281         Moving fetching stop_pc until after ecs->event_thread is refreshed.
4282
4283 2018-06-28  Tom Tromey  <tom@tromey.com>
4284
4285         * coffread.c (coff_symfile_finish): Update.
4286         * xcoffread.c (xcoff_symfile_finish): Update.
4287         * elfread.c (elf_symfile_finish): Update.
4288         * symfile.h (dwarf2_free_objfile): Don't declare.
4289         * dwarf2read.c (_initialize_dwarf2_read): Use
4290         register_objfile_data_with_cleanup.
4291         (dwarf2_free_objfile): Now static.  Change signature.
4292
4293 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4294
4295         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
4296         option "-o" to add-symbol-file-load to add an offset to each
4297         section's load address.
4298         * symfile.c (set_objfile_default_section_offset): New function.
4299
4300 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4301
4302         * symfile.c (add_symbol_file_command): Make sure that sections
4303         with the same name are sorted in the same order.
4304
4305 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4306
4307         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
4308         require the second argument.  If omitted, load sections at the
4309         addresses specified in the file.
4310
4311 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4312
4313         * symfile.c (symbol_file_command, symbol_file_add_main_1)
4314         (_initialize_symfile): Add option "-o" to symbol-file to add an
4315         offset to each section of the symbol file.
4316
4317 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4318
4319         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
4320
4321 2018-06-27  Tom Tromey  <tom@tromey.com>
4322
4323         * stack.c (_initialize_stack): Update "func" help text.
4324
4325 2018-06-27  Tom Tromey  <tom@tromey.com>
4326
4327         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
4328         std::vector.
4329         (unwind_infopy_str, pyuw_create_unwind_info)
4330         (unwind_infopy_add_saved_register, pyuw_sniffer)
4331         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
4332         Update.
4333         (struct saved_reg): Add constructor.
4334         <value>: Now a gdbpy_ref<>.
4335
4336 2018-06-27  Tom Tromey  <tom@tromey.com>
4337
4338         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
4339
4340 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4341
4342         * gdb-gdb.py.in: Format using autopep8.
4343
4344 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4345
4346         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
4347         (type_lookup_function): Recognize CORE_ADDR values.
4348
4349 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4350
4351         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
4352         print tag_name.
4353
4354 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4355
4356         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
4357         <__lt__>: Add.
4358
4359 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4360
4361         * gdb-gdb.py: Move to...
4362         * gdb-gdb.py.in: ... here.
4363         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
4364         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
4365         dependencies.
4366         (distclean): Remove gdb-gdb.py when cleaning.
4367         (gdb-gdb.py, gdb-gdb.gdb): New rules.
4368         * configure: Re-generate.
4369
4370 2018-06-27  Pedro Alves  <palves@redhat.com>
4371
4372         * proc-service.c (get_ps_regcache): New.
4373         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4374         (ps_lsetfpregs): Use it.
4375
4376 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
4377
4378         PR gdb/21695
4379         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
4380         (dwarf_decode_lines_1): Adjust.
4381
4382 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4383
4384         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
4385         override.
4386         <info_proc>: Likewise.
4387
4388 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
4389
4390         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
4391         to windows_fetch_one_register, and only handle the case of
4392         fetching one register.  Move the code that reloads the context
4393         and iterates over all registers if R is negative to...
4394         (windows_nat_target::fetch_registers): ... here.
4395         (do_windows_store_inferior_registers): Rename to
4396         windows_store_one_register, and only handle the case of storing
4397         one register.  Move the code that handles the case where r is
4398         negative to...
4399         (windows_nat_target::store_registers) ... here.
4400
4401 2018-06-26  Tom Tromey  <tom@tromey.com>
4402
4403         PR rust/22574:
4404         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
4405         * rust-lang.c (rust_print_struct_def): Add podata parameter.
4406         Update.
4407         (rust_internal_print_type): Add podata parameter.
4408         (rust_print_type): Update.
4409
4410 2018-06-26  Tom Tromey  <tom@tromey.com>
4411
4412         * typeprint.h (struct print_offset_data) <update, finish,
4413         maybe_print_hole>: New methods.
4414         <indentation>: New constant.
4415         * typeprint.c (print_offset_data::indentation): Define.
4416         (print_offset_data::maybe_print_hole, print_offset_data::update)
4417         (print_offset_data::finish): Move from c-typeprint.c and rename.
4418         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
4419         (print_spaces_filtered_with_print_options): Update.
4420         (c_print_type_union_field_offset, maybe_print_hole)
4421         (c_print_type_struct_field_offset): Move to typeprint.c and
4422         rename.
4423         (c_type_print_base_struct_union): Update.
4424
4425 2018-06-25  Pedro Alves  <palves@redhat.com>
4426
4427         * gdbthread.h (thread_info_ref, delete_thread)
4428         (delete_thread_silent, first_thread_of_inferior)
4429         (any_thread_of_inferior, switch_to_thread)
4430         (enable_thread_stack_temporaries)
4431         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4432         (get_last_thread_stack_temporary)
4433         (value_in_thread_stack_temporaries, can_access_registers_thread):
4434         Spell out "struct thread_info" instead of just "thread_info".
4435         * inferior.h (notice_new_inferior): Likewise.
4436
4437 2018-06-25  Pedro Alves  <palves@redhat.com>
4438
4439         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
4440         pass thread_info pointer to delete_thread.
4441         (windows_nat_target::detach): Pass inferior pointer to
4442         detach_inferior.
4443         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
4444         delete_thread.
4445         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
4446         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
4447         and pass a thread_info pointer to delete_thread.
4448         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
4449         pass thread_info pointer to delete_thread.
4450         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
4451         delete_thread_silent call.
4452         * procfs.c (procfs_target::detach): Pass inferior pointer to
4453         detach_inferior.
4454         (procfs_target::wait): Pass thread_info pointer to delete_thread.
4455         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
4456         delete_thread_silent call.
4457         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
4458         pass thread_info pointer to delete_thread.
4459         (windows_nat_target::detach): Pass inferior pointer to
4460         delete_inferior.
4461
4462 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
4463
4464         * regcache.c (readable_regcache::read_part): Fix asserts.
4465         (reg_buffer::raw_collect_part): New function.
4466         (regcache::write_part): Fix asserts.
4467         (reg_buffer::raw_supply_part): New function.
4468         (regcache::transfer_regset_register): New helper function.
4469         (regcache::transfer_regset): Call new functions.
4470         (regcache_supply_regset): Use gdb_byte*.
4471         (regcache::supply_regset): Likewise.
4472         (regcache_collect_regset): Likewise.
4473         (regcache::collect_regset): Likewise.
4474         * regcache.h (reg_buffer::raw_collect_part): New declaration.
4475         (reg_buffer::raw_supply_part): Likewise.
4476         (regcache::transfer_regset_register): Likewise.
4477         (regcache::transfer_regset): Use gdb_byte*.
4478
4479 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
4480
4481         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
4482
4483 2018-06-21  Pedro Alves  <palves@redhat.com>
4484
4485         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
4486         instead of a ptid_t.  All callers adjusted.
4487         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
4488         adjusted.
4489         (print_ada_task_info, display_current_task_id, task_command_1):
4490         Adjust.
4491         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
4492         inferior_thread.
4493         (breakpoint_kind): Adjust.
4494         (remove_breakpoints_pid): Rename to ...
4495         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
4496         pointer.  All callers adjusted.
4497         (bpstat_clear_actions): Use inferior_thread.
4498         (get_bpstat_thread): New.
4499         (bpstat_do_actions): Use it.
4500         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
4501         to take a thread_info pointer.  All callers adjusted.
4502         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
4503         (breakpoint_re_set_thread): Use inferior_thread.
4504         * breakpoint.h (struct inferior): Forward declare.
4505         (bpstat_stop_status): Update.
4506         (remove_breakpoints_pid): Delete.
4507         (remove_breakpoints_inf): New.
4508         * bsd-uthread.c (bsd_uthread_target::wait)
4509         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
4510         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
4511         (maint_btrace_packet_history_cmd)
4512         (maint_btrace_clear_packet_history_cmd): Adjust.
4513         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
4514         inferior_thread.
4515         * cli/cli-interp.c: Include "inferior.h".
4516         * common/refcounted-object.h (struct
4517         refcounted_object_ref_policy): New.
4518         * compile/compile-object-load.c: Include gdbthread.h.
4519         (store_regs): Use inferior_thread.
4520         * corelow.c (core_target::close): Use current_inferior.
4521         (core_target_open): Adjust to use first_thread_of_inferior and use
4522         the current inferior.
4523         * ctf.c (ctf_target::close): Adjust to use current_inferior.
4524         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
4525         <thread>: ... this new field.  All references adjusted.
4526         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
4527         Take a thread_info pointer instead of a ptid_t.
4528         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
4529         (dummy_frame_discard, register_dummy_frame_dtor): Take a
4530         thread_info pointer instead of a ptid_t.
4531         * elfread.c: Include "inferior.h".
4532         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
4533         Use inferior_thread.
4534         * eval.c (evaluate_subexp): Likewise.
4535         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
4536         inferior_thread.
4537         * gdb_proc_service.h (struct thread_info): Forward declare.
4538         (struct ps_prochandle) <ptid>: Delete, replaced by ...
4539         <thread>: ... this new field.  All references adjusted.
4540         * gdbarch.h, gdbarch.c: Regenerate.
4541         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
4542         'thread' parameter.  All implementations and callers adjusted.
4543         * gdbthread.h (thread_info) <set_running>: New method.
4544         (delete_thread, delete_thread_silent): Take a thread_info pointer
4545         instead of a ptid.
4546         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
4547         (first_thread_of_process): Delete, replaced by ...
4548         (first_thread_of_inferior): ... this new function.  All callers
4549         adjusted.
4550         (any_live_thread_of_process): Delete, replaced by ...
4551         (any_live_thread_of_inferior): ... this new function.  All callers
4552         adjusted.
4553         (switch_to_thread, switch_to_no_thread): Declare.
4554         (is_executing): Delete.
4555         (enable_thread_stack_temporaries): Update comment.
4556         <enable_thread_stack_temporaries>: Take a thread_info pointer
4557         instead of a ptid_t.  Incref the thread.
4558         <~enable_thread_stack_temporaries>: Decref the thread.
4559         <m_ptid>: Delete
4560         <m_thr>: New.
4561         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4562         (get_last_thread_stack_temporary)
4563         (value_in_thread_stack_temporaries, can_access_registers_thread):
4564         Take a thread_info pointer instead of a ptid_t.  All callers
4565         adjusted.
4566         * infcall.c (get_call_return_value): Use inferior_thread.
4567         (run_inferior_call): Work with thread pointers instead of ptid_t.
4568         (call_function_by_hand_dummy): Work with thread pointers instead
4569         of ptid_t.  Use thread_info_ref.
4570         * infcmd.c (proceed_thread_callback): Access thread's state
4571         directly.
4572         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
4573         access thread's state directly.
4574         (continue_command): Use inferior_thread.
4575         (info_program_command): Use find_thread_ptid and access thread
4576         state directly.
4577         (proceed_after_attach_callback): Use thread state directly.
4578         (notice_new_inferior): Take a thread_info pointer instead of a
4579         ptid_t.  All callers adjusted.
4580         (exit_inferior): Take an inferior pointer instead of a pid.  All
4581         callers adjusted.
4582         (exit_inferior_silent): New.
4583         (detach_inferior): Delete.
4584         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
4585         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
4586         (detach_inferior_command, kill_inferior_command): Use
4587         find_inferior_id instead of valid_gdb_inferior_id and
4588         gdb_inferior_id_to_pid.
4589         (inferior_command): Use inferior and thread pointers.
4590         * inferior.h (struct thread_info): Forward declare.
4591         (notice_new_inferior): Take a thread_info pointer instead of a
4592         ptid_t.  All callers adjusted.
4593         (detach_inferior): Delete declaration.
4594         (exit_inferior, exit_inferior_silent): Take an inferior pointer
4595         instead of a pid.  All callers adjusted.
4596         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
4597         (valid_gdb_inferior_id): Delete.
4598         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
4599         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
4600         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
4601         ...
4602         <inf>: ... this new field.
4603         <step_ptid>: Delete, replaced by ...
4604         <step_thread>: ... this new field.
4605         (get_displaced_stepping_state): Take an inferior pointer instead
4606         of a pid.  All callers adjusted.
4607         (displaced_step_in_progress_any_inferior): Adjust.
4608         (displaced_step_in_progress_thread): Take a thread pointer instead
4609         of a ptid_t.  All callers adjusted.
4610         (displaced_step_in_progress, add_displaced_stepping_state): Take
4611         an inferior pointer instead of a pid.  All callers adjusted.
4612         (get_displaced_step_closure_by_addr): Adjust.
4613         (remove_displaced_stepping_state): Take an inferior pointer
4614         instead of a pid.  All callers adjusted.
4615         (displaced_step_prepare_throw, displaced_step_prepare)
4616         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
4617         All callers adjusted.
4618         (start_step_over): Adjust.
4619         (infrun_thread_ptid_changed): Remove bit updating ptids in the
4620         displaced step queue.
4621         (do_target_resume): Adjust.
4622         (fetch_inferior_event): Use inferior_thread.
4623         (context_switch, get_inferior_stop_soon): Take an
4624         execution_control_state pointer instead of a ptid_t.  All callers
4625         adjusted.
4626         (switch_to_thread_cleanup): Delete.
4627         (stop_all_threads): Use scoped_restore_current_thread.
4628         * inline-frame.c: Include "gdbthread.h".
4629         (inline_state) <inline_state>: Take a thread pointer instead of a
4630         ptid_t.  All callers adjusted.
4631         <ptid>: Delete, replaced by ...
4632         <thread>: ... this new field.
4633         (find_inline_frame_state): Take a thread pointer instead of a
4634         ptid_t.  All callers adjusted.
4635         (skip_inline_frames, step_into_inline_frame)
4636         (inline_skipped_frames, inline_skipped_symbol): Take a thread
4637         pointer instead of a ptid_t.  All callers adjusted.
4638         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
4639         (inline_skipped_frames, inline_skipped_symbol): Likewise.
4640         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
4641         pointers directly.
4642         * linux-nat.c (get_detach_signal): Likewise.
4643         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
4644         (thread_db_notice_clone): Adjust.
4645         (thread_db_find_new_threads_silently)
4646         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
4647         a thread pointer instead of a ptid_t.  All callers adjusted.
4648         * mi/mi-cmd-var.c: Include "inferior.h".
4649         (mi_cmd_var_update_iter): Update to use thread pointers.
4650         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
4651         inferior directly.
4652         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
4653         out to ...
4654         (mi_output_running): ... this new function.
4655         (mi_on_resume_1): Adjust to use it.
4656         (mi_user_selected_context_changed): Adjust to use inferior_thread.
4657         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
4658         directly.
4659         (interrupt_thread_callback): : Adjust to use thread and inferior
4660         pointers.
4661         * proc-service.c: Include "gdbthread.h".
4662         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
4663         * progspace-and-thread.c: Include "inferior.h".
4664         * progspace.c: Include "inferior.h".
4665         * python/py-exitedevent.c (create_exited_event_object): Adjust to
4666         hold a reference to an inferior_object.
4667         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
4668         inferior_thread.
4669         * python/py-inferior.c (struct inferior_object): Give the type a
4670         tag name instead of a typedef.
4671         (python_on_normal_stop): No need to check if the current thread is
4672         listed.
4673         (inferior_to_inferior_object): Change return type to
4674         inferior_object.  All callers adjusted.
4675         (find_thread_object): Delete, bits factored out to ...
4676         (thread_to_thread_object): ... this new function.
4677         * python/py-infthread.c (create_thread_object): Use
4678         inferior_to_inferior_object.
4679         (thpy_is_stopped): Use thread pointer directly.
4680         (gdbpy_selected_thread): Use inferior_thread.
4681         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
4682         field, replaced with ...
4683         <thread>: ... this new field.  All users adjusted.
4684         (btpy_insn_or_gap_new): Drop const.
4685         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
4686         callers adjusted.
4687         * python/py-record.c: Include "gdbthread.h".
4688         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
4689         a ptid_t.  All callers adjusted.
4690         (gdbpy_current_recording): Use inferior_thread.
4691         * python/py-record.h (recpy_record_object) <ptid>: Delete
4692         field, replaced with ...
4693         <thread>: ... this new field.  All users adjusted.
4694         (recpy_element_object) <ptid>: Delete
4695         field, replaced with ...
4696         <thread>: ... this new field.  All users adjusted.
4697         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
4698         a ptid_t.  All callers adjusted.
4699         * python/py-threadevent.c: Include "gdbthread.h".
4700         (get_event_thread): Use thread_to_thread_object.
4701         * python/python-internal.h (struct inferior_object): Forward
4702         declare.
4703         (find_thread_object, find_inferior_object): Delete declarations.
4704         (thread_to_thread_object, inferior_to_inferior_object): New
4705         declarations.
4706         * record-btrace.c: Include "inferior.h".
4707         (require_btrace_thread): Use inferior_thread.
4708         (record_btrace_frame_sniffer)
4709         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
4710         (get_thread_current_frame): Use scoped_restore_current_thread and
4711         switch_to_thread.
4712         (get_thread_current_frame): Use thread pointer directly.
4713         (record_btrace_replay_at_breakpoint): Use thread's inferior
4714         pointer directly.
4715         * record-full.c: Include "inferior.h".
4716         * regcache.c: Include "gdbthread.h".
4717         (get_thread_arch_regcache): Use the inferior's address space
4718         directly.
4719         (get_thread_regcache, registers_changed_thread): New.
4720         * regcache.h (get_thread_regcache(thread_info *thread)): New
4721         overload.
4722         (registers_changed_thread): New.
4723         (remote_target) <remote_detach_1>: Swap order of parameters.
4724         (remote_add_thread): <remote_add_thread>: Return the new thread.
4725         (get_remote_thread_info(ptid_t)): New overload.
4726         (remote_target::remote_notice_new_inferior): Use thread pointers
4727         directly.
4728         (remote_target::process_initial_stop_replies): Use
4729         thread_info::set_running.
4730         (remote_target::remote_detach_1, remote_target::detach)
4731         (extended_remote_target::detach): Adjust.
4732         * stack.c (frame_show_address): Use inferior_thread.
4733         * target-debug.h (target_debug_print_thread_info_pp): New.
4734         * target-delegates.c: Regenerate.
4735         * target.c (default_thread_address_space): Delete.
4736         (memory_xfer_partial_1): Use current_inferior.
4737         (target_detach): Use current_inferior.
4738         (target_thread_address_space): Delete.
4739         (generic_mourn_inferior): Use current_inferior.
4740         * target.h (struct target_ops) <thread_address_space>: Delete.
4741         (target_thread_address_space): Delete.
4742         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
4743         pointers directly.
4744         (delete_thread_1, delete_thread, delete_thread_silent): Take a
4745         thread pointer instead of a ptid_t.  Adjust all callers.
4746         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
4747         (first_thread_of_process): Delete, replaced by ...
4748         (first_thread_of_inferior): ... this new function.  All callers
4749         adjusted.
4750         (any_thread_of_process): Rename to ...
4751         (any_thread_of_inferior): ... this, and take an inferior pointer.
4752         (any_live_thread_of_process): Rename to ...
4753         (any_live_thread_of_inferior): ... this, and take an inferior
4754         pointer.
4755         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4756         (value_in_thread_stack_temporaries)
4757         (get_last_thread_stack_temporary): Take a thread pointer instead
4758         of a ptid_t.  Adjust all callers.
4759         (thread_info::set_running): New.
4760         (validate_registers_access): Use inferior_thread.
4761         (can_access_registers_ptid): Rename to ...
4762         (can_access_registers_thread): ... this, and take a thread
4763         pointer.
4764         (print_thread_info_1): Adjust to compare thread pointers instead
4765         of ptids.
4766         (switch_to_no_thread, switch_to_thread): Make extern.
4767         (scoped_restore_current_thread::~scoped_restore_current_thread):
4768         Use m_thread pointer directly.
4769         (scoped_restore_current_thread::scoped_restore_current_thread):
4770         Use inferior_thread.
4771         (thread_command): Use thread pointer directly.
4772         (thread_num_make_value_helper): Use inferior_thread.
4773         * top.c (execute_command): Use inferior_thread.
4774         * tui/tui-interp.c: Include "inferior.h".
4775         * varobj.c (varobj_create): Use inferior_thread.
4776         (value_of_root_1): Use find_thread_global_id instead of
4777         global_thread_id_to_ptid.
4778
4779 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
4780
4781         * regcache.c (readable_regcache::read_part): Avoid memcpy when
4782         possible.
4783         (regcache::write_part): Likewise.
4784         (readable_regcache::cooked_read_part): Update comment.
4785         (readable_regcache::cooked_write_part): Likewise.
4786         * regcache.h: (readable_regcache::read_part): Likewise.
4787         (regcache::write_part): Likewise.
4788
4789 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
4790             Dirk Schubert  <dirk.schubert@arm.com>
4791
4792         * aarch64-linux-nat.c (post_attach): New.
4793         (aarch64_linux_nat_target::post_attach): Override post_attach to
4794         record the number of hardware debug registers.
4795
4796 2018-06-20  Tom Tromey  <tom@tromey.com>
4797
4798         * python/py-param.c (add_setshow_generic): Make parameters const.
4799         (parmpy_init): Update.
4800
4801 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
4802
4803         * regcache.h (regcache_cooked_read_ftype): Rename to...
4804         (register_read_ftype): ...this, change type to function_view.
4805         (class reg_buffer) <save>: Remove src parameter.
4806         (readonly_detached_regcache) <readonly_detached_regcache>: Make
4807         parameter non-const in first overload.  Remove src parameter in
4808         second overload.
4809         * regcache.c (do_cooked_read): Remove.
4810         (readonly_detached_regcache::readonly_detached_regcache): Make
4811         parameter non-const, adjust call to other constructor.
4812         (reg_buffer::save): Remove src parameter.
4813         * frame.c (do_frame_register_read): Remove.
4814         (frame_save_as_regcache): Use lambda function.
4815         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
4816         parameter to ppu2spu_data *.
4817         (ppu2spu_sniffer): Use lambda function.
4818
4819 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
4820
4821         * record-full.c (record_full_target::insert_breakpoint): Remove
4822         "struct" keyword, add const.
4823
4824 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
4825
4826         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
4827         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
4828         * configure.ac: Remove AC_PREREQ, add missing quoting.
4829         * gnulib/configure.ac: Modernize usage of
4830         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
4831         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
4832         (AUTOMAKE_VERSION): Bump to 1.15.1.
4833         * configure: Re-generate.
4834         * config.in: Re-generate.
4835         * aclocal.m4: Re-generate.
4836         * gnulib/aclocal.m4: Re-generate.
4837         * gnulib/config.in: Re-generate.
4838         * gnulib/configure: Re-generate.
4839         * gnulib/import/Makefile.in: Re-generate.
4840
4841 2018-06-19  Pedro Alves  <palves@redhat.com>
4842
4843         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
4844         (lookup_minimal_symbol_by_pc_section): ... here with
4845         gdb_assert_not_reached added.
4846
4847 2018-06-19  Pedro Alves  <palves@redhat.com>
4848
4849         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
4850         parameter with a block parameter.  Compare location's block symbol
4851         with the frame's block instead of addresses.
4852         (skip_inline_frames): Pass the current block instead of the
4853         frame's address.  Break out as soon as we determine the frame
4854         should not be skipped.
4855
4856 2018-06-18  Tom Tromey  <tom@tromey.com>
4857
4858         * solib-aix.c (solib_aix_get_section_offsets): Return
4859         unique_xmalloc_ptr.
4860         (solib_aix_solib_create_inferior_hook): Update.
4861
4862 2018-06-18  Tom Tromey  <tom@tromey.com>
4863
4864         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
4865
4866 2018-06-18  Tom Tromey  <tom@tromey.com>
4867
4868         * solib-frv.c (frv_relocate_main_executable): Use
4869         unique_xmalloc_ptr.
4870         * solib-dsbt.c (dsbt_relocate_main_executable): Use
4871         unique_xmalloc_ptr.
4872
4873 2018-06-18  Tom Tromey  <tom@tromey.com>
4874
4875         * objfiles.h (inhibit_section_map_updates): Update.
4876         (resume_section_map_updates, resume_section_map_updates_cleanup):
4877         Remove.
4878         * solib-svr4.c (svr4_handle_solib_event): Update.
4879         * objfiles.c (inhibit_section_map_updates): Return
4880         scoped_restore_tmpl<int>.
4881         (resume_section_map_updates, resume_section_map_updates_cleanup):
4882         Remove.
4883
4884 2018-06-18  Tom Tromey  <tom@tromey.com>
4885
4886         * valprint.h (read_string): Update.
4887         * valprint.c (read_string): Change type of "buffer".
4888         (val_print_string): Update.
4889         * python/py-value.c (valpy_string): Update.
4890         * language.h (struct language_defn) <la_get_string>: Change
4891         type of "buffer".
4892         (default_get_string, c_get_string): Update.
4893         * language.c (default_get_string): Change type of "buffer".
4894         * guile/scm-value.c (gdbscm_value_to_string): Update.
4895         * c-lang.c (c_get_string): Change type of "buffer".
4896
4897 2018-06-18  Tom Tromey  <tom@tromey.com>
4898
4899         * ser-mingw.c (struct pipe_state_destroyer): New.
4900         (pipe_state_up): New typedef.
4901         (cleanup_pipe_state): Remove.
4902         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
4903
4904 2018-06-18  Tom Tromey  <tom@tromey.com>
4905
4906         * rust-lang.h (rust_yyerror): Don't declare.
4907         * rust-lang.c (rust_language_defn): Update.
4908         * rust-exp.y (yyerror): Now static.
4909         * parse.c (parse_exp_in_context_1): Update.
4910         * p-lang.h (p_yyerror): Don't declare.
4911         * p-lang.c (p_language_defn): Update.
4912         * p-exp.y (yyerror): Now static.
4913         * opencl-lang.c (opencl_language_defn): Update.
4914         * objc-lang.c (objc_language_defn): Update.
4915         * m2-lang.h (m2_yyerror): Don't declare.
4916         * m2-lang.c (m2_language_defn): Update.
4917         * m2-exp.y (yyerror): Now static.
4918         * language.h (struct language_defn) <la_error>: Remove.
4919         * language.c (unk_lang_error): Remove.
4920         (unknown_language_defn, auto_language_defn): Remove.
4921         * go-lang.h (go_yyerror): Don't declare.
4922         * go-lang.c (go_language_defn): Update.
4923         * go-exp.y (yyerror): Now static.
4924         * f-lang.h (f_yyerror): Don't declare.
4925         * f-lang.c (f_language_defn): Update.
4926         * f-exp.y (yyerror): Now static.
4927         * d-lang.h (d_yyerror): Don't declare.
4928         * d-lang.c (d_language_defn): Update.
4929         * d-exp.y (yyerror): Now static.
4930         * c-lang.h (c_yyerror): Don't declare.
4931         * c-lang.c (c_language_defn, cplus_language_defn)
4932         (asm_language_defn, minimal_language_defn): Update.
4933         * c-exp.y (yyerror): Now static.
4934         * ada-lang.h (ada_yyerror): Don't declare.
4935         * ada-lang.c (ada_language_defn): Update.
4936         * ada-exp.y (yyerror): Now static.
4937
4938 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
4939
4940         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
4941         (store_sveregs_to_thread): Likewise.
4942         (aarch64_linux_fetch_inferior_registers): Check for SVE.
4943         (aarch64_linux_store_inferior_registers): Likewise.
4944         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
4945         function.
4946         (aarch64_sve_regs_copy_to_regcache): Likewise.
4947         (aarch64_sve_regs_copy_from_regcache): Likewise.
4948         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
4949         declaration.
4950         (aarch64_sve_regs_copy_to_regcache): Likewise.
4951         (aarch64_sve_regs_copy_from_regcache): Likewise.
4952         (sve_context): Structure from Linux headers.
4953         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
4954         (SVE_SIG_ZREG_SIZE): Likewise.
4955         (SVE_SIG_PREG_SIZE): Likewise.
4956         (SVE_SIG_FFR_SIZE): Likewise.
4957         (SVE_SIG_REGS_OFFSET): Likewise.
4958         (SVE_SIG_ZREGS_OFFSET): Likewise.
4959         (SVE_SIG_ZREG_OFFSET): Likewise.
4960         (SVE_SIG_ZREGS_SIZE): Likewise.
4961         (SVE_SIG_PREGS_OFFSET): Likewise.
4962         (SVE_SIG_PREG_OFFSET): Likewise.
4963         (SVE_SIG_PREGS_SIZE): Likewise.
4964         (SVE_SIG_FFR_OFFSET): Likewise.
4965         (SVE_SIG_REGS_SIZE): Likewise.
4966         (SVE_SIG_CONTEXT_SIZE): Likewise.
4967         (SVE_PT_REGS_MASK): Likewise.
4968         (SVE_PT_REGS_FPSIMD): Likewise.
4969         (SVE_PT_REGS_SVE): Likewise.
4970         (SVE_PT_VL_INHERIT): Likewise.
4971         (SVE_PT_VL_ONEXEC): Likewise.
4972         (SVE_PT_REGS_OFFSET): Likewise.
4973         (SVE_PT_FPSIMD_OFFSET): Likewise.
4974         (SVE_PT_FPSIMD_SIZE): Likewise.
4975         (SVE_PT_SVE_ZREG_SIZE): Likewise.
4976         (SVE_PT_SVE_PREG_SIZE): Likewise.
4977         (SVE_PT_SVE_FFR_SIZE): Likewise.
4978         (SVE_PT_SVE_FPSR_SIZE): Likewise.
4979         (SVE_PT_SVE_FPCR_SIZE): Likewise.
4980         (__SVE_SIG_TO_PT): Likewise.
4981         (SVE_PT_SVE_OFFSET): Likewise.
4982         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
4983         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
4984         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
4985         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
4986         (SVE_PT_SVE_PREG_OFFSET): Likewise.
4987         (SVE_PT_SVE_PREGS_SIZE): Likewise.
4988         (SVE_PT_SVE_FFR_OFFSET): Likewise.
4989         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
4990         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
4991         (SVE_PT_SVE_SIZE): Likewise.
4992         (SVE_PT_SIZE): Likewise.
4993         (HAS_SVE_STATE): New define.
4994
4995 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
4996
4997         * nat/aarch64-sve-linux-sigcontext.h: New file.
4998         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
4999         new files.
5000         (SVE_VQ_MIN): Likewise.
5001         (SVE_VQ_MAX): Likewise.
5002         (SVE_VL_MIN): Likewise.
5003         (SVE_VL_MAX): Likewise.
5004         (SVE_NUM_ZREGS): Likewise.
5005         (SVE_NUM_PREGS): Likewise.
5006         (sve_vl_valid): Likewise.
5007         (struct user_sve_header): Likewise.
5008
5009 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
5010             Richard Bunt <Richard.Bunt@arm.com>
5011
5012         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
5013         was requested by GDB.
5014
5015 2018-06-15  Tom de Vries  <tdevries@suse.de>
5016
5017         * MAINTAINERS (Write After Approval): Add Tom de Vries.
5018
5019 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
5020
5021         * gnulib/update-gnulib.sh: Print expected versions of
5022         autoconf/aclocal.
5023
5024 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
5025
5026         * arch-utils.c (default_type_align): Use type_length_units.
5027         * gdbtypes.c (type_align): Use type_length_units.
5028
5029 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5030
5031         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
5032         of 'define' command.
5033
5034 2018-06-14  Tom de Vries  <tdevries@suse.de>
5035
5036         PR cli/22573
5037         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
5038         get_no_prettyformat_print_options.
5039
5040 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
5041
5042         * sparc-nat.h: Include target.h.
5043         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
5044         <fetch_registers>: Remove this argument in function call.
5045         <store_registers>: Remove this argument in function call, remove
5046         extra semicolon.
5047         <low_forget_process>: Call sparc64_forget_process instead of
5048         sparc_forget_process.
5049
5050 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5051
5052         * procfs.c (_initialize_procfs): Use add_inf_child_target.
5053         (procfs_target::make_corefile_notes): Adjust to new
5054         target_read_alloc return type.
5055
5056 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
5057             Stephen Roberts  <stephen.roberts@arm.com>
5058
5059         PR gdb/22882
5060         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
5061         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
5062         Move should_notify_stop local into more inner scope.
5063
5064 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
5065             Stephen Roberts  <stephen.roberts@arm.com>
5066
5067         PR gdb/22882
5068         * infrun.c (resume_1): Add call to mark_async_event_handler.
5069
5070 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
5071
5072         * infrun.c (do_target_wait): Change old version of $pc printed.
5073
5074 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
5075
5076         * dwarf2read.c (read_index_from_section): Rename to...
5077         (read_gdb_index_from_section): ... this, update all callers.
5078         (dwarf2_read_index): Rename to...
5079         (dwarf2_read_gdb_index): ... this, update all callers.
5080
5081 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
5082
5083         * gdb/hppa-linux-nat.c
5084         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
5085         hppa_linux_nat_target::fetch_registers.
5086
5087 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
5088
5089         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
5090         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
5091         (AARCH64_DWARF_SVE_FFR): Likewise.
5092         (AARCH64_DWARF_SVE_P0): Likewise.
5093         (AARCH64_DWARF_SVE_Z0): Likewise.
5094
5095 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
5096
5097         * common/common-regcache.h (raw_compare): New function.
5098         * regcache.c (regcache::raw_compare): Likewise.
5099         * regcache.h (regcache::raw_compare): New declaration.
5100
5101 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
5102
5103         * common/common-regcache.h (reg_buffer_common): New structure.
5104         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
5105         (reg_buffer::raw_supply): Likewise.
5106         (reg_buffer::raw_supply_integer): Likewise.
5107         (reg_buffer::raw_supply_zeroed): Likewise.
5108         (reg_buffer::raw_collect): Likewise.
5109         (reg_buffer::raw_collect_integer): Likewise.
5110         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
5111         (reg_buffer::raw_supply): Likewise.
5112         (reg_buffer::raw_supply_integer): Likewise.
5113         (reg_buffer::raw_supply_zeroed): Likewise.
5114         (reg_buffer::raw_collect): Likewise.
5115         (reg_buffer::raw_collect_integer): Likewise.
5116
5117 2018-06-10  Tom Tromey  <tom@tromey.com>
5118
5119         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
5120         (class remote_state) <stop_reply_queue>: Now std::vector.
5121         (remote_state::~remote_state)
5122         (remote_target::stop_reply_queue_length): Update.
5123         (struct queue_iter_param, remove_child_of_pending_fork)
5124         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
5125         (check_pending_event_prevents_wildcard_vcont_callback)
5126         (remove_stop_reply_for_inferior)
5127         (remove_stop_reply_of_remote_state)
5128         (remote_notif_remove_once_on_match)
5129         (stop_reply_match_ptid_and_ws)
5130         (remote_kill_child_of_pending_fork): Remove.
5131         (remote_target::remove_new_fork_children)
5132         (remote_target::check_pending_events_prevent_wildcard_vcont)
5133         (remote_target::discard_pending_stop_replies)
5134         (remote_target::discard_pending_stop_replies_in_queue)
5135         (remote_target::remote_notif_remove_queued_reply)
5136         (remote_target::queued_stop_reply)
5137         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
5138         (remote_target::wait, remote_target::kill_new_fork_children)
5139         (remote_target::async): Update.
5140
5141 2018-06-10  Tom Tromey  <tom@tromey.com>
5142
5143         * record-full.c (record_full_arch_list_cleanups): Remove.
5144         (record_full_message): Use try/catch.
5145         (record_full_wait_cleanups): Remove.
5146         (record_full_wait_1): Use try/catch.
5147         (record_full_restore): Likewise.
5148
5149 2018-06-10  Tom Tromey  <tom@tromey.com>
5150
5151         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
5152         declare VEC.  Add constructor.
5153         <in_target_beneath>: Now bool.
5154         (record_full_breakpoints): Now a std::vector, static.
5155         (record_full_sync_record_breakpoints)
5156         (record_full_init_record_breakpoints)
5157         (record_full_target::insert_breakpoint)
5158         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
5159
5160 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
5161
5162         * dwarf2read.c (process_cu_includes): Remove struct keyword.
5163         * serial.c (serial_interface_lookup): Remove struct keyword.
5164
5165 2018-06-10  Tom Tromey  <tom@tromey.com>
5166
5167         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
5168         method.
5169         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
5170         a method.
5171         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
5172         method.
5173         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
5174         "beneath" as a method.
5175         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
5176         Use "beneath" as a method.
5177
5178 2018-06-10  Tom Tromey  <tom@tromey.com>
5179
5180         * tracefile.c (struct trace_file_writer_deleter): New.
5181         <operator()>: Rename from trace_file_writer_xfree.
5182         (trace_file_writer_up): New typedef.
5183         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
5184
5185 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
5186
5187         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
5188         <m_registers, m_register_status>: Change type to
5189         std::unique_ptr.
5190         * regcache.c (reg_buffer::reg_buffer): Use new instead of
5191         XCNEWVEC.
5192
5193 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
5194
5195         * common/common-regcache.h (enum register_status): Add
5196         underlying type "signed char".
5197         * regcache.h (reg_buffer) <m_register_status>: Change type to
5198         register_status *.
5199         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
5200         register_status instead of signed char.
5201         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
5202         (reg_buffer::get_register_status): Remove cast.
5203         (readable_regcache::raw_read): Remove cast.
5204         (readable_regcache::cooked_read): Remove cast.
5205
5206 2018-06-09  Tom Tromey  <tom@tromey.com>
5207
5208         * source.c (reverse_search_command, forward_search_command): Use
5209         scoped_fd.
5210
5211 2018-06-09  Tom Tromey  <tom@tromey.com>
5212
5213         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
5214         (serial_ops_list): Now static, std::vector.
5215         (serial_interface_lookup, serial_add_interface): Update.
5216
5217 2018-06-09  Tom Tromey  <tom@tromey.com>
5218
5219         * dwarf2read.c (process_cu_includes): Update.
5220         (process_full_comp_unit): Update.
5221         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
5222         std::vector.
5223
5224 2018-06-08  Paul Koning  <paul_koning@dell.com>
5225
5226         PR gdb/23252
5227
5228         * python/python.c (do_start_initialization):
5229         Avoid call to internal Python API.
5230         (init__gdb_module): New function.
5231
5232 2018-06-08  Gary Benson <gbenson@redhat.com>
5233
5234         * linux-thread-db.c (valprint.h): New include.
5235         (struct check_thread_db_info): New structure.
5236         (check_thread_db_on_load, tdb_testinfo): New static globals.
5237         (check_thread_db, check_thread_db_callback): New functions.
5238         (try_thread_db_load_1): Run integrity checks if requested.
5239         (maintenance_check_libthread_db): New function.
5240         (_initialize_thread_db): Register "maint check libthread-db"
5241         and "maint set/show check-libthread-db".
5242         * NEWS: Mention the above new commands.
5243
5244 2018-06-08  Tom Tromey  <tom@tromey.com>
5245
5246         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
5247         now a method.
5248
5249 2018-06-08  Tom Tromey  <tom@tromey.com>
5250
5251         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
5252
5253 2018-06-08  Tom Tromey  <tom@tromey.com>
5254
5255         * common/btrace-common.h (struct btrace_data): Add constructor,
5256         destructor, move assignment operator.
5257         <empty, clear, fini>: New methods.
5258         <format>: Initialize.
5259         (btrace_data_init, btrace_data_fini, btrace_data_clear)
5260         (btrace_data_empty): Don't declare.
5261         * common/btrace-common.c (btrace_data_init): Remove.
5262         (btrace_data::fini): Rename from btrace_data_fini.
5263         (btrace_data::empty): Rename from btrace_data_empty.
5264         (btrace_data::clear): Rename from btrace_data_clear.  Return
5265         bool.
5266         * btrace.h (make_cleanup_btrace_data): Don't declare.
5267         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
5268         (parse_xml_btrace): Update.
5269         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
5270         (maint_btrace_clear_packet_history_cmd): Update.
5271
5272 2018-06-07  Pedro Alves  <palves@redhat.com>
5273
5274         * target.h (target_ops) <beneath>: Now a method.  All references
5275         updated.
5276         (class target_stack): New.
5277         * target.c (g_target_stack): New.
5278         (g_current_top_target): Delete.
5279         (current_top_target): Get the top target out of g_target_stack.
5280         (target_stack::push, target_stack::unpush): New.
5281         (push_target, unpush_target): Reimplement.
5282         (target_is_pushed): Reimplement in terms of g_target_stack.
5283         (target_ops::beneath, target_stack::find_beneath): New.
5284
5285 2018-06-07  Pedro Alves  <palves@redhat.com>
5286
5287         * target.h (find_target_beneath): Delete declaration.
5288         * target.c (find_target_beneath): Delete definition.
5289         * aix-thread.c: All callers of find_target_beneath adjusted to
5290         call target_ops::beneath instead.
5291         * bsd-uthread.c: Likewise.
5292         * linux-thread-db.c: Likewise.
5293         * ravenscar-thread.c: Likewise.
5294         * sol-thread.c: Likewise.
5295         * spu-multiarch.c: Likewise.
5296
5297 2018-06-07  Pedro Alves  <palves@redhat.com>
5298
5299         * target.h (target_ops) <beneath>: Now a method.  All references
5300         updated.
5301         (target_ops) <m_beneath>: New.
5302         * target.c (target_ops::beneath): New.
5303         * corelow.c: Adjust all references to target_ops::beneath.
5304         * linux-thread-db.c: Likewise.
5305         * make-target-delegates: Likewise.
5306         * record-btrace.c: Likewise.
5307         * record-full.c: Likewise.
5308         * remote.c: Likewise.
5309         * target.c: Likewise.
5310         * target-delegates.c: Regenerate.
5311
5312 2018-06-07  Pedro Alves  <palves@redhat.com>
5313
5314         * target.h (target_stack): Delete.
5315         (current_top_target): Declare function.
5316         * target.c (target_stack): Delete.
5317         (g_current_top_target): New.
5318         (current_top_target): New function.
5319         * auxv.c: Use current_top_target instead of target_stack
5320         throughout.
5321         * avr-tdep.c: Likewise.
5322         * breakpoint.c: Likewise.
5323         * corefile.c: Likewise.
5324         * elfread.c: Likewise.
5325         * eval.c: Likewise.
5326         * exceptions.c: Likewise.
5327         * frame.c: Likewise.
5328         * gdbarch-selftests.c: Likewise.
5329         * gnu-v3-abi.c: Likewise.
5330         * ia64-tdep.c: Likewise.
5331         * ia64-vms-tdep.c: Likewise.
5332         * infcall.c: Likewise.
5333         * infcmd.c: Likewise.
5334         * infrun.c: Likewise.
5335         * linespec.c: Likewise.
5336         * linux-tdep.c: Likewise.
5337         * minsyms.c: Likewise.
5338         * ppc-linux-nat.c: Likewise.
5339         * ppc-linux-tdep.c: Likewise.
5340         * procfs.c: Likewise.
5341         * regcache.c: Likewise.
5342         * remote.c: Likewise.
5343         * rs6000-tdep.c: Likewise.
5344         * s390-linux-nat.c: Likewise.
5345         * s390-tdep.c: Likewise.
5346         * solib-aix.c: Likewise.
5347         * solib-darwin.c: Likewise.
5348         * solib-dsbt.c: Likewise.
5349         * solib-spu.c: Likewise.
5350         * solib-svr4.c: Likewise.
5351         * solib-target.c: Likewise.
5352         * sparc-tdep.c: Likewise.
5353         * sparc64-tdep.c: Likewise.
5354         * spu-tdep.c: Likewise.
5355         * symfile.c: Likewise.
5356         * symtab.c: Likewise.
5357         * target-descriptions.c: Likewise.
5358         * target-memory.c: Likewise.
5359         * target.c: Likewise.
5360         * target.h: Likewise.
5361         * tracefile-tfile.c: Likewise.
5362         * tracepoint.c: Likewise.
5363         * valops.c: Likewise.
5364         * valprint.c: Likewise.
5365         * value.c: Likewise.
5366         * windows-tdep.c: Likewise.
5367         * mi/mi-main.c: Likewise.
5368
5369 2018-06-07  Tom Tromey  <tom@tromey.com>
5370
5371         * valprint.h (build_address_symbolic): Declare.
5372         * printcmd.c (print_address_symbolic): Update.
5373         (build_address_symbolic): Change "name" and "filename" to
5374         std::string.
5375         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
5376         Update.
5377         * defs.h (build_address_symbolic): Remove declaration.
5378
5379 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
5380
5381         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
5382         (aarch64_vnv_type): Add function.
5383         (aarch64_pseudo_register_name): Add V regs for SVE.
5384         (aarch64_pseudo_register_type): Likewise.
5385         (aarch64_pseudo_register_reggroup_p): Likewise.
5386         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
5387         (aarch64_pseudo_read_value): Add V regs for SVE.
5388         (aarch64_pseudo_write_2): Use V0 offset for SVE
5389         (aarch64_pseudo_write): Add V regs for SVE.
5390         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
5391
5392 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
5393
5394         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
5395         (sve_vl_from_vq): Likewise.
5396
5397 2018-06-05  Tom Tromey  <tom@tromey.com>
5398
5399         * cli/cli-cmds.c (show_version): Update.
5400         * top.c (print_gdb_version): Add "interactive" parameter.
5401         Update.
5402         * main.c (captured_main_1): Update.
5403         * top.h (print_gdb_version): Add "interactive" parameter and a
5404         comment.
5405
5406 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
5407
5408         * common/enum-flags.h: Add trailing semicolon to example in
5409         comment.
5410
5411 2018-06-05  Tom Tromey  <tom@tromey.com>
5412
5413         PR cli/12326:
5414         * NEWS: Add entry about pager.
5415         * utils.c (pagination_disabled_for_command): New global.
5416         (prompt_for_continue): Allow "c" response to prompt.
5417         (reinitialize_more_filter): Clear
5418         pagination_disabled_for_command.
5419         (fputs_maybe_filtered): Check pagination_disabled_for_command.
5420
5421 2018-06-04  Tom Tromey  <tom@tromey.com>
5422
5423         * ada-lang.h (ada_lookup_symbol_list): Update.
5424         * ada-lang.c (resolve_subexp): Update.
5425         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
5426         parameter.
5427         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
5428         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
5429         results parameter to std::vector.
5430         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
5431         Update.
5432         * ada-exp.y (block_lookup): Update.
5433         (select_possible_type_sym): Change type of syms.  Remove nsyms
5434         parameter.
5435         (write_var_or_type, write_name_assoc): Update.
5436
5437 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
5438
5439         * windows-nat.c (windows_nat_target::xfer_partial): Return
5440         TARGET_XFER_E_IO if we need to delegate to the target beneath
5441         but BENEATH is NULL.
5442
5443 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
5444
5445         * Makefile.in (config.status): Add configure.nat as a
5446         dependency.
5447
5448 2018-06-04  Tom Tromey  <tom@tromey.com>
5449
5450         * cp-name-parser.y (cpname_state): Add method declarations.
5451         (HANDLE_QUAL): Update.
5452         (cpname_state::d_grab, cpname_state::fill_comp)
5453         (cpname_state::make_operator, cpname_state::make_dtor)
5454         (cpname_state::make_builtin_type, cpname_state::make_name)
5455         (cpname_state::d_qualify, cpname_state::d_int_type)
5456         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
5457         (%union): Move earlier.
5458
5459 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5460
5461         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
5462
5463 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5464
5465         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
5466         (aarch64_pseudo_write_1): Likewise.
5467         (aarch64_pseudo_read_value): Use helper.
5468         (aarch64_pseudo_write): Likewise.
5469
5470 2018-06-04  Pedro Alves  <palves@redhat.com>
5471
5472         * darwin-nat.c (darwin_ops): Delete.
5473         (darwin_attach_pid): Use get_native_target.
5474
5475 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5476
5477         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
5478         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
5479
5480 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5481
5482         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
5483         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
5484         (aarch64_gdbarch_init): Check for SVE.
5485         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
5486
5487 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5488
5489         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
5490         * aarch64-tdep.h (aarch64_read_description): Likewise.
5491         * arch/aarch64.c (aarch64_create_target_description): Likewise.
5492         * arch/aarch64.h (aarch64_create_target_description): Likewise.
5493         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
5494         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
5495         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
5496
5497 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
5498
5499         * value.c (value_fetch_lazy_bitfield): New.
5500         (value_fetch_lazy_memory): New.
5501         (value_fetch_lazy_register): New.
5502         (value_fetch_lazy): Factor out to smaller functions.
5503
5504 2018-06-01  Tom Tromey  <tom@tromey.com>
5505
5506         * cp-name-parser.y (backslashable, represented): Now const.
5507
5508 2018-06-01  Tom Tromey  <tom@tromey.com>
5509
5510         * cp-name-parser.y: Include parser-defs.h.
5511         (parser_fprintf): Remove declaration.
5512
5513 2018-06-01  Tom Tromey  <tom@tromey.com>
5514
5515         * cp-name-parser.y: Use %pure-parser, %lex-param, and
5516         %parse-param.
5517         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
5518         (global_result): Remove globals.
5519         (struct cpname_state): New.
5520         (yyparse): Don't declare.
5521         (yylex, yyerror): Move declarations after %union.
5522         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
5523         (make_name): Add state parameter.
5524         Update all callers.
5525         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
5526         parameter.
5527         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
5528         Update.
5529         (yylex): Add lvalp, state parameters.
5530         (yyerror): Add state parameter.
5531         (cp_demangled_name_to_comp): Update.
5532
5533 2018-06-01  Tom Tromey  <tom@tromey.com>
5534
5535         * cp-name-parser.y (parser_fprintf): Declare.
5536         (GDB_YY_REMAP_PREFIX): Define.
5537         Include yy-remap.h.  Don't redefine yy* identifiers.
5538
5539 2018-06-01  Tom Tromey  <tom@tromey.com>
5540
5541         * python/py-type.c (typy_legacy_template_argument): Update.
5542         * cp-support.h (cp_demangled_name_to_comp): Update.
5543         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
5544         parameter to be a "std::string *".
5545         (main): Update.
5546
5547 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
5548
5549         * ada-lex.l: Include "diagnostics.h" instead of
5550         "common/diagnostics.h".
5551         * unittests/environ-selftests.c: Likewise.
5552         * common/diagnostics.h: Moved to ../include.
5553
5554 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
5555
5556         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
5557         to language_mode_manual while calling breakpoint_re_set_one.
5558
5559 2018-06-01  Tom Tromey  <tom@tromey.com>
5560
5561         * valops.c (value_cast_structs, destructor_name_p): Update.
5562         * symtab.c (gdb_mangle_name): Update.
5563         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
5564         Update.
5565         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
5566         (pascal_object_print_value_fields, pascal_object_print_value):
5567         Update.
5568         * p-typeprint.c (pascal_type_print_derivation_info): Update.
5569         * linespec.c (find_methods): Update.
5570         * gdbtypes.h (type_name_no_tag): Remove.
5571         (type_name_or_error): Rename from type_name_no_tag_or_error.
5572         * gdbtypes.c (type_name_no_tag): Remove.
5573         (type_name_or_error): Rename from type_name_no_tag_or_error.
5574         (lookup_struct_elt_type, check_typedef): Update.
5575         * expprint.c (print_subexp_standard): Update.
5576         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
5577         * d-namespace.c (d_lookup_nested_symbol): Update.
5578         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
5579         (cp_print_class_member): Update.
5580         * cp-namespace.c (cp_lookup_nested_symbol): Update.
5581         * completer.c (add_struct_fields): Update.
5582         * c-typeprint.c (cp_type_print_derivation_info)
5583         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
5584         Update.
5585         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
5586         (ada_prefer_type, ada_is_exception_sym): Update.
5587
5588 2018-06-01  Tom Tromey  <tom@tromey.com>
5589
5590         * valops.c (enum_constant_from_type, value_namespace_elt)
5591         (value_maybe_namespace_elt): Update.
5592         * valarith.c (find_size_for_pointer_math): Update.
5593         * target-descriptions.c (make_gdb_type): Update.
5594         * symmisc.c (print_symbol): Update.
5595         * stabsread.c (define_symbol, read_type)
5596         (complain_about_struct_wipeout, add_undefined_type)
5597         (cleanup_undefined_types_1): Update.
5598         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
5599         (rust_range_type_p, val_print_struct, rust_print_struct_def)
5600         (rust_internal_print_type, rust_composite_type)
5601         (rust_evaluate_funcall, rust_evaluate_subexp)
5602         (rust_inclusive_range_type_p): Update.
5603         * python/py-type.c (typy_get_tag): Update.
5604         * p-typeprint.c (pascal_type_print_base): Update.
5605         * mdebugread.c (parse_symbol, parse_type): Update.
5606         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
5607         Update.
5608         * guile/scm-type.c (gdbscm_type_tag): Update.
5609         * go-lang.c (sixg_string_p): Update.
5610         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
5611         Update.
5612         * gdbtypes.h (struct main_type) <tag_name>: Remove.
5613         (TYPE_TAG_NAME): Remove.
5614         * gdbtypes.c (type_name_no_tag): Simplify.
5615         (check_typedef, check_types_equal, recursive_dump_type)
5616         (copy_type_recursive, arch_composite_type): Update.
5617         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
5618         in summary mode when needed.
5619         * eval.c (evaluate_funcall): Update.
5620         * dwarf2read.c (fixup_go_packaging, read_structure_type)
5621         (process_structure_scope, read_enumeration_type)
5622         (read_namespace_type, read_module_type, determine_prefix): Update.
5623         * cp-support.c (inspect_type): Update.
5624         * coffread.c (process_coff_symbol, decode_base_type): Update.
5625         * c-varobj.c (c_is_path_expr_parent): Update.
5626         * c-typeprint.c (c_type_print_base_struct_union): Update.
5627         (c_type_print_base_1): Update.  Print struct/class/union/enum in
5628         summary when using C language.
5629         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
5630         (gen_maybe_namespace_elt): Update.
5631         * ada-lang.c (ada_type_name): Simplify.
5632         (empty_record, ada_template_to_fixed_record_type_1)
5633         (template_to_static_fixed_type)
5634         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
5635
5636 2018-06-01  Tom Tromey  <tom@tromey.com>
5637
5638         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
5639         c_print_type.
5640         * c-typeprint.c (c_print_type_1): Add "language" parameter.
5641         (c_print_type): Update.
5642         (c_print_type): New overload.
5643         (c_type_print_varspec_prefix, c_type_print_args)
5644         (c_type_print_varspec_suffix, c_print_type_no_offsets)
5645         (c_type_print_base_struct_union, c_type_print_base_1)
5646         (cp_type_print_method_args): Add "language" parameter.
5647         (c_type_print_base): Update.
5648         * c-lang.h (c_print_type): Add new overload.
5649
5650 2018-06-01  Tom Tromey  <tom@tromey.com>
5651
5652         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
5653         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
5654
5655 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
5656
5657         * aarch64-tdep.c (aarch64_sve_register_names): New const
5658         var.
5659         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
5660         (AARCH64_SVE_Z_REGS_NUM): New define.
5661         (AARCH64_SVE_P_REGS_NUM): Likewise.
5662         (AARCH64_SVE_NUM_REGS): Likewise.
5663
5664 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
5665
5666         * nat/linux-ptrace.h [__alpha__]
5667         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
5668         definitions.
5669
5670 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
5671
5672         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
5673         the endianness selected.
5674         * NEWS: Document `set endian auto' mode operation update.
5675
5676 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
5677
5678         * Makefile.in: Add new header.
5679         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
5680         (sve_vl_from_vg): Likewise.
5681         (sve_vq_from_vl): Likewise.
5682         (sve_vl_from_vq): Likewise.
5683         (sve_vq_from_vg): Likewise.
5684         (sve_vg_from_vq): Likewise.
5685         * configure.nat: Add new c file.
5686         * nat/aarch64-sve-linux-ptrace.c: New file.
5687         * nat/aarch64-sve-linux-ptrace.h: New file.
5688
5689 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
5690
5691         * aarch64-linux-nat.c (aarch64_linux_read_description):
5692         Add parmeter zero.
5693         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
5694         Likewise.
5695         * aarch64-tdep.c (tdesc_aarch64_list): Add.
5696         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
5697         (aarch64_gdbarch_init): Add parmeter zero.
5698         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
5699         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
5700         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
5701         parmeter.
5702         * doc/gdb.texinfo: Describe SVE feature
5703         * features/aarch64-sve.c: New file.
5704
5705 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
5706
5707         PR gdb/23210
5708         * gdbarch.sh (significant_addr_bit): Default to zero when
5709         not set by target architecture.
5710         * gdbarch.c: Re-generated.
5711         * utils.c (address_significant): Update.
5712
5713 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
5714
5715         * stack.c (func_command): Remove trailing newline in call to error.
5716
5717 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5718
5719         * regcache.h (regcache_raw_collect): Remove, update callers to
5720         use regcache::raw_collect.
5721         * regcache.c (regcache_raw_collect): Remove.
5722
5723 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5724
5725         * regcache.h (regcache_raw_supply): Remove, update callers to
5726         use detached_regcache::raw_supply.
5727         * regcache.c (regcache_raw_supply): Remove.
5728
5729 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5730
5731         * regcache.h (regcache_cooked_write_part): Remove, update
5732         callers to use regcache::cooked_write_part.
5733         * regcache.c (regcache_cooked_write_part): Remove.
5734
5735 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5736
5737         * regcache.h (regcache_cooked_read_part): Remove, update callers
5738         to use readable_regcache::cooked_read_part.
5739         * regcache.c (regcache_cooked_read_part): Remove.
5740
5741 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5742
5743         * regcache.h (regcache_cooked_read_value): Remove, update
5744         callers to use readable_regcache::cooked_read_value.
5745         * regcache.c (regcache_cooked_read_value): Remove.
5746
5747 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5748
5749         * regcache.h (regcache_cooked_write): Remove, update callers to
5750         use regcache::cooked_write.
5751         * regcache.c (regcache_cooked_write): Remove.
5752
5753 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5754
5755         * regcache.h (regcache_invalidate): Remove, update callers to
5756         use detached_regcache::invalidate instead.
5757         * regcache.c (regcache_invalidate): Remove.
5758
5759 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5760
5761         * regcache.h (regcache_raw_write_part): Remove, update callers
5762         to use regcache::raw_write_part instead.
5763         * regcache.c (regcache_raw_write_part): Remove.
5764
5765 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5766
5767         * regcache.h (regcache_raw_read_part): Remove, update callers to
5768         use readable_regcache::raw_read_part instead.
5769         * regcache.c (regcache_raw_read_part): Remove.
5770
5771 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5772
5773         * regcache.h (regcache_cooked_read): Remove, update callers to
5774         use readable_regcache::cooked_read instead.
5775         * regcache.c (regcache_cooked_read): Remove.
5776
5777 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5778
5779         * regcache.h (regcache_raw_write): Remove, update callers to use
5780         regcache::raw_write instead.
5781         * regcache.c (regcache_raw_write): Remove.
5782
5783 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5784
5785         * regcache.h (regcache_raw_read): Remove, update callers to use
5786         readable_regcache::raw_read instead.
5787         * regcache.c (regcache_raw_read): Remove.
5788
5789 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5790
5791         * regcache.h (regcache_raw_update): Remove, update callers to
5792         use readable_regcache::raw_update instead.
5793         * regcache.c (regcache_raw_update): Remove.
5794
5795 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5796
5797         * regcache.h (regcache_register_status): Remove, update callers
5798         to use reg_buffer::get_register_status directly instead.
5799         * regcache.c (regcache_register_status): Remove.
5800
5801 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5802
5803         * regcache.h (regcache_get_ptid): Remove, update all callers to
5804         call regcache::ptid instead.
5805         * regcache.c (regcache_get_ptid): Remove.
5806
5807 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5808
5809         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
5810
5811 2018-05-30  Pedro Alves  <palves@redhat.com>
5812
5813         * common/common-exceptions.h (exception_rethrow): Use
5814         ATTRIBUTE_NORETURN.
5815
5816 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
5817
5818         * breakpoint.c (print_solib_event, check_status_catch_solib):
5819         Remove struct keyword in range-based for loops.
5820         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
5821         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
5822         Likewise.
5823         * linespec.c (find_superclass_methods, search_minsyms_for_name):
5824         Likewise.
5825         * symfile.c (addr_info_make_relative): Likewise.
5826         * thread.c (value_in_thread_stack_temporaries): Likewise.
5827
5828 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
5829
5830         PR gdb/16841
5831         * valops.c (value_struct_elt_for_reference): Call check_typedef on
5832         aggregate type to get its real type before accessing it.
5833
5834 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
5835
5836         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
5837         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
5838         * coff-pe-read.c (add_pe_forwarded_sym): Replace
5839         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
5840         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
5841         * jit.c (jit_breakpoint_re_set_internal): Likewise.
5842         * printcmd.c (info_address_command): Likewise.
5843
5844 2018-05-29  Tom Tromey  <tom@tromey.com>
5845
5846         * windows-nat.c (handle_exception): Update fall-through comment.
5847
5848 2018-05-29  Tom Tromey  <tom@tromey.com>
5849
5850         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
5851         (struct program_space) <added_solibs>: Now a std::vector.
5852         * breakpoint.c (print_solib_event): Update.
5853         (check_status_catch_solib): Update.
5854         * progspace.c (clear_program_space_solib_cache): Update.
5855         * solib.c (update_solib_list): Update.
5856
5857 2018-05-29  Tom Tromey  <tom@tromey.com>
5858
5859         * python/py-type.c (typy_richcompare): Update.
5860         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
5861         * gdbtypes.h (types_deeply_equal): Return bool.
5862         (types_equal): Likewise.
5863         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
5864         declare VEC.
5865         (check_types_equal): Change worklist to std::vector.  Return
5866         bool.
5867         (struct type_equality_entry): Add constructor.
5868         (compare_maybe_null_strings): Return bool.
5869         (check_types_worklist): Return bool.  Change worklist to
5870         std::vector.
5871         (types_deeply_equal): Use std::vector.
5872         (types_equal): Return bool.
5873         (compare_maybe_null_strings): Simplify.
5874
5875 2018-05-29  Tom Tromey  <tom@tromey.com>
5876
5877         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
5878
5879 2018-05-29  Tom Tromey  <tom@tromey.com>
5880
5881         * objc-lang.h: Don't include cp-support.h.
5882         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
5883         declare VEC.
5884
5885 2018-05-27  Tom Tromey  <tom@tromey.com>
5886
5887         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
5888
5889 2018-05-25  Tom Tromey  <tom@tromey.com>
5890
5891         * value.c (value::location): Initialize.
5892
5893 2018-05-25  Tom Tromey  <tom@tromey.com>
5894
5895         * dbxread.c (init_bincl_list): Remove.
5896         (bincl_list): Now a std::vector.
5897         (bincls_allocated, next_bincl): Remove.
5898         (free_bincl_list, do_free_bincl_list_cleanup)
5899         (make_cleanup_free_bincl_list): Remove.
5900         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
5901         unique_xmalloc_ptr.
5902         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
5903         (struct header_file_location): Add constructor.
5904         (add_bincl_to_list): Remove.
5905
5906 2018-05-25  Tom Tromey  <tom@tromey.com>
5907
5908         * tui/tui.c (tui_enable): Update.
5909         * mi/mi-interp.c (mi_interp::init): Update.
5910         * interps.h (class interp) <name>: New method.
5911         <m_name>: Rename from name.
5912         (~scoped_restore_interp): Update.
5913         * interps.c (interp::interp): Update.
5914         (interp_add, interp_set, interp_lookup_existing)
5915         (current_interp_named_p): Update.
5916
5917 2018-05-25  Tom Tromey  <tom@tromey.com>
5918
5919         * interps.c (interp_name): Remove.
5920         * mi/mi-interp.c (mi_interp::init): Update.
5921         * interps.h (interp_name): Remove.
5922         (~scoped_restore_interp): Update.
5923         * tui/tui.c (tui_enable): Update.
5924
5925 2018-05-25  Tom Tromey  <tom@tromey.com>
5926
5927         * utils.c (fputs_maybe_filtered): Update.
5928         * linespec.c (decode_line_full): Update.
5929         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
5930         (mi_print_breakpoint_for_event, mi_solib_loaded)
5931         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
5932         (mi_user_selected_context_changed): Update.
5933         * mi/mi-main.c (mi_execute_command): Update.
5934         * cli/cli-script.c (execute_control_command): Update.
5935         * python/python.c (execute_gdb_command): Update.
5936         * solib.c (info_sharedlibrary_command): Update.
5937         * interps.c (interp_ui_out): Remove.
5938         * interps.h (interp_ui_out): Remove.
5939
5940 2018-05-25  Tom Tromey  <tom@tromey.com>
5941
5942         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
5943         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
5944         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
5945
5946 2018-05-25  Tom Tromey  <tom@tromey.com>
5947
5948         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
5949         * interps.c (interp_exec): Use scoped_restore.
5950
5951 2018-05-25  Tom Tromey  <tom@tromey.com>
5952
5953         * remote.c (remote_target::remote_file_get): Use
5954         gdb::byte_vector.
5955         (remote_target::remote_file_put): Likewise.
5956
5957 2018-05-25  Tom Tromey  <tom@tromey.com>
5958
5959         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
5960         a std::string.
5961         (get_pe_section_index, add_pe_exported_sym): Update.
5962         (read_pe_exported_syms): Use gdb::def_vector.
5963
5964 2018-05-25  Tom Tromey  <tom@tromey.com>
5965
5966         * frame.c (remove_prev_frame): Remove.
5967         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
5968
5969 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
5970
5971         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
5972         Remove prototypes.
5973         * mips-linux-nat.c (supply_fpregset): Always call
5974         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
5975         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
5976         `mips_fill_fpregset'.
5977         * mips-linux-tdep.c (mips_supply_fpregset)
5978         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
5979         (mips_fill_fpregset_wrapper): Remove functions.
5980         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
5981         (mips_linux_fpregset): Remove variable.
5982         (mips_linux_iterate_over_regset_sections): Use
5983         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
5984         (mips_linux_o32_sigframe_init): Remove comment.
5985
5986 2018-05-25  Pedro Alves  <palves@redhat.com>
5987
5988         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
5989         (struct readahead_cache, struct packet_reg, struct
5990         remote_arch_state, class remote_state): Move higher up in the
5991         file.
5992         (remote_target::m_remote_state): Now an object instead of a pointer.
5993         (remote_target::get_remote_state): Adjust.
5994
5995 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
5996
5997         * stack.c (select_and_print_frame): Delete.
5998         (struct function_bounds): Move struct within function.
5999         (func_command): Most content moved into new function
6000         find_frame_for_function, use new function, print result, add
6001         function comment.
6002         (find_frame_for_function): New function, now returns a result.
6003
6004 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6005
6006         * stack.c (iterate_over_block_arg_vars): Fix comment.
6007         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
6008
6009 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
6010
6011         PR gdb/23203
6012         * frame.c
6013         (scoped_restore_selected_frame::scoped_restore_selected_frame):
6014         Define.
6015         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
6016         Define.
6017         * frame.h (class scoped_restore_selected_frame): New class.
6018         * stack.c (print_frame_local_vars): Remove catching and rethrowing
6019         of any exception, use scoped_restore_selected_frame to restore the
6020         frame instead.
6021
6022 2018-05-24  Pedro Alves  <palves@redhat.com>
6023
6024         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
6025         override.
6026
6027 2018-05-23  Tom Tromey  <tom@tromey.com>
6028
6029         * complaints.c (struct complaints): Remove.
6030         (symfile_complaint_book): Remove.
6031         (series): New global.
6032         (complaint_internal): Update.
6033         (clear_complaints): Update.
6034
6035 2018-05-23  Tom Tromey  <tom@tromey.com>
6036
6037         * complaints.c (counters): New global.
6038         (struct complain): Remove.
6039         (struct complaints) <root>: Remove.
6040         (complaint_sentinel): Remove.
6041         (symfile_complaint_book): Update.
6042         (find_complaint) Remove.
6043         (complaint_internal, clear_complaints): Update.
6044
6045 2018-05-23  Tom Tromey  <tom@tromey.com>
6046
6047         * complaints.c (struct complain) <file, line>: Remove.
6048         (find_complaint): Remove file, line parameters.
6049         (complaint_internal): Update.
6050
6051 2018-05-23  Tom Tromey  <tom@tromey.com>
6052
6053         * complaints.c (vcomplaint): Remove.
6054         (complaint_internal) Merge in contents of vcomplaint.
6055
6056 2018-05-23  Tom Tromey  <tom@tromey.com>
6057
6058         * complaints.c (struct complaints) <explanation>: Remove.
6059         (symfile_explanations): Remove.
6060         (symfile_complaint_book): Update.
6061         (vcomplaint): Update.
6062         (struct explanation): Remove.
6063
6064 2018-05-23  Tom Tromey  <tom@tromey.com>
6065
6066         * complaints.c (symfile_complaints): Remove.
6067         (complaint_internal): Remove "complaints" parameter.
6068         (clear_complaints, vcomplaint): Remove "c" parameter.
6069         (get_complaints): Remove.
6070         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
6071         (dwarf2_debug_line_missing_file_complaint)
6072         (dwarf2_debug_line_missing_end_sequence_complaint)
6073         (dwarf2_complex_location_expr_complaint)
6074         (dwarf2_const_value_length_mismatch_complaint)
6075         (dwarf2_section_buffer_overflow_complaint)
6076         (dwarf2_macro_malformed_definition_complaint)
6077         (dwarf2_invalid_attrib_class_complaint)
6078         (create_addrmap_from_index, dw2_symtab_iter_next)
6079         (dw2_expand_marked_cus)
6080         (dw2_debug_names_iterator::find_vec_in_debug_names)
6081         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
6082         (create_debug_type_hash_table, init_cutu_and_read_dies)
6083         (partial_die_parent_scope, add_partial_enumeration)
6084         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
6085         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
6086         (read_import_statement, read_file_scope, create_dwo_cu_reader)
6087         (create_cus_hash_table, create_dwp_hash_table)
6088         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
6089         (dwarf2_rnglists_process, dwarf2_ranges_process)
6090         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
6091         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
6092         (handle_struct_member_die, process_structure_scope)
6093         (read_array_type, read_common_block, read_module_type)
6094         (read_tag_pointer_type, read_typedef, read_base_type)
6095         (read_subrange_type, load_partial_dies, partial_die_info::read)
6096         (partial_die_info::read, partial_die_info::read)
6097         (partial_die_info::read, read_checked_initial_length_and_offset)
6098         (dwarf2_string_attr, read_formatted_entries)
6099         (dwarf_decode_line_header)
6100         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
6101         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
6102         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
6103         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6104         (get_signatured_type, get_DW_AT_signature_type)
6105         (decode_locdesc, file_file_name, consume_improper_spaces)
6106         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
6107         (dwarf_decode_macro_bytes, dwarf_decode_macros)
6108         (dwarf2_symbol_mark_computed, set_die_type)
6109         (read_attribute_value): Update.
6110         * stap-probe.c (handle_stap_probe, get_stap_base_address):
6111         Update.
6112         * dbxread.c (unknown_symtype_complaint)
6113         (lbrac_mismatch_complaint, repeated_header_complaint)
6114         (set_namestring, function_outside_compilation_unit_complaint)
6115         (read_dbx_symtab, process_one_symbol): Update.
6116         * gdbtypes.c (stub_noname_complaint): Update.
6117         * windows-nat.c (handle_unload_dll): Update.
6118         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
6119         (decode_base_type): Update.
6120         * xcoffread.c (bf_notfound_complaint, ef_complaint)
6121         (eb_complaint, record_include_begin, record_include_end)
6122         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
6123         (process_xcoff_symbol, read_symbol)
6124         (function_outside_compilation_unit_complaint)
6125         (scan_xcoff_symtab): Update.
6126         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
6127         * buildsym.c (finish_block_internal, make_blockvector)
6128         (end_symtab_get_static_block, augment_type_symtab): Update.
6129         * dtrace-probe.c (dtrace_process_dof)
6130         (dtrace_static_probe_ops::get_probes): Update.
6131         * complaints.h (struct complaint): Don't declare.
6132         (symfile_complaints): Remove.
6133         (complaint_internal): Remove "complaints" parameter.
6134         (complaint): Likewise.
6135         (clear_complaints): Likewise.
6136         * symfile.c (syms_from_objfile_1, finish_new_objfile)
6137         (reread_symbols): Update.
6138         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
6139         (dwarf2_frame_cache, decode_frame_entry): Update.
6140         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
6141         * objc-lang.c (lookup_objc_class, lookup_child_selector)
6142         (info_selectors_command): Update.
6143         * macrotab.c (macro_include, check_for_redefinition)
6144         (macro_undef): Update.
6145         * objfiles.c (filter_overlapping_sections): Update.
6146         * stabsread.c (invalid_cpp_abbrev_complaint)
6147         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
6148         (define_symbol, error_type, read_type, rs6000_builtin_type)
6149         (stabs_method_name_from_physname, read_member_functions)
6150         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
6151         (attach_fields_to_type, complain_about_struct_wipeout)
6152         (read_range_type, read_args, common_block_start)
6153         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
6154         Update.
6155         * mdebugread.c (index_complaint, unknown_ext_complaint)
6156         (basic_type_complaint, bad_tag_guess_complaint)
6157         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
6158         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
6159         (parse_procedure, parse_lines)
6160         (function_outside_compilation_unit_complaint)
6161         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
6162         (bad_tag_guess_complaint, reg_value_complaint): Update.
6163         * cp-support.c (demangled_name_complaint): Update.
6164         * macroscope.c (sal_macro_scope): Update.
6165         * dwarf-index-write.c (class debug_names): Update.
6166
6167 2018-05-23  Tom Tromey  <tom@tromey.com>
6168
6169         * complaints.c (clear_complaints): Remove "noisy" parameter.
6170         * complaints.h (clear_complaints): Update.
6171         * symfile.c (syms_from_objfile_1, finish_new_objfile)
6172         (reread_symbols): Update.
6173
6174 2018-05-23  Tom Tromey  <tom@tromey.com>
6175
6176         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
6177         SUBSEQUENT_MESSAGE.
6178         (vcomplaint, clear_complaints): Update.
6179         (symfile_explanations): Remove some messages.
6180
6181 2018-05-23  Tom Tromey  <tom@tromey.com>
6182
6183         * complaints.c (internal_complaint): Remove.
6184         * complaints.h (internal_complaint): Remove.
6185
6186 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
6187
6188         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
6189
6190 2018-05-22  Pedro Alves  <palves@redhat.com>
6191
6192         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
6193         (remote_fileio_badfd, remote_fileio_return_errno)
6194         (remote_fileio_return_success, remote_fileio_func_open)
6195         (remote_fileio_func_open, remote_fileio_func_close)
6196         (remote_fileio_func_read, remote_fileio_func_write)
6197         (remote_fileio_func_lseek, remote_fileio_func_rename)
6198         (remote_fileio_func_unlink, remote_fileio_func_stat)
6199         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
6200         (remote_fileio_func_isatty, remote_fileio_func_system): Add
6201         remote_target parameter.
6202         (remote_fio_func_map) <func>: Add remote_target parameter.
6203         (do_remote_fileio_request, remote_fileio_request):
6204         * remote-fileio.h (remote_fileio_request):
6205         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
6206         remote_target parameter.
6207         (remote_notif_process, handle_notification): Adjust to pass down
6208         the remote.
6209         (remote_notif_state_allocate): Add remote_target parameter.  Save
6210         it.
6211         * remote-notif.h (struct remote_target): Forward declare.
6212         (struct notif_client) <parse, ack, can_get_pending_events>: Add
6213         remote_target parameter.
6214         (struct remote_notif_state) <remote>: New field.
6215         (remote_notif_ack, remote_notif_parse): Add remote_target
6216         parameter.
6217         (remote_notif_state_allocate, remote_notif_state_allocate): Add
6218         remote_target parameter.
6219         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
6220         (threads_listing_context, rmt_thread_action, protocol_feature)
6221         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
6222         (packet_result, struct threads_listing_context, remote_state):
6223         Move definitions and declarations higher up.
6224         (remote_target) <~remote_target>: Declare.
6225         (remote_download_command_source, remote_file_put, remote_file_get)
6226         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
6227         (remote_hostio_pread_vFile, remote_hostio_send_command)
6228         (remote_hostio_set_filesystem, remote_hostio_open)
6229         (remote_hostio_close, remote_hostio_unlink, remote_state)
6230         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
6231         (get_memory_write_packet_size, get_memory_read_packet_size)
6232         (append_pending_thread_resumptions, remote_detach_1)
6233         (append_resumption, remote_resume_with_vcont)
6234         (add_current_inferior_and_thread, wait_ns, wait_as)
6235         (process_stop_reply, remote_notice_new_inferior)
6236         (process_initial_stop_replies, remote_add_thread)
6237         (btrace_sync_conf, remote_btrace_maybe_reopen)
6238         (remove_new_fork_children, kill_new_fork_children)
6239         (discard_pending_stop_replies, stop_reply_queue_length)
6240         (check_pending_events_prevent_wildcard_vcont)
6241         (discard_pending_stop_replies_in_queue, stop_reply)
6242         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
6243         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
6244         (remote_interrupt_as, remote_interrupt_ns)
6245         (remote_get_noisy_reply, remote_query_attached)
6246         (remote_add_inferior, remote_current_thread, get_current_thread)
6247         (set_thread, set_general_thread, set_continue_thread)
6248         (set_general_process, write_ptid)
6249         (remote_unpack_thread_info_response, remote_get_threadinfo)
6250         (parse_threadlist_response, remote_get_threadlist)
6251         (remote_threadlist_iterator, remote_get_threads_with_ql)
6252         (remote_get_threads_with_qxfer)
6253         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
6254         (get_offsets, remote_check_symbols, remote_supported_packet)
6255         (remote_query_supported, remote_packet_size)
6256         (remote_serial_quit_handler, remote_detach_pid)
6257         (remote_vcont_probe, remote_resume_with_hc)
6258         (send_interrupt_sequence, interrupt_query)
6259         (remote_notif_get_pending_events, fetch_register_using_p)
6260         (send_g_packet, process_g_packet, fetch_registers_using_g)
6261         (store_register_using_P, store_registers_using_G)
6262         (set_remote_traceframe, check_binary_download)
6263         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
6264         (remote_xfer_live_readonly_partial, remote_read_bytes)
6265         (remote_send_printf, remote_flash_write, readchar)
6266         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
6267         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
6268         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
6269         (extended_remote_disable_randomization, extended_remote_run)
6270         (send_environment_packet, extended_remote_environment_support)
6271         (extended_remote_set_inferior_cwd, remote_write_qxfer)
6272         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
6273         (packet_command): Now methods of ...
6274         (remote_target): ... this class.
6275         (m_remote_state) <remote_target>: New field.
6276         (struct remote_state) <stop_reply_queue,
6277         remote_async_inferior_event_token, wait_forever_enabled_p>: New
6278         fields.
6279         (remote_state::remote_state): Allocate stop_reply_queue.
6280         (remote_state): Delete global.
6281         (get_remote_state_raw): Delete.
6282         (remote_target::get_remote_state): Allocate m_remote_state on
6283         demand.
6284         (get_current_remote_target): New.
6285         (remote_ops, extended_remote_ops): Delete.
6286         (wait_forever_enabled_p, remote_async_inferior_event_token):
6287         Delete, moved to struct remote_state.
6288         (remote_target::close): Delete self.  Destruction bits split to
6289         ...
6290         (remote_target::~remote_target): ... this.
6291         (show_memory_packet_size): Adjust to use
6292         get_current_remote_target.
6293         (struct protocol_feature) <func>: Add remote_target parameter.
6294         All callers adjusted.
6295         (curr_quit_handler_target): New.
6296         (remote_serial_quit_handler): Reimplement.
6297         (remote_target::open_1): Adjust to use get_current_remote_target.
6298         Heap-allocate remote_target/extended_remote_target instances.
6299         (vcont_builder::vcont_builder): Add remote_target parameter, and
6300         save it in m_remote.  All callers adjusted.
6301         (vcont_builder::m_remote): New field.
6302         (vcont_builder::restart, vcont_builder::flush)
6303         (vcont_builder::push_action): Use it.
6304         (remote_target::commit_resume): Use it.
6305         (struct queue_iter_param) <remote>: New field.
6306         (remote_target::remove_new_fork_children): Fill in 'remote' field.
6307         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
6308         (check_pending_event_prevents_wildcard_vcont_callback)
6309         (remote_target::check_pending_events_prevent_wildcard_vcont)
6310         (remote_target::discard_pending_stop_replies)
6311         (remote_target::discard_pending_stop_replies_in_queue)
6312         (remote_target::remote_notif_remove_queued_reply): Fill in
6313         'remote' field.
6314         (remote_notif_get_pending_events): New.
6315         (remote_target::readchar, remote_target::remote_serial_write):
6316         Save/restore curr_quit_handler_target.
6317         (putpkt): New.
6318         (kill_new_fork_children): Fill in 'remote' field.
6319         (packet_command): Use get_current_remote_target, defer to
6320         remote_target method of same name.
6321         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
6322         parameter, and save it in m_remote.  All callers adjusted.
6323         (scoped_remote_fd::release): Use m_remote.
6324         (scoped_remote_fd::m_remote): New field.
6325         (remote_file_put, remote_file_get, remote_file_delete): Use
6326         get_current_remote_target, defer to remote_target method of same
6327         name.
6328         (remote_btrace_reset): Add remote_state paremeter.  Update all
6329         callers.
6330         (remote_async_inferior_event_handler). Pass down 'data'.
6331         (remote_new_objfile): Use get_current_remote_target.
6332         (remote_target::vcont_r_supported): New.
6333         (set_range_stepping): Use get_current_remote_target and
6334         remote_target::vcont_r_supported.
6335         (_initialize_remote): Don't allocate 'remote_state' and
6336         'stop_reply_queue' globals.
6337         * remote.h (struct remote_target): Forward declare.
6338         (getpkt, putpkt, remote_notif_get_pending_events): Add
6339         'remote_target' parameter.
6340
6341 2018-05-22  Pedro Alves  <palves@redhat.com>
6342
6343         * remote.c (vcont_builder): Now a class.  Make all data members
6344         private.
6345         (vcont_builder) <vcont_builder, restart, flush, push_action>:
6346         Declare methods.
6347         (vcont_builder_restart): Rename to ...
6348         (vcont_builder::restart): ... this.
6349         (vcont_builder_flush): Rename to ...
6350         (vcont_builder::flush): ... this.
6351         (vcont_builder_push_action): Rename to ...
6352         (vcont_builder::push_action): ... this.
6353         (remote_target::commit_resume): Adjust.
6354
6355 2018-05-22  Pedro Alves  <palves@redhat.com>
6356
6357         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
6358         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
6359         (get_fixed_memory_packet_size): New.
6360         (get_memory_packet_size): Use it.
6361         (set_memory_packet_size): Don't override the config size with
6362         DEFAULT_MAX_MEMORY_PACKET_SIZE.
6363         (show_memory_packet_size): Use get_fixed_memory_packet_size.
6364         Don't refer to get_memory_packet_size if not connected to a remote
6365         target.  Show "(default)" if configured size is 0.
6366
6367 2018-05-22  Pedro Alves  <palves@redhat.com>
6368
6369         * remote.c (remote_target::mourn_inferior): Move
6370         discard_pending_stop_replies call here from ...
6371         (_initialize_remote): ... here.
6372
6373 2018-05-22  Pedro Alves  <palves@redhat.com>
6374
6375         * remote.c (compare_section_command): Remove set_general_process
6376         call.
6377
6378 2018-05-22  Pedro Alves  <palves@redhat.com>
6379
6380         * remote.c (struct packet_reg, struct remote_arch_state):
6381         Move higher up in the file.
6382         (remote_state) <m_arch_states>: Store remote_arch_state values
6383         instead of remote_arch_state pointers.
6384         (remote_state::get_remote_arch_state): Adjust.
6385
6386 2018-05-22  Pedro Alves  <palves@redhat.com>
6387
6388         * remote.c: Include <unordered_map>.
6389         (remote_state): Now a class.
6390         (remote_state) <get_remote_arch_state>: Declare method.
6391         <get_remote_arch_state>: New field.
6392         (remote_arch_state) <remote_arch_state>: Declare ctor.
6393         <regs>: Now a unique_ptr.
6394         (remote_gdbarch_data_handle): Delete.
6395         (get_remote_arch_state): Delete.
6396         (remote_state::get_remote_arch_state): New.
6397         (get_remote_state): Adjust to call remote_state's
6398         get_remote_arch_state method.
6399         (init_remote_state): Delete, bits factored out to ...
6400         (remote_arch_state::remote_arch_state): ... this new method.
6401         (get_remote_packet_size, get_memory_packet_size)
6402         (process_g_packet, remote_target::fetch_registers)
6403         (remote_target::prepare_to_store, store_registers_using_G)
6404         (remote_target::store_registers, remote_target::get_trace_status):
6405         Adjust to call remote_state's method.
6406         (_initialize_remote): Remove reference to
6407         remote_gdbarch_data_handle.
6408
6409 2018-05-22  Pedro Alves  <palves@redhat.com>
6410
6411         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
6412         pread>: New method declarations.
6413         (remote_target::open_1): Adjust.
6414         (readahead_cache_invalidate): Rename to ...
6415         (readahead_cache::invalidate): ... this, and adjust to be a class
6416         method.
6417         (readahead_cache_invalidate_fd): Rename to ...
6418         (readahead_cache::invalidate_fd): ... this, and adjust to be a
6419         class method.
6420         (remote_hostio_pwrite): Adjust.
6421         (remote_hostio_pread_from_cache): Rename to ...
6422         (readahead_cache::pread): ... this, and adjust to be a class
6423         method.
6424         (remote_hostio_close): Adjust.
6425
6426 2018-05-22  Pedro Alves  <palves@redhat.com>
6427
6428         * remote.c (remote_hostio_close_cleanup): Delete.
6429         (class scoped_remote_fd): New.
6430         (remote_file_put, remote_file_get): Use it.
6431
6432 2018-05-22  Pedro Alves  <palves@redhat.com>
6433
6434         (struct vCont_action_support): Use bool and initialize all fields.
6435         (struct readahead_cache): Initialize all fields.
6436         (remote_state): Use bool and initialize all fields.
6437         (remote_state::remote_state, remote_state::~remote_state): New.
6438         (new_remote_state): Delete.
6439         (_initialize_remote): Use new to allocate remote_state.
6440
6441 2018-05-22  Pedro Alves  <palves@redhat.com>
6442             張俊芝  <zjz@zjz.name>
6443
6444         PR gdb/22973
6445         * c-exp.y: Include "c-support.h".
6446         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
6447         of tolower.  Use c_ident_is_alpha to scan names.
6448         * c-lang.c: Include "c-support.h".
6449         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
6450         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
6451         * c-support.h: New file, with bits factored out from ...
6452         * cp-name-parser.y: ... this file.
6453         Include "c-support.h".
6454         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
6455         c-support.h and renamed.
6456         (symbol_end, yylex): Adjust.
6457
6458 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6459
6460         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
6461         parameter type to CORE_ADDR.
6462         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
6463         parameter type in declaration to CORE_ADDR.
6464         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
6465         target_auxv_search to get AT_HWCAP and use the result to get the
6466         target description.
6467         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
6468         to CORE_ADDR. Remove the cast of the return value to unsigned
6469         long. Fix error predicate of target_auxv_search.
6470         (ppc_linux_nat_target::read_description): Change the type of the
6471         hwcap variable to CORE_ADDR.
6472
6473 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6474
6475         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
6476         if the size of fpscr is larger than 32 bits.
6477
6478 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6479
6480         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
6481         (ppc32_linux_vsxregmap): New global.
6482         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
6483         regcache_supply_regset, and regcache_collect_regset.
6484         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
6485         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
6486         (fetch_vsx_register, store_vsx_register): Remove.
6487         (fetch_vsx_registers): Add regno parameter. Get regset using
6488         ppc_linux_vsxregset. Use regset to supply registers.
6489         (store_vsx_registers): Add regno parameter. Get regset using
6490         ppc_linux_vsxregset. Use regset to collect registers.
6491         (fetch_register): Call fetch_vsx_registers instead of
6492         fetch_vsx_register.
6493         (store_register): Call store_vsx_registers instead of
6494         store_vsx_register.
6495         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
6496         new regno parameter.
6497         (store_ppc_registers): Call store_vsx_registers with -1 for the
6498         new regno parameter.
6499         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
6500         (ppc_collect_vsxregset): Remove.
6501
6502 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6503
6504         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
6505         offset fields.
6506         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
6507         for vector register offset fields.
6508         (ppc64_fbsd_reg_offsets): Likewise.
6509         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
6510         to vector register offset fields.
6511         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
6512         to vector register offset fields.
6513         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
6514         vector register offset fields.
6515         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
6516         initializers for vector register offset fields.
6517         (rs6000_aix64_reg_offsets): Likewise.
6518         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
6519         (ppc_supply_vrregset): Remove.
6520         (ppc_collect_vrregset): Remove.
6521         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
6522         (ppc_linux_vrregset) : New function.
6523         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
6524         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
6525         (ppc32_linux_vrregset): Remove.
6526         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
6527         and use result instead of ppc32_linux_vrregset.
6528         (ppc32_linux_reg_offsets): Remove initializers for vector register
6529         offset fields.
6530         (ppc64_linux_reg_offsets): Likewise.
6531         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
6532         * ppc-linux-nat.c: Include regset.h.
6533         (gdb_vrregset_t): Adjust comment to account for little-endian
6534         mode.
6535         (supply_vrregset, fill_vrregset): Remove.
6536         (fetch_altivec_register, store_altivec_register): Remove.
6537         (fetch_altivec_registers): Add regno parameter. Get regset using
6538         ppc_linux_vrregset. Use regset to supply registers.
6539         (store_altivec_registers): Add regno parameter. Get regset using
6540         ppc_linux_vrregset. Use regset to collect registers.
6541         (fetch_register): Call fetch_altivec_registers instead of
6542         fetch_altivec_register.
6543         (store_register): Call store_altivec_registers instead of
6544         store_altivec_register.
6545         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
6546         the new regno parameter.
6547         (store_ppc_registers): Call store_altivec_registers with -1 for
6548         the new regno parameter.
6549
6550 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6551
6552         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
6553         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
6554         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
6555         (gdb_vrregset_t): Change array type size to
6556         PPC_LINUX_SIZEOF_VRREGSET.
6557         (gdb_vsxregset_t): Change array type size to
6558         PPC_LINUX_SIZEOF_VSXREGSET.
6559         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
6560         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
6561         PPC_LINUX_SIZEOF_VSXREGSET.
6562
6563 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6564
6565         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
6566         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
6567         nat/ppc-linux.c.
6568         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
6569         ppc_linux_target_wordsize with tid.
6570         (ppc_linux_nat_target::read_description): Call ppc_linux_target
6571         wordsize with tid.
6572         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
6573         (ppc64_64bit_inferior_p): Add static and inline specifiers.
6574         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
6575         tid parameter. Remove static specifier.
6576         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
6577         (ppc_linux_target_wordsize): New declaration.
6578
6579 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6580
6581         * arch/ppc-linux-common.c: New file.
6582         * arch/ppc-linux-common.h: New file.
6583         * arch/ppc-linux-tdesc.h: New file.
6584         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
6585         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
6586         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
6587         arch/ppc-linux-tdesc.h.
6588         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
6589         arch/ppc-linux-tdesc.h.
6590         (ppc_linux_nat_target::read_description): Remove target
6591         description matching code. Fill a ppc_linux_features struct and
6592         call ppc_linux_match_description with it. Move comment about ISA
6593         2.05 to ppc-linux-common.c.
6594         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
6595         arch/ppc-linux-tdesc.h.
6596         (ppc_linux_core_read_description): Remove target description
6597         matching code. Fill a ppc_linux_features struct and call
6598         ppc_linux_match_description with it.
6599         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
6600         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
6601         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
6602         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
6603         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
6604         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
6605         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
6606         (tdesc_powerpc_e500l): Remove.
6607
6608 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
6609
6610         * ada-lang.c (catch_assert_command): Pass empty string instead
6611         of NULL for excep_string argument.
6612
6613 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
6614
6615         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
6616         the width of the requested register exceeds the width of the
6617         `ptrace' data type.
6618
6619 2018-05-21  Tom Tromey  <tom@tromey.com>
6620
6621         * printcmd.c (output_command): Remove.
6622         (output_command_const): Rename to output_command.
6623         * valprint.h (output_command): Rename from output_command_const.
6624         * tracepoint.c (trace_dump_actions): Call output_command.
6625
6626 2018-05-21  Tom Tromey  <tom@tromey.com>
6627
6628         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
6629         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
6630         * ada-lang.h (create_ada_exception_catchpoint): Update.
6631         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
6632         std::string.
6633         (create_excep_cond_exprs, ~ada_catchpoint)
6634         (should_stop_exception, print_one_exception)
6635         (print_mention_exception, print_recreate_exception): Update.
6636         (ada_get_next_arg): Remove.
6637         (catch_ada_exception_command_split): Use std::string.  Change type
6638         of "excep_string", "cond_string".
6639         (catch_ada_exception_command): Update.
6640         (create_ada_exception_catchpoint): Change type of excep_string.
6641         (ada_exception_sal): Remove excep_string parameter.
6642         (~ada_catchpoint): Remove.
6643
6644 2018-05-21  Tom Tromey  <tom@tromey.com>
6645
6646         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
6647         cleanup.
6648
6649 2018-05-21  Tom Tromey  <tom@tromey.com>
6650
6651         * ada-lang.c (ada_exception_message_1, ada_exception_message):
6652         Return unique_xmalloc_ptr.
6653         (print_it_exception): Update.
6654
6655 2018-05-21  Tom Tromey  <tom@tromey.com>
6656
6657         * tracepoint.c (trace_dump_actions): Use std::string.
6658
6659 2018-05-21  Tom Tromey  <tom@tromey.com>
6660
6661         * symfile.c (reread_symbols): Use std::string for original_name.
6662
6663 2018-05-21  Tom Tromey  <tom@tromey.com>
6664
6665         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
6666         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
6667         constructor.
6668
6669 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
6670
6671         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
6672         instance to...
6673         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
6674         * objfiles.c (get_objfile_bfd_data): Allocate
6675         objfile_per_bfd_storage with obstack_new when allocating on
6676         obstack.
6677
6678 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
6679
6680         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
6681         OBSTACK_ZALLOC.
6682         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
6683         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
6684         * mdebugread.c (mdebug_build_psymtabs): Likewise.
6685         (add_pending): Likewise.
6686         (parse_symbol): Likewise.
6687         (parse_partial_symbols): Likewise.
6688         (psymtab_to_symtab_1): Likewise.
6689         (new_psymtab): Likewise.
6690         (elfmdebug_build_psymtabs): Likewise.
6691         * minsyms.c (terminate_minimal_symbol_table): Likewise.
6692         * objfiles.c (get_objfile_bfd_data): Likewise.
6693         (objfile_register_static_link): Likewise.
6694         * psymtab.c (allocate_psymtab): Likewise.
6695         * stabsread.c (read_member_functions): Likewise.
6696         * xcoffread.c (xcoff_end_psymtab): Likewise.
6697
6698 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
6699
6700         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
6701         compiler supports std::is_trivially_constructible.
6702         * common/poison.h: Include obstack.h.
6703         (IsMallocable): Define to is_trivially_constructible if the
6704         compiler supports it, define to true_type otherwise.
6705         (xobnew): New.
6706         (XOBNEW): Redefine.
6707         (xobnewvec): New.
6708         (XOBNEWVEC): Redefine.
6709         * gdb_obstack.h (obstack_zalloc): New.
6710         (OBSTACK_ZALLOC): Redefine.
6711         (obstack_calloc): New.
6712         (OBSTACK_CALLOC): Redefine.
6713         (obstack_new): New.
6714         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
6715         (gdbarch_obstack): New declaration in gdbarch.h, definition in
6716         gdbarch.c.
6717         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
6718         obstack_calloc/obstack_zalloc.
6719         (gdbarch_obstack_zalloc): Remove.
6720         * target-descriptions.c (tdesc_data_init): Use obstack_new.
6721
6722 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6723
6724         * stack.c (backtrace_command_1): Remove useless variable int i.
6725
6726 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6727
6728         * stack.c (print_frame_info): Fix comment.
6729
6730 2018-05-18  Tom Tromey  <tom@tromey.com>
6731
6732         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
6733         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
6734         (~dwarf2_per_objfile): Update
6735         (dwarf2_get_dwz_file): Use new.
6736         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
6737         unique_ptr.
6738
6739 2018-05-18  Tom Tromey  <tom@tromey.com>
6740
6741         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
6742         unique_ptr.
6743         * dwarf2read.c (struct dwp_file): Add constructor and
6744         initializers.
6745         (open_and_init_dwp_file): Return a unique_ptr.
6746         (dwarf2_per_objfile, create_dwp_hash_table)
6747         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
6748         (lookup_dwo_unit_in_dwp): Update.
6749         (open_and_init_dwp_file, get_dwp_file): Update.
6750
6751 2018-05-18  Tom Tromey  <tom@tromey.com>
6752
6753         * dwarf2read.c (dwarf2_per_objfile): Update.
6754         (struct mapped_index): Add initializers.
6755         (dwarf2_read_index): Use new.
6756         (dw2_symtab_iter_init): Update.
6757         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
6758         unique_ptr.
6759
6760 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
6761
6762         * dwarf2read.c (mapped_index) <total_size>: Remove.
6763
6764 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
6765
6766         * unittests/format_pieces-selftests.c (test_format_specifier):
6767         Add ARI comments.
6768
6769 2018-05-18  Tom Tromey  <tom@tromey.com>
6770
6771         * c-typeprint.c (maybe_print_hole): New function.
6772         (c_print_type_struct_field_offset): Update.
6773         (c_type_print_base_struct_union): Call maybe_print_hole.
6774
6775 2018-05-17  Keith Seitz  <keiths@redhat.com>
6776
6777         * breakpoint.c (build_bpstat_chain): New function, moved from
6778         bpstat_stop_status.
6779         (bpstat_stop_status): Add optional parameter, `stop_chain'.
6780         If no stop chain is passed, call build_bpstat_chain to build it.
6781         * breakpoint.h (build_bpstat_chain): Declare.
6782         (bpstat_stop_status): Move documentation here from breakpoint.c.
6783         * infrun.c (handle_signal_stop): Before eliding inlined frames,
6784         build the stop chain and pass it to skip_inline_frames.
6785         Pass this stop chain to bpstat_stop_status.
6786         * inline-frame.c: Include breakpoint.h.
6787         (stopped_by_user_bp_inline_frame): New function.
6788         (skip_inline_frames): Add parameter `stop_chain'.
6789         Move documention to inline-frame.h.
6790         If non-NULL, use stopped_by_user_bp_inline_frame to determine
6791         whether the frame should be elided.
6792         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
6793         Add moved documentation and update for new parameter.
6794
6795 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
6796
6797         PR cli/14975
6798         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6799         unittests/format_pieces-selftests.c.
6800         * common/format.h (format_piece) <operator==>: New.
6801         (format_pieces) <operator[]>: Remove.
6802         * common/format.c (format_pieces::format_pieces): Handle \e.
6803         * unittests/format_pieces-selftests.c: New.
6804
6805 2018-05-17  Tom Tromey  <tom@tromey.com>
6806
6807         PR symtab/23010:
6808         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
6809         (dw2_instantiate_symtab): Add skip_partial parameter.
6810         (dw2_find_last_source_symtab, dw2_map_expand_apply)
6811         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
6812         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
6813         (dw2_expand_symtabs_matching_one)
6814         (dw2_find_pc_sect_compunit_symtab)
6815         (dw2_debug_names_lookup_symbol)
6816         (dw2_debug_names_expand_symtabs_for_function): Update.
6817         (init_cutu_and_read_dies): Add skip_partial parameter.
6818         (process_psymtab_comp_unit, build_type_psymtabs_1)
6819         (process_skeletonless_type_unit, load_partial_comp_unit)
6820         (psymtab_to_symtab_1): Update.
6821         (load_full_comp_unit): Add skip_partial parameter.
6822         (process_imported_unit_die, dwarf2_read_addr_index)
6823         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
6824         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
6825         (read_signatured_type): Update.
6826
6827 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
6828
6829         * value.c (release_value): Remove unused variable.
6830         (record_latest_value): Likewise.
6831         (access_value_history): Likewise.
6832         (preserve_values): Likewise.
6833
6834 2018-05-17  Tom Tromey  <tom@tromey.com>
6835
6836         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
6837         Initialize.
6838
6839 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
6840
6841         PR gdb/22286
6842         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
6843         Also handle registers whose width is not a multiple of
6844         PTRACE_TYPE_RET.
6845         (linux_nat_trad_target::store_register): Likewise.
6846
6847 2018-05-16  Tom Tromey  <tom@tromey.com>
6848
6849         * gdbcore.h (core_bfd): Redefine.
6850         * corelow.c (core_target::close): Update.
6851         (core_target_open): Update.
6852         * progspace.h (struct program_space) <cbfd>: Now a
6853         gdb_bfd_ref_ptr.
6854
6855 2018-05-16  Tom Tromey  <tom@tromey.com>
6856
6857         PR cli/19551:
6858         * symfile-add-flags.h (enum symfile_add_flags)
6859         <SYMFILE_NOT_FILENAME>: New constant.
6860         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
6861         objfile name from BFD.
6862         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
6863         * minidebug.c (find_separate_debug_file_in_section): Put
6864         ".gnu_debugdata" into BFD's file name.
6865
6866 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
6867
6868         * regcache.c (regcache_read_ftype, regcache_write_ftype):
6869         Remove.
6870
6871 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
6872
6873         PR binutils/21446
6874         * aarch64-tdep.c (aarch64_analyze_prologue,
6875         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
6876         Indicate not interested in errors.
6877
6878 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
6879
6880         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
6881         Supply the MIPS_ZERO_REGNUM register.
6882
6883 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
6884
6885         * mips-tdep.c (mask_address_var): Make variable static.
6886
6887 2018-05-14  Tom Tromey  <tom@tromey.com>
6888
6889         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
6890
6891 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
6892
6893         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
6894         FXSAVE_ADDR for the mxcsr register.
6895
6896 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
6897
6898         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
6899
6900 2018-05-11  Pedro Alves  <palves@redhat.com>
6901
6902         * corelow.c (core_target) <core_target>: No longer inline.
6903         Initialize m_core_gdbarch, m_core_vec and build the section table
6904         here.
6905         <~core_target>: New.
6906         <core_gdbarch, get_core_register_section>: New methods.
6907         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
6908         factored out from ...
6909         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
6910         (core_ops): Delete.
6911         (sniff_core_bfd): Add gdbarch parameter.
6912         (core_close): Delete, merged into ...
6913         (core_target::close): ... here.  Delete self.
6914         (core_close_cleanup): Delete.
6915         (core_target_open): Allocate a core_target on the heap.  Use a
6916         unique_ptr instead of a cleanup.  Bits moved into the core_target
6917         ctor.  Adjust to use core_target methods instead of globals.
6918         (get_core_register_section): Rename to ...
6919         (core_target::get_core_register_section): ... this and adjust.
6920         (struct get_core_registers_cb_data): New.
6921         (get_core_registers_cb): Use it.  Use bool.
6922         (core_target::fetch_registers, core_target::files_info)
6923         (core_target::xfer_partial, core_target::read_description)
6924         (core_target::pid_to, core_target::thread_name): Adjust to
6925         reference class fields instead of globals.
6926         * target.h (struct target_ops_deleter, target_ops_up): New.
6927
6928 2018-05-11  Pedro Alves  <palves@redhat.com>
6929
6930         * corefile.c (core_file_command): Move to corelow.c.
6931         * corelow.c (the_core_target): Delete.
6932         (core_file_command): Moved from corefile.c.  Check exec_bfd
6933         instead of the_core_target.  Use target_detach instead of calling
6934         into the_core_target directly.
6935         (maybe_say_no_core_file_now): New.
6936         (core_target::detach): Use it.
6937         (_initialize_corelow): Remove references to the_core_target.
6938         * gdbcore.h (the_core_target): Delete.
6939
6940 2018-05-11  Tom Tromey  <tromey@redhat.com>
6941             Pedro Alves  <palves@redhat.com>
6942
6943         * corefile.c (core_bfd): Remove.
6944         * gdbcore.h (core_bfd): Now a macro.
6945         * progspace.h (struct program_space) <cbfd>: New field.
6946
6947 2018-05-11  Tom Tromey  <tom@tromey.com>
6948
6949         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
6950         gdb::def_vector.
6951
6952 2018-05-10  Tom Tromey  <tom@tromey.com>
6953
6954         * configure: Rebuild.
6955         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
6956
6957 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
6958
6959         PR server/23158:
6960         * regformats/regdat.sh: Adjust script, following the addition
6961         of the new expedite_regs parameter to init_target_desc.
6962
6963 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
6964     
6965         PR gdb/23127
6966         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
6967         set_gdbarch_significant_addr_bit.
6968         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
6969         set_gdbarch_significant_addr_bit.
6970         * utils.c (address_significant): Update to sign extend addr.
6971
6972 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
6973
6974         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
6975         (xtensa_linux_init_abi): Limit tdep->num_regs by
6976         tdep->num_nopriv_regs.
6977         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
6978         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
6979         not initialized.
6980
6981 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
6982
6983         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
6984
6985 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
6986
6987         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
6988         (I387_MXCSR_INIT_VAL): New constant.
6989         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
6990         buffer if it was supplied by the inferior.
6991         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
6992         (i387_xsave_get_clear_bv): New function.
6993         (i387_supply_xsave): Only read x87 control registers from the
6994         xsave buffer if the feature is enabled, and the state will have
6995         been written, otherwise, provide a suitable default.
6996         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
6997         including x87 control registers.  Update control registers if they
6998         have changed from the default value, and mark features as enabled
6999         as required.
7000         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
7001
7002 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
7003
7004         * spu-tdep.c (info_spu_event_command): Fix output formatting.
7005
7006 2018-05-07  Tom Tromey  <tom@tromey.com>
7007
7008         * configure: Rebuild.
7009         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
7010
7011 2018-05-07  Tom Tromey  <tom@tromey.com>
7012
7013         PR tdep/20362:
7014         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
7015         bit.  Use correct value for VDIV.
7016
7017 2018-05-04  Tom Tromey  <tom@tromey.com>
7018
7019         * configure: Rebuild.
7020         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
7021
7022 2018-05-04  Tom Tromey  <tom@tromey.com>
7023
7024         * linux-record.c (record_linux_system_call) <case
7025         RECORD_SYS_RECVFROM>: Add "break".
7026
7027 2018-05-04  Tom Tromey  <tom@tromey.com>
7028
7029         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
7030         Add missing "break".
7031         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
7032         Add missing "break".
7033
7034 2018-05-04  Tom Tromey  <tom@tromey.com>
7035
7036         * rs6000-tdep.c (ppc_process_record_op4)
7037         (ppc_process_record_op63): Add fall-through comment.
7038
7039 2018-05-04  Tom Tromey  <tom@tromey.com>
7040
7041         * i386-tdep.c (i386_process_record): Add fall-through comment.
7042
7043 2018-05-04  Tom Tromey  <tom@tromey.com>
7044
7045         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
7046         comment.
7047
7048 2018-05-04  Tom Tromey  <tom@tromey.com>
7049
7050         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
7051         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
7052         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
7053         comment.
7054         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
7055         comment.
7056         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
7057         comment.
7058
7059 2018-05-04  Tom Tromey  <tom@tromey.com>
7060
7061         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
7062
7063 2018-05-04  Tom Tromey  <tom@tromey.com>
7064
7065         * s390-tdep.c (s390_process_record): Fix fall-through comments.
7066         * xcoffread.c (scan_xcoff_symtab): Move comment later.
7067         * symfile.c (section_is_mapped): Fix fall-through comment.
7068         * stabsread.c (define_symbol, read_member_functions): Fix
7069         fall-through comment.
7070         * s390-linux-tdep.c (s390_process_record): Fix fall-through
7071         comment.
7072         * remote.c (remote_wait_as): Fix fall-through comment.
7073         * p-exp.y (yylex): Fix fall-through comment.
7074         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
7075         comment.
7076         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
7077         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
7078         * jv-exp.y (yylex): Fix fall-through comment.
7079         * go-exp.y (lex_one_token): Fix fall-through comment.
7080         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
7081         fall-through comment.
7082         * f-exp.y (yylex): Fix fall-through comment.
7083         * dwarf2read.c (process_die): Fix fall-through comments.
7084         * dbxread.c (process_one_symbol): Fix fall-through comment.
7085         * d-exp.y (lex_one_token): Fix fall-through comment.
7086         * cp-name-parser.y (yylex): Fix fall-through comment.
7087         * coffread.c (coff_symtab_read): Fix fall-through comment.
7088         * c-exp.y (lex_one_token): Fix fall-through comment.
7089         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
7090         comment.
7091         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
7092         comment.
7093
7094 2018-05-04  Tom Tromey  <tom@tromey.com>
7095
7096         PR python/22730:
7097         * NEWS: Mention gdb.execute change.
7098         * gdbcmd.h (execute_control_command): Don't declare.
7099         * python/python.c (execute_gdb_command): Use read_command_lines_1,
7100         execute_control_commands, execute_control_commands_to_string.
7101         * cli/cli-script.h (execute_control_commands)
7102         (execute_control_commands_to_string): Declare.
7103         (execute_control_command): Add from_tty parameter.
7104         * cli/cli-script.c (execute_control_commands)
7105         (execute_control_commands_to_string): New functions.
7106         (execute_user_command): Use execute_control_commands.
7107         (execute_control_command_1): Add "from_tty" parameter.  Update.
7108         (execute_control_command): Likewise.
7109
7110 2018-05-04  Tom Tromey  <tom@tromey.com>
7111
7112         PR python/22731:
7113         * NEWS: Mention that breakpoint commands are writable.
7114         * python/py-breakpoint.c (bppy_set_commands): New function.
7115         (breakpoint_object_getset) <"commands">: Use it.
7116
7117 2018-05-04  Tom Tromey  <tom@tromey.com>
7118
7119         * tracepoint.c (actions_command): Update.
7120         * mi/mi-cmd-break.c (mi_command_line_array)
7121         (mi_command_line_array_cnt, mi_command_line_array_ptr)
7122         (mi_read_next_line): Remove.
7123         (mi_cmd_break_commands): Update.
7124         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
7125         function_view.
7126         * cli/cli-script.c (get_command_line): Update.
7127         (process_next_line): Use function_view.  Constify.
7128         (recurse_read_control_structure, read_command_lines)
7129         (read_command_lines_1): Change argument types to function_view.
7130         (do_define_command, document_command): Update.
7131         * breakpoint.h (check_tracepoint_command): Don't declare.
7132         * breakpoint.c (check_tracepoint_command): Remove.
7133         (commands_command_1, create_tracepoint_from_upload): Update.
7134
7135 2018-05-04  Tom Tromey  <tom@tromey.com>
7136
7137         PR gdb/11750:
7138         * cli/cli-script.h (enum command_control_type) <define_control>:
7139         New constant.
7140         * cli/cli-script.c (multi_line_command_p): Handle define_control.
7141         (build_command_line, execute_control_command_1)
7142         (process_next_line): Likewise.
7143         (do_define_command): New function, extracted from define_command.
7144         (define_command): Use it.
7145
7146 2018-05-04  Tom Tromey  <tom@tromey.com>
7147
7148         * tracepoint.c (actions_command): Update.
7149         * cli/cli-script.h (read_command_lines): Update.
7150         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
7151         (MAX_TMPBUF): Remove define.
7152         (define_command): Use string_printf.
7153         (document_command): Likewise.
7154         * breakpoint.c (commands_command_1): Update.
7155
7156 2018-05-04  Tom Tromey  <tom@tromey.com>
7157
7158         * top.c (execute_command): Update.
7159         * cli/cli-script.h (print_command_lines): Now varargs.
7160         * cli/cli-script.c (print_command_lines): Now varargs.
7161         (execute_control_command_1) <case while_control, case if_control>:
7162         Update.
7163
7164 2018-05-04  Tom Tromey  <tom@tromey.com>
7165
7166         * tracepoint.c (all_tracepoint_actions): Rename from
7167         all_tracepoint_actions_and_cleanup.  Change return type.
7168         (actions_command, encode_actions_1, encode_actions)
7169         (trace_dump_actions, tdump_command): Update.
7170         * remote.c (remote_download_command_source): Update.
7171         * python/python.c (gdbpy_eval_from_control_command)
7172         (python_command, python_interactive_command): Update.
7173         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
7174         * guile/guile.c (guile_command)
7175         (gdbscm_eval_from_control_command, guile_command): Update.
7176         * compile/compile.c (compile_code_command)
7177         (compile_print_command, compile_to_object): Update.
7178         * cli/cli-script.h (struct command_lines_deleter): New.
7179         (counted_command_line): New typedef.
7180         (struct command_line): Add constructor, destructor.
7181         <body_list>: Remove.
7182         <body_list_0, body_list_1>: New members.
7183         (command_line_up): Remove typedef.
7184         (read_command_lines, read_command_lines_1, get_command_line):
7185         Update.
7186         (copy_command_lines): Don't declare.
7187         * cli/cli-script.c (build_command_line): Use "new".
7188         (get_command_line): Return counted_command_line.
7189         (print_command_lines, execute_user_command)
7190         (execute_control_command_1, while_command, if_command): Update.
7191         (realloc_body_list): Remove.
7192         (process_next_line, recurse_read_control_structure): Update.
7193         (read_command_lines, read_command_lines_1): Return counted_command_line.
7194         (free_command_lines): Use "delete".
7195         (copy_command_lines): Remove.
7196         (define_command, document_command, show_user_1): Update.
7197         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
7198         a counted_command_line.
7199         * breakpoint.h (counted_command_line): Remove typedef.
7200         (breakpoint_set_commands): Update.
7201         * breakpoint.c (check_no_tracepoint_commands)
7202         (validate_commands_for_breakpoint): Update.
7203         (breakpoint_set_commands): Change commands to be a
7204         counted_command_line.
7205         (commands_command_1, update_dprintf_command_list)
7206         (create_tracepoint_from_upload): Update.
7207
7208 2018-05-04  Tom Tromey  <tom@tromey.com>
7209
7210         * cli/cli-decode.h (cmd_list_element): New constructor.
7211         (~cmd_list_element): New destructor.
7212         (struct cmd_list_element): Add initializers.
7213         * cli/cli-decode.c (do_add_cmd): Use "new".
7214         (delete_cmd): Use "delete".
7215
7216 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
7217             Pedro Alves <palves@redhat.com>
7218
7219         PR breakpoints/19806 and support for PR external/20207.
7220         * NEWS: Mention Aarch64 watchpoint improvements.
7221         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
7222         watchpoints and PR external/20207 watchpoints.
7223         * nat/aarch64-linux-hw-point.c
7224         (kernel_supports_any_contiguous_range): New.
7225         (aarch64_watchpoint_offset): New.
7226         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
7227         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
7228         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
7229         (aarch64_align_watchpoint): New parameters aligned_offset_p and
7230         next_addr_orig_p.  Support PR external/20207 watchpoints.
7231         (aarch64_downgrade_regs): New.
7232         (aarch64_dr_state_insert_one_point): New parameters offset and
7233         addr_orig.
7234         (aarch64_dr_state_remove_one_point): Likewise.
7235         (aarch64_handle_breakpoint): Update caller.
7236         (aarch64_handle_aligned_watchpoint): Likewise.
7237         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
7238         aligned_offset.
7239         (aarch64_linux_set_debug_regs): Remove const from state.  Call
7240         aarch64_downgrade_regs.
7241         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
7242         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
7243         (DR_CONTROL_MASK): ... this.
7244         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
7245         (unsigned int aarch64_watchpoint_offset): New prototype.
7246         (aarch64_linux_set_debug_regs): Remove const from state.
7247         * utils.c (align_up, align_down): Move to ...
7248         * common/common-utils.c (align_up, align_down): ... here.
7249         * utils.h (align_up, align_down): Move to ...
7250         * common/common-utils.h (align_up, align_down): ... here.
7251
7252 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
7253
7254         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
7255         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
7256         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
7257         Re-implement to match the ABI as summarized in GCC's
7258         gcc/config/sparc/sparc.c.  All callers updated.
7259         (sparc32_store_arguments): Remove assertion.
7260
7261 2018-05-04  Tom Tromey  <tom@tromey.com>
7262
7263         * printcmd.c: Don't include tui.h.
7264         (decode_format): Use skip_spaces.
7265
7266 2018-05-04  Tom Tromey  <tom@tromey.com>
7267
7268         PR gdb/22619:
7269         * printcmd.c (last_count): New global.
7270         (x_command): Use saved count when repeating.
7271
7272 2018-05-04  Tom Tromey  <tom@tromey.com>
7273
7274         * nto-procfs.c (do_closedir_cleanup): Remove.
7275         (procfs_pidlist): Use gdb_dir_up.
7276         * procfs.c (do_closedir_cleanup): Remove.
7277         (proc_update_threads): Use gdb_dir_up.
7278         * common/filestuff.h (struct gdb_dir_deleter): New.
7279         (gdb_dir_up): New typedef.
7280
7281 2018-05-04  Tom Tromey  <tom@tromey.com>
7282
7283         * ada-lang.c (print_mention_exception): Use std::string.
7284
7285 2018-05-04  Tom Tromey  <tom@tromey.com>
7286
7287         * ada-lang.c (create_excep_cond_exprs): Update.
7288         (ada_exception_catchpoint_cond_string): Use std::string.
7289
7290 2018-05-04  Tom Tromey  <tom@tromey.com>
7291
7292         * ada-lang.c (xget_renaming_scope): Return std::string.
7293         (old_renaming_is_invisible): Update.
7294
7295 2018-05-04  Tom Tromey  <tom@tromey.com>
7296
7297         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
7298         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
7299
7300 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
7301
7302         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
7303
7304 2018-05-04  Tom Tromey  <tom@tromey.com>
7305
7306         * remote.c (remote_query_supported_append): Change type.
7307         (remote_check_symbols): Update.
7308
7309 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
7310
7311         PR gdb/11420
7312         * configure.ac: Prepend libpython.
7313         * python/python-config.py: Likewise.
7314         * configure: Regenerate.
7315
7316 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
7317
7318         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
7319
7320 2018-05-03  Pedro Alves  <palves@redhat.com>
7321
7322         * s390-linux-nat.c
7323         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
7324         override.  Write 'true' instead of '1'.
7325         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
7326         declaration.
7327
7328 2018-05-02  Pedro Alves  <palves@redhat.com>
7329
7330         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
7331         add_inf_child_target.
7332         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
7333         add_inf_child_target.
7334         * aix-thread.c (aix_thread_target_info): New.
7335         (aix_thread_target) <shortname, longname, doc>: Delete.
7336         <info>: New.
7337         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
7338         add_inf_child_target.
7339         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
7340         add_inf_child_target.
7341         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
7342         add_inf_child_target.
7343         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
7344         add_inf_child_target.
7345         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
7346         add_inf_child_target.
7347         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
7348         add_inf_child_target.
7349         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
7350         add_inf_child_target.
7351         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
7352         add_inf_child_target.
7353         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
7354         add_inf_child_target.
7355         * bfd-target.c (target_bfd_target_info): New.
7356         (target_bfd) <shortname, longname, doc>: Delete.
7357         <info>: New.
7358         * bsd-kvm.c (bsd_kvm_target_info): New.
7359         (bsd_kvm_target) <shortname, longname, doc>: Delete.
7360         <info>: New.
7361         (bsd_kvm_target::open): Rename to ...
7362         (bsd_kvm_target_open): ... this.  Adjust.
7363         * bsd-uthread.c (bsd_uthread_target_info): New.
7364         (bsd_uthread_target) <shortname, longname, doc>: Delete.
7365         <info>: New.
7366         * corefile.c (core_file_command): Adjust.
7367         * corelow.c (core_target_info): New.
7368         (core_target) <shortname, longname, doc>: Delete.
7369         <info>: New.
7370         (core_target::open): Rename to ...
7371         (core_target_open): ... this.  Adjust.
7372         * ctf.c (ctf_target_info): New.
7373         (ctf_target) <shortname, longname, doc>: Delete.
7374         <info>: New.
7375         (ctf_target::open): Rename to ...
7376         (ctf_target_open): ... this.
7377         (_initialize_ctf): Adjust.
7378         * exec.c (exec_target_info): New.
7379         (exec_target) <shortname, longname, doc>: Delete.
7380         <info>: New.
7381         (exec_target::open): Rename to ...
7382         (exec_target_open): ... this.
7383         * gdbcore.h (core_target_open): Declare.
7384         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
7385         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
7386         add_inf_child_target.
7387         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
7388         add_inf_child_target.
7389         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
7390         add_inf_child_target.
7391         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
7392         add_inf_child_target.
7393         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
7394         add_inf_child_target.
7395         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
7396         add_inf_child_target.
7397         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
7398         add_inf_child_target.
7399         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
7400         add_inf_child_target.
7401         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
7402         add_inf_child_target.
7403         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
7404         add_inf_child_target.
7405         * inf-child.c (inf_child_target_info): New.
7406         (inf_child_target::info): New.
7407         (inf_child_open_target): Remove 'target' parameter.  Use
7408         get_native_target instead.
7409         (inf_child_target::open): Delete.
7410         (add_inf_child_target): New.
7411         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
7412         Delete.
7413         <info>: New.
7414         (add_inf_child_target): Declare.
7415         (inf_child_open_target): Declare.
7416         * linux-thread-db.c (thread_db_target_info): New.
7417         (thread_db_target) <shortname, longname, doc>: Delete.
7418         <info>: New.
7419         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
7420         add_inf_child_target.
7421         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
7422         add_inf_child_target.
7423         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
7424         add_inf_child_target.
7425         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
7426         add_inf_child_target.
7427         * make-target-delegates (print_class): Adjust.
7428         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
7429         add_inf_child_target.
7430         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
7431         add_inf_child_target.
7432         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
7433         add_inf_child_target.
7434         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
7435         add_inf_child_target.
7436         * nto-procfs.c (nto_native_target_info): New.
7437         (nto_procfs_target_native) <shortname, longname, doc>:
7438         Delete.
7439         <info>: New.
7440         (nto_procfs_target_info): New.
7441         (nto_procfs_target_procfs) <shortname, longname, doc>:
7442         Delete.
7443         <info>: New.
7444         (init_procfs_targets): Adjust.
7445         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
7446         add_inf_child_target.
7447         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
7448         add_inf_child_target.
7449         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
7450         add_inf_child_target.
7451         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
7452         add_inf_child_target.
7453         * ravenscar-thread.c (ravenscar_target_info): New.
7454         (ravenscar_thread_target) <shortname, longname, doc>:
7455         Delete.
7456         <info>: New.
7457         * record-btrace.c (record_btrace_target_info):
7458         (record_btrace_target) <shortname, longname, doc>: Delete.
7459         <info>: New.
7460         (record_btrace_target::open): Rename to ...
7461         (record_btrace_target_open): ... this.  Adjust.
7462         * record-full.c (record_longname, record_doc): New.
7463         (record_full_base_target) <shortname, longname, doc>: Delete.
7464         <info>: New.
7465         (record_full_target_info): New.
7466         (record_full_target): <shortname>: Delete.
7467         <info>: New.
7468         (record_full_core_open_1, record_full_open_1): Update comments.
7469         (record_full_base_target::open): Rename to ...
7470         (record_full_open): ... this.
7471         (cmd_record_full_restore): Update.
7472         (_initialize_record_full): Update.
7473         * remote-sim.c (remote_sim_target_info): New.
7474         (gdbsim_target) <shortname, longname, doc>: Delete.
7475         <info>: New.
7476         (gdbsim_target::open): Rename to ...
7477         (gdbsim_target_open): ... this.
7478         (_initialize_remote_sim): Adjust.
7479         * remote.c (remote_doc): New.
7480         (remote_target_info): New.
7481         (remote_target) <shortname, longname, doc>: Delete.
7482         <info>: New.
7483         (extended_remote_target_info): New.
7484         (extended_remote_target) <shortname, longname, doc>: Delete.
7485         <info>: New.
7486         (remote_target::open_1): Make static.  Adjust.
7487         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
7488         * s390-linux-nat.c (_initialize_s390_nat): Use
7489         add_inf_child_target.
7490         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
7491         add_inf_child_target.
7492         * sol-thread.c (thread_db_target_info): New.
7493         (sol_thread_target) <shortname, longname, doc>: Delete.
7494         <info>: New.
7495         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
7496         add_inf_child_target.
7497         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
7498         add_inf_child_target.
7499         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
7500         add_inf_child_target.
7501         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
7502         add_inf_child_target.
7503         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
7504         add_inf_child_target.
7505         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
7506         add_inf_child_target.
7507         * spu-linux-nat.c (_initialize_spu_nat): Use
7508         add_inf_child_target.
7509         * spu-multiarch.c (spu_multiarch_target_info): New.
7510         (spu_multiarch_target) <shortname, longname, doc>: Delete.
7511         <info>: New.
7512         * target-delegates.c: Regenerate.
7513         * target.c: Include <unordered_map>.
7514         (target_ops_p): Delete.
7515         (DEF_VEC_P(target_ops_p)): Delete.
7516         (target_factories): New.
7517         (test_target_info): New.
7518         (test_target_ops::info): New.
7519         (open_target): Adjust to use target_factories.
7520         (add_target_with_completer): Rename to ...
7521         (add_target): ... this.  Change prototype.  Register target_info
7522         and open callback in target_factories.  Register target_info in
7523         command context instead of target_ops.
7524         (add_target): Delete old implementation.
7525         (add_deprecated_target_alias): Change prototype.  Adjust.
7526         (the_native_target): New.
7527         (set_native_target, get_native_target): New.
7528         (find_default_run_target): Use the_native_target.
7529         (find_attach_target, find_run_target): Simplify.
7530         (target_ops::open): Delete.
7531         (dummy_target_info): New.
7532         (dummy_target::shortname, dummy_target::longname)
7533         (dummy_target::doc): Delete.
7534         (dummy_target::info): New.
7535         (debug_target::shortname, debug_target::longname)
7536         (debug_target::doc): Delete.
7537         (debug_target::info): New.
7538         * target.h (struct target_info): New.
7539         (target_ops::~target_ops): Add comment.
7540         (target_ops::info): New.
7541         (target_ops::shortname, target_ops::longname, target_ops::doc): No
7542         longer virtual.  Implement in terms of target_info.
7543         (set_native_target, get_native_target): Declare.
7544         (target_open_ftype): New.
7545         (add_target, add_target_with_completer)
7546         (add_deprecated_target_alias): Change prototype.
7547         (test_target) <shortname, longname, doc>: Delete.
7548         <info>: New.
7549         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
7550         add_inf_child_target.
7551         * tracefile-tfile.c (tfile_target_info): New.
7552         (tfile_target) <shortname, longname, doc>: Delete.
7553         <info>: New.
7554         (tfile_target::open): Rename to ...
7555         (tfile_target_open): ... this.
7556         (_initialize_tracefile_tfile): Adjust.
7557         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
7558         add_inf_child_target.
7559         * windows-nat.c (_initialize_windows_nat): Use
7560         add_inf_child_target.
7561         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
7562         add_inf_child_target.
7563
7564 2018-05-02  Pedro Alves  <palves@redhat.com>
7565
7566         * linux-nat.h (linux_nat_target) <low_new_thread,
7567         low_delete_thread, low_new_fork, low_forget_process,
7568         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
7569         New virtual methods.
7570         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
7571         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
7572         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
7573         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
7574         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
7575         Delete.
7576         * linux-fork.c (delete_fork): Adjust to call low method.
7577         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
7578         (linux_nat_new_fork, linux_nat_forget_process_hook)
7579         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
7580         (linux_nat_status_is_event):
7581         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
7582         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
7583         to call low method.
7584         (sigtrap_is_event): Rename to ...
7585         (linux_nat_target::low_status_is_event): ... this.
7586         (linux_nat_set_status_is_event): Delete.
7587         (save_stop_reason, linux_nat_wait_1)
7588         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
7589         low methods.
7590         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
7591         (linux_nat_set_new_fork, linux_nat_set_forget_process)
7592         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
7593         (linux_nat_set_prepare_to_resume): Delete.
7594         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
7595         low virtual methods.
7596         * amd64-linux-nat.c: Likewise.
7597         * arm-linux-nat.c: Likewise.
7598         * i386-linux-nat.c: Likewise.
7599         * ia64-linux-nat.c: Likewise.
7600         * mips-linux-nat.c: Likewise.
7601         * ppc-linux-nat.c: Likewise.
7602         * s390-linux-nat.c: Likewise.
7603         * sparc64-linux-nat.c: Likewise.
7604         * x86-linux-nat.c: Likewise.
7605         * x86-linux-nat.h: Include "nat/x86-linux.h".
7606         (x86_linux_nat_target) <low_new_fork, low_forget_process,
7607         low_prepare_to_resume, low_new_thread, low_delete_thread>:
7608         Override methods.
7609
7610 2018-05-02  Pedro Alves  <palves@redhat.com>
7611
7612         * target.h (target_ops)
7613         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
7614         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
7615         stopped_by_watchpoint, have_continuable_watchpoint,
7616         stopped_data_address, watchpoint_addr_within_range,
7617         can_accel_watchpoint_condition, can_run, thread_alive,
7618         has_all_memory, has_memory, has_stack, has_registers,
7619         has_execution, can_async_p, is_async_p, supports_non_stop,
7620         always_non_stop_p, can_execute_reverse, supports_multi_process,
7621         supports_enable_disable_tracepoint,
7622         supports_disable_randomization, supports_string_tracing,
7623         supports_evaluation_of_breakpoint_conditions,
7624         can_run_breakpoint_commands, filesystem_is_local,
7625         can_download_tracepoint, get_trace_state_variable_value,
7626         set_trace_notes, get_tib_address, use_agent, can_use_agent,
7627         record_is_replaying, record_will_replay,
7628         augmented_libraries_svr4_read>: Adjust to return bool.
7629         * aarch64-linux-nat.c: All implementations adjusted.
7630         * aix-thread.c: All implementations adjusted.
7631         * arm-linux-nat.c: All implementations adjusted.
7632         * breakpoint.c: All implementations adjusted.
7633         * bsd-kvm.c: All implementations adjusted.
7634         * bsd-uthread.c: All implementations adjusted.
7635         * corelow.c: All implementations adjusted.
7636         * ctf.c: All implementations adjusted.
7637         * darwin-nat.c: All implementations adjusted.
7638         * darwin-nat.h: All implementations adjusted.
7639         * exec.c: All implementations adjusted.
7640         * fbsd-nat.c: All implementations adjusted.
7641         * fbsd-nat.h: All implementations adjusted.
7642         * gnu-nat.c: All implementations adjusted.
7643         * gnu-nat.h: All implementations adjusted.
7644         * go32-nat.c: All implementations adjusted.
7645         * ia64-linux-nat.c: All implementations adjusted.
7646         * inf-child.c: All implementations adjusted.
7647         * inf-child.h: All implementations adjusted.
7648         * inf-ptrace.c: All implementations adjusted.
7649         * inf-ptrace.h: All implementations adjusted.
7650         * linux-nat.c: All implementations adjusted.
7651         * linux-nat.h: All implementations adjusted.
7652         * mips-linux-nat.c: All implementations adjusted.
7653         * nto-procfs.c: All implementations adjusted.
7654         * ppc-linux-nat.c: All implementations adjusted.
7655         * procfs.c: All implementations adjusted.
7656         * ravenscar-thread.c: All implementations adjusted.
7657         * record-btrace.c: All implementations adjusted.
7658         * record-full.c: All implementations adjusted.
7659         * remote-sim.c: All implementations adjusted.
7660         * remote.c: All implementations adjusted.
7661         * s390-linux-nat.c: All implementations adjusted.
7662         * sol-thread.c: All implementations adjusted.
7663         * spu-multiarch.c: All implementations adjusted.
7664         * target-delegates.c: All implementations adjusted.
7665         * target.c: All implementations adjusted.
7666         * target.h: All implementations adjusted.
7667         * tracefile-tfile.c: All implementations adjusted.
7668         * tracefile.c: All implementations adjusted.
7669         * tracefile.h: All implementations adjusted.
7670         * windows-nat.c: All implementations adjusted.
7671         * x86-linux-nat.h: All implementations adjusted.
7672         * x86-nat.h: All implementations adjusted.
7673
7674 2018-05-02  Pedro Alves  <palves@redhat.com>
7675
7676         * make-target-delegates (scan_target_h): Don't trim lines here.
7677         Replace sequences of tabs and/or whitespace with a single
7678         whitespace.
7679         (top level, parsing methods): Trim each line before processing it
7680         here.
7681
7682 2018-05-02  Pedro Alves  <palves@redhat.com>
7683             John Baldwin  <jhb@freebsd.org>
7684
7685         * target.h (enum strata) <debug_stratum>: New.
7686         (struct target_ops) <all delegation methods>: Replace by C++
7687         virtual methods, and drop "to_" prefix.  All references updated
7688         throughout.
7689         <to_shortname, to_longname, to_doc, to_data,
7690         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
7691         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
7692         virtual methods.  All references updated throughout.
7693         <can_attach, supports_terminal_ours, can_create_inferior,
7694         get_thread_control_capabilities, attach_no_wait>: New
7695         virtual methods.
7696         <insert_breakpoint, remove_breakpoint>: Now
7697         TARGET_DEFAULT_NORETURN methods.
7698         <info_proc>: Now returns bool.
7699         <to_magic>: Delete.
7700         (OPS_MAGIC): Delete.
7701         (current_target): Delete.  All references replaced by references
7702         to ...
7703         (target_stack): ... this.  New.
7704         (target_shortname, target_longname): Adjust.
7705         (target_can_run): Now a function declaration.
7706         (default_child_has_all_memory, default_child_has_memory)
7707         (default_child_has_stack, default_child_has_registers)
7708         (default_child_has_execution): Remove target_ops parameter.
7709         (complete_target_initialization): Delete.
7710         (memory_breakpoint_target): New template class.
7711         (test_target_ops): Refactor as a C++ class with virtual methods.
7712         * make-target-delegates (NAME_PART): Tighten.
7713         (POINTER_PART, CP_SYMBOL): New.
7714         (SIMPLE_RETURN_PART): Reimplement.
7715         (VEC_RETURN_PART): Expect less.
7716         (RETURN_PART, VIRTUAL_PART): New.
7717         (METHOD): Adjust to C++ virtual methods.
7718         (scan_target_h): Remove reference to C99.
7719         (dname): Output "target_ops::" prefix.
7720         (write_function_header): Adjust to output a C++ class method.
7721         (write_declaration): New.
7722         (write_delegator): Adjust to output a C++ class method.
7723         (tdname): Output "dummy_target::" prefix.
7724         (write_tdefault, write_debugmethod): Adjust to output a C++ class
7725         method.
7726         (tdefault_names, debug_names): Delete.
7727         (return_types, tdefaults, styles, argtypes_array): New.
7728         (top level): All methods are delegators.
7729         (print_class): New.
7730         (top level): Print dummy_target and debug_target classes.
7731         * target-delegates.c: Regenerate.
7732         * target-debug.h (target_debug_print_enum_info_proc_what)
7733         (target_debug_print_thread_control_capabilities)
7734         (target_debug_print_thread_info_p): New.
7735         * target.c (dummy_target): Delete.
7736         (the_dummy_target, the_debug_target): New.
7737         (target_stack): Now extern.
7738         (set_targetdebug): Push/unpush debug target.
7739         (default_child_has_all_memory, default_child_has_memory)
7740         (default_child_has_stack, default_child_has_registers)
7741         (default_child_has_execution): Remove target_ops parameter.
7742         (complete_target_initialization): Delete.
7743         (add_target_with_completer): No longer call
7744         complete_target_initialization.
7745         (target_supports_terminal_ours): Use regular delegation.
7746         (update_current_target): Delete.
7747         (push_target): No longer check magic number.  Don't call
7748         update_current_target.
7749         (unpush_target): Don't call update_current_target.
7750         (target_is_pushed): No longer check magic number.
7751         (target_require_runnable): Skip for all stratums over
7752         process_stratum.
7753         (target_ops::info_proc): New.
7754         (target_info_proc): Use find_target_at and
7755         find_default_run_target.
7756         (target_supports_disable_randomization): Use regular delegation.
7757         (target_get_osdata): Use find_target_at.
7758         (target_ops::open, target_ops::close, target_ops::can_attach)
7759         (target_ops::attach, target_ops::can_create_inferior)
7760         (target_ops::create_inferior, target_ops::can_run)
7761         (target_can_run): New.
7762         (default_fileio_target): Use regular delegation.
7763         (target_ops::fileio_open, target_ops::fileio_pwrite)
7764         (target_ops::fileio_pread, target_ops::fileio_fstat)
7765         (target_ops::fileio_close, target_ops::fileio_unlink)
7766         (target_ops::fileio_readlink): New.
7767         (target_fileio_open_1, target_fileio_unlink)
7768         (target_fileio_readlink): Always call the target method.  Handle
7769         FILEIO_ENOSYS.
7770         (return_zero, return_zero_has_execution): Delete.
7771         (init_dummy_target): Delete.
7772         (dummy_target::dummy_target, dummy_target::shortname)
7773         (dummy_target::longname, dummy_target::doc)
7774         (debug_target::debug_target, debug_target::shortname)
7775         (debug_target::longname, debug_target::doc): New.
7776         (target_supports_delete_record): Use regular delegation.
7777         (setup_target_debug): Delete.
7778         (maintenance_print_target_stack): Skip debug_stratum.
7779         (initialize_targets): Instantiate the_dummy_target and
7780         the_debug_target.
7781         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
7782         use target_stack.
7783         (target_auxv_search, fprint_target_auxv): Adjust.
7784         (info_auxv_command): Adjust to use target_stack.
7785         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
7786         * exceptions.c (print_flush): Handle a NULL target_stack.
7787         * regcache.c (target_ops_no_register): Refactor as class with
7788         virtual methods.
7789
7790         * exec.c (exec_target): New class.
7791         (exec_ops): Now an exec_target.
7792         (exec_open, exec_close_1, exec_get_section_table)
7793         (exec_xfer_partial, exec_files_info, exec_has_memory)
7794         (exec_make_note_section): Refactor as exec_target methods.
7795         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
7796         Delete.
7797         (exec_target::find_memory_regions): New.
7798         (_initialize_exec): Don't call init_exec_ops.
7799         * gdbcore.h (exec_file_clear): Delete.
7800
7801         * corefile.c (core_target): Delete.
7802         (core_file_command): Adjust.
7803         * corelow.c (core_target): New class.
7804         (the_core_target): New.
7805         (core_close): Remove target_ops parameter.
7806         (core_close_cleanup): Adjust.
7807         (core_target::close): New.
7808         (core_open, core_detach, get_core_registers, core_files_info)
7809         (core_xfer_partial, core_thread_alive, core_read_description)
7810         (core_pid_to_str, core_thread_name, core_has_memory)
7811         (core_has_stack, core_has_registers, core_info_proc): Rework as
7812         core_target methods.
7813         (ignore, core_remove_breakpoint, init_core_ops): Delete.
7814         (_initialize_corelow): Initialize the_core_target.
7815         * gdbcore.h (core_target): Delete.
7816         (the_core_target): New.
7817
7818         * ctf.c: (ctf_target): New class.
7819         (ctf_ops): Now a ctf_target.
7820         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
7821         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
7822         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
7823         methods.
7824         (init_ctf_ops): Delete.
7825         (_initialize_ctf): Don't call it.
7826         * tracefile-tfile.c (tfile_target): New class.
7827         (tfile_ops): Now a tfile_target.
7828         (tfile_open, tfile_close, tfile_files_info)
7829         (tfile_get_tracepoint_status, tfile_trace_find)
7830         (tfile_fetch_registers, tfile_xfer_partial)
7831         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
7832         Refactor as tfile_target methods.
7833         (tfile_xfer_partial_features): Remove target_ops parameter.
7834         (init_tfile_ops): Delete.
7835         (_initialize_tracefile_tfile): Don't call it.
7836         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
7837         (tracefile_has_stack, tracefile_has_registers)
7838         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
7839         tracefile_target methods.
7840         (init_tracefile_ops): Delete.
7841         (tracefile_target::tracefile_target): New.
7842         * tracefile.h: Include "target.h".
7843         (tracefile_target): New class.
7844         (init_tracefile_ops): Delete.
7845
7846         * spu-multiarch.c (spu_multiarch_target): New class.
7847         (spu_ops): Now a spu_multiarch_target.
7848         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
7849         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
7850         (spu_search_memory, spu_mourn_inferior): Refactor as
7851         spu_multiarch_target methods.
7852         (init_spu_ops): Delete.
7853         (_initialize_spu_multiarch): Remove references to init_spu_ops,
7854         complete_target_initialization.
7855
7856         * ravenscar-thread.c (ravenscar_thread_target): New class.
7857         (ravenscar_ops): Now a ravenscar_thread_target.
7858         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
7859         (ravenscar_thread_alive, ravenscar_pid_to_str)
7860         (ravenscar_fetch_registers, ravenscar_store_registers)
7861         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
7862         (ravenscar_stopped_by_hw_breakpoint)
7863         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
7864         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
7865         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
7866         methods.
7867         (init_ravenscar_thread_ops): Delete.
7868         (_initialize_ravenscar): Remove references to
7869         init_ravenscar_thread_ops and complete_target_initialization.
7870
7871         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
7872         (bsd_uthread_target): New class.
7873         (bsd_uthread_ops): Now a bsd_uthread_target.
7874         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
7875         (bsd_uthread_close, bsd_uthread_mourn_inferior)
7876         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
7877         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
7878         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
7879         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
7880         (bsd_uthread_target): Delete function.
7881         (_initialize_bsd_uthread): Remove reference to
7882         complete_target_initialization.
7883
7884         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
7885         (target_bfd): ... this new class.
7886         (target_bfd_xfer_partial, target_bfd_get_section_table)
7887         (target_bfd_close): Refactor as target_bfd methods.
7888         (target_bfd::~target_bfd): New.
7889         (target_bfd_reopen): Adjust.
7890         (target_bfd::close): New.
7891
7892         * record-btrace.c (record_btrace_target): New class.
7893         (record_btrace_ops): Now a record_btrace_target.
7894         (record_btrace_open, record_btrace_stop_recording)
7895         (record_btrace_disconnect, record_btrace_close)
7896         (record_btrace_async, record_btrace_info)
7897         (record_btrace_insn_history, record_btrace_insn_history_range)
7898         (record_btrace_insn_history_from, record_btrace_call_history)
7899         (record_btrace_call_history_range)
7900         (record_btrace_call_history_from, record_btrace_record_method)
7901         (record_btrace_is_replaying, record_btrace_will_replay)
7902         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
7903         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
7904         (record_btrace_store_registers, record_btrace_prepare_to_store)
7905         (record_btrace_to_get_unwinder)
7906         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
7907         (record_btrace_commit_resume, record_btrace_wait)
7908         (record_btrace_stop, record_btrace_can_execute_reverse)
7909         (record_btrace_stopped_by_sw_breakpoint)
7910         (record_btrace_supports_stopped_by_sw_breakpoint)
7911         (record_btrace_stopped_by_hw_breakpoint)
7912         (record_btrace_supports_stopped_by_hw_breakpoint)
7913         (record_btrace_update_thread_list, record_btrace_thread_alive)
7914         (record_btrace_goto_begin, record_btrace_goto_end)
7915         (record_btrace_goto, record_btrace_stop_replaying_all)
7916         (record_btrace_execution_direction)
7917         (record_btrace_prepare_to_generate_core)
7918         (record_btrace_done_generating_core): Refactor as
7919         record_btrace_target methods.
7920         (init_record_btrace_ops): Delete.
7921         (_initialize_record_btrace): Remove reference to
7922         init_record_btrace_ops.
7923         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
7924         the execution_direction global.
7925         (record_full_base_target, record_full_target)
7926         (record_full_core_target): New classes.
7927         (record_full_ops): Now a record_full_target.
7928         (record_full_core_ops): Now a record_full_core_target.
7929         (record_full_target::detach, record_full_target::disconnect)
7930         (record_full_core_target::disconnect)
7931         (record_full_target::mourn_inferior, record_full_target::kill):
7932         New.
7933         (record_full_open, record_full_close, record_full_async): Refactor
7934         as methods of the record_full_base_target class.
7935         (record_full_resume, record_full_commit_resume): Refactor
7936         as methods of the record_full_target class.
7937         (record_full_wait, record_full_stopped_by_watchpoint)
7938         (record_full_stopped_data_address)
7939         (record_full_stopped_by_sw_breakpoint)
7940         (record_full_supports_stopped_by_sw_breakpoint)
7941         (record_full_stopped_by_hw_breakpoint)
7942         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
7943         methods of the record_full_base_target class.
7944         (record_full_store_registers, record_full_xfer_partial)
7945         (record_full_insert_breakpoint, record_full_remove_breakpoint):
7946         Refactor as methods of the record_full_target class.
7947         (record_full_can_execute_reverse, record_full_get_bookmark)
7948         (record_full_goto_bookmark, record_full_execution_direction)
7949         (record_full_record_method, record_full_info, record_full_delete)
7950         (record_full_is_replaying, record_full_will_replay)
7951         (record_full_goto_begin, record_full_goto_end, record_full_goto)
7952         (record_full_stop_replaying): Refactor as methods of the
7953         record_full_base_target class.
7954         (record_full_core_resume, record_full_core_kill)
7955         (record_full_core_fetch_registers)
7956         (record_full_core_prepare_to_store)
7957         (record_full_core_store_registers, record_full_core_xfer_partial)
7958         (record_full_core_insert_breakpoint)
7959         (record_full_core_remove_breakpoint)
7960         (record_full_core_has_execution): Refactor
7961         as methods of the record_full_core_target class.
7962         (record_full_base_target::supports_delete_record): New.
7963         (init_record_full_ops): Delete.
7964         (init_record_full_core_ops): Delete.
7965         (record_full_save): Refactor as method of the
7966         record_full_base_target class.
7967         (_initialize_record_full): Remove references to
7968         init_record_full_ops and init_record_full_core_ops.
7969
7970         * remote.c (remote_target, extended_remote_target): New classes.
7971         (remote_ops): Now a remote_target.
7972         (extended_remote_ops): Now an extended_remote_target.
7973         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
7974         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
7975         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
7976         (remote_pass_signals, remote_set_syscall_catchpoint)
7977         (remote_program_signals, )
7978         (remote_thread_always_alive): Remove target_ops parameter.
7979         (remote_thread_alive, remote_thread_name)
7980         (remote_update_thread_list, remote_threads_extra_info)
7981         (remote_static_tracepoint_marker_at)
7982         (remote_static_tracepoint_markers_by_strid)
7983         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
7984         (remote_open): Refactor as methods of remote_target.
7985         (extended_remote_open, extended_remote_detach)
7986         (extended_remote_attach, extended_remote_post_attach):
7987         (extended_remote_supports_disable_randomization)
7988         (extended_remote_create_inferior): : Refactor as method of
7989         extended_remote_target.
7990         (remote_set_permissions, remote_open_1, remote_detach)
7991         (remote_follow_fork, remote_follow_exec, remote_disconnect)
7992         (remote_resume, remote_commit_resume, remote_stop)
7993         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
7994         (remote_terminal_ours, remote_wait, remote_fetch_registers)
7995         (remote_prepare_to_store, remote_store_registers)
7996         (remote_flash_erase, remote_flash_done, remote_files_info)
7997         (remote_kill, remote_mourn, remote_insert_breakpoint)
7998         (remote_remove_breakpoint, remote_insert_watchpoint)
7999         (remote_watchpoint_addr_within_range)
8000         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
8001         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
8002         (remote_supports_stopped_by_sw_breakpoint)
8003         (remote_stopped_by_hw_breakpoint)
8004         (remote_supports_stopped_by_hw_breakpoint)
8005         (remote_stopped_by_watchpoint, remote_stopped_data_address)
8006         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
8007         (remote_verify_memory): Refactor as methods of remote_target.
8008         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
8009         parameter.
8010         (remote_xfer_partial, remote_get_memory_xfer_limit)
8011         (remote_search_memory, remote_rcmd, remote_memory_map)
8012         (remote_pid_to_str, remote_get_thread_local_address)
8013         (remote_get_tib_address, remote_read_description): Refactor as
8014         methods of remote_target.
8015         (remote_target::fileio_open, remote_target::fileio_pwrite)
8016         (remote_target::fileio_pread, remote_target::fileio_close): New.
8017         (remote_hostio_readlink, remote_hostio_fstat)
8018         (remote_filesystem_is_local, remote_can_execute_reverse)
8019         (remote_supports_non_stop, remote_supports_disable_randomization)
8020         (remote_supports_multi_process, remote_supports_cond_breakpoints)
8021         (remote_supports_enable_disable_tracepoint)
8022         (remote_supports_string_tracing)
8023         (remote_can_run_breakpoint_commands, remote_trace_init)
8024         (remote_download_tracepoint, remote_can_download_tracepoint)
8025         (remote_download_trace_state_variable, remote_enable_tracepoint)
8026         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
8027         (remote_trace_start, remote_get_trace_status)
8028         (remote_get_tracepoint_status, remote_trace_stop)
8029         (remote_trace_find, remote_get_trace_state_variable_value)
8030         (remote_save_trace_data, remote_get_raw_trace_data)
8031         (remote_set_disconnected_tracing, remote_core_of_thread)
8032         (remote_set_circular_trace_buffer, remote_traceframe_info)
8033         (remote_get_min_fast_tracepoint_insn_len)
8034         (remote_set_trace_buffer_size, remote_set_trace_notes)
8035         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
8036         (remote_disable_btrace, remote_teardown_btrace)
8037         (remote_read_btrace, remote_btrace_conf)
8038         (remote_augmented_libraries_svr4_read, remote_load)
8039         (remote_pid_to_exec_file, remote_can_do_single_step)
8040         (remote_execution_direction, remote_thread_handle_to_thread_info):
8041         Refactor as methods of remote_target.
8042         (init_remote_ops, init_extended_remote_ops): Delete.
8043         (remote_can_async_p, remote_is_async_p, remote_async)
8044         (remote_thread_events, remote_upload_tracepoints)
8045         (remote_upload_trace_state_variables): Refactor as methods of
8046         remote_target.
8047         (_initialize_remote): Remove references to init_remote_ops and
8048         init_extended_remote_ops.
8049
8050         * remote-sim.c (gdbsim_target): New class.
8051         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
8052         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
8053         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
8054         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
8055         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
8056         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
8057         Refactor as methods of gdbsim_target.
8058         (gdbsim_ops): Now a gdbsim_target.
8059         (init_gdbsim_ops): Delete.
8060         (gdbsim_cntrl_c): Adjust.
8061         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
8062
8063         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
8064         (the_amd64_linux_nat_target): New.
8065         (amd64_linux_fetch_inferior_registers)
8066         (amd64_linux_store_inferior_registers): Refactor as methods of
8067         amd64_linux_nat_target.
8068         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
8069         * i386-linux-nat.c: Don't include "linux-nat.h".
8070         (i386_linux_nat_target): New class.
8071         (the_i386_linux_nat_target): New.
8072         (i386_linux_fetch_inferior_registers)
8073         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
8074         as methods of i386_linux_nat_target.
8075         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
8076         * inf-child.c (inf_child_ops): Delete.
8077         (inf_child_fetch_inferior_registers)
8078         (inf_child_store_inferior_registers): Delete.
8079         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
8080         methods of inf_child_target.
8081         (inf_child_target::supports_terminal_ours)
8082         (inf_child_target::terminal_init)
8083         (inf_child_target::terminal_inferior)
8084         (inf_child_target::terminal_ours_for_output)
8085         (inf_child_target::terminal_ours, inf_child_target::interrupt)
8086         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
8087         New.
8088         (inf_child_open, inf_child_disconnect, inf_child_close)
8089         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
8090         (inf_child_post_startup_inferior, inf_child_can_run)
8091         (inf_child_pid_to_exec_file): Refactor as methods of
8092         inf_child_target.
8093         (inf_child_follow_fork): Delete.
8094         (inf_child_target::can_create_inferior)
8095         (inf_child_target::can_attach): New.
8096         (inf_child_target::has_all_memory, inf_child_target::has_memory)
8097         (inf_child_target::has_stack, inf_child_target::has_registers)
8098         (inf_child_target::has_execution): New.
8099         (inf_child_fileio_open, inf_child_fileio_pwrite)
8100         (inf_child_fileio_pread, inf_child_fileio_fstat)
8101         (inf_child_fileio_close, inf_child_fileio_unlink)
8102         (inf_child_fileio_readlink, inf_child_use_agent)
8103         (inf_child_can_use_agent): Refactor as methods of
8104         inf_child_target.
8105         (return_zero, inf_child_target): Delete.
8106         (inf_child_target::inf_child_target): New.
8107         * inf-child.h: Include "target.h".
8108         (inf_child_target): Delete function prototype.
8109         (inf_child_target): New class.
8110         (inf_child_open_target, inf_child_mourn_inferior)
8111         (inf_child_maybe_unpush_target): Delete.
8112         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
8113         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
8114         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
8115         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
8116         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
8117         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
8118         (inf_ptrace_wait, inf_ptrace_xfer_partial)
8119         (inf_ptrace_thread_alive, inf_ptrace_files_info)
8120         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
8121         methods of inf_ptrace_target.
8122         (inf_ptrace_target): Delete function.
8123         * inf-ptrace.h: Include "inf-child.h".
8124         (inf_ptrace_target): Delete function declaration.
8125         (inf_ptrace_target): New class.
8126         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
8127         * linux-nat.c (linux_target): New.
8128         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
8129         (linux_nat_target::~linux_nat_target): New.
8130         (linux_child_post_attach, linux_child_post_startup_inferior)
8131         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
8132         (linux_child_remove_fork_catchpoint)
8133         (linux_child_insert_vfork_catchpoint)
8134         (linux_child_remove_vfork_catchpoint)
8135         (linux_child_insert_exec_catchpoint)
8136         (linux_child_remove_exec_catchpoint)
8137         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
8138         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
8139         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
8140         (linux_nat_stopped_data_address)
8141         (linux_nat_stopped_by_sw_breakpoint)
8142         (linux_nat_supports_stopped_by_sw_breakpoint)
8143         (linux_nat_stopped_by_hw_breakpoint)
8144         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
8145         (linux_nat_kill, linux_nat_mourn_inferior)
8146         (linux_nat_xfer_partial, linux_nat_thread_alive)
8147         (linux_nat_update_thread_list, linux_nat_pid_to_str)
8148         (linux_nat_thread_name, linux_child_pid_to_exec_file)
8149         (linux_child_static_tracepoint_markers_by_strid)
8150         (linux_nat_is_async_p, linux_nat_can_async_p)
8151         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
8152         (linux_nat_supports_multi_process)
8153         (linux_nat_supports_disable_randomization, linux_nat_async)
8154         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
8155         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
8156         (linux_nat_fileio_open, linux_nat_fileio_readlink)
8157         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
8158         methods of linux_nat_target.
8159         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
8160         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
8161         parameter.
8162         (check_stopped_by_watchpoint): Adjust.
8163         (linux_xfer_partial): Delete.
8164         (linux_target_install_ops, linux_target, linux_nat_add_target):
8165         Delete.
8166         (linux_nat_target::linux_nat_target): New.
8167         * linux-nat.h: Include "inf-ptrace.h".
8168         (linux_nat_target): New.
8169         (linux_target, linux_target_install_ops, linux_nat_add_target):
8170         Delete function declarations.
8171         (linux_target): Declare global.
8172         * linux-thread-db.c (thread_db_target): New.
8173         (thread_db_target::thread_db_target): New.
8174         (thread_db_ops): Delete.
8175         (the_thread_db_target): New.
8176         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
8177         (thread_db_update_thread_list, thread_db_pid_to_str)
8178         (thread_db_extra_thread_info)
8179         (thread_db_thread_handle_to_thread_info)
8180         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
8181         (thread_db_resume): Refactor as methods of thread_db_target.
8182         (init_thread_db_ops): Delete.
8183         (_initialize_thread_db): Remove reference to init_thread_db_ops.
8184         * x86-linux-nat.c: Don't include "linux-nat.h".
8185         (super_post_startup_inferior): Delete.
8186         (x86_linux_nat_target::~x86_linux_nat_target): New.
8187         (x86_linux_child_post_startup_inferior)
8188         (x86_linux_read_description, x86_linux_enable_btrace)
8189         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
8190         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
8191         methods of x86_linux_nat_target.
8192         (x86_linux_create_target): Delete.  Bits folded ...
8193         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
8194         pointer.
8195         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
8196         (x86_linux_nat_target): New class.
8197         (x86_linux_create_target): Delete.
8198         (x86_linux_add_target): Now takes a linux_nat_target pointer.
8199         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
8200         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
8201         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
8202         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
8203         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
8204         make extern.
8205         (x86_use_watchpoints): Delete.
8206         * x86-nat.h: Include "breakpoint.h" and "target.h".
8207         (x86_use_watchpoints): Delete.
8208         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
8209         (x86_stopped_by_watchpoint, x86_stopped_data_address)
8210         (x86_insert_watchpoint, x86_remove_watchpoint)
8211         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
8212         (x86_stopped_by_hw_breakpoint): New declarations.
8213         (x86_nat_target): New template class.
8214
8215         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
8216         (the_ppc_linux_nat_target): New.
8217         (ppc_linux_fetch_inferior_registers)
8218         (ppc_linux_can_use_hw_breakpoint)
8219         (ppc_linux_region_ok_for_hw_watchpoint)
8220         (ppc_linux_ranged_break_num_registers)
8221         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
8222         (ppc_linux_insert_mask_watchpoint)
8223         (ppc_linux_remove_mask_watchpoint)
8224         (ppc_linux_can_accel_watchpoint_condition)
8225         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
8226         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
8227         (ppc_linux_watchpoint_addr_within_range)
8228         (ppc_linux_masked_watch_num_registers)
8229         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
8230         (ppc_linux_read_description): Refactor as methods of
8231         ppc_linux_nat_target.
8232         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
8233
8234         * procfs.c (procfs_xfer_partial): Delete forward declaration.
8235         (procfs_target): New class.
8236         (the_procfs_target): New.
8237         (procfs_target): Delete function.
8238         (procfs_auxv_parse, procfs_attach, procfs_detach)
8239         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
8240         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
8241         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
8242         (procfs_create_inferior, procfs_update_thread_list)
8243         (procfs_thread_alive, procfs_pid_to_str)
8244         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
8245         (procfs_stopped_data_address, procfs_insert_watchpoint)
8246         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
8247         (proc_find_memory_regions, procfs_info_proc)
8248         (procfs_make_note_section): Refactor as methods of procfs_target.
8249         (_initialize_procfs): Adjust.
8250         * sol-thread.c (sol_thread_target): New class.
8251         (sol_thread_ops): Now a sol_thread_target.
8252         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
8253         (sol_thread_fetch_registers, sol_thread_store_registers)
8254         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
8255         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
8256         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
8257         (init_sol_thread_ops): Delete.
8258         (_initialize_sol_thread): Adjust.  Remove references to
8259         init_sol_thread_ops and complete_target_initialization.
8260
8261         * windows-nat.c (windows_nat_target): New class.
8262         (windows_fetch_inferior_registers)
8263         (windows_store_inferior_registers, windows_resume, windows_wait)
8264         (windows_attach, windows_detach, windows_pid_to_exec_file)
8265         (windows_files_info, windows_create_inferior)
8266         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
8267         (windows_close, windows_pid_to_str, windows_xfer_partial)
8268         (windows_get_tib_address, windows_get_ada_task_ptid)
8269         (windows_thread_name, windows_thread_alive): Refactor as
8270         windows_nat_target methods.
8271         (do_initial_windows_stuff): Adjust.
8272         (windows_target): Delete function.
8273         (_initialize_windows_nat): Adjust.
8274
8275         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
8276         (darwin_mourn_inferior, darwin_kill_inferior)
8277         (darwin_create_inferior, darwin_attach, darwin_detach)
8278         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
8279         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
8280         (darwin_supports_multi_process): Refactor as darwin_nat_target
8281         methods.
8282         (darwin_resume_to, darwin_files_info): Delete.
8283         (_initialize_darwin_inferior): Rename to ...
8284         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
8285         * darwin-nat.h: Include "inf-child.h".
8286         (darwin_nat_target): New class.
8287         (darwin_complete_target): Delete.
8288         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
8289         (darwin_target): New.
8290         (i386_darwin_fetch_inferior_registers)
8291         (i386_darwin_store_inferior_registers): Refactor as methods of
8292         darwin_nat_target.
8293         (darwin_complete_target): Delete, with ...
8294         (_initialize_i386_darwin_nat): ... bits factored out here.
8295
8296         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
8297         (the_alpha_linux_nat_target): New.
8298         (alpha_linux_register_u_offset): Refactor as
8299         alpha_linux_nat_target method.
8300         (_initialize_alpha_linux_nat): Adjust.
8301         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
8302         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
8303         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
8304         methods of linux_nat_trad_target.
8305         (linux_trad_target): Delete.
8306         * linux-nat-trad.h (linux_trad_target): Delete function.
8307         (linux_nat_trad_target): New class.
8308         * mips-linux-nat.c (mips_linux_nat_target): New class.
8309         (super_fetch_registers, super_store_registers, super_close):
8310         Delete.
8311         (the_mips_linux_nat_target): New.
8312         (mips64_linux_regsets_fetch_registers)
8313         (mips64_linux_regsets_store_registers)
8314         (mips64_linux_fetch_registers, mips64_linux_store_registers)
8315         (mips_linux_register_u_offset, mips_linux_read_description)
8316         (mips_linux_can_use_hw_breakpoint)
8317         (mips_linux_stopped_by_watchpoint)
8318         (mips_linux_stopped_data_address)
8319         (mips_linux_region_ok_for_hw_watchpoint)
8320         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
8321         (mips_linux_close): Refactor as methods of mips_linux_nat.
8322         (_initialize_mips_linux_nat): Adjust to C++ification.
8323
8324         * aix-thread.c (aix_thread_target): New class.
8325         (aix_thread_ops): Now an aix_thread_target.
8326         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
8327         (aix_thread_fetch_registers, aix_thread_store_registers)
8328         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
8329         (aix_thread_thread_alive, aix_thread_pid_to_str)
8330         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
8331         Refactor as methods of aix_thread_target.
8332         (init_aix_thread_ops): Delete.
8333         (_initialize_aix_thread): Remove references to init_aix_thread_ops
8334         and complete_target_initialization.
8335         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
8336         (rs6000_nat_target): New class.
8337         (the_rs6000_nat_target): New.
8338         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
8339         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
8340         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
8341         (super_create_inferior): Delete.
8342         (_initialize_rs6000_nat): Adjust to C++ification.
8343
8344         * arm-linux-nat.c (arm_linux_nat_target): New class.
8345         (the_arm_linux_nat_target): New.
8346         (arm_linux_fetch_inferior_registers)
8347         (arm_linux_store_inferior_registers, arm_linux_read_description)
8348         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
8349         (arm_linux_remove_hw_breakpoint)
8350         (arm_linux_region_ok_for_hw_watchpoint)
8351         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
8352         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
8353         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
8354         arm_linux_nat_target.
8355         (_initialize_arm_linux_nat): Adjust to C++ification.
8356
8357         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
8358         (the_aarch64_linux_nat_target): New.
8359         (aarch64_linux_fetch_inferior_registers)
8360         (aarch64_linux_store_inferior_registers)
8361         (aarch64_linux_child_post_startup_inferior)
8362         (aarch64_linux_read_description)
8363         (aarch64_linux_can_use_hw_breakpoint)
8364         (aarch64_linux_insert_hw_breakpoint)
8365         (aarch64_linux_remove_hw_breakpoint)
8366         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
8367         (aarch64_linux_region_ok_for_hw_watchpoint)
8368         (aarch64_linux_stopped_data_address)
8369         (aarch64_linux_stopped_by_watchpoint)
8370         (aarch64_linux_watchpoint_addr_within_range)
8371         (aarch64_linux_can_do_single_step): Refactor as methods of
8372         aarch64_linux_nat_target.
8373         (super_post_startup_inferior): Delete.
8374         (_initialize_aarch64_linux_nat): Adjust to C++ification.
8375
8376         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
8377         (the_hppa_linux_nat_target): New.
8378         (hppa_linux_fetch_inferior_registers)
8379         (hppa_linux_store_inferior_registers): Refactor as methods of
8380         hppa_linux_nat_target.
8381         (_initialize_hppa_linux_nat): Adjust to C++ification.
8382
8383         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
8384         (the_ia64_linux_nat_target): New.
8385         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
8386         (ia64_linux_stopped_data_address)
8387         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
8388         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
8389         ia64_linux_nat_target methods.
8390         (super_xfer_partial): Delete.
8391         (_initialize_ia64_linux_nat): Adjust to C++ification.
8392
8393         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
8394         (the_m32r_linux_nat_target): New.
8395         (m32r_linux_fetch_inferior_registers)
8396         (m32r_linux_store_inferior_registers): Refactor as
8397         m32r_linux_nat_target methods.
8398         (_initialize_m32r_linux_nat): Adjust to C++ification.
8399
8400         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
8401         (the_m68k_linux_nat_target): New.
8402         (m68k_linux_fetch_inferior_registers)
8403         (m68k_linux_store_inferior_registers): Refactor as
8404         m68k_linux_nat_target methods.
8405         (_initialize_m68k_linux_nat): Adjust to C++ification.
8406
8407         * s390-linux-nat.c (s390_linux_nat_target): New class.
8408         (the_s390_linux_nat_target): New.
8409         (s390_linux_fetch_inferior_registers)
8410         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
8411         (s390_insert_watchpoint, s390_remove_watchpoint)
8412         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
8413         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
8414         (s390_auxv_parse, s390_read_description): Refactor as methods of
8415         s390_linux_nat_target.
8416         (_initialize_s390_nat): Adjust to C++ification.
8417
8418         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
8419         (the_sparc_linux_nat_target): New.
8420         (_initialize_sparc_linux_nat): Adjust to C++ification.
8421         * sparc-nat.c (sparc_fetch_inferior_registers)
8422         (sparc_store_inferior_registers): Remove target_ops parameter.
8423         * sparc-nat.h (sparc_fetch_inferior_registers)
8424         (sparc_store_inferior_registers): Remove target_ops parameter.
8425         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
8426         (the_sparc64_linux_nat_target): New.
8427         (_initialize_sparc64_linux_nat): Adjust to C++ification.
8428
8429         * spu-linux-nat.c (spu_linux_nat_target): New class.
8430         (the_spu_linux_nat_target): New.
8431         (spu_child_post_startup_inferior, spu_child_post_attach)
8432         (spu_child_wait, spu_fetch_inferior_registers)
8433         (spu_store_inferior_registers, spu_xfer_partial)
8434         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
8435         methods.
8436         (_initialize_spu_nat): Adjust to C++ification.
8437
8438         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
8439         (the_tilegx_linux_nat_target): New.
8440         (fetch_inferior_registers, store_inferior_registers):
8441         Refactor as methods.
8442         (_initialize_tile_linux_nat): Adjust to C++ification.
8443
8444         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
8445         (the_xtensa_linux_nat_target): New.
8446         (xtensa_linux_fetch_inferior_registers)
8447         (xtensa_linux_store_inferior_registers): Refactor as
8448         xtensa_linux_nat_target methods.
8449         (_initialize_xtensa_linux_nat): Adjust to C++ification.
8450
8451         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
8452         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
8453         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
8454         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
8455         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
8456         (fbsd_stopped_by_sw_breakpoint)
8457         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
8458         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
8459         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
8460         (fbsd_post_startup_inferior, fbsd_post_attach)
8461         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
8462         (fbsd_set_syscall_catchpoint)
8463         (super_xfer_partial, super_resume, super_wait)
8464         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
8465         (fbsd_handle_debug_trap): Remove target_ops parameter.
8466         (fbsd_nat_add_target): Delete.
8467         * fbsd-nat.h: Include "inf-ptrace.h".
8468         (fbsd_nat_add_target): Delete.
8469         (USE_SIGTRAP_SIGINFO): Define.
8470         (fbsd_nat_target): New class.
8471
8472         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
8473         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
8474         (amd64bsd_target): Delete.
8475         * amd64-bsd-nat.h: New file.
8476         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
8477         "x86-bsd-nat.h".
8478         (amd64_fbsd_nat_target): New class.
8479         (the_amd64_fbsd_nat_target): New.
8480         (amd64fbsd_read_description): Refactor as method of
8481         amd64_fbsd_nat_target.
8482         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
8483         (_initialize_amd64fbsd_nat): Adjust to C++ification.
8484         * amd64-nat.h (amd64bsd_target): Delete function declaration.
8485         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
8486         (i386bsd_store_inferior_registers): Remove target_ops parameter.
8487         (i386bsd_target): Delete.
8488         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
8489         (i386bsd_fetch_inferior_registers)
8490         (i386bsd_store_inferior_registers): Declare.
8491         (i386_bsd_nat_target): New class.
8492         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
8493         (the_i386_fbsd_nat_target): New.
8494         (i386fbsd_resume, i386fbsd_read_description): Refactor as
8495         i386_fbsd_nat_target methods.
8496         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
8497         (_initialize_i386fbsd_nat): Adjust to C++ification.
8498         * x86-bsd-nat.c (super_mourn_inferior): Delete.
8499         (x86bsd_mourn_inferior, x86bsd_target): Delete.
8500         (_initialize_x86_bsd_nat): Adjust to C++ification.
8501         * x86-bsd-nat.h: Include "x86-nat.h".
8502         (x86bsd_target): Delete declaration.
8503         (x86bsd_nat_target): New class.
8504
8505         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
8506         (the_aarch64_fbsd_nat_target): New.
8507         (aarch64_fbsd_fetch_inferior_registers)
8508         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
8509         aarch64_fbsd_nat_target.
8510         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
8511         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
8512         (the_alpha_bsd_nat_target): New.
8513         (alphabsd_fetch_inferior_registers)
8514         (alphabsd_store_inferior_registers): Refactor as
8515         alpha_bsd_nat_target methods.
8516         (_initialize_alphabsd_nat): Refactor as methods of
8517         alpha_bsd_nat_target.
8518         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
8519         (the_amd64_nbsd_nat_target): New.
8520         (_initialize_amd64nbsd_nat): Adjust to C++ification.
8521         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
8522         (the_amd64_obsd_nat_target): New.
8523         (_initialize_amd64obsd_nat): Adjust to C++ification.
8524         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
8525         (the_arm_fbsd_nat_target): New.
8526         (arm_fbsd_fetch_inferior_registers)
8527         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
8528         (_initialize_arm_fbsd_nat): Refactor as methods of
8529         arm_fbsd_nat_target.
8530         (_initialize_arm_fbsd_nat): Adjust to C++ification.
8531         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
8532         (the_arm_netbsd_nat_target): New.
8533         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
8534         arm_netbsd_nat_target.
8535         (_initialize_arm_netbsd_nat): Adjust to C++ification.
8536         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
8537         (the_hppa_nbsd_nat_target): New.
8538         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
8539         hppa_nbsd_nat_target methods.
8540         (_initialize_hppanbsd_nat): Adjust to C++ification.
8541         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
8542         (the_hppa_obsd_nat_target): New.
8543         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
8544         methods of hppa_obsd_nat_target.
8545         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
8546         add_target.
8547         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
8548         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
8549         add_target.
8550         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
8551         (_initialize_i386obsd_nat): Use add_target.
8552         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
8553         (the_m68k_bsd_nat_target): New.
8554         (m68kbsd_fetch_inferior_registers)
8555         (m68kbsd_store_inferior_registers): Refactor as methods of
8556         m68k_bsd_nat_target.
8557         (_initialize_m68kbsd_nat): Adjust to C++ification.
8558         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
8559         (the_mips_fbsd_nat_target): New.
8560         (mips_fbsd_fetch_inferior_registers)
8561         (mips_fbsd_store_inferior_registers): Refactor as methods of
8562         mips_fbsd_nat_target.
8563         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
8564         add_target.
8565         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
8566         (the_mips_nbsd_nat_target): New.
8567         (mipsnbsd_fetch_inferior_registers)
8568         (mipsnbsd_store_inferior_registers): Refactor as methods of
8569         mips_nbsd_nat_target.
8570         (_initialize_mipsnbsd_nat): Adjust to C++ification.
8571         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
8572         (the_mips64_obsd_nat_target): New.
8573         (mips64obsd_fetch_inferior_registers)
8574         (mips64obsd_store_inferior_registers): Refactor as methods of
8575         mips64_obsd_nat_target.
8576         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
8577         add_target.
8578         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
8579         nbsd_nat_target.
8580         * nbsd-nat.h: Include "inf-ptrace.h".
8581         (nbsd_nat_target): New class.
8582         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
8583         (obsd_wait): Refactor as methods of obsd_nat_target.
8584         (obsd_add_target): Delete.
8585         * obsd-nat.h: Include "inf-ptrace.h".
8586         (obsd_nat_target): New class.
8587         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
8588         (the_ppc_fbsd_nat_target): New.
8589         (ppcfbsd_fetch_inferior_registers)
8590         (ppcfbsd_store_inferior_registers): Refactor as methods of
8591         ppc_fbsd_nat_target.
8592         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
8593         add_target.
8594         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
8595         (the_ppc_nbsd_nat_target): New.
8596         (ppcnbsd_fetch_inferior_registers)
8597         (ppcnbsd_store_inferior_registers): Refactor as methods of
8598         ppc_nbsd_nat_target.
8599         (_initialize_ppcnbsd_nat): Adjust to C++ification.
8600         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
8601         (the_ppc_obsd_nat_target): New.
8602         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
8603         methods of ppc_obsd_nat_target.
8604         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
8605         add_target.
8606         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
8607         (the_sh_nbsd_nat_target): New.
8608         (shnbsd_fetch_inferior_registers)
8609         (shnbsd_store_inferior_registers): Refactor as methods of
8610         sh_nbsd_nat_target.
8611         (_initialize_shnbsd_nat): Adjust to C++ification.
8612         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
8613         (inf_ptrace_xfer_partial): Delete.
8614         (sparc_xfer_partial, sparc_target): Delete.
8615         * sparc-nat.h (sparc_fetch_inferior_registers)
8616         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
8617         (sparc_target): Delete function declaration.
8618         (sparc_target): New template class.
8619         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
8620         (_initialize_sparcnbsd_nat): Adjust to C++ification.
8621         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
8622         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
8623         add_target.
8624         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
8625         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
8626         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
8627         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
8628         add_target.
8629         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
8630         (the_vax_bsd_nat_target): New.
8631         (vaxbsd_fetch_inferior_registers)
8632         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
8633         methods.
8634         (_initialize_vaxbsd_nat): Adjust to C++ification.
8635
8636         * bsd-kvm.c (bsd_kvm_target): New class.
8637         (bsd_kvm_ops): Now a bsd_kvm_target.
8638         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
8639         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
8640         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
8641         bsd_kvm_target.
8642         (bsd_kvm_return_one): Delete.
8643         (bsd_kvm_add_target): Adjust to C++ification.
8644
8645         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
8646         (nto_procfs_target_procfs): New classes.
8647         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
8648         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
8649         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
8650         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
8651         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
8652         (procfs_remove_hw_breakpoint, procfs_resume)
8653         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
8654         (procfs_kill_inferior, procfs_store_registers)
8655         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
8656         as methods of nto_procfs_target.
8657         (nto_procfs_ops): Now an nto_procfs_target_procfs.
8658         (nto_native_ops): Delete.
8659         (procfs_open, procfs_native_open): Delete.
8660         (nto_native_ops): Now an nto_procfs_target_native.
8661         (init_procfs_targets): Adjust to C++ification.
8662         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
8663         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
8664         Refactor as methods of nto_procfs_target.
8665
8666         * go32-nat.c (go32_nat_target): New class.
8667         (the_go32_nat_target): New.
8668         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
8669         (go32_store_registers, go32_xfer_partial, go32_files_info)
8670         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
8671         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
8672         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
8673         (go32_pid_to_str): Refactor as methods of go32_nat_target.
8674         (go32_target): Delete.
8675         (_initialize_go32_nat): Adjust to C++ification.
8676
8677         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
8678         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
8679         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
8680         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
8681         gnu_nat_target.
8682         (gnu_target): Delete.
8683         * gnu-nat.h (gnu_target): Delete.
8684         (gnu_nat_target): New class.
8685         * i386-gnu-nat.c (gnu_base_target): New.
8686         (i386_gnu_nat_target): New class.
8687         (the_i386_gnu_nat_target): New.
8688         (_initialize_i386gnu_nat): Adjust to C++ification.
8689
8690 2018-05-02  Pedro Alves  <palves@redhat.com>
8691
8692         * bfd-target.c (target_bfd_xclose): Rename to ...
8693         (target_bfd_close): ... this.
8694         (target_bfd_reopen): Adjust.
8695         * target.c (target_close): Remove references to to_xclose.
8696         * target.h (target_ops::to_xclose): Delete.
8697         (target_ops::to_close): Update comments.
8698
8699 2018-05-02  Pedro Alves  <palves@redhat.com>
8700
8701         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
8702         "linux-nat.h".
8703         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
8704         * inf-ptrace.c (inf_ptrace_register_u_offset)
8705         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
8706         (inf_ptrace_store_register, inf_ptrace_store_registers)
8707         (inf_ptrace_trad_target): Move to ...
8708         * linux-nat-trad.c: ... this new file.
8709         * linux-nat-trad.h: New file.
8710         * linux-nat.c (linux_target_install_ops): Make extern.
8711         (linux_trad_target): Delete.
8712         * linux-nat.h (linux_trad_target): Delete declaration.
8713         (linux_target_install_ops): Declare.
8714         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
8715         "linux-nat.h".
8716
8717 2018-05-02  Pedro Alves  <palves@redhat.com>
8718
8719         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
8720         procfs_target/add_target here.
8721         * procfs.c (procfs_target): Make static.
8722         (_initialize_procfs): Call add_target here.
8723         * procfs.h (struct target_ops): Remove forward declaration.
8724         (procfs_target): Remove declaration.
8725         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
8726
8727 2018-05-02  Pedro Alves  <palves@redhat.com>
8728
8729         * procfs.c (procfs_stopped_by_watchpoint)
8730         (procfs_insert_watchpoint, procfs_remove_watchpoint)
8731         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
8732         Forward declare.
8733         (procfs_use_watchpoints): Delete, move contents...
8734         (procfs_target): ... here.
8735         * procfs.h (procfs_use_watchpoints): Delete declaration.
8736         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
8737         procfs_use_watchpoints.
8738         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
8739         procfs_use_watchpoints.
8740
8741 2018-05-02  Tom Tromey  <tom@tromey.com>
8742
8743         PR python/20084:
8744         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
8745         and var_zuinteger_unlimited.
8746         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
8747         and PARAM_ZUINTEGER_UNLIMITED.
8748         (set_parameter_value): Handle var_zuinteger and
8749         var_zuinteger_unlimited.
8750         (add_setshow_generic): Likewise.
8751         (parmpy_init): Likewise.
8752
8753 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
8754
8755         PR rust/23124
8756         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
8757         pointer is not null before dereferencing it.
8758
8759 2018-04-30  Tom Tromey  <tom@tromey.com>
8760
8761         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
8762         is_mi_like_p.
8763
8764 2018-04-30  Tom Tromey  <tom@tromey.com>
8765
8766         * breakpoint.c (mention): Remove use of is_mi_like_p.
8767         (print_mention_ranged_breakpoint): Likewise.
8768         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
8769         of is_mi_like_p.
8770
8771 2018-04-30  Tom Tromey  <tom@tromey.com>
8772
8773         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
8774
8775 2018-04-30  Tom Tromey  <tom@tromey.com>
8776
8777         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
8778         (info_spu_event_command): Remove some uses of is_mi_like_p.
8779
8780 2018-04-30  Tom Tromey  <tom@tromey.com>
8781
8782         * python/py-framefilter.c (py_print_single_arg)
8783         (enumerate_locals, py_print_args, py_print_frame): Remove some
8784         uses of is_mi_like_p.
8785
8786 2018-04-30  Tom Tromey  <tom@tromey.com>
8787
8788         * ui-out.c: Update.
8789         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
8790         * ui-out.h (ui_out::is_mi_like_p): Now const.
8791         (ui_out::do_is_mi_like_p): Now const.
8792         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
8793
8794 2018-04-30  Tom Tromey  <tom@tromey.com>
8795
8796         * varobj.c (varobj_set_visualizer): Use new_reference.
8797         * python/python.c (gdbpy_decode_line): Use new_reference.
8798         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
8799         new_reference.
8800
8801 2018-04-30  Tom Tromey  <tom@tromey.com>
8802
8803         * varobj.c (install_new_value): Use new_reference.
8804         * value.h (value_incref): Return void.  Swap intro comment with
8805         value_decref.
8806         * value.c (set_value_parent): Use new_reference.
8807         (value_incref): Return void.  Update intro comment.
8808         (release_value): Use new_reference.
8809         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
8810
8811 2018-04-30  Tom Tromey  <tom@tromey.com>
8812
8813         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
8814         * gdb_bfd.h (new_bfd_ref): Remove.
8815         (gdb_bfd_open): Update comment.
8816         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
8817         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
8818         (gdb_bfd_fdopenr): Use new_reference.
8819         * exec.c (exec_file_attach): Use new_reference.
8820
8821 2018-04-30  Tom Tromey  <tom@tromey.com>
8822
8823         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
8824         method.
8825
8826 2018-04-30  Tom Tromey  <tom@tromey.com>
8827
8828         * jit.c (jit_read_code_entry): Use type_align.
8829         * i386-tdep.c (i386_gdbarch_init): Don't call
8830         set_gdbarch_long_long_align_bit.
8831         * gdbarch.sh: Remove long_long_align_bit.
8832         * gdbarch.c, gdbarch.h: Rebuild.
8833         * arc-tdep.c (arc_type_align): New function.
8834         (arc_gdbarch_init): Use arc_type_align.  Don't call
8835         set_gdbarch_long_long_align_bit.
8836
8837 2018-04-30  Tom Tromey  <tom@tromey.com>
8838
8839         * rust-lang.c (rust_type_alignment): Remove.
8840         (rust_composite_type): Use type_align.
8841
8842 2018-04-30  Tom Tromey  <tom@tromey.com>
8843
8844         * NEWS: Mention Type.align.
8845         * python/py-type.c (typy_get_alignof): New function.
8846         (type_object_getset): Add "alignof".
8847
8848 2018-04-30  Tom Tromey  <tom@tromey.com>
8849
8850         PR exp/17095:
8851         * NEWS: Update.
8852         * std-operator.def (UNOP_ALIGNOF): New operator.
8853         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
8854         New.
8855         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
8856         * c-lang.c (c_op_print_tab): Add alignof.
8857         * c-exp.y (ALIGNOF): New token.
8858         (exp): Add "ALIGNOF" production.
8859         (ident_tokens): Add _Alignof and alignof.
8860
8861 2018-04-30  Tom Tromey  <tom@tromey.com>
8862
8863         * i386-tdep.c (i386_type_align): New function.
8864         (i386_gdbarch_init): Update.
8865         * gdbarch.sh (type_align): New method.
8866         * gdbarch.c, gdbarch.h: Rebuild.
8867         * arch-utils.h (default_type_align): Declare.
8868         * arch-utils.c (default_type_align): New function.
8869         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
8870         (struct type) <align_log2>: New field.
8871         <instance_flags>: Now a bitfield.
8872         (TYPE_RAW_ALIGN): New macro.
8873         (type_align, type_raw_align, set_type_align): Declare.
8874         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
8875         functions.
8876         * dwarf2read.c (quirk_rust_enum): Set type alignment.
8877         (get_alignment, maybe_set_alignment): New functions.
8878         (read_structure_type, read_enumeration_type, read_array_type)
8879         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
8880         (read_subrange_type, read_base_type): Set type alignment.
8881
8882 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
8883
8884         * dwarf2read.c (read_index_from_section): Use bool.
8885
8886 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
8887
8888         PR gdb/22950
8889         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
8890         with #ifdef.
8891
8892 2018-04-29  John Reiser  <jreiser@BitWagon.com>
8893
8894         PR build/22873
8895         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
8896         last step, and do it atomically.
8897
8898 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
8899
8900         * compile/compile-c-types.c (convert_int, convert_float):
8901         Update for C FE v1.
8902
8903 2018-04-27  Tom Tromey  <tom@tromey.com>
8904
8905         PR rust/22545:
8906         * rust-lang.c (rust_inclusive_range_type_p): New function.
8907         (rust_range): Handle inclusive ranges.
8908         (rust_compute_range): Likewise.
8909         * rust-exp.y (struct rust_op) <inclusive>: New field.
8910         (DOTDOTEQ): New constant.
8911         (range_expr): Add "..=" productions.
8912         (operator_tokens): Add "..=" token.
8913         (ast_range): Add "inclusive" parameter.
8914         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
8915         ranges.
8916         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
8917         bounds values.
8918         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
8919         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
8920         Update comments.
8921         * expprint.c (print_subexp_standard): Handle new bounds values.
8922         (dump_subexp_body_standard): Likewise.
8923
8924 2018-04-27  Tom Tromey  <tom@tromey.com>
8925
8926         * configure: Rebuild.
8927         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
8928         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
8929         "OVERRIDE".
8930         (class symbol_needs_eval_context): Likewise.
8931         * dwarf2read.c (mock_mapped_index::symbol_name_count)
8932         (mock_mapped_index::symbol_name_at): Use "override".  Remove
8933         "virtual".
8934         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
8935         "override".
8936         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
8937         * aarch64-tdep.c (instruction_reader::read): Use "override".
8938         (instruction_reader_test::read): Likewise.
8939         * arm-tdep.c (instruction_reader::read): Use "override".
8940         (instruction_reader_thumb::read): Likewise.
8941
8942 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
8943
8944         PR remote/9665
8945         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
8946         instead of remote_send.
8947         (remote_send): Remove.
8948
8949 2018-04-26  Pedro Alves  <palves@redhat.com>
8950
8951         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
8952         find_function_start_sal instead of find_pc_line.
8953
8954 2018-04-26  Pedro Alves  <palves@redhat.com>
8955
8956         * breakpoint.c (set_breakpoint_location_function): Handle
8957         mst_data_gnu_ifunc.
8958         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
8959         * elfread.c (elf_symtab_read): Give data symbols with
8960         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
8961         (elf_rel_plt_read): Update comment.
8962         * linespec.c (convert_linespec_to_sals): Handle
8963         mst_data_gnu_ifunc.
8964         (minsym_found): Handle mst_data_gnu_ifunc.
8965         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
8966         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
8967         * parse.c (find_minsym_type_and_address): Handle
8968         mst_data_gnu_ifunc.
8969         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
8970         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
8971         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
8972         comment.
8973         <mst_data_gnu_ifunc>: New enumerator.
8974
8975 2018-04-26  Pedro Alves  <palves@redhat.com>
8976
8977         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
8978         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
8979         'want_trampoline' parameter by a lookup_msym_prefer parameter.
8980         Handle it.
8981         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
8982         (lookup_minimal_symbol_by_pc): Adjust.
8983         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
8984         (lookup_solib_trampoline_symbol_by_pc): Adjust.
8985         * minsyms.h (lookup_msym_prefer): New enum.
8986         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8987         parameter by a lookup_msym_prefer parameter.
8988
8989 2018-04-26  Pedro Alves  <palves@redhat.com>
8990
8991         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
8992         ends in "@plt" instead of looking at the symbol's section.
8993
8994 2018-04-26  Pedro Alves  <palves@redhat.com>
8995
8996         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
8997         all references.
8998         (find_pc_partial_function_gnu_ifunc): Rename to ...
8999         (find_pc_partial_function): ... this, and remove references to
9000         'is_gnu_ifunc_p'.
9001         (find_pc_partial_function): Delete old implementation.
9002         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
9003
9004 2018-04-26  Pedro Alves  <palves@redhat.com>
9005
9006         * linespec.c (struct bound_minimal_symbol_search_key): New.
9007         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
9008         skip first line if we found a GNU ifunc minimal symbol by name.
9009         (compare_msymbols): Change parameters to work with a destructured
9010         lhs minsym.
9011         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
9012         functions.
9013
9014 2018-04-26  Pedro Alves  <palves@redhat.com>
9015
9016         * breakpoint.c (set_breakpoint_location_function): Don't resolve
9017         ifunc targets here.  Instead, if we have an ifunc minsym, use its
9018         address/name.
9019         (add_location_to_breakpoint): Store the minsym and the objfile in
9020         the breakpoint location.
9021         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
9022         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
9023         Record the minsym in the sal.
9024         * symtab.h (symtab_and_line) <msymbol>: New field.
9025
9026 2018-04-26  Pedro Alves  <palves@redhat.com>
9027
9028         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
9029         unless we actually resolved the ifunc.
9030
9031 2018-04-26  Pedro Alves  <palves@redhat.com>
9032
9033         * c-exp.y (variable production): Prefer ifunc minsyms over
9034         regular function symbols.
9035         * symtab.c (find_gnu_ifunc): New function.
9036         * minsyms.h (lookup_msym_prefer): New enum.
9037         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
9038         parameter by a lookup_msym_prefer parameter.
9039         * symtab.h (find_gnu_ifunc): New declaration.
9040
9041 2018-04-26  Pedro Alves  <palves@redhat.com>
9042
9043         * blockframe.c (find_gnu_ifunc_target_type): New function.
9044         (find_function_type): New.
9045         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
9046         return a value with a memory address.
9047         (eval_call): For calls to GNU ifunc functions, try to find the
9048         type of the target function from the type that the resolver
9049         returns.
9050         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
9051         symbols.
9052         * infcall.c (find_function_return_type): Delete.
9053         (find_function_addr): Add 'function_type' parameter.  For calls to
9054         GNU ifunc functions, try to find the type of the target function
9055         from the type that the resolver returns, and return it via
9056         FUNCTION_TYPE.
9057         (call_function_by_hand_dummy): Adjust to use the function type
9058         returned by find_function_addr.
9059         (find_function_addr): Add 'function_type' parameter and move
9060         description here.
9061         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
9062         declarations.
9063
9064 2018-04-26  Pedro Alves  <palves@redhat.com>
9065
9066         * c-exp.y (variable production): Skip finding an alias for ifunc
9067         symbols.
9068
9069 2018-04-26  Pedro Alves  <palves@redhat.com>
9070
9071         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
9072
9073 2018-04-25  Pedro Alves  <palves@redhat.com>
9074
9075         * infcmd.c (kill_command): Print the pid as string, not the whole
9076         thread's ptid.  Add comment.  s/has been killed/killed/ in output
9077         message.
9078         * remote.c (remote_detach_1): Print the pid as string, not the
9079         whole thread's ptid.
9080
9081 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
9082             Sergio Durigan Junior  <sergiodj@redhat.com>
9083             Pedro Alves  <palves@redhat.com>
9084
9085         * infcmd.c (kill_command): Print message when inferior has
9086         been killed.
9087         * inferior.c (print_inferior_events): Remove 'static'.  Set as
9088         '1'.
9089         (add_inferior): Improve message printed when
9090         'print_inferior_events' is on.
9091         (exit_inferior): Remove message printed when
9092         'print_inferior_events' is on.
9093         (detach_inferior): Improve message printed when
9094         'print_inferior_events' is on.
9095         (initialize_inferiors): Use 'add_inferior_silent' to set
9096         'current_inferior_'.
9097         * inferior.h (print_inferior_events): Declare here as
9098         'extern'.
9099         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
9100         '[Detaching...]' messages when 'print_inferior_events' is on.
9101         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
9102         as prefix/suffix for messages.  Remove periods.  Fix erroneous
9103         'Detaching after fork from child...', replace it by '... from
9104         parent...'.
9105         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
9106         prefix/suffix when printing 'Detaching...' messages.  Print
9107         them when 'print_inferior_events' is on.
9108         * remote.c (remote_detach_1): Print message when detaching
9109         from inferior and '!is_fork_parent'.
9110
9111 2018-04-24  Tom Tromey  <tom@tromey.com>
9112
9113         * cli-out.h: Reindent.
9114
9115 2018-04-24  Tom Tromey  <tom@tromey.com>
9116
9117         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
9118         (cli_ui_out::do_field_string): Use fputs_filtered.
9119         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
9120
9121 2018-04-23  Tom Tromey  <tom@tromey.com>
9122
9123         * guile/scm-frame.c (gdbscm_frame_read_var): Use
9124         gdb::unique_xmalloc_ptr.
9125
9126 2018-04-23  Tom Tromey  <tom@tromey.com>
9127
9128         * configure: Rebuild.
9129
9130 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
9131
9132         PR gdb/23095
9133         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
9134         prepare_for_testing.  Set normal_bp to r_debug_state if target
9135         is bsd.
9136
9137 2018-04-21  Pedro Alves  <palves@redhat.com>
9138             Rajendra SY  <rajendra.sy@gmail.com>
9139
9140         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
9141         * remote.c (extended_remote_attach): In all-stop mode, mark the
9142         thread as executing.
9143
9144 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
9145
9146         * thread.c (thread_apply_all_command): Fix comment.
9147         (thread_command): Fix comment.
9148
9149 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
9150
9151         * common/tdesc.h (tdesc_create_feature): Remove xml filename
9152         parameter.
9153         * features/aarch64-core.c (create_feature_aarch64_core):
9154         Regenerate.
9155         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
9156         Likewise.
9157         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
9158         Likewise.
9159         * features/i386/32bit-avx512.c
9160         (create_feature_i386_32bit_avx512): Likewise.
9161         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
9162         Likewise.
9163         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
9164         Likewise.
9165         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
9166         Likewise.
9167         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
9168         Likewise.
9169         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
9170         Likewise.
9171         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
9172         Likewise.
9173         * features/i386/64bit-avx512.c
9174         (create_feature_i386_64bit_avx512): Likewise.
9175         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
9176         Likewise.
9177         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
9178         Likewise.
9179         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
9180         Likewise.
9181         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
9182         Likewise.
9183         * features/i386/64bit-segments.c
9184         (create_feature_i386_64bit_segments): Likewise.
9185         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
9186         Likewise.
9187         * features/i386/x32-core.c
9188         (create_feature_i386_x32_core): Likewise.
9189         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
9190         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
9191         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
9192         * target-descriptions.c: In generated code, don't pass xml
9193         filename.
9194
9195 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9196
9197         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
9198         (print_xml_feature::visit_post): Likewise.
9199         (print_xml_feature::visit): Likewise.
9200         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
9201         (print_xml_feature): Add new class.
9202         * regformats/regdat.sh: Null xmltarget on feature targets.
9203         * target-descriptions.c (struct target_desc): Add xmltarget.
9204         (maintenance_check_tdesc_xml_convert): Add unittest function.
9205         (tdesc_get_features_xml): Add function to get xml.
9206         (maintenance_check_xml_descriptions): Test xml generation.
9207         * xml-tdesc.c (string_read_description_xml): Add function.
9208         * xml-tdesc.h (string_read_description_xml): Add declaration.
9209
9210 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9211
9212         * features/Makefile: Add feature marker to targets with new style
9213         target descriptions.
9214         * regformats/aarch64.dat: Regenerate.
9215         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
9216         * regformats/i386/amd64-avx-linux.dat: Likewise.
9217         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
9218         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
9219         * regformats/i386/amd64-linux.dat: Likewise.
9220         * regformats/i386/amd64-mpx-linux.dat: Likewise.
9221         * regformats/i386/amd64.dat: Likewise.
9222         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
9223         * regformats/i386/i386-avx-linux.dat: Likewise.
9224         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
9225         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
9226         * regformats/i386/i386-linux.dat: Likewise.
9227         * regformats/i386/i386-mmx-linux.dat: Likewise.
9228         * regformats/i386/i386-mpx-linux.dat: Likewise.
9229         * regformats/i386/i386.dat: Likewise.
9230         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
9231         * regformats/i386/x32-avx-linux.dat: Likewise.
9232         * regformats/i386/x32-linux.dat: Likewise.
9233         * regformats/tic6x-c62x-linux.dat: Likewise.
9234         * regformats/tic6x-c64x-linux.dat: Likewise.
9235         * regformats/tic6x-c64xp-linux.dat: Likewise.
9236         * regformats/regdat.sh: Parse feature marker.
9237
9238 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9239
9240         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
9241         (tdesc_osabi_name): Likewise.
9242         * target-descriptions.c (tdesc_architecture_name): Add new
9243         function.
9244         (tdesc_osabi_name): Likewise.
9245
9246 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9247
9248         * common/tdesc.c (tdesc_predefined_type): Move to here.
9249         (tdesc_named_type): Likewise.
9250         (tdesc_create_vector): Likewise.
9251         (tdesc_create_struct): Likewise.
9252         (tdesc_set_struct_size): Likewise.
9253         (tdesc_create_union): Likewise.
9254         (tdesc_create_flags): Likewise.
9255         (tdesc_create_enum): Likewise.
9256         (tdesc_add_field): Likewise.
9257         (tdesc_add_typed_bitfield): Likewise.
9258         (tdesc_add_bitfield): Likewise.
9259         (tdesc_add_flag): Likewise.
9260         (tdesc_add_enum_value): Likewise.
9261         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
9262         (struct tdesc_type_vector): Likewise.
9263         (struct tdesc_type_field): Likewise.
9264         (struct tdesc_type_with_fields): Likewise.
9265         (tdesc_create_enum): Add declaration.
9266         (tdesc_add_typed_bitfield): Likewise.
9267         (tdesc_add_enum_value): Likewise.
9268         * target-descriptions.c (tdesc_type_field): Move from here.
9269         (tdesc_type_builtin): Likewise.
9270         (tdesc_type_vector): Likewise.
9271         (tdesc_type_with_fields): Likewise.
9272         (tdesc_predefined_types): Likewise.
9273         (tdesc_named_type): Likewise.
9274         (tdesc_create_vector): Likewise.
9275         (tdesc_create_struct): Likewise.
9276         (tdesc_set_struct_size): Likewise.
9277         (tdesc_create_union): Likewise.
9278         (tdesc_create_flags): Likewise.
9279         (tdesc_create_enum): Likewise.
9280         (tdesc_add_field): Likewise.
9281         (tdesc_add_typed_bitfield): Likewise.
9282         (tdesc_add_bitfield): Likewise.
9283         (tdesc_add_flag): Likewise.
9284         (tdesc_add_enum_value): Likewise.
9285         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
9286         (tdesc_add_typed_bitfield): Likewise.
9287         (tdesc_add_enum_value): Likewise.
9288
9289 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9290
9291         * common/tdesc.c (tdesc_feature::accept): Move to here.
9292         (tdesc_feature::operator==): Likewise.
9293         (tdesc_create_reg): Likewise.
9294         * common/tdesc.h (tdesc_type_kind): Likewise.
9295         (struct tdesc_type): Likewise.
9296         (struct tdesc_feature): Likewise.
9297         * regformats/regdat.sh: Create a feature.
9298         * target-descriptions.c (tdesc_type_kind): Move from here.
9299         (tdesc_type): Likewise.
9300         (tdesc_type_up): Likewise.
9301         (tdesc_feature): Likewise.
9302         (tdesc_create_reg): Likewise.
9303
9304 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9305
9306         * Makefile.in: Add arch/tdesc.c
9307         * common/tdesc.c: New file.
9308         * common/tdesc.h (tdesc_element_visitor): Move to here.
9309         (tdesc_element): Likewise.
9310         (tdesc_reg): Likewise.
9311         (tdesc_reg_up): Likewise.
9312         * regformats/regdef.h (reg): Add offset to constructors.
9313         * target-descriptions.c (tdesc_element_visitor): Move from here.
9314         (tdesc_element): Likewise.
9315         (tdesc_reg): Likewise.
9316         (tdesc_reg_up): Likewise.
9317
9318 2018-04-17  Tom Tromey  <tom@tromey.com>
9319
9320         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
9321         discriminant field.
9322
9323 2018-04-17  Tom Tromey  <tom@tromey.com>
9324
9325         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
9326
9327 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9328
9329         * symtab.c (print_symbol_info): Skip printing filename and line
9330         number when `last' is NULL.
9331         (symtab_symbol_info): Use empty string instead of NULL for first
9332         invocation of print_symbol_info.
9333         (rbreak_command): Pass NULL to `last' parameter of
9334         print_symbol_info.
9335
9336 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
9337
9338         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
9339         instead of nullptr.
9340
9341 2018-04-16  Pedro Alves  <palves@redhat.com>
9342
9343         * MAINTAINERS (sh): Remove.
9344         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
9345         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
9346         (ALLDEPFILES): Remove sh64-tdep.c.
9347         * NEWS: Mentions that support for SH-5/SH64 is removed.
9348         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
9349         (sh*-*-openbsd*): Ditto.
9350         (sh64-*-elf*): Remove.
9351         (sh*): Remove.
9352         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
9353         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
9354         * sh-tdep.c: No longer include "sh64-tdep.h".
9355         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
9356         * sh64-tdep.c, sh64-tdep.h: Remove files.
9357
9358 2018-04-16  Pedro Alves  <palves@redhat.com>
9359
9360         * MAINTAINERS: Remove m88k.
9361         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
9362         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
9363         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
9364         * NEWS: Mention that support for m88k was removed.
9365         * configure.host (m88*-*-*): Remove support.
9366         * configure.nat (m88k-*-*): Remove support.
9367         * configure.tgt (m88*-*-openbsd*): Remove.
9368         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
9369
9370 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
9371
9372         * configure.tgt (x86_tobjs): New variable.
9373         (amd64_tobjs, i386_tobjs): Use it.
9374
9375 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9376
9377         * symtab.c (print_symbol_info): Precede the symbol definition by
9378         the line number when available.
9379         * NEWS: Advertise this enhancement.
9380
9381 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
9382
9383         * NEWS (New options): announce set/show record btrace cpu.
9384         * btrace.c: Include record-btrace.h.
9385         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
9386         the vendor is unknown.
9387         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
9388         Maybe overwrite the btrace configuration's cpu.
9389         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
9390         (btrace_fetch): Add cpu parameter.  Update callers.
9391         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
9392         Maybe overwrite the btrace configuration's cpu.  Skip enabling
9393         errata workarounds if the vendor is unknown.
9394         * python/py-record-btrace.c: Include record-btrace.h.
9395         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
9396         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
9397         * record-btrace.c (record_btrace_cpu_state_kind): New.
9398         (record_btrace_cpu): New.
9399         (set_record_btrace_cpu_cmdlist): New.
9400         (record_btrace_get_cpu): New.
9401         (require_btrace_thread, record_btrace_info)
9402         (record_btrace_resume_thread): Call record_btrace_get_cpu.
9403         (cmd_set_record_btrace_cpu_none): New.
9404         (cmd_set_record_btrace_cpu_auto): New.
9405         (cmd_set_record_btrace_cpu): New.
9406         (cmd_show_record_btrace_cpu): New.
9407         (_initialize_record_btrace): Initialize set/show record btrace cpu
9408         commands.
9409         * record-btrace.h (record_btrace_get_cpu): New.
9410
9411 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
9412
9413         * record.c (set_record_command): Fix typo in message.
9414
9415 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
9416
9417         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
9418
9419 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
9420
9421         * infrun.c (process_event_stop_test): Call
9422         gdbarch_in_indirect_branch_thunk.
9423         * gdbarch.sh (in_indirect_branch_thunk): New.
9424         * gdbarch.c: Regenerated.
9425         * gdbarch.h: Regenerated.
9426         * x86-tdep.h: New.
9427         * x86-tdep.c: New.
9428         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
9429         (HFILES_NO_SRCDIR): Add x86-tdep.h.
9430         (ALLDEPFILES): Add x86-tdep.c.
9431         * arch-utils.h (default_in_indirect_branch_thunk): New.
9432         * arch-utils.c (default_in_indirect_branch_thunk): New.
9433         * i386-tdep: Include x86-tdep.h.
9434         (i386_in_indirect_branch_thunk): New.
9435         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
9436         function.
9437         * amd64-tdep: Include x86-tdep.h.
9438         (amd64_in_indirect_branch_thunk): New.
9439         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
9440
9441 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
9442
9443         PR gdb/23053
9444         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
9445         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
9446         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
9447         regression.
9448
9449 2018-04-12  Tom Tromey  <tom@tromey.com>
9450
9451         * rust-lang.c (rust_print_struct_def): Remove univariant code.
9452         (rust_evaluate_subexp): Likewise.
9453
9454 2018-04-12  Pedro Alves  <palves@redhat.com>
9455
9456         * procfs.c (procfs_detach): Make forward declaration's prototype
9457         match definition's protototype.
9458         (proc_get_LDT_entry): Remove stale do_cleanups call.
9459
9460 2018-04-12  Pedro Alves  <palves@redhat.com>
9461
9462         * target.h (target_ops::to_has_exited): Delete.
9463         (target_has_exited): Delete.
9464         * target-delegates.c: Regenerate.
9465
9466 2018-04-11  Pedro Alves  <palves@redhat.com>
9467
9468         * target.c (fileio_fh_t::t): Add comment.
9469         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
9470         (target_fileio_close): Handle a NULL target.
9471         (invalidate_fileio_fh): New.
9472         (target_close): Call it.
9473         * remote.c (remote_hostio_send_command): No longer check whether
9474         remote_desc is open.
9475
9476 2018-04-11  Pedro Alves  <palves@redhat.com>
9477
9478         * target.c (fileio_fh_t): Make it a named struct instead of a
9479         typedef.
9480         (fileio_fh_t::is_closed): New method.
9481         (DEF_VEC_O (fileio_fh_t)): Remove.
9482         (fileio_fhandles): Now a std::vector.
9483         (is_closed_fileio_fh): Delete.
9484         (acquire_fileio_fd): Adjust.  Rename parameters.
9485         (release_fileio_fd): Adjust.
9486         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
9487         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
9488         (target_fileio_close): Adjust.
9489
9490 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
9491
9492         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
9493         index.
9494
9495 2018-04-10  Pedro Alves  <palves@redhat.com>
9496
9497         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
9498         (scoped_finish_thread_state): New class.
9499         * infcmd.c (run_command_1): Use it instead of finish_thread_state
9500         cleanup.
9501         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
9502         (fetch_inferior_event, normal_stop): Likewise.
9503         * thread.c (finish_thread_state_cleanup): Delete.
9504
9505 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9506             Pedro Alves  <palves@redhat.com>
9507
9508         * value.c: Include "selftest.h" and "common/array-view.h".
9509         (struct range) <operator ==>: New.
9510         (test_ranges_contain): New.
9511         (check_ranges_vector): New.
9512         (test_insert_into_bit_range_vector): New.
9513         (_initialize_values): Register selftests.
9514         * common/array-view.h (operator==, operator!=): New.
9515
9516 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9517
9518         * common/gdb_vecs.h (unordered_remove): Add overload that takes
9519         an iterator.
9520         * inline-frame.c: Include <algorithm>.
9521         (struct inline_state): Add constructor.
9522         (inline_state_s): Remove.
9523         (DEF_VEC_O(inline_state_s)): Remove.
9524         (inline_states): Change type to std::vector.
9525         (find_inline_frame_state): Adjust to std::vector.
9526         (allocate_inline_frame_state): Remove.
9527         (clear_inline_frame_state): Adjust to std::vector.
9528         (skip_inline_frames): Adjust to std::vector.
9529
9530 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9531
9532         * tracepoint.h (struct trace_state_variable): Add constructor.
9533         <name>: Change type to std::string.
9534         * tracepoint.c (tsv_s): Remove.
9535         (DEF_VEC_O(tsv_s)): Remove.
9536         (tvariables): Change to std::vector.
9537         (create_trace_state_variable): Adjust to std::vector.
9538         (find_trace_state_variable): Likewise.
9539         (find_trace_state_variable_by_number): Likewise.
9540         (delete_trace_state_variable): Likewise.
9541         (trace_variable_command): Adjust to std::string.
9542         (delete_trace_variable_command): Likewise.
9543         (tvariables_info_1): Adjust to std::vector.
9544         (save_trace_state_variables): Likewise.
9545         (start_tracing): Likewise.
9546         (merge_uploaded_trace_state_variables): Adjust to std::vector
9547         and std::string.
9548         * target.h (struct target_ops)
9549         <to_download_trace_state_variable>: Pass reference to
9550         trace_state_variable.
9551         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
9552         * target-delegates.c: Re-generate.
9553         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
9554         (mi_tsv_deleted): Likewise.
9555         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
9556         * remote.c (remote_download_trace_state_variable): Change
9557         pointer to reference and adjust.
9558         * make-target-delegates (parse_argtypes): Handle references.
9559         (write_function_header): Likewise.
9560         (munge_type): Likewise.
9561
9562 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9563
9564         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9565         string_view-selftests.c.
9566         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
9567         testsuite.
9568         * unittests/basic_string_view/cons/char/1.cc: Likewise.
9569         * unittests/basic_string_view/cons/char/2.cc: Likewise.
9570         * unittests/basic_string_view/cons/char/3.cc: Likewise.
9571         * unittests/basic_string_view/element_access/char/1.cc:
9572         Likewise.
9573         * unittests/basic_string_view/element_access/char/empty.cc:
9574         Likewise.
9575         * unittests/basic_string_view/element_access/char/front_back.cc:
9576         Likewise.
9577         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
9578         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
9579         Likewise.
9580         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
9581         Likewise.
9582         * unittests/basic_string_view/modifiers/swap/char/1.cc:
9583         Likewise.
9584         * unittests/basic_string_view/operations/compare/char/1.cc:
9585         Likewise.
9586         * unittests/basic_string_view/operations/compare/char/13650.cc:
9587         Likewise.
9588         * unittests/basic_string_view/operations/copy/char/1.cc:
9589         Likewise.
9590         * unittests/basic_string_view/operations/data/char/1.cc:
9591         Likewise.
9592         * unittests/basic_string_view/operations/find/char/1.cc:
9593         Likewise.
9594         * unittests/basic_string_view/operations/find/char/2.cc:
9595         Likewise.
9596         * unittests/basic_string_view/operations/find/char/3.cc:
9597         Likewise.
9598         * unittests/basic_string_view/operations/find/char/4.cc:
9599         Likewise.
9600         * unittests/basic_string_view/operations/rfind/char/1.cc:
9601         Likewise.
9602         * unittests/basic_string_view/operations/rfind/char/2.cc:
9603         Likewise.
9604         * unittests/basic_string_view/operations/rfind/char/3.cc:
9605         Likewise.
9606         * unittests/basic_string_view/operations/substr/char/1.cc:
9607         Likewise.
9608         * unittests/basic_string_view/operators/char/2.cc: Likewise.
9609         * unittests/string_view-selftests.c: New file.
9610
9611 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9612
9613         * unittests/basic_string_view/capacity/1.cc: New file.
9614         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
9615         * unittests/basic_string_view/cons/char/1.cc: New file.
9616         * unittests/basic_string_view/cons/char/2.cc: New file.
9617         * unittests/basic_string_view/cons/char/3.cc: New file.
9618         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
9619         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
9620         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
9621         * unittests/basic_string_view/element_access/char/1.cc: New file.
9622         * unittests/basic_string_view/element_access/char/2.cc: New file.
9623         * unittests/basic_string_view/element_access/char/empty.cc: New file.
9624         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
9625         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
9626         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
9627         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
9628         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
9629         * unittests/basic_string_view/include.cc: New file.
9630         * unittests/basic_string_view/inserters/char/1.cc: New file.
9631         * unittests/basic_string_view/inserters/char/2.cc: New file.
9632         * unittests/basic_string_view/inserters/char/3.cc: New file.
9633         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
9634         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
9635         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
9636         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
9637         * unittests/basic_string_view/literals/types.cc: New file.
9638         * unittests/basic_string_view/literals/values.cc: New file.
9639         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
9640         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
9641         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
9642         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
9643         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
9644         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
9645         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
9646         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
9647         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
9648         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
9649         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
9650         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
9651         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
9652         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
9653         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
9654         * unittests/basic_string_view/operations/data/char/1.cc: New file.
9655         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
9656         * unittests/basic_string_view/operations/find/char/1.cc: New file.
9657         * unittests/basic_string_view/operations/find/char/2.cc: New file.
9658         * unittests/basic_string_view/operations/find/char/3.cc: New file.
9659         * unittests/basic_string_view/operations/find/char/4.cc: New file.
9660         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
9661         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
9662         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
9663         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
9664         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
9665         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
9666         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
9667         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
9668         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
9669         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
9670         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
9671         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
9672         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
9673         * unittests/basic_string_view/operators/char/2.cc: New file.
9674         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
9675         * unittests/basic_string_view/range_access/char/1.cc: New file.
9676         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
9677         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
9678         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
9679         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
9680         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
9681         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
9682         * unittests/basic_string_view/requirements/typedefs.cc: New file.
9683         * unittests/basic_string_view/typedefs.cc: New file.
9684         * unittests/basic_string_view/types/1.cc: New file.
9685
9686 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9687
9688         * common/gdb_string_view.h: Remove libstdc++ implementation
9689         details, adjust to gdb reality.
9690         * common/gdb_string_view.tcc: Likewise.
9691         * cli/cli-script.c (struct string_view): Remove.
9692         (user_args) <m_args>: Change element type to gdb::string_view.
9693         (user_args::insert_args): Adjust.
9694
9695 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9696
9697         * common/gdb_string_view.h: New file.
9698         * common/gdb_string_view.tcc: New file.
9699
9700 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9701
9702         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
9703         * configure: Re-generate.
9704
9705 2018-04-09  Pedro Alves  <palves@redhat.com>
9706
9707         * gdbarch.sh: Include "observable.h" instead of "observer.h".
9708         (set_target_gdbarch): Call
9709         gdb::observers::architecture_changed.notify instead of
9710         observer_notify_architecture_changed.
9711
9712 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9713
9714         * tracepoint.c (struct current_traceframe_cleanup): Remove.
9715         (do_restore_current_traceframe_cleanup): Remove.
9716         (restore_current_traceframe_cleanup_dtor): Remove.
9717         (make_cleanup_restore_current_traceframe): Remove.
9718         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
9719         New.
9720         * tracepoint.h (struct scoped_restore_current_traceframe): New.
9721         * infrun.c (fetch_inferior_event): Use
9722         scoped_restore_current_traceframe.
9723
9724 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9725
9726         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
9727         Remove.
9728         <n_allocated_type_units>: Remove.
9729         <all_type_units>: Change to std::vector.
9730         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
9731         to std::vector change.
9732         (dwarf2_per_objfile::get_cutu): Likewise.
9733         (dwarf2_per_objfile::get_tu): Likewise.
9734         (create_signatured_type_table_from_index): Likewise.
9735         (create_signatured_type_table_from_debug_names): Likewise.
9736         (dw2_symtab_iter_next): Likewise.
9737         (dw2_print_stats): Likewise.
9738         (dw2_expand_all_symtabs): Likewise.
9739         (dw2_expand_marked_cus): Likewise.
9740         (dw2_debug_names_iterator::next): Likewise.
9741         (dwarf2_initialize_objfile): Likewise.
9742         (add_signatured_type_cu_to_table): Likewise.
9743         (create_all_type_units): Likewise.
9744         (add_type_unit): Likewise.
9745         (struct tu_abbrev_offset): Add constructor.
9746         (build_type_psymtabs_1): Adjust to std::vector change.
9747         (print_tu_stats): Likewise.
9748         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9749         (write_debug_names): Likewise.
9750
9751 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9752
9753         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
9754         Make an std::vector.
9755         <n_comp_units>: Remove.
9756         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
9757         to std::vector change.
9758         (dwarf2_per_objfile::get_cutu): Likewise.
9759         (dwarf2_per_objfile::get_cu): Likewise.
9760         (create_cus_from_index): Likewise.
9761         (create_addrmap_from_index): Likewise.
9762         (create_addrmap_from_aranges): Likewise.
9763         (dwarf2_read_index): Likewise.
9764         (dw2_find_last_source_symtab): Likewise.
9765         (dw2_map_symtabs_matching_filename): Likewise.
9766         (dw2_symtab_iter_next): Likewise.
9767         (dw2_print_stats): Likewise.
9768         (dw2_expand_all_symtabs): Likewise.
9769         (dw2_expand_symtabs_with_fullname): Likewise.
9770         (dw2_expand_marked_cus): Likewise.
9771         (dw2_map_symbol_filenames): Likewise.
9772         (create_cus_from_debug_names): Likewise.
9773         (dwarf2_read_debug_names): Likewise.
9774         (dw2_debug_names_iterator::next): Likewise.
9775         (dwarf2_initialize_objfile): Likewise.
9776         (set_partial_user): Likewise.
9777         (dwarf2_build_psymtabs_hard): Likewise.
9778         (read_comp_units_from_section): Remove arguments, adjust to
9779         std::vector change.
9780         (create_all_comp_units): Adjust to std::vector and
9781         read_comp_units_from_section changes.
9782         (dwarf2_find_containing_comp_unit): Adjust to std::vector
9783         change.
9784         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9785         (psyms_seen_size): Likewise.
9786         (write_gdbindex): Likewise.
9787         (write_debug_names): Likewise.
9788
9789 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9790
9791         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
9792         with dwarf2_per_objfile.
9793         (create_cus_from_index): Likewise.
9794         (create_signatured_type_table_from_index): Likewise.
9795         (dwarf2_read_index): Likewise.
9796         (dwarf2_initialize_objfile): Likewise.
9797         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
9798         per_cu rather than get_dwarf2_per_objfile.
9799
9800 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9801
9802         * dwarf2read.h (struct signatured_type): Forward declare.
9803         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
9804         New methods.
9805         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
9806         (dw2_get_cutu): ...this.
9807         (dwarf2_per_objfile::get_cu): Rename from...
9808         (dw2_get_cu): ...this.
9809         (dwarf2_per_objfile::get_tu): New.
9810         (create_addrmap_from_index): Adjust.
9811         (create_addrmap_from_aranges): Adjust.
9812         (dw2_find_last_source_symtab): Adjust.
9813         (dw2_map_symtabs_matching_filename): Adjust.
9814         (dw2_symtab_iter_next): Adjust.
9815         (dw2_print_stats): Adjust.
9816         (dw2_expand_all_symtabs): Adjust.
9817         (dw2_expand_symtabs_with_fullname): Adjust.
9818         (dw2_expand_marked_cus): Adjust.
9819         (dw_expand_symtabs_matching_file_matcher): Adjust.
9820         (dw2_map_symbol_filenames): Adjust.
9821         (dw2_debug_names_iterator::next): Adjust.
9822         (dwarf2_initialize_objfile): Adjust.
9823         (set_partial_user): Adjust.
9824         (dwarf2_build_psymtabs_hard): Adjust.
9825
9826 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9827
9828         * dwarf2read.c (create_signatured_type_table_from_debug_names):
9829         Remove unused variables.
9830         (dw2_map_symtabs_matching_filename): Likewise.
9831         (dwarf2_record_block_ranges): Likewise.
9832         (dwarf2_read_addr_index): Likewise.
9833         (follow_die_offset): Likewise.
9834
9835 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9836
9837         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
9838         to symbol_file_add_main.
9839
9840 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9841
9842         PR mi/22299
9843         * mi/mi-console.c (do_fputc_async_safe): New.
9844         (mi_console_file::write_async_safe): New.
9845         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
9846         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
9847         New.
9848         * ui-file.c (ui_file::putstrn): Adjust call to
9849         fputstrn_unfiltered.
9850         * utils.c (printchar): Replace do_fputs and do_fprintf
9851         parameters by do_fputc.
9852         (fputstr_filtered): Adjust call to printchar.
9853         (fputstr_unfiltered): Likewise.
9854         (fputstrn_filtered): Likewise.
9855         (fputstrn_unfiltered): Add do_fputc parameter, pass to
9856         printchar.
9857         * utils.h (do_fputc_ftype): New typedef.
9858         (fputstrn_unfiltered): Add do_fputc parameter.
9859
9860 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9861
9862         * regformats/i386/i386-avx.dat: Remove.
9863
9864 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
9865
9866         PR gdb/22979
9867         * amd64-tdep.c (amd64_none_init_abi): New function.
9868         (amd64_x32_none_init_abi): New function.
9869         (_initialize_amd64_tdep): Register handlers for x86-64 and
9870         x64_32 with GDB_OSABI_NONE.
9871         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
9872         GDB_OSABI_NONE osabi.
9873
9874 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
9875
9876         PR gdb/22980
9877         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
9878         GDB_OSABI_NONE.
9879         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
9880         * osabi.c (gdb_osabi_names): Add "unknown" entry.
9881
9882 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
9883
9884         * common/byte-vector.h (char_vector): New type.
9885         * target.h (target_read_alloc): Return
9886         gdb::optional<byte_vector>.
9887         (target_read_stralloc): Return gdb::optional<char_vector>.
9888         (target_get_osdata): Return gdb::optional<char_vector>.
9889         * target.c (target_read_alloc_1): Templatize.  Replacement
9890         manual memory management with vector.
9891         (target_read_alloc): Change return type, adjust.
9892         (target_read_stralloc): Change return type, adjust.
9893         (target_get_osdata): Change return type, adjust.
9894         * auxv.c (struct auxv_info) <length>: Remove.
9895         <data>: Change type to gdb::optional<byte_vector>.
9896         (auxv_inferior_data_cleanup): Free auxv_info with delete.
9897         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
9898         (target_auxv_search): Adjust.
9899         (fprint_target_auxv): Adjust.
9900         * avr-tdep.c (avr_io_reg_read_command): Adjust.
9901         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
9902         (linux_make_corefile_notes): Adjust.
9903         * osdata.c (get_osdata): Adjust.
9904         * remote.c (remote_get_threads_with_qxfer): Adjust.
9905         (remote_memory_map): Adjust.
9906         (remote_traceframe_info): Adjust.
9907         (btrace_read_config): Adjust.
9908         (remote_read_btrace): Adjust.
9909         (remote_pid_to_exec_file): Adjust.
9910         * solib-aix.c (solib_aix_get_library_list): Adjust.
9911         * solib-dsbt.c (decode_loadmap): Don't free buf.
9912         (dsbt_get_initial_loadmaps): Adjust.
9913         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
9914         * solib-target.c (solib_target_current_sos): Adjust.
9915         * tracepoint.c (sdata_make_value): Adjust.
9916         * xml-support.c (xinclude_start_include): Adjust.
9917         (xml_fetch_content_from_file): Adjust.
9918         * xml-support.h (xml_fetch_another): Change return type.
9919         (xml_fetch_content_from_file): Change return type.
9920         * xml-syscall.c (xml_init_syscalls_info): Adjust.
9921         * xml-tdesc.c (file_read_description_xml): Adjust.
9922         (fetch_available_features_from_target): Change return type.
9923         (target_fetch_description_xml): Adjust.
9924         (target_read_description_xml): Adjust.
9925
9926 2018-04-06  Tom Tromey  <tom@tromey.com>
9927
9928         * value.c (~value): Update.
9929         (struct value) <contents>: Now unique_xmalloc_ptr.
9930         (value_contents_bits_eq, allocate_value_contents)
9931         (value_contents_raw, value_contents_all_raw)
9932         (value_contents_for_printing, value_contents_for_printing_const)
9933         (set_value_enclosing_type): Update.
9934
9935 2018-04-06  Tom Tromey  <tom@tromey.com>
9936
9937         * value.c (range_s): Remove typedef, VEC.
9938         (struct range): Add operator<.
9939         (range_lessthan): Remove.
9940         (ranges_contain): Change type.
9941         (~value): Update.
9942         (struct value) <unavailable, optimized_out>: Now std::vector.
9943         (value_entirely_available)
9944         (value_entirely_covered_by_range_vector)
9945         (value_entirely_unavailable, value_entirely_optimized_out):
9946         Update.
9947         (insert_into_bit_range_vector): Change argument type.
9948         (find_first_range_overlap): Likewise.
9949         (struct ranges_and_idx, value_contents_bits_eq)
9950         (require_not_optimized_out, require_available): Update.
9951         (ranges_copy_adjusted): Change argument types.
9952         (value_optimized_out, value_copy, value_fetch_lazy): Update.
9953
9954 2018-04-06  Tom Tromey  <tom@tromey.com>
9955
9956         * value.c (~value): Update.
9957         (struct value) <parent>: Now a value_ref_ptr.
9958         (value_parent, set_value_parent, value_address, value_copy):
9959         Update.
9960
9961 2018-04-06  Tom Tromey  <tom@tromey.com>
9962
9963         * value.c (struct value): Add constructor, destructor, and member
9964         initializers.
9965         (allocate_value_lazy, value_decref): Update.
9966
9967 2018-04-06  Tom Tromey  <tom@tromey.com>
9968
9969         * value.c (struct value) <released, next>: Remove.
9970         (all_values): Now a std::vector.
9971         (allocate_value_lazy): Update.
9972         (value_next): Remove.
9973         (value_mark, value_free_to_mark, release_value)
9974         (value_release_to_mark): Update.
9975
9976 2018-04-06  Tom Tromey  <tom@tromey.com>
9977
9978         * value.h (fetch_subexp_value, value_release_to_mark): Update.
9979         (free_value_chain): Remove.
9980         * value.c (free_value_chain): Remove.
9981         (value_release_to_mark): Return a std::vector.
9982         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
9983         std::vector.
9984         (check_condition): Update.
9985         * eval.c (fetch_subexp_value): Change "val_chain" to a
9986         std::vector.
9987         * breakpoint.c (update_watchpoint): Update.
9988         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
9989
9990 2018-04-06  Tom Tromey  <tom@tromey.com>
9991
9992         * value.h (free_all_values): Remove.
9993         * value.c (free_all_values): Remove.
9994
9995 2018-04-06  Tom Tromey  <tom@tromey.com>
9996
9997         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
9998         (value_history_chain, value_history_count): Remove.
9999         (value_history): New global.
10000         (record_latest_value, access_value_history, show_values)
10001         (preserve_values): Update.
10002
10003 2018-04-06  Tom Tromey  <tom@tromey.com>
10004
10005         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
10006         * varobj.c (varobj_set_display_format, varobj_set_value)
10007         (install_default_visualizer, construct_visualizer)
10008         (install_new_value, ~varobj, varobj_get_value_type)
10009         (my_value_of_variable, varobj_editable_p): Update.
10010         * c-varobj.c (c_describe_child, c_value_of_variable)
10011         (cplus_number_of_children, cplus_describe_child): Update.
10012         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
10013         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
10014         (ada_value_of_variable, ada_value_is_changeable_p): Update.
10015
10016 2018-04-06  Tom Tromey  <tom@tromey.com>
10017
10018         * printcmd.c (last_examine_address): Change type to
10019         value_ref_ptr.
10020         (do_examine, x_command): Update.
10021
10022 2018-04-06  Tom Tromey  <tom@tromey.com>
10023
10024         * value.c (release_value): Update.
10025         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
10026         (struct bpstats) <val>: Now a value_ref_ptr.
10027         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
10028         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
10029         (~watchpoint, print_it_watchpoint, watch_command_1)
10030         (invalidate_bp_value_on_memory_change): Update.
10031
10032 2018-04-06  Tom Tromey  <tom@tromey.com>
10033
10034         * varobj.c (varobj_clear_saved_item)
10035         (update_dynamic_varobj_children, install_new_value, ~varobj):
10036         Update.
10037         * value.h (value_incref): Move declaration earlier.
10038         (value_decref): Rename from value_free.
10039         (struct value_ref_policy): New.
10040         (value_ref_ptr): New typedef.
10041         (struct value_deleter): Remove.
10042         (gdb_value_up): Remove typedef.
10043         (release_value): Change return type.
10044         (release_value_or_incref): Remove.
10045         * value.c (set_value_parent): Update.
10046         (value_incref): Change return type.
10047         (value_decref): Rename from value_free.
10048         (value_free_to_mark, free_all_values, free_value_chain): Update.
10049         (release_value): Return value_ref_ptr.
10050         (release_value_or_incref): Remove.
10051         (record_latest_value, set_internalvar, clear_internalvar):
10052         Update.
10053         * stack.c (info_frame_command): Don't call value_free.
10054         * python/py-value.c (valpy_dealloc, valpy_new)
10055         (value_to_value_object): Update.
10056         * printcmd.c (do_examine): Update.
10057         * opencl-lang.c (lval_func_free_closure): Update.
10058         * mi/mi-main.c (register_changed_p): Don't call value_free.
10059         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
10060         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
10061         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
10062         value_free.
10063         * guile/scm-value.c (vlscm_free_value_smob)
10064         (vlscm_scm_from_value): Update.
10065         * frame.c (frame_register_unwind, frame_unwind_register_signed)
10066         (frame_unwind_register_unsigned, get_frame_register_bytes)
10067         (put_frame_register_bytes): Don't call value_free.
10068         * findvar.c (address_from_register): Don't call value_free.
10069         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
10070         * dwarf2loc.c (entry_data_value_free_closure)
10071         (value_of_dwarf_reg_entry, free_pieced_value_closure)
10072         (dwarf2_evaluate_loc_desc_full): Update.
10073         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
10074         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
10075         (~watchpoint, watch_command_1)
10076         (invalidate_bp_value_on_memory_change): Update.
10077         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
10078
10079 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
10080
10081         PR gdb/23022
10082         * warning.m4: Add -Wno-error=deprecated-register.
10083         * configure: Re-generate.
10084
10085 2018-04-05  Tom Tromey  <tom@tromey.com>
10086
10087         * linespec.h: Remove include of "vec.h".
10088
10089 2018-04-05  Tom Tromey  <tom@tromey.com>
10090
10091         * linespec.c (typep): Remove typedef.
10092         (find_methods, find_superclass_methods): Take a std::vector.
10093         (find_method): Use std::vector.
10094
10095 2018-04-05  Tom Tromey  <tom@tromey.com>
10096
10097         * utils.c (compare_strings): Remove.
10098         * utils.h (compare_strings): Remove.
10099         * objc-lang.h (find_imps): Update.
10100         * objc-lang.c (find_methods): Take a std::vector.
10101         (uniquify_strings, find_imps): Likewise.
10102         * linespec.c (find_methods): Take a std::vector.
10103         (decode_objc): Use std::vector.
10104         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
10105         a std::vector.
10106         (find_method, find_function_symbols): Use std::vector.
10107
10108 2018-04-05  Tom Tromey  <tom@tromey.com>
10109
10110         * completer.c (completion_tracker::completion_tracker): Remove
10111         cast.
10112         (completion_tracker::discard_completions): Likewise.
10113         * breakpoint.c (ambiguous_names_p): Remove cast.
10114         * ada-lang.c (_initialize_ada_language): Remove cast.
10115         * utils.h (streq): Update.
10116         (streq_hash): Add new declaration.
10117         * utils.c (streq): Return bool.
10118         (streq_hash): New function.
10119
10120 2018-04-05  Tom Tromey  <tom@tromey.com>
10121
10122         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
10123         Remove a string copy.
10124
10125 2018-04-05  Tom Tromey  <tom@tromey.com>
10126
10127         * linespec.c (filter_results): Use std::vector.
10128         (decode_line_2, decode_line_full): Update.
10129
10130 2018-04-05  Tom Tromey  <tom@tromey.com>
10131
10132         * linespec.c (canonical_to_fullform): Return std::string.
10133         (filter_results): Update.
10134         (struct decode_line_2_item): Add constructor.
10135         <fullform, displayform>: Now std::string.
10136         (decode_line_2_compare_items): Now a std::sort comparator.
10137         (decode_line_2): Update.
10138
10139 2018-04-05  Tom Tromey  <tom@tromey.com>
10140
10141         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
10142         (unexpected_linespec_error): Update.
10143         (linespec_parse_basic, parse_linespec): Update.
10144
10145 2018-04-05  Tom Tromey  <tom@tromey.com>
10146
10147         * linespec.c (linespec_parse_basic): Reindent.
10148
10149 2018-04-05  Tom Tromey  <tom@tromey.com>
10150
10151         * minsyms.h (iterate_over_minimal_symbols): Update.
10152         * minsyms.c (iterate_over_minimal_symbols): Take a
10153         gdb::function_view.
10154         * linespec.c (struct collect_minsyms): Remove.
10155         (compare_msyms): Now a std::sort comparator.
10156         (add_minsym): Add parameters.
10157         (search_minsyms_for_name): Update.  Use std::vector.
10158
10159 2018-04-03  Tom Tromey  <tom@tromey.com>
10160
10161         * mipsread.c (read_alphacoff_dynamic_symtab): Use
10162         gdb::byte_vector.
10163
10164 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
10165
10166         * MAINTAINERS (Write After Approval): Add Weimin Pan.
10167
10168 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
10169
10170         PR gdb/16959
10171         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
10172         printing static type.
10173
10174 2018-04-01  Tom Tromey  <tom@tromey.com>
10175
10176         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
10177         (rs6000_xfer_shared_libraries): Update.
10178
10179 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
10180
10181         * common/gdb_vecs.h (char_ptr): Remove.
10182         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
10183
10184 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
10185
10186         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
10187         with std::vector.
10188         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
10189
10190 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
10191
10192         * tracepoint.h (struct uploaded_tp): Initialize fields.
10193         <actions, step_actions, cmd_strings>: Change type to
10194         std::vector<char *>.
10195         * tracepoint.c (get_uploaded_tp): Allocate with new.
10196         (free_uploaded_tps): Free with delete.
10197         (parse_tracepoint_definition): Adjust to std::vector change.
10198         * breakpoint.c (read_uploaded_action): Likewise.
10199         (create_tracepoint_from_upload): Likewise.
10200         * ctf.c (ctf_write_uploaded_tp): Likewise.
10201         (SET_ARRAY_FIELD): Likewise.
10202         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
10203
10204 2018-03-30  Tom Tromey  <tom@tromey.com>
10205
10206         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
10207         std::unique_ptr.
10208         (svr4_keep_data_in_core): Update.
10209         (svr4_read_so_list): Update.
10210
10211 2018-03-30  Tom Tromey  <tom@tromey.com>
10212
10213         * windows-nat.c (handle_output_debug_string, handle_exception):
10214         Update.
10215         * target.h (target_read_string): Update.
10216         * target.c (target_read_string): Change "string" to
10217         unique_xmalloc_ptr.
10218         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
10219         Update.
10220         * solib-frv.c (frv_current_sos): Update.
10221         * solib-dsbt.c (dsbt_current_sos): Update.
10222         * solib-darwin.c (darwin_current_sos): Update.
10223         * linux-thread-db.c (inferior_has_bug): Update.
10224         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
10225         Update.  Remove alloca.
10226         * ada-lang.c (ada_main_name): Update.
10227
10228 2018-03-30  Tom Tromey  <tom@tromey.com>
10229
10230         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
10231         (struct dwo_file_deleter): New.
10232         (dwo_file_up): New typedef.
10233         (open_and_init_dwo_file): Use dwo_file_up.
10234         (free_dwo_file_cleanup): Remove.
10235
10236 2018-03-30  Tom Tromey  <tom@tromey.com>
10237
10238         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
10239         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
10240
10241 2018-03-30  Tom Tromey  <tom@tromey.com>
10242
10243         * dwarf2read.c (class free_cached_comp_units): New class.
10244         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
10245         (free_cached_comp_units): Remove function.
10246
10247 2018-03-30  Tom Tromey  <tom@tromey.com>
10248
10249         * utils.h (make_cleanup_unpush_target): Remove.
10250         * inf-ptrace.c (struct target_unpusher): New.
10251         (target_unpush_up) New typedef.
10252         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
10253         target_unpush_up.
10254         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
10255
10256 2018-03-27  Tom Tromey  <tom@tromey.com>
10257
10258         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
10259
10260 2018-03-27  Pedro Alves  <palves@redhat.com>
10261             Tom Tromey  <tom@tromey.com>
10262
10263         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
10264         destructor.  Now a class.
10265         (gdb_readline_wrapper_cleanup): Remove function.
10266         (gdb_readline_wrapper): Remove cleanups.
10267
10268 2018-03-27  Tom Tromey  <tom@tromey.com>
10269
10270         * typeprint.h (struct type_print_options) <local_typedefs,
10271         global_typedefs>: Remove "struct" keyword.
10272         (class typedef_hash_table): New class.
10273         (recursively_update_typedef_hash, add_template_parameters)
10274         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
10275         (find_typedef_in_hash): Don't declare.
10276         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
10277         (typedef_hash_table::recursively_update): Rename from
10278         recursively_update_typedef_hash.  Now a member.
10279         (typedef_hash_table::add_template_parameters): Rename from
10280         add_template_parameters.  Now a member.
10281         (typedef_hash_table::typedef_hash_table): Now a constructor;
10282         rename from create_typedef_hash.
10283         (typedef_hash_table::~typedef_hash_table): Now a destructor;
10284         rename from free_typedef_hash.
10285         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
10286         (do_free_global_table): Remove.
10287         (typedef_hash_table::typedef_hash_table): New constructor; renamed
10288         from copy_type_recursive.
10289         (create_global_typedef_table): Remove.
10290         (typedef_hash_table::find_global_typedef): Now a member of
10291         typedef_hash_table.
10292         (typedef_hash_table::find_typedef): Rename from
10293         find_typedef_in_hash; now a member.
10294         (whatis_exp): Update.
10295         * extension.h (struct ext_lang_type_printers): Add constructor and
10296         destructor.
10297         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
10298         declare.
10299         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
10300         Now a constructor; rename from start_ext_lang_type_printers.
10301         (ext_lang_type_printers): Now a destructor; rename from
10302         free_ext_lang_type_printers.
10303         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
10304         Update.
10305         (c_type_print_base_struct_union): Update.  Remove cleanups.
10306
10307 2018-03-27  Tom Tromey  <tom@tromey.com>
10308
10309         * dwarf-index-write.c: Include <cmath>.
10310
10311 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
10312
10313         * NEWS: Add entry describing new "set|show varsize-limit" command.
10314         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
10315         command.
10316         * printcmd.c (_initialize_printcmd): Add "set var" alias of
10317         "set variable".
10318
10319 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
10320
10321         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
10322         dwarf-index-write.c
10323         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
10324         * dwarf-index-common.c: New file.
10325         * dwarf-index-common.h: New file.
10326         * dwarf-index-write.c: New file.
10327         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
10328         (struct dwarf2_section_info): Move from here.
10329         (dwarf2_section_info_def): Likewise.
10330         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
10331         (offset_type): Likewise.
10332         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
10333         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
10334         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
10335         (byte_swap): Likewise.
10336         (MAYBE_SWAP): Likewise.
10337         (dwarf2_per_cu_ptr): Likewise.
10338         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
10339         (struct tu_stats): Likewise.
10340         (struct dwarf2_per_objfile): Likewise.
10341         (struct dwarf2_per_cu_data): Likewise.
10342         (struct signatured_type): Likewise.
10343         (sig_type_ptr): Likewise.
10344         (DEF_VEC_P (sig_type_ptr)): Likewise.
10345         (INDEX4_SUFFIX): Likewise.
10346         (INDEX5_SUFFIX): Likewise.
10347         (DEBUG_STR_SUFFIX): Likewise.
10348         (dwarf2_read_section): Make non-static.
10349         (mapped_index_string_hash): Move from here.
10350         (dwarf5_djb_hash): Likewise.
10351         (file_write): Likewise.
10352         (class data_buf): Likewise.
10353         (struct symtab_index_entry): Likewise.
10354         (struct mapped_symtab): Likewise.
10355         (find_slot): Likewise.
10356         (hash_expand): Likewise.
10357         (add_index_entry): Likewise.
10358         (uniquify_cu_indices): Likewise.
10359         (class c_str_view): Likewise.
10360         (class c_str_view_hasher): Likewise.
10361         (class vector_hasher): Likewise.
10362         (write_hash_table): Likewise.
10363         (psym_index_map): Likewise.
10364         (struct addrmap_index_data): Likewise.
10365         (add_address_entry): Likewise.
10366         (add_address_entry_worker): Likewise.
10367         (write_address_map): Likewise.
10368         (symbol_kind): Likewise.
10369         (write_psymbols): Likewise.
10370         (struct signatured_type_index_data): Likewise.
10371         (write_one_signatured_type): Likewise.
10372         (recursively_count_psymbols): Likewise.
10373         (recursively_write_psymbols): Likewise.
10374         (class debug_names): Likewise.
10375         (check_dwarf64_offsets): Likewise.
10376         (psyms_seen_size): Likewise.
10377         (write_gdbindex): Likewise.
10378         (write_debug_names): Likewise.
10379         (assert_file_size): Likewise.
10380         (write_psymtabs_to_index): Likewise.
10381         (save_gdb_index_command): Likewise.
10382         (_initialize_dwarf2_read): Don't register the "save gdb-index"
10383         command.
10384         * dwarf2read.h: New file.
10385
10386 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
10387
10388         PR gdb/22670
10389         * dwarf2read.c (dwarf2_physname): Do not return the demangled
10390         symbol name if the CU's language stores symbol names in linkage
10391         format.
10392         * language.h (struct language_defn)
10393         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
10394         all instances of this struct.
10395
10396 2018-03-26  Tom Tromey  <tom@tromey.com>
10397
10398         * stack.c (backtrace_command_1): Remove verbose code.
10399
10400 2018-03-26  Tom Tromey  <tom@tromey.com>
10401
10402         * python/py-framefilter.c (py_print_type): Don't catch
10403         exceptions.  Return void.
10404         (py_print_value): Likewise.
10405         (py_print_single_arg): Likewise.
10406         (enumerate_args): Don't catch exceptions.
10407         (py_print_args): Likewise.
10408         (py_print_frame): Likewise.
10409         (gdbpy_apply_frame_filter): Catch exceptions here.
10410
10411 2018-03-26  Tom Tromey  <tom@tromey.com>
10412
10413         * stack.c (_initialize_stack): Remove trailing newlines from help
10414         text.  Add "Usage" line to "backtrace" help.
10415
10416 2018-03-26  Tom Tromey  <tom@tromey.com>
10417
10418         PR python/16486:
10419         * python/py-framefilter.c (py_print_args): Call wrap_hint.
10420
10421 2018-03-26  Tom Tromey  <tom@tromey.com>
10422
10423         * python/py-framefilter.c (py_print_single_arg): Return
10424         EXT_LANG_BT_ERROR from catch.
10425
10426 2018-03-26  Tom Tromey  <tom@tromey.com>
10427
10428         PR backtrace/15584:
10429         * stack.c (backtrace_command_1): Move some code into no-filters
10430         "if".
10431
10432 2018-03-26  Tom Tromey  <tom@tromey.com>
10433
10434         * python/py-framefilter.c (throw_quit_or_print_exception): New
10435         function.
10436         (gdbpy_apply_frame_filter): Use it.
10437
10438 2018-03-26  Tom Tromey  <tom@tromey.com>
10439
10440         PR cli/17716:
10441         * python/py-framefilter.c (py_print_type, py_print_value)
10442         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
10443         RETURN_MASK_ERROR.
10444
10445 2018-03-26  Tom Tromey  <tom@tromey.com>
10446
10447         * python/py-framefilter.c (enumerate_args): Use
10448         gdb::unique_xmalloc_ptr.
10449
10450 2018-03-26  Tom Tromey  <tom@tromey.com>
10451
10452         * python/py-framefilter.c (py_print_frame): Return
10453         EXT_LANG_BT_OK.
10454         (gdbpy_apply_frame_filter): Update comment.
10455         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
10456         Remove.
10457         <EXT_LANG_BT_NO_FILTERS>: Change value.
10458
10459 2018-03-26  Tom Tromey  <tom@tromey.com>
10460
10461         PR backtrace/15582:
10462         * stack.c (backtrace_command): Parse "hide" argument.
10463         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
10464         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
10465         constant.
10466
10467 2018-03-26  Tom Tromey  <tom@tromey.com>
10468
10469         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
10470         add "flags".
10471         (backtrace_command): Remove "fulltrace", add "flags".
10472
10473 2018-03-26  Tom Tromey  <tom@tromey.com>
10474
10475         * stack.c (backtrace_command): Rewrite command line parsing.
10476
10477 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
10478
10479         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
10480
10481 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
10482
10483         * filename-seen-cache.h: Add include guard.
10484
10485 2018-03-26  Keith Seitz  <keiths@redhat.com>
10486
10487         * symfile.c (place_section): Remove "struct" from section_addr_info
10488         in comment.
10489         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
10490         "struct" keyword from section_addr_info.
10491
10492 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
10493
10494         * regformats/regdef.h (reg): Add constructors.
10495
10496 2018-03-25  Pedro Alves  <palves@redhat.com>
10497
10498         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
10499         if then/else bodies in var_func_name extraction.
10500
10501 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
10502
10503         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
10504         lookup_minimal_symbol() to find symbol entry.
10505         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
10506
10507 2018-03-23  Keith Seitz  <keiths@redhat.com>
10508
10509         PR c++/22968
10510         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
10511         nested type definitions for C++, too.
10512
10513 2018-03-23  Tom Tromey  <tom@tromey.com>
10514
10515         * machoread.c (struct oso_el): Add a constructor.  Don't define as
10516         a typedef.
10517         (macho_register_oso): Remove.
10518         (macho_symtab_read): Take a std::vector.
10519         (oso_el_compare_name): Now a std::sort comparator.
10520         (macho_symfile_read_all_oso): Take a std::vector.
10521         (macho_symfile_read): Use std::vector.  Remove cleanups.
10522
10523 2018-03-22  Tom Tromey  <tom@tromey.com>
10524
10525         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
10526         (record_full_goto_bookmark): Use std::string.
10527
10528 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
10529
10530         PR tdep/18295
10531         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
10532         a single mask.
10533
10534 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
10535
10536         * rs6000-tdep.c (store_insn_p): New function.
10537         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
10538         and cr_reg to their unshifted values. Use store_insn_p to
10539         match LR saves using either R1 or fdata->alloca_reg. Use
10540         store_insn_p to match CR saves. Set alloca_reg_offset
10541         when alloca_reg and framep are set. Remove lr_reg shift
10542         when assigning to fdata->lr_register.
10543
10544 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10545
10546         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
10547         command line args instead of emitting a warning.
10548
10549 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
10550
10551         * tracepoint.h (struct static_tracepoint_marker): Initialize
10552         fields, define default constructor, move constructor and move
10553         assignment, disable the rest.
10554         <str_id, extra>: Make std::string.
10555         (release_static_tracepoint_marker): Remove.
10556         (free_current_marker): Remove.
10557         * tracepoint.c (free_current_marker): Remove.
10558         (parse_static_tracepoint_marker_definition): Adjust to
10559         std::string, use new hex2str overload.
10560         (release_static_tracepoint_marker): Remove.
10561         (print_one_static_tracepoint_marker): Get marker by reference
10562         and adjust to std::string.
10563         (info_static_tracepoint_markers_command): Adjust to std::vector
10564         changes
10565         * target.h (static_tracepoint_marker_p): Remove typedef.
10566         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
10567         (struct target_ops) <to_static_tracepoint_marker_at>: Return
10568         bool.
10569         <to_static_tracepoint_markers_by_strid>: Return std::vector.
10570         * target-debug.h
10571         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
10572         (target_debug_print_std_vector_static_tracepoint_marker): New.
10573         (target_debug_print_struct_static_tracepoint_marker_p): Rename
10574         to...
10575         (target_debug_print_static_tracepoint_marker_p): ... this.
10576         * target-delegates.c: Re-generate.
10577         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
10578         Make std::string.
10579         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
10580         (decode_static_tracepoint_spec): Adjust to std::vector.
10581         (tracepoint_print_one_detail): Adjust to std::string.
10582         (strace_marker_decode_location): Adjust to std::string.
10583         (update_static_tracepoint): Adjust to std::string, remove call
10584         to release_static_tracepoint_marker.
10585         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
10586         Adjust to std::vector.
10587         * remote.c (remote_static_tracepoint_marker_at): Return bool.
10588         (remote_static_tracepoint_markers_by_strid): Adjust to
10589         std::vector.
10590         * common/rsp-low.h (hex2str): New overload with explicit count
10591         of bytes.
10592         * common/rsp-low.c (hex2str): New overload with explicit count
10593         of bytes.
10594         * unittests/rsp-low-selftests.c (test_hex2str): New function.
10595         (_initialize_rsp_low_selftests): Add test_hex2str test.
10596         * unittests/tracepoint-selftests.c
10597         (test_parse_static_tracepoint_marker_definition): Adjust to
10598         std::string.
10599
10600 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
10601
10602         * tracepoint.c (parse_static_tracepoint_marker_definition):
10603         Consider case where the definition is followed by more
10604         definitions.
10605         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10606         tracepoint-selftests.c.
10607         * unittests/tracepoint-selftests.c: New.
10608
10609 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
10610
10611         * MAINTAINERS (Write After Approval): Add Pedro Franco de
10612         Carvalho.
10613
10614 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
10615
10616         * symtab.c (find_pc_sect_line): fixed indentation.
10617
10618 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
10619
10620         * symtab.c (find_pc_sect_line): now uses binary search.
10621
10622 2018-03-19  Tom Tromey  <tom@tromey.com>
10623
10624         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
10625         "IDENT" production.
10626
10627 2018-03-19  Pedro Alves  <palves@redhat.com>
10628             Tom Tromey  <tom@tromey.com>
10629
10630         * unittests/observable-selftests.c: New file.
10631         * common/observable.h: New file.
10632         * observable.h: New file.
10633         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
10634         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
10635         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
10636         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
10637         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
10638         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
10639         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
10640         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
10641         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
10642         python/py-breakpoint.c, python/py-finishbreakpoint.c,
10643         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
10644         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
10645         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
10646         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
10647         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
10648         tui/tui-interp.c, valops.c: Update all users.
10649         * tui/tui-hooks.c (tui_bp_created_observer)
10650         (tui_bp_deleted_observer, tui_bp_modified_observer)
10651         (tui_inferior_exit_observer, tui_before_prompt_observer)
10652         (tui_normal_stop_observer, tui_register_changed_observer):
10653         Remove.
10654         (tui_observers_token): New global.
10655         (attach_or_detach, tui_attach_detach_observers): New functions.
10656         (tui_install_hooks, tui_remove_hooks): Use
10657         tui_attach_detach_observers.
10658         * record-btrace.c (record_btrace_thread_observer): Remove.
10659         (record_btrace_thread_observer_token): New global.
10660         * observer.sh: Remove.
10661         * observer.c: Rename to observable.c.
10662         * observable.c (namespace gdb_observers): Define new objects.
10663         (observer_debug): Move into gdb_observers namespace.
10664         (struct observer, struct observer_list, xalloc_observer_list_node)
10665         (xfree_observer_list_node, generic_observer_attach)
10666         (generic_observer_detach, generic_observer_notify): Remove.
10667         (_initialize_observer): Update.
10668         Don't include observer.inc.
10669         * Makefile.in (generated_files): Remove observer.h, observer.inc.
10670         (clean mostlyclean): Likewise.
10671         (observer.h, observer.inc): Remove targets.
10672         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
10673         (COMMON_SFILES): Use observable.c, not observer.c.
10674         * .gitignore: Remove observer.h.
10675
10676 2018-03-18  Tom Tromey  <tom@tromey.com>
10677
10678         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
10679         gdb::def_vector.
10680         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
10681
10682 2018-03-17  Tom Tromey  <tom@tromey.com>
10683
10684         * auto-load.c (auto_load_objfile_script_1): Use std::string.
10685
10686 2018-03-17  Tom Tromey  <tom@tromey.com>
10687
10688         * target.c (class scoped_target_fd): New.
10689         (target_fileio_close_cleanup): Remove.
10690         (target_fileio_read_alloc_1): Use scoped_target_fd.
10691
10692 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
10693
10694         * silent-rules.mk: New.
10695         * Makefile.in: Include silent-rules.mk
10696         (srcdir, VPATH, top_srcdir): Move up.
10697         (COMPILE): Add ECHO_CXX.
10698         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
10699         (init.c): Add ECHO_INIT_C.
10700         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
10701         (version.c): Add ECHO_GEN.
10702         (printcmd.o): Add ECHO_CXX.
10703         (target-float.o): Add ECHO_CXX.
10704         (ada-exp.o): Add ECHO_CXX.
10705         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
10706         (insight$(EXEEXT)): Add ECHO_CXXLD.
10707         * gnulib/configure.ac: Add AM_SILENT_RULES.
10708         * gnulib/aclocal.m4: Re-generate.
10709         * gnulib/configure: Re-generate.
10710         * gnulib/import/Makefile.in: Re-generate.
10711
10712 2018-03-16  Tom Tromey  <tom@tromey.com>
10713
10714         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
10715         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
10716         * utils.c (do_free_section_addr_info)
10717         (make_cleanup_free_section_addr_info): Remove.
10718         * symfile.h (struct other_sections): Add constructor.
10719         (struct section_addr_info): Remove.
10720         (section_addr_info): New typedef.
10721         (struct sym_fns) <sym_offsets>: Change type of parameter.
10722         (build_section_addr_info_from_objfile)
10723         (relative_addr_info_to_section_offsets, addr_info_make_relative)
10724         (default_symfile_offsets, symbol_file_add)
10725         (symbol_file_add_from_bfd)
10726         (build_section_addr_info_from_section_table): Update.
10727         (alloc_section_addr_info, free_section_addr_info): Don't declare.
10728         * symfile.c (alloc_section_addr_info): Remove.
10729         (build_section_addr_info_from_section_table): Change return type.
10730         Update.
10731         (build_section_addr_info_from_bfd)
10732         (build_section_addr_info_from_objfile): Likewise.
10733         (free_section_addr_info): Remove.
10734         (relative_addr_info_to_section_offsets): Change type of "addrs".
10735         (addrs_section_compar): Now a std::sort comparator.
10736         (addrs_section_sort): Change return type.
10737         (addr_info_make_relative): Change type of "addrs".  Update.
10738         (default_symfile_offsets, syms_from_objfile_1)
10739         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
10740         (symbol_file_add_separate): Update.
10741         (symbol_file_add): Change type of "addrs".  Update.
10742         (add_symbol_file_command): Update.  Remove cleanups.
10743         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
10744         cleanups.
10745         * symfile-debug.c (debug_sym_offsets): Change type of "info".
10746         * solib.c (solib_read_symbols): Update.
10747         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
10748         * machoread.c (macho_symfile_offsets): Update.
10749         * jit.c (jit_bfd_try_read_symtab): Update.
10750
10751 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
10752
10753         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10754         unittests/utils-selftests.c.
10755         * unittests/utils-selftests.c: New file.
10756
10757 2018-03-14  Tom Tromey  <tom@tromey.com>
10758
10759         PR cli/14977:
10760         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
10761         for NULL.
10762
10763 2018-03-14  Tom Tromey  <tom@tromey.com>
10764
10765         PR cli/19918:
10766         * printcmd.c (printf_pointer): Allow "-" in format.
10767
10768 2018-03-14  Tom Tromey  <tom@tromey.com>
10769
10770         * printcmd.c (_initialize_printcmd): Add usage to printf.
10771
10772 2018-03-14  Yao Qi  <qiyao@sourceware.org>
10773
10774         * MAINTAINERS: Update my email address.
10775
10776 2018-03-13  Tom Tromey  <tom@tromey.com>
10777
10778         * machoread.c (macho_check_dsym): Change filenamep to a
10779         std::string*.
10780         (macho_symfile_read): Update.
10781         * symfile.c (load_command): Use std::string.
10782
10783 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
10784
10785         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
10786         to error message string.
10787         (riscv_register_name): Use xsnprintf instead of sprintf.
10788         (riscv_insn::fetch_instruction): Use gdb_assert instead of
10789         internal_error.
10790         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
10791         error.
10792         (riscv_push_dummy_call): Likewise.
10793
10794 2018-03-12  Tom Tromey  <tom@tromey.com>
10795
10796         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
10797         Use gdb::byte_vector.
10798         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
10799
10800 2018-03-12  Yao Qi  <yao.qi@linaro.org>
10801
10802         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
10803         parameter type to readable_regcache.
10804         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
10805         the declaration.
10806
10807 2018-03-11  Tom Tromey  <tom@tromey.com>
10808
10809         * dwarf2read.c (struct nextfield): Add initializers.
10810         (struct nextfnfield): Remove.
10811         (struct fnfieldlist): Add initializers.  Remove "length" and
10812         "head", use std::vector.
10813         (struct decl_field_list): Remove.
10814         (struct field_info): Add initializers.
10815         <fields, baseclasses>: Now std::vector.
10816         <nbaseclasses, nfnfields, typedef_field_list_count,
10817         nested_types_list_count>: Remove.
10818         (dwarf2_add_field, dwarf2_add_type_defn)
10819         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
10820         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
10821         (process_structure_scope): Update.
10822
10823 2018-03-11  Tom Tromey  <tom@tromey.com>
10824
10825         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
10826         for use by std::sort.
10827         (build_type_psymtabs_1): Use std::vector.
10828
10829 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
10830
10831         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
10832         and LIBMPFR in the printed configuration.
10833
10834 2018-03-08  Tom Tromey  <tom@tromey.com>
10835
10836         * source.c (get_filename_and_charpos): Use scoped_fd.
10837         * nto-procfs.c (procfs_open_1): Use scoped_fd.
10838         (procfs_pidlist): Likewise.
10839         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
10840         (iterate_over_mappings): Likewise.
10841
10842 2018-03-08  Tom Tromey  <tom@tromey.com>
10843
10844         * infcall.c (struct call_return_meta_info)
10845         <stack_temporaries_enabled>: Remove.
10846         (get_call_return_value, call_function_by_hand_dummy): Update.
10847         * thread.c (disable_thread_stack_temporaries): Remove.
10848         (enable_thread_stack_temporaries): Remove.
10849         (thread_stack_temporaries_enabled_p): Return bool.
10850         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
10851         (get_last_thread_stack_temporary): Update.
10852         * eval.c (evaluate_subexp): Update.
10853         * gdbthread.h (class enable_thread_stack_temporaries): Now a
10854         class, not a function.
10855         (value_ptr, value_vec): Remove typedefs.
10856         (class thread_info) <stack_temporaries_enabled>: Now bool.
10857         <stack_temporaries>: Now a std::vector.
10858         (thread_stack_temporaries_enabled_p)
10859         (value_in_thread_stack_temporaries): Return bool.
10860
10861 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
10862
10863         * remote.c (putpkt_binary): Fix omitted bytes reporting.
10864         (getpkt_or_notif_sane_1): Likewise.
10865
10866 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
10867
10868         * build-id.c (build_id_to_debug_bfd): Use std::string.
10869
10870 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
10871
10872         * build-id.c (find_separate_debug_file_by_buildid): Return
10873         std::string.
10874         * build-id.h (find_separate_debug_file_by_buildid): Return
10875         std::string.
10876         * coffread.c (coff_symfile_read): Adjust to std::string.
10877         * elfread.c (elf_symfile_read): Adjust to std::string.
10878         * symfile.c (separate_debug_file_exists): Change parameter to
10879         std::string.
10880         (find_separate_debug_file): Return std::string.
10881         (find_separate_debug_file_by_debuglink): Return std::string.
10882         * symfile.h (find_separate_debug_file_by_debuglink): Return
10883         std::string.
10884
10885 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
10886
10887         * common/xml-utils.c (xml_escape_text): Move code to...
10888         (xml_escape_text_append): ... this new function.
10889         * common/xml-utils.h (xml_escape_text_append): New declaration.
10890         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
10891         New function.
10892         (_initialize_xml_utils): register test_xml_escape_text_append as
10893         a selftest.
10894
10895 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
10896
10897         * defs.h: Remove MAX_REGISTER_SIZE.
10898         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
10899         asserts.
10900         * python/py-unwind.c (pyuw_sniffer): Likewise.
10901
10902 2018-03-07  Tom Tromey  <tom@tromey.com>
10903
10904         * linux-tdep.c (linux_info_proc): Update.
10905         * target.h (struct target_ops) <to_fileio_readlink>: Return
10906         optional<string>.
10907         (target_fileio_readlink): Return optional<string>.
10908         * remote.c (remote_hostio_readlink): Return optional<string>.
10909         * inf-child.c (inf_child_fileio_readlink): Return
10910         optional<string>.
10911         * target.c (target_fileio_readlink): Return optional<string>.
10912
10913 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
10914
10915         * regcache.c (cooked_read_test): Add riscv to the list of
10916         architectures that have a save_reggroup.
10917
10918 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10919
10920         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
10921         value is not a dynamic class object.
10922
10923 2018-03-06  Tom Tromey  <tom@tromey.com>
10924
10925         * rust-exp.y: Formatting fixes.
10926
10927 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10928
10929         * riscv-tdep.c (riscv_register_name): Remove target description
10930         support.
10931         (riscv_gdbarch_init): Remove target description check.
10932
10933 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10934
10935         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
10936         comment.
10937         * riscv-tdep.h: Likewise.
10938
10939 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10940
10941         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
10942         (riscv_pseudo_register_write): Delete.
10943         (riscv_gdbarch_init): Remove all use of pseudo registers.
10944
10945 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
10946
10947         * record-btrace.c (btrace_print_lines): Replace cleanup
10948         parameter with RAII equivalents.
10949         (btrace_insn_history): Replace cleanup with RAII equivalents.
10950         * ui-out.h (make_cleanup_ui_out_list_begin_end,
10951         make_cleanup_ui_out_tuple_begin_end): Remove.
10952         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
10953         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
10954         make_cleanup_ui_out_list_begin_end): Remove.
10955
10956 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
10957
10958         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
10959         parameter types to std::vector.  Use bool.
10960         (record_btrace_wait): Replace VEC(tp_t) with
10961         std::vector<thread_info *>.
10962         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
10963
10964 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
10965
10966         * record-btrace.c (record_btrace_disable_callback): Remove.
10967         (struct scoped_btrace_disable): New.
10968         (record_btrace_open): Use scoped_btrace_disable.
10969
10970 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10971
10972         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
10973         reading values from registers.
10974
10975 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10976
10977         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
10978         where appropriate.
10979
10980 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10981
10982         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
10983         change parameter type.  Use GDB's print functions, and use
10984         core_addr_to_string where appropriate.
10985         (riscv_push_dummy_call): Use core_addr_to_string where
10986         appropriate, update call to riscv_print_arg_location, and reindent
10987         a few lines.
10988         (riscv_return_value): Update call to riscv_print_arg_location.
10989
10990 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10991             Tim Newsome <tim@sifive.com>
10992             Albert Ou <a0u@eecs.berkeley.edu>
10993             Darius Rad <darius@bluespec.com>
10994
10995         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
10996         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
10997         (ALLDEPFILES): Add riscv-tdep.c
10998         * configure.tgt: Add riscv support.
10999         * riscv-tdep.c: New file.
11000         * riscv-tdep.h: New file.
11001         * NEWS: Mention new target.
11002         * MAINTAINERS: Add entry for riscv.
11003
11004 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11005
11006         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
11007         fields within aggregates.
11008
11009 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
11010
11011         * record-btrace.c (btrace_print_lines): Change type of flags to
11012         gdb_disassembly_flags.
11013
11014 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
11015
11016         * fbsd-nat.c: Include "inf-ptrace.h".
11017         (USE_SIGTRAP_SIGINFO): Conditionally define.
11018         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
11019         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
11020         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
11021         function.
11022         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
11023         Likewise.
11024         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
11025         Likewise.
11026         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
11027         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
11028         "supports_stopped_by_hw_breakpoint" target methods.
11029
11030 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
11031
11032         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
11033         * fbsd-nat.c (debug_fbsd_nat): New variable.
11034         (show_fbsd_nat_debug): New function.
11035         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
11036         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
11037
11038 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
11039
11040         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
11041         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
11042         prototype.
11043         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
11044         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
11045         method.
11046
11047 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
11048
11049         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
11050         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
11051
11052 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
11053
11054         * charset.c (struct charset_vector): New.
11055         (charsets): Change type to charset_vector.
11056         (find_charset_names): Adjust.
11057         (add_one): Adjust.
11058         (_initialize_charset): Adjust.
11059
11060 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
11061
11062         * progspace.h (struct program_space) <deleted_solibs>: Change
11063         type to std::vector<std::string>.
11064         * progspace.c (clear_program_space_solib_cache): Adjust.
11065         * breakpoint.c (print_solib_event): Adjust.
11066         (check_status_catch_solib): Adjust.
11067         * solib.c (update_solib_list): Adjust.
11068         * ui-out.h (class ui_out) <field_string>: New overload.
11069         * ui-out.c (ui_out::field_string): New overload.
11070
11071 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
11072
11073         * progspace.h (struct program_space): Add constructor and
11074         destructor, initialize fields.
11075         (add_program_space): Remove.
11076         * progspace.c (add_program_space): Rename to...
11077         (program_space::program_space): ... this.
11078         (release_program_space): Rename to...
11079         (program_space::~program_space): ... this.
11080         (delete_program_space): Use delete to delete program_space.
11081         (initialize_progspace): Use new to allocate program_space.
11082         * inferior.c (add_inferior_with_spaces): Likewise.
11083         (clone_inferior_command): Likewise.
11084         * infrun.c (follow_fork_inferior): Likewise.
11085         (handle_vfork_child_exec_or_exit): Likewise.
11086
11087 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
11088
11089         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
11090         (delim_string_to_char_ptr_vec): Return std::vector of
11091         gdb::unique_xmalloc_ptr.
11092         (dirnames_to_char_ptr_vec_append): Take std::vector of
11093         gdb::unique_xmalloc_ptr.
11094         (dirnames_to_char_ptr_vec): Return std::vector of
11095         gdb::unique_xmalloc_ptr.
11096         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
11097         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
11098         (delim_string_to_char_ptr_vec): Return an std::vector of
11099         gdb::unique_xmalloc_ptr, adjust the code.
11100         (dirnames_to_char_ptr_vec_append): Take an std::vector of
11101         gdb::unique_xmalloc_ptr, adjust the code.
11102         (dirnames_to_char_ptr_vec): Return an std::vector of
11103         gdb::unique_xmalloc_ptr, adjust the code.
11104         * auto-load.c (auto_load_safe_path_vec): Change type to
11105         std::vector of gdb::unique_xmalloc_ptr.
11106         (auto_load_expand_dir_vars): Return an std::vector of
11107         gdb::unique_xmalloc_ptr, adjust the code.
11108         (auto_load_safe_path_vec_update): Adjust.
11109         (filename_is_in_auto_load_safe_path_vec): Adjust.
11110         (auto_load_objfile_script_1): Adjust.
11111         * build-id.c (build_id_to_debug_bfd): Adjust.
11112         * linux-thread-db.c (thread_db_load_search): Adjust.
11113         * source.c (add_path): Adjust.
11114         (openp): Adjust.
11115         * symfile.c (find_separate_debug_file): Adjust.
11116         * utils.c (do_free_char_ptr_vec): Remove.
11117         (make_cleanup_free_char_ptr_vec): Remove.
11118
11119 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
11120
11121         PR gdb/22907
11122         * common/pathstuff.c: Conditionally include "<windows.h>".
11123
11124 2018-03-01  Georg Sauthoff  <mail@georg.so>
11125
11126         PR gdb/22888
11127         * gcore.in: Quote variables and switch interpreter to bash.
11128
11129 2018-03-01  Tom Tromey  <tom@tromey.com>
11130
11131         * dwarf2read.c (alloc_discriminant_info): Fix default_index
11132         assertion.  Add assertion for discriminant_index.
11133         (quirk_rust_enum): Use correct base type name in univariant case.
11134
11135 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
11136
11137         * record.c (get_call_history_modifiers): Return a
11138         record_print_flags.
11139         (cmd_record_call_history): Adjust.
11140         * record-btrace.c (record_btrace_call_history): Adjust.
11141         (record_btrace_call_history_range): Adjust.
11142         (record_btrace_call_history_from): Adjust.
11143         * target-debug.h (target_debug_print_record_print_flags): New.
11144         * target-delegates.c: Re-generate.
11145         * target.c (target_call_history): Change flags type.
11146         (target_call_history_from): Likewise.
11147         (target_call_history_range): Likewise.
11148         * target.h (struct target_ops) <target_call_history>: Likewise.
11149         (target_call_history_from): Likewise.
11150         (target_call_history_range): Likewise.
11151
11152 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
11153             Simon Marchi  <simon.marchi@polymtl.ca>
11154
11155         * common/common-utils.c: Include "sys/stat.h".
11156         (is_regular_file): Move here from "source.c"; change return
11157         type to "bool".
11158         * common/common-utils.h (is_regular_file): New prototype.
11159         * common/pathstuff.c (contains_dir_separator): New function.
11160         * common/pathstuff.h (contains_dir_separator): New prototype.
11161         * source.c: Don't include "sys/stat.h".
11162         (is_regular_file): Move to "common/common-utils.c".
11163
11164 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
11165
11166         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
11167         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
11168         * auto-load.c: Include "common/pathstuff.h".
11169         * common/common-def.h (current_directory): Move here.
11170         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
11171         function.
11172         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
11173         prototype.
11174         * common/pathstuff.c: New file.
11175         * common/pathstuff.h: New file.
11176         * compile/compile.c: Include "common/pathstuff.h".
11177         * defs.h (current_directory): Move to "common/common-defs.h".
11178         * dwarf2read.c: Include "common/pathstuff.h".
11179         * exec.c: Likewise.
11180         * guile/scm-safe-call.c: Likewise.
11181         * linux-thread-db.c: Likewise.
11182         * main.c: Likewise.
11183         * nto-tdep.c: Likewise.
11184         * objfiles.c: Likewise.
11185         * source.c: Likewise.
11186         * symtab.c: Likewise.
11187         * utils.c: Include "common/pathstuff.h".
11188         (gdb_realpath): Move to "common/pathstuff.c".
11189         (gdb_realpath_keepfile): Likewise.
11190         (gdb_abspath): Likewise.
11191         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
11192         (gdb_realpath_keepfile): Likewise.
11193         (gdb_abspath): Likewise.
11194
11195 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
11196
11197         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
11198         wildcard process pid for super_resume for kernels with a
11199         specific bug.
11200
11201 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
11202
11203         * compile/compile.c (get_args): Add additional comments
11204         explaining function.
11205
11206 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
11207             Tom Tromey  <tom@tromey.com>
11208
11209         * target.h (memory_write_request_s): Remove typedef.  Don't define
11210         VEC.
11211         (target_write_memory_blocks): Change argument to std::vector.
11212         (struct memory_write_request): Add constructor.
11213         * target-memory.c (compare_block_starting_address): Return bool.
11214         Change argument types.
11215         (claim_memory): Change arguments to use std::vector.
11216         (split_regular_and_flash_blocks, blocks_to_erase)
11217         (compute_garbled_blocks): Likewise.
11218         (cleanup_request_data, cleanup_write_requests_vector): Remove.
11219         (target_write_memory_blocks): Change argument to std::vector.
11220         * symfile.c (struct load_section_data): Add constructor and
11221         destructor.  Use std::vector for "requests".
11222         (struct load_progress_data): Add initializers.
11223         (load_section_callback): Update.  Use "new".
11224         (clear_memory_write_data): Remove.
11225         (generic_load): Update.
11226
11227 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
11228
11229         * arch/aarch64.h: Use common/tdesc.h.
11230
11231 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
11232
11233         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
11234         architecture with a 64-bit ABI.
11235
11236 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
11237
11238         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
11239         ahead of target description loading.
11240
11241 2018-02-26  Tom Tromey  <tom@tromey.com>
11242
11243         * stack.c (backtrace_command_1): Update.
11244         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
11245         of "flags".
11246         * python/py-framefilter.c (py_print_frame)
11247         (gdbpy_apply_frame_filter): Change type of "flags".
11248         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
11249         of "flags".
11250         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
11251         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
11252         * extension.h (enum frame_filter_flag): Rename from
11253         frame_filter_flags.
11254         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
11255         (apply_ext_lang_frame_filter): Change type of "flags".
11256         * extension.c (apply_ext_lang_frame_filter): Change type of
11257         "flags".
11258         * extension-priv.h (struct extension_language_ops)
11259         <apply_frame_filter>: Change type of "flags".
11260
11261 2018-02-26  Tom Tromey  <tom@tromey.com>
11262
11263         PR python/16497:
11264         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
11265         off-by-one in py_end computation.
11266         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
11267         PRINT_MORE_FRAMES.
11268         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
11269         constant.
11270
11271 2018-02-26  Tom Tromey  <tom@tromey.com>
11272
11273         * dwarf2read.c (struct variant_field): New.
11274         (struct nextfield) <variant>: New field.
11275         (dwarf2_add_field): Handle DW_TAG_variant_part.
11276         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
11277         discriminated union.
11278         (read_structure_type): Handle DW_TAG_variant_part.
11279         (handle_struct_member_die): New function, extracted from
11280         process_structure_scope.  Handle DW_TAG_variant.
11281         (process_structure_scope): Handle discriminated unions.  Call
11282         handle_struct_member_die.
11283
11284 2018-02-26  Tom Tromey  <tom@tromey.com>
11285
11286         * rust-lang.h (rust_last_path_segment): Declare.
11287         * rust-lang.c (rust_last_path_segment): Now public.  Change
11288         contract.
11289         (struct disr_info): Remove.
11290         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
11291         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
11292         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
11293         (rust_enum_p, rust_enum_variant): New function.
11294         (rust_underscore_fields): Remove "offset" parameter.
11295         (rust_print_enum): New function.
11296         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
11297         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
11298         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
11299         enums.
11300         (rust_internal_print_type): New function, from rust_print_type.
11301         Remove enum code.
11302         (rust_print_type): Call rust_internal_print_type.
11303         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
11304         Update enum handling.
11305         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
11306         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
11307         (rust_union_quirks): New functions.
11308         (process_full_comp_unit, process_full_type_unit): Call
11309         rust_union_quirks.
11310         (process_structure_scope): Update rust_unions if necessary.
11311
11312 2018-02-26  Tom Tromey  <tom@tromey.com>
11313
11314         * value.h (value_union_variant): Declare.
11315         * valops.c (value_union_variant): New function.
11316         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
11317         (struct discriminant_info): New.
11318         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
11319         enumerator.
11320         (struct main_type) <flag_discriminated_union>: New field.
11321
11322 2018-02-26  Tom Tromey  <tom@tromey.com>
11323
11324         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11325         unittests/unpack-selftests.c.
11326         * unittests/unpack-selftests.c: New file.
11327         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
11328
11329 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11330
11331         * dwarf2read.c (struct partial_die_info) <read>: New method.
11332         (read_partial_die): Remove the declaration.
11333         (load_partial_dies): Update.
11334         (partial_die_info::partial_die_info):
11335         (read_partial_die): Change it to partial_die_info::read.
11336
11337 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11338
11339         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
11340         (fixup_partial_die): Remove declaration.
11341         (scan_partial_symbols): Update.
11342         (partial_die_parent_scope): Likewise.
11343         (partial_die_full_name): Likewise.
11344         (fixup_partial_die): Change it to partial_die_info::fixup.
11345
11346 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11347
11348         * dwarf2read.c (read_partial_die): Update the declaration.
11349         (load_partial_dies): Caller update.
11350         (read_partial_die): Remove one argument abbrev_len.
11351
11352 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11353
11354         * dwarf2read.c (struct partial_die_info): Add ctor, delete
11355         assignment operator.
11356         (load_partial_dies): Use ctor and copy ctor.
11357         (read_partial_die): Update.
11358         (dwarf2_cu::find_partial_die): Use ctor.
11359
11360 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11361
11362         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
11363         (find_partial_die_in_comp_unit): Change it to
11364         dwarf2_cu::find_partial_die.
11365         (find_partial_die): Update.
11366
11367 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11368
11369         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
11370         is NULL.
11371
11372 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11373
11374         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
11375
11376 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
11377
11378         * arch/amd64.h: Use common/tdesc.h.
11379         * arch/i386.c: Likewise.
11380         * arch/i386.h: Likewise.
11381         * arch/tic6x.c: Likewise.
11382         * arch/tdesc.h: Move file from here...
11383         * common/tdesc.h: ...to here.
11384         * features/aarch64-core.c: Regenerate.
11385         * features/aarch64-fpu.c: Regenerate.
11386         * features/i386/32bit-avx.c: Regenerate.
11387         * features/i386/32bit-avx512.c: Regenerate.
11388         * features/i386/32bit-core.c: Regenerate.
11389         * features/i386/32bit-linux.c: Regenerate.
11390         * features/i386/32bit-mpx.c: Regenerate.
11391         * features/i386/32bit-pkeys.c: Regenerate.
11392         * features/i386/32bit-sse.c: Regenerate.
11393         * features/i386/64bit-avx.c: Regenerate.
11394         * features/i386/64bit-avx512.c: Regenerate.
11395         * features/i386/64bit-core.c: Regenerate.
11396         * features/i386/64bit-linux.c: Regenerate.
11397         * features/i386/64bit-mpx.c: Regenerate.
11398         * features/i386/64bit-pkeys.c: Regenerate.
11399         * features/i386/64bit-segments.c: Regenerate.
11400         * features/i386/64bit-sse.c: Regenerate.
11401         * features/i386/x32-core.c: Regenerate.
11402         * features/tic6x-c6xp.c: Regenerate.
11403         * features/tic6x-core.c: Regenerate.
11404         * features/tic6x-gp.c: Regenerate.
11405         * target-descriptions.c: Use common/tdesc.h.
11406         * target-descriptions.h: Likewise.
11407
11408 2018-02-24  Tom Tromey  <tom@tromey.com>
11409
11410         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
11411         (try_thread_db_load_from_dir, thread_db_load_search): Use
11412         std::string.
11413         (info_auto_load_libthread_db_compare): Return bool.  Change
11414         argument types.
11415         (info_auto_load_libthread_db): Use std::vector, std::string.
11416         Remove cleanups.
11417
11418 2018-02-24  Tom Tromey  <tom@tromey.com>
11419
11420         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
11421         std::string.
11422         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
11423         std::string*.
11424         * gdbarch.c: Rebuild.
11425         * gdbarch.h: Rebuild.
11426         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
11427         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
11428         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
11429         std::string*.
11430
11431 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
11432
11433         * gdbtypes.h (sect_offset): Change type to uint64_t.
11434         (sect_offset_str): New function.
11435         * dwarf2read.c (create_addrmap_from_aranges): Use
11436         sect_offset_str.
11437         (error_check_comp_unit_head): Likewise.
11438         (create_debug_type_hash_table): Likewise.
11439         (read_cutu_die_from_dwo): Likewise.
11440         (init_cutu_and_read_dies): Likewise.
11441         (init_cutu_and_read_dies_no_follow): Likewise.
11442         (process_psymtab_comp_unit_reader): Likewise.
11443         (partial_die_parent_scope): Likewise.
11444         (peek_die_abbrev): Likewise.
11445         (process_queue): Likewise.
11446         (dwarf2_physname): Likewise.
11447         (read_namespace_alias): Likewise.
11448         (read_import_statement): Likewise.
11449         (create_dwo_cu_reader): Likewise.
11450         (create_cus_hash_table): Likewise.
11451         (lookup_dwo_cutu): Likewise.
11452         (inherit_abstract_dies): Likewise.
11453         (read_func_scope): Likewise.
11454         (read_call_site_scope): Likewise.
11455         (dwarf2_add_member_fn): Likewise.
11456         (read_common_block): Likewise.
11457         (read_module_type): Likewise.
11458         (read_typedef): Likewise.
11459         (read_subrange_type): Likewise.
11460         (load_partial_dies): Likewise.
11461         (read_partial_die): Likewise.
11462         (find_partial_die): Likewise.
11463         (read_str_index): Likewise.
11464         (dwarf2_string_attr): Likewise.
11465         (build_error_marker_type): Likewise.
11466         (lookup_die_type): Likewise.
11467         (dump_die_shallow): Likewise.
11468         (follow_die_ref): Likewise.
11469         (dwarf2_fetch_die_loc_sect_off): Likewise.
11470         (dwarf2_fetch_constant_bytes): Likewise.
11471         (follow_die_sig): Likewise.
11472         (get_signatured_type): Likewise.
11473         (get_DW_AT_signature_type): Likewise.
11474         (dwarf2_find_containing_comp_unit): Likewise.
11475         (set_die_type): Likewise.
11476
11477 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
11478
11479         * arch/aarch64.c: Include "common-defs.h".
11480         * arch/amd64.c: Likewise.
11481         * arch/i386.c: Likewise.
11482
11483 2018-02-21  Tom Tromey  <tom@tromey.com>
11484
11485         * value.h: (extract_field_op): Update.
11486         * eval.c (extract_field_op): Return a const char *.
11487         * expression.h (parse_expression_for_completion): Update.
11488         * completer.c (complete_expression): Update.
11489         (add_struct_fields): Make fieldname const.
11490         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
11491         (mark_completion_tag, parse_exp_in_context_1): Update.
11492         (parse_expression_for_completion): Change "name" to
11493         unique_xmalloc_ptr*.
11494
11495 2018-02-21  Tom Tromey  <tom@tromey.com>
11496
11497         * infcall.c (call_function_by_hand_dummy): Use std::vector.
11498
11499 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11500
11501         * avr-tdep.c (avr_read_pc): Change parameter type to
11502         readable_regcache.
11503         * gdbarch.sh (read_pc): Likewise.
11504         * gdbarch.c: Re-generated.
11505         * gdbarch.h: Re-generated.
11506         * hppa-tdep.c (hppa_read_pc): Change parameter type to
11507         readable_regcache.
11508         * ia64-tdep.c (ia64_read_pc): Likewise.
11509         * mips-tdep.c (mips_read_pc): Likewise.
11510         * spu-tdep.c (spu_read_pc): Likewise.
11511
11512 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11513
11514         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
11515         * regcache-dump.c: New file.
11516         * regcache.c: Move register_dump to regcache-dump.c.
11517         (maintenance_print_registers): Likewise.
11518         (maintenance_print_raw_registers): Likewise.
11519         (maintenance_print_cooked_registers): Likewise.
11520         (maintenance_print_register_groups): Likewise.
11521         (maintenance_print_remote_registers): Likewise.
11522         (_initialize_regcache): Likewise.
11523         * regcache.h (register_dump): Moved from regcache.c.
11524
11525 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11526
11527         * regcache.c (regcache::regcache): Update.
11528         (regcache::invalidate): Move it to detached_regcache::invalidate.
11529         (get_thread_arch_aspace_regcache): Update.
11530         (regcache::raw_update): Update.
11531         (regcache::cooked_read): Remove some code.
11532         (regcache::cooked_read_value): Likewise.
11533         (regcache::raw_write): Remove assert on m_readonly_p.
11534         (regcache::raw_supply_integer): Move it to
11535         detached_regcache::raw_supply_integer.
11536         (regcache::raw_supply_zeroed): Likewise.
11537         * regcache.h (detached_regcache) <raw_supply_integer>: New
11538         declaration.
11539         <raw_supply_zeroed, invalidate>: Likewise.
11540         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
11541         <invalidate>: Likewise.
11542         <m_readonly_p>: Removed.
11543
11544 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11545
11546         * infcmd.c (get_return_value): Let stop_regs point to
11547         get_current_regcache.
11548         * regcache.c (regcache::regcache): Remove.
11549         (register_dump_reg_buffer): New class.
11550         (regcache_print): Adjust.
11551         * regcache.h (regcache): Remove constructors.
11552
11553 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11554
11555         * regcache.c (class register_dump): New class.
11556         (register_dump_regcache, register_dump_none): New class.
11557         (register_dump_remote, register_dump_groups): New class.
11558         (regcache_print): Update.
11559         * regcache.h (regcache_dump_what): Move it to regcache.c.
11560         (regcache) <dump>: Remove.
11561
11562 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11563
11564         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
11565          reg_buffer_rw *.
11566         (jit_unwind_reg_set_impl): Call raw_supply.
11567         (jit_frame_sniffer): Use reg_buffer_rw.
11568         * record-full.c (record_full_core_regbuf): Change its type.
11569         (record_full_core_open_1): Use reg_buffer_rw.
11570         (record_full_close): Likewise.
11571         (record_full_core_fetch_registers): Use regcache->raw_supply.
11572         (record_full_core_store_registers): Likewise.
11573         * regcache.c (regcache::get_register_status): Move it to
11574         reg_buffer.
11575         (regcache_raw_set_cached_value): Remove.
11576         (regcache::raw_set_cached_value): Remove.
11577         (regcache::raw_write): Call raw_supply.
11578         (regcache::raw_supply): Move it to reg_buffer_rw.
11579         * regcache.h (regcache_raw_set_cached_value): Remove.
11580         (reg_buffer_rw): New class.
11581
11582 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11583
11584         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
11585         readonly_detached_regcache.
11586         (dummy_frame_prev_register): Use regcache->cooked_read.
11587         * frame.c (frame_save_as_regcache): Change return type.
11588         (frame_pop): Update.
11589         * frame.h (frame_save_as_regcache): Update declaration.
11590         * inferior.h (get_infcall_suspend_state_regcache): Update
11591         declaration.
11592         * infrun.c (infcall_suspend_state) <registers>: use
11593         readonly_detached_regcache.
11594         (save_infcall_suspend_state): Don't use regcache_dup.
11595         (get_infcall_suspend_state_regcache): Change return type.
11596         * linux-fork.c (struct fork_info) <savedregs>: Change to
11597         readonly_detached_regcache.
11598         <pc>: New field.
11599         (fork_save_infrun_state): Don't use regcache_dup.
11600         (info_checkpoints_command): Adjust.
11601         * mi/mi-main.c (register_changed_p): Update declaration.
11602         (mi_cmd_data_list_changed_registers): Use
11603         readonly_detached_regcache.
11604         (register_changed_p): Change parameter type to
11605         readonly_detached_regcache.
11606         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
11607         readonly_detached_regcache.
11608         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
11609         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
11610         New.
11611         (regcache::save): Move it to reg_buffer.
11612         (regcache::restore): Change parameter type.
11613         (regcache_dup): Remove.
11614         * regcache.h (reg_buffer) <save>: New method.
11615         (readonly_detached_regcache): New class.
11616         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
11617         readonly_detached_regcache.
11618         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
11619
11620 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11621
11622         * frame.c (frame_save_as_regcache): Use regcache method save.
11623         (frame_pop): Use regcache method restore.
11624         * infrun.c (restore_infcall_suspend_state): Likewise.
11625         * linux-fork.c (fork_load_infrun_state): Likewise.
11626         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
11627         save.
11628         * regcache.c (regcache_save): Remove.
11629         (regcache::restore): More asserts.
11630         (regcache_cpy): Remove.
11631         * regcache.h (regcache_save): Remove the declaration.
11632         (regcache::restore): Move from private to public.
11633         Remove the friend declaration of regcache_cpy.
11634         (regcache_cpy): Remove declaration.
11635
11636 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11637
11638         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
11639         parameter type to 'readable_regcache *'.
11640         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
11641         * arm-tdep.c (arm_neon_quad_read): Likewise.
11642         (arm_pseudo_read): Likewise.
11643         * avr-tdep.c (avr_pseudo_register_read): Likewise.
11644         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
11645         * frv-tdep.c (frv_pseudo_register_read): Likewise.
11646         * gdbarch.c: Re-generated.
11647         * gdbarch.h: Re-generated.
11648         * gdbarch.sh (pseudo_register_read): Change parameter type to
11649         'readable_regcache *'.
11650         (pseudo_register_read_value): Likewise.
11651         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
11652         (h8300_pseudo_register_read): Likewise.
11653         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
11654         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
11655         (i386_pseudo_register_read_into_value): Likewise.
11656         (i386_pseudo_register_read_value): Likewise.
11657         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
11658         declaration.
11659         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
11660         * m32c-tdep.c (m32c_raw_read): Likewise.
11661         (m32c_read_flg): Likewise.
11662         (m32c_banked_register): Likewise.
11663         (m32c_banked_read): Likewise.
11664         (m32c_sb_read): Likewise.
11665         (m32c_part_read): Likewise.
11666         (m32c_cat_read): Likewise.
11667         (m32c_r3r2r1r0_read): Likewise.
11668         (m32c_pseudo_register_read): Likewise.
11669         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
11670         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
11671         (mep_pseudo_cr64_read): Likewise.
11672         (mep_pseudo_register_read): Likewise.
11673         * mips-tdep.c (mips_pseudo_register_read): Likewise.
11674         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
11675         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
11676         * regcache.c (regcache::raw_read): Move it to readable_regcache.
11677         (regcache::cooked_read): Likewise.
11678         (regcache::cooked_read_value): Likewise.
11679         (regcache_cooked_read_signed):
11680         (regcache::cooked_read): Likewise.
11681         * regcache.h (readable_regcache): New class.
11682         (regcache): Inherit readable_regcache.  Move some methods to
11683         readable_regcache.
11684         * rl78-tdep.c (rl78_pseudo_register_read): Change
11685         parameter type to 'readable_regcache *'.
11686         * rs6000-tdep.c (do_regcache_raw_read): Remove.
11687         (e500_pseudo_register_read): Change parameter type to
11688         'readable_regcache *'.
11689         (dfp_pseudo_register_read): Likewise.
11690         (vsx_pseudo_register_read): Likewise.
11691         (efpr_pseudo_register_read): Likewise.
11692         * s390-tdep.c (s390_pseudo_register_read): Likewise.
11693         * sh-tdep.c (sh_pseudo_register_read): Likewise.
11694         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
11695         (sh64_pseudo_register_read): Likewise.
11696         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
11697         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
11698         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
11699         (spu_pseudo_register_read): Likewise.
11700         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
11701         (xtensa_pseudo_register_read): Likewise.
11702
11703 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11704
11705         * regcache.c (regcache::regcache): Call reg_buffer ctor.
11706         (regcache::arch): Move it to reg_buffer::arch.
11707         (regcache::register_buffer): Likewise.
11708         (regcache::assert_regnum): Likewise.
11709         (regcache::num_raw_registers): Likewise.
11710         * regcache.h (reg_buffer): New class.
11711         (regcache): Inherit reg_buffer.
11712
11713 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
11714
11715         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
11716         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
11717
11718 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
11719
11720         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
11721
11722 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
11723
11724         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
11725         (SFILES): Remove common/*.c files.
11726         (COMMON_OBS): Remove some *.o files built from common/*.c files.
11727         * common/common.host: Add common reference.
11728         * configure.ac: Likewise.
11729         * configure: Regenerate.
11730
11731 2018-02-16  Yao Qi  <yao.qi@linaro.org>
11732
11733         * block.c (block_namespace_info): Inherit allocate_on_obstack.
11734         (block_initialize_namespace): Use new.
11735         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
11736         (dwarf2_free_objfile): Use delete.
11737         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
11738         (copy_type_recursive): Use new.
11739         * gdb_obstack.h (allocate_on_obstack): New.
11740
11741 2018-02-15  Yao Qi  <yao.qi@linaro.org>
11742
11743         PR gdb/22849
11744         * inferior.c (exit_inferior_1): Reset inf->control.
11745
11746 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
11747
11748         * ada-lang.c (ada_to_fixed_value_create): Delete advance
11749         declaration.
11750
11751 2018-02-14  Pedro Alves  <palves@redhat.com>
11752
11753         * frame-unwind.c (frame_unwind_try_unwinder): Always call
11754         frame_cleanup_after_sniffer on exception.
11755
11756 2018-02-14  Tom Tromey  <tom@tromey.com>
11757
11758         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
11759         const.
11760         (solib_bfd_open): Make pathname const.
11761         * solib.c (solib_bfd_open): Make pathname const.
11762         * solib-spu.c (spu_bfd_fopen): Make name const.
11763         (spu_bfd_open): Make pathname const.
11764         * solib-darwin.c (darwin_bfd_open): Make pathname const.
11765         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
11766
11767 2018-02-14  Tom Tromey  <tom@tromey.com>
11768
11769         * symfile.c (symfile_bfd_open): Update.
11770         * source.h (openp, source_full_path_of, find_and_open_source):
11771         Change argument type to unique_xmalloc_ptr.
11772         * source.c (openp): Take a unique_xmalloc_ptr.
11773         (source_full_path_of, find_and_open_source): Likewise.
11774         (open_source_file, symtab_to_fullname): Update.
11775         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
11776         unique_xmalloc_ptr.
11777         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
11778         (exec_file_find): Update.
11779         * psymtab.c (psymtab_to_fullname): Update.
11780         * nto-tdep.h (nto_find_and_open_solib): Update.
11781         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
11782         unique_xmalloc_ptr.
11783         * exec.c (exec_file_attach): Update.
11784         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
11785         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
11786
11787 2018-02-14  Tom Tromey  <tom@tromey.com>
11788
11789         * solib.c: Include source.h.
11790         * nto-tdep.c: Include source.h.
11791         * mi/mi-cmd-env.c: Include source.h.
11792         * infcmd.c: Include source.h.
11793         * exec.c: Include source.h.
11794         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
11795         (add_path, directory_switch, source_path, init_source_path): Move
11796         declarations...
11797         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
11798         (add_path, directory_switch, source_path, init_source_path):
11799         ...here.
11800
11801 2018-02-14  Tom Tromey  <tom@tromey.com>
11802
11803         * solist.h (exec_file_find, solib_find): Return
11804         unique_xmalloc_ptr.
11805         (solib_bfd_fopen): Take a const char *.
11806         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
11807         (exec_file_find, solib_find): Likewise.
11808         (solib_bfd_fopen): Do not take ownership of "pathname".
11809         (solib_bfd_open): Use unique_xmalloc_ptr.
11810         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
11811         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
11812         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
11813         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
11814
11815 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
11816
11817         * ada-lang.c (name_match_type_from_name): Remove reference to
11818         ada_name_for_lookup in function's documentation.
11819         * ada-lang.h (ada_name_for_lookup): Delete declaration.
11820
11821 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
11822
11823         * defs.h (enum openp_flags): New enum.
11824         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
11825         Move to enum openp_flags.
11826         (openp_flags): New enum flags.
11827         (openp): Change parameter type to openp_flags.
11828         * source.c (openp): Change parameter type to openp_flags.
11829         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
11830         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
11831
11832 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
11833
11834         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
11835         per-command.
11836
11837 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
11838
11839         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
11840         into...
11841         (class dwarf2_queue_guard): ...the destructor of this new class.
11842         (dw2_do_instantiate_symtab): Create instance of the new class
11843         dwarf2_queue_guard, remove cleanup.
11844
11845 2018-02-09  Tom Tromey  <tom@tromey.com>
11846
11847         * source.c (find_source_lines): Don't reference past the end of
11848         the vector.
11849
11850 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11851
11852         * remote.c (remote_btrace_maybe_reopen): Change error message.
11853         * btrace.c (btrace_enable): Likewise.
11854         (parse_xml_btrace): Likewise.
11855         (parse_xml_btrace_conf): Likewise.
11856
11857 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11858
11859         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
11860         (linux_enable_pt, linux_enable_bts): Call
11861         diagnose_perf_event_open_fail.
11862
11863 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11864
11865         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
11866         Remove parameter and change return type.  Update callers.  Move it.
11867         (linux_enable_bts, linux_enable_pt): Improve error message.
11868         (linux_enable_pt): Remove zero buffer size check.
11869         (linux_enable_btrace): Improve error messages.  Remove NULL return
11870         check.
11871
11872 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11873
11874         * btrace.c (btrace_enable): Remove target_supports_btrace call.
11875         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
11876         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
11877         (linux_supports_pt, linux_supports_btrace): Remove.
11878         (linux_enable_bts): Call cpu_supports_bts.
11879         * nat/linux-btrace.h (linux_supports_btrace): Remove.
11880         * remote.c (remote_supports_btrace): Remove.
11881         (init_remote_ops): Remove remote_supports_btrace.
11882         * target-delegates.c: Regenerated.
11883         * target.c (target_supports_btrace): Remove.
11884         * target.h (target_ops) <to_supports_btrace>: Remove
11885         (target_supports_btrace): Remove.
11886         * x86-linux-nat.c (x86_linux_create_target): Remove
11887         linux_supports_btrace.
11888
11889 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11890
11891         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
11892         btrace failed.
11893         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
11894         exception and use message in own exception.
11895
11896 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11897
11898         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
11899         (perf_event_pt_event_type): Use gdb_file_up.
11900         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
11901         scoped_fd, and scoped_mmap.
11902
11903 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11904
11905         * common/scoped_mmap.h: New.
11906         * unittests/scoped_mmap-selftest.c: New.
11907         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11908         unittests/scoped_mmap-selftest.c.
11909
11910 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11911
11912         * common/scoped_fd.h: New.
11913         * unittests/scoped_fd-selftest.c: New.
11914         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11915         unittests/scoped_fd-selftest.c.
11916
11917 2018-02-09  Tom Tromey  <tom@tromey.com>
11918
11919         * auto-load.c (auto_load_section_scripts): Use
11920         gdb::unique_xmalloc_ptr.
11921
11922 2018-02-09  Tom Tromey  <tom@tromey.com>
11923
11924         * auto-load.c (execute_script_contents): Use std::string.
11925
11926 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
11927
11928         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
11929         Python function, rather than a new command.
11930
11931 2018-02-08  Tom Tromey  <tom@tromey.com>
11932
11933         * solib.c (solib_find_1): Use std::string.
11934         (solib_bfd_fopen): Use unique_xmalloc_ptr.
11935
11936 2018-02-08  Tom Tromey  <tom@tromey.com>
11937
11938         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
11939
11940 2018-02-08  Tom Tromey  <tom@tromey.com>
11941
11942         * source.c (find_source_lines): Use gdb::def_vector.
11943
11944 2018-02-08  Tom Tromey  <tom@tromey.com>
11945
11946         * macrocmd.c (struct temporary_macro_definition): New.
11947         (macro_define_command): Use temporary_macro_definition.  Remove
11948         cleanups.
11949         (free_macro_definition_ptr): Remove.
11950
11951 2018-02-08  Tom Tromey  <tom@tromey.com>
11952
11953         * macroexp.c (maybe_expand): Use std::string.
11954
11955 2018-02-08  Tom Tromey  <tom@tromey.com>
11956
11957         * macroexp.c (struct macro_buffer): Add initializers for some
11958         members.
11959         (init_buffer, init_shared_buffer, free_buffer)
11960         (free_buffer_return_text): Remove.
11961         (macro_buffer): New constructors.
11962         (~macro_buffer): New destructor.
11963         (macro_buffer::set_shared): New method.
11964         (macro_buffer::resize_buffer, macro_buffer::appendc)
11965         (macro_buffer::appendmem): Now methods, not free functions.
11966         (set_token, append_tokens_without_splicing, stringify)
11967         (macro_stringify): Update.
11968         (gather_arguments): Change return type.  Remove argc_p argument,
11969         add args_ptr argument.  Use std::vector.
11970         (substitute_args): Remove argc argument.  Accept std::vector.
11971         (expand): Update.  Use std::vector.
11972         (scan, macro_expand, macro_expand_next): Update.
11973
11974 2018-02-08  Tom Tromey  <tom@tromey.com>
11975
11976         * symtab.c (default_collect_symbol_completion_matches_break_on):
11977         Use unique_xmalloc_ptr.
11978         * macroscope.h: (sal_macro_scope, user_macro_scope)
11979         (default_macro_scope): Return unique_xmalloc_ptr.
11980         * macroscope.c (sal_macro_scope, user_macro_scope)
11981         (default_macro_scope): Return unique_xmalloc_ptr.
11982         * macroexp.h (macro_expand, macro_expand_once): Return
11983         unique_xmalloc_ptr.
11984         * macroexp.c (macro_expand, macro_expand_once): Return
11985         unique_xmalloc_ptr.
11986         * macrocmd.c (macro_expand_command, macro_expand_once_command)
11987         (info_macro_command, info_macros_command): Use
11988         unique_xmalloc_ptr.
11989         * compile/compile-c-support.c (write_macro_definitions): Use
11990         unique_xmalloc_ptr.
11991         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
11992
11993 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
11994
11995         * value.c (value_static_field): Assign field type instead of
11996         containing type when returning an optimized out value.
11997
11998 2018-02-06  Yao Qi  <yao.qi@linaro.org>
11999
12000         * ft32-tdep.c (ft32_read_pc): Remove.
12001         (ft32_write_pc): Remove.
12002         (ft32_gdbarch_init): Update.
12003         * m32r-tdep.c (m32r_read_pc): Remove.
12004         (m32r_gdbarch_init): Update.
12005         * mep-tdep.c (mep_read_pc): Remove.
12006         (mep_gdbarch_init): Update.
12007         * microblaze-tdep.c (microblaze_write_pc): Remove.
12008         (microblaze_gdbarch_init): Update.
12009         * mn10300-tdep.c (mn10300_read_pc): Remove.
12010         (mn10300_write_pc): Remove.
12011         (mn10300_gdbarch_init): Update.
12012         * moxie-tdep.c (moxie_read_pc): Remove.
12013         (moxie_write_pc): Remove.
12014         (moxie_gdbarch_init): Update.
12015
12016 2018-02-06  Yao Qi  <yao.qi@linaro.org>
12017
12018         * expprint.c (print_subexp_standard): Handle
12019         OP_F77_UNDETERMINED_ARGLIST.
12020         (dump_subexp_body_standard): Likewise.
12021
12022 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
12023
12024         * target-descriptions.c (tdesc_element_visitor) Add empty
12025         implementations.
12026         (tdesc_type): Move make_gdb_type from here.
12027         (tdesc_type_builtin): Likewise.
12028         (tdesc_type_vector): Likewise.
12029         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
12030         (make_gdb_type_struct): Move from tdesc_type_with_fields.
12031         (make_gdb_type_union): Likewise.
12032         (make_gdb_type_flags): Likewise.
12033         (make_gdb_type_enum): Likewise.
12034         (make_gdb_type): New function.
12035         (tdesc_register_type): Use static make_gdb_type.
12036
12037 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
12038
12039         * infcmd.c (default_print_one_register_info): Align natural-format
12040         column values consistently one under another.
12041         (pad_to_column): New function.
12042
12043 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
12044
12045         * dwarf2read.c (dwarf2_physname): Move commment.
12046
12047 2018-02-01  Leszek Swirski  <leszeks@google.com>
12048
12049         * varobj.c (varobj_formatted_print_options): Allow recursive
12050         pretty printing if pretty printing is enabled.
12051
12052 2018-02-01  Leszek Swirski  <leszeks@google.com>
12053
12054         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
12055         names after a structop as a filename.
12056
12057 2018-02-01  Yao Qi  <yao.qi@linaro.org>
12058
12059         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
12060         (arm_record_coproc_data_proc): Likewise.
12061
12062 2018-02-01  Yao Qi  <yao.qi@linaro.org>
12063
12064         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
12065
12066 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
12067
12068         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
12069         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
12070
12071 2018-01-31  Pedro Alves  <palves@redhat.com>
12072
12073         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
12074         * inflow.c (child_terminal_save_inferior): Wrap reference to
12075         tcgetpgrp in HAVE_TERMIOS_H.
12076         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
12077         _WIN32.
12078         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
12079         always iterate over all inferiors.
12080         (gdbsim_cntrl_c): Adjust.
12081         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
12082
12083 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
12084
12085         * gdbtypes.c (lookup_array_range_type): Make sure the array's
12086         index type is objfile-owned if the element type is as well.
12087
12088 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
12089
12090         GDB 8.1 released.
12091
12092 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12093
12094         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
12095         "features/s390x-linux64.c".
12096         (_initialize_s390_linux_tdep): Remove initialization of tdescs
12097         s390_linux32 and s390x_linux64.
12098         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
12099         default tdesc.
12100         * s390-tdep.c: Include "features/s390-linux32.c" and
12101         "features/s390x-linux64.c".
12102         (s390_tdesc_valid): Add check for tdesc_has_registers.
12103         (s390_gdbarch_init): Make sure there is always a valid tdesc.
12104         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
12105         tdesc_s390x_linux64.
12106         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
12107         tdesc_s390x_linux64 to...
12108         * s390-tdep.h: ...here.
12109
12110 2018-01-30  Pedro Alves  <palves@redhat.com>
12111
12112         PR gdb/13211
12113         * config.in, configure: Regenerate.
12114         * configure.ac: Check for getpgid.
12115         * go32-nat.c (go32_pass_ctrlc): New.
12116         (go32_target): Install it.
12117         * inf-child.c (inf_child_target): Install
12118         child_terminal_save_inferior, child_pass_ctrlc and
12119         child_interrupt.
12120         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
12121         (inf_ptrace_target): No longer install it.
12122         * infcmd.c (interrupt_target_1): Adjust.
12123         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
12124         (child_interrupt): Declare.
12125         (inferior::terminal_state): New.
12126         * inflow.c (struct terminal_info): Update comments.
12127         (inferior_process_group): Delete.
12128         (terminal_is_ours): Delete.
12129         (gdb_tty_state): New.
12130         (child_terminal_init): Adjust.
12131         (is_gdb_terminal, sharing_input_terminal_1)
12132         (sharing_input_terminal): New functions.
12133         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
12134         Set the process's actual process group in the foreground if
12135         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
12136         mark terminal as the inferior's if not sharing GDB's terminal.
12137         Don't check attach_flag.
12138         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
12139         pass down a target_terminal_state.
12140         (child_terminal_save_inferior): New, factored out from ...
12141         (child_terminal_ours_1): ... this.  Handle
12142         target_terminal_state::is_ours_for_output.
12143         (child_interrupt, child_pass_ctrlc): New.
12144         (inflow_inferior_exit): Clear the inferior's terminal_state.
12145         (copy_terminal_info): Copy the inferior's terminal state.
12146         (_initialize_inflow): Remove reference to terminal_is_ours.
12147         * inflow.h (inferior_process_group): Delete.
12148         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
12149         * procfs.c (procfs_target): Don't install procfs_interrupt.
12150         (procfs_interrupt): Delete.
12151         * remote.c (remote_serial_quit_handler): Adjust.
12152         (remote_interrupt): Remove ptid parameter.  Adjust.
12153         * target-delegates.c: Regenerate.
12154         * target.c: Include "terminal.h".
12155         (target_terminal::terminal_state): Rename to ...
12156         (target_terminal::m_terminal_state): ... this.
12157         (target_terminal::init): Adjust.
12158         (target_terminal::inferior): Adjust to per-inferior
12159         terminal_state.
12160         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
12161         (target_terminal::ours, target_terminal::ours_for_output): Use
12162         target_terminal_is_ours_kind.
12163         (target_interrupt): Remove ptid parameter.  Adjust.
12164         (default_target_pass_ctrlc): Adjust.
12165         * target.h (target_ops::to_terminal_save_inferior): New field.
12166         (target_ops::to_interrupt): Remove ptid_t parameter.
12167         (target_interrupt): Remove ptid_t parameter.  Update comment.
12168         (target_pass_ctrlc): Update comment.
12169         * target/target.h (target_terminal_state): New scoped enum,
12170         factored out of ...
12171         (target_terminal::terminal_state): ... here.
12172         (target_terminal::inferior): Update comments.
12173         (target_terminal::restore_inferior): New.
12174         (target_terminal::is_inferior, target_terminal::is_ours)
12175         (target_terminal::is_ours_for_output): Adjust.
12176         (target_terminal::scoped_restore_terminal_state): Adjust to
12177         rename, and call restore_inferior() instead of inferior().
12178         (target_terminal::scoped_restore_terminal_state::m_state): Change
12179         type.
12180         (target_terminal::terminal_state): Rename to ...
12181         (target_terminal::m_terminal_state): ... this and change type.
12182
12183 2018-01-30  Pedro Alves  <palves@redhat.com>
12184
12185         * linux-nat.c (wait_for_signal): New function.
12186         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
12187         directly.
12188         (async_terminal_is_ours)
12189         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
12190         (linux_nat_add_target): Don't override
12191         to_terminal_inferior/to_terminal_ours.
12192
12193 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
12194
12195         * remote.c (remote_follow_fork): Don't call "detach_inferior".
12196
12197 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
12198
12199         * dwarf2read.c (free_dwo_files): Add forward-declaration.
12200         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
12201         dwarf2_per_objfile_free here.
12202         (dwarf2_per_objfile_free): Remove.
12203         (_initialize_dwarf2_read): Don't register
12204         dwarf2_per_objfile_free as a registry cleanup.
12205
12206 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
12207
12208         Avoid compilation errors in MinGW native builds
12209
12210         The error is triggered by including python-internal.h, and the
12211         error message is:
12212
12213              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
12214                       from build-gnulib/import/math.h:27,
12215                       from d:/usr/Python26/include/pyport.h:235,
12216                       from d:/usr/Python26/include/Python.h:58,
12217                       from python/python-internal.h:94,
12218                       from python/py-arch.c:24:
12219              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
12220         using ::hypot;
12221                 ^~~~~
12222
12223         This happens because Python headers define 'hypot' to expand t
12224         '_hypot' in the Windows builds.
12225         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
12226         'hypoth'.  This avoids a compilation error.
12227
12228 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
12229
12230         * MAINTAINERS (Write After Approval): Fix ordering.
12231
12232 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
12233
12234         * MAINTAINERS (Write After Approval): Add Alan Hayward.
12235
12236 2018-01-26  Alan Modra  <amodra@gmail.com>
12237
12238         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
12239         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
12240         Remove nop.  Make const.  Comment.
12241         (powerpc32_plt_stub_so_2): New.
12242         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
12243         Correct count.  Update uses.
12244         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
12245         Move common code reading PLT entry word.  Correct
12246         powerpc32_plt_stub PLT address calculation.
12247         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
12248         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
12249         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
12250         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
12251         (ppc64_standard_linkage8): Likewise.
12252         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
12253         Correct insns description.
12254         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
12255
12256 2018-01-24  Pedro Alves  <palves@redhat.com>
12257
12258         GCC PR libstdc++/83906
12259         * gdbtypes.c (operator==(const dynamic_prop &,
12260         const dynamic_prop &)): New.
12261         (operator==(const range_bounds &, const range_bounds &)): New.
12262         (check_types_equal): Use them instead of memcmp.
12263         * gdbtypes.h (operator==(const dynamic_prop &,
12264         const dynamic_prop &)): Declare.
12265         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
12266         (operator==(const range_bounds &, const range_bounds &)): Declare.
12267         (operator!=(const range_bounds &, const range_bounds &)): Declare.
12268
12269 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12270
12271         * s390-linux-tdep.c (s390_record_address_mask)
12272         (s390_record_calc_disp_common, s390_record_calc_disp)
12273         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12274         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12275         (s390_process_record): Move to s390-tdep.c.
12276         (s390_linux_init_abi_any): Adjust.
12277         * s390-tdep.c (s390_record_address_mask)
12278         (s390_record_calc_disp_common, s390_record_calc_disp)
12279         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12280         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12281         (s390_process_record): Moved from s390-linux-tdep.c
12282         (s390_gdbarch_init): Adjust.
12283
12284 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12285
12286         * s390-linux-nat.c (s390-tdep.h): New include.
12287         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
12288         (HFILES_NO_SRCDIR): Add s390-tdep.h.
12289         (ALLDEPFILES): Add s390-tdep.c.
12290         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
12291         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
12292         * s390-tdep.h: ...this.  New file.
12293         * s390-linux-tdep.c (s390-tdep.h): New include.
12294         (_initialize_s390_tdep): Rename to...
12295         (_initialize_s390_linux_tdep): ...this and adjust.
12296         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
12297         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
12298         s390-tdep.h.
12299         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
12300         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
12301         (s390_is_partial_instruction, s390_software_single_step)
12302         (is_non_branch_ril, s390_displaced_step_copy_insn)
12303         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
12304         (s390_prologue_data, s390_addr, s390_store, s390_load)
12305         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
12306         (s390_register_call_saved, s390_guess_tracepoint_registers)
12307         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
12308         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
12309         (s390_pseudo_register_name, s390_pseudo_register_type)
12310         (s390_pseudo_register_read, s390_pseudo_register_write)
12311         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
12312         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
12313         (s390_addr_bits_remove, s390_address_class_type_flags)
12314         (s390_address_class_type_flags_to_name)
12315         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
12316         (s390_function_arg_float, s390_function_arg_vector)
12317         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
12318         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
12319         (s390_frame_align, s390_register_return_value, s390_return_value)
12320         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
12321         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
12322         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
12323         (s390_trad_frame_prev_register, s390_unwind_cache)
12324         (s390_prologue_frame_unwind_cache)
12325         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
12326         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
12327         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
12328         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
12329         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
12330         (s390_frame_base_address, s390_local_base_address)
12331         (s390_frame_base, s390_gcc_target_options)
12332         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
12333         (s390_validate_reg_range, s390_tdesc_valid)
12334         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
12335         * s390-tdep.c: ...this.  New file.
12336
12337 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12338
12339         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
12340         (s390_process_record, s390_gdbarch_tdep_alloc)
12341         (s390_linux_init_abi_any): Use/set new hook.
12342
12343 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12344
12345         * s390-linux-tdep.c (osabi.h): New include.
12346         (s390_linux_init_abi_31, s390_linux_init_abi_64)
12347         (s390_linux_init_abi_any): New functions.
12348         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
12349
12350 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12351
12352         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
12353         tdesc_has_registers check
12354
12355 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12356
12357         * s390-linux-tdep.c (s390_tdesc_valid): New function.
12358         (s390_validate_reg_range): New macro.
12359         (s390_gdbarch_init): Adjust.
12360
12361 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12362
12363         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
12364         (s390_gdbarch_tdep_alloc): Adjust.
12365         (s390_gdbarch_init): Adjust.
12366
12367 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12368
12369         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
12370         <have_tdb>: Change type to bool.
12371         (s390_gdbarch_tdep_alloc): Adjust.
12372         (s390_gdbarch_init): Adjust.
12373
12374 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12375
12376         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
12377         (gdbarch_tdep) <have_upper, have_vx>: New fields.
12378         (s390_gdbarch_tdep_alloc): New function.
12379         (s390_gdbarch_init): Allocate tdep at start and use its fields
12380         instead of separate variables.
12381
12382 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12383
12384         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
12385         when looking for cached gdbarch and add comment for remaining.
12386
12387 2018-01-22  Pedro Alves  <palves@redhat.com>
12388             Sergio Durigan Junior  <sergiodj@redhat.com>
12389
12390         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
12391         case.
12392
12393 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
12394
12395         * MAINTAINERS: Update my company e-mail address.
12396
12397 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12398
12399         * regcache.c (cooked_write_test): New function.
12400         (_initialize_regcache): Register the test.
12401
12402 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12403
12404         * ia64-tdep.c (ia64_pseudo_register_read): Call
12405         regcache->cooked_read instead of regcache_cooked_read_unsigned.
12406         * m32c-tdep.c (m32c_cat_read): Likewise.
12407         (m32c_r3r2r1r0_read): Likewise.
12408         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
12409         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
12410
12411 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12412
12413         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
12414         method raw_read instead of regcache_raw_read.
12415         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
12416         * arm-tdep.c (arm_neon_quad_read): Likewise.
12417         * avr-tdep.c (avr_pseudo_register_read): Likewise.
12418         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
12419         * frv-tdep.c (frv_pseudo_register_read): Likewise.
12420         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
12421         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
12422         (i386_pseudo_register_read_into_value): Likewise.
12423         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
12424         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
12425         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
12426         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
12427         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
12428         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
12429         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
12430         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
12431         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
12432
12433 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12434
12435         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
12436         * configure.tgt: Remove target mt.
12437         * mt-tdep.c: Remove.
12438         * regcache.c (cooked_read_test): Remove the check for mt.
12439
12440 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12441
12442         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
12443         instead of gdbarch_pseudo_register_read_value.
12444
12445 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
12446
12447         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
12448         language is Ada.
12449
12450 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
12451
12452         * linespec.c (create_sals_line_offset): Remove code that preserved
12453         the symtab_and_line's line number.
12454
12455 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12456
12457         * varobj.c (varobj_create): Don't set valid_block when creating a
12458         floating varobj.
12459
12460 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12461
12462         * varobj.c (varobj_create): Remove out of date comment.
12463
12464 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12465
12466         PR mi/20395
12467         * ada-exp.y (write_var_from_sym): Pass extra parameter when
12468         updating innermost block.
12469         * parse.c (innermost_block_tracker::update): Take extra type
12470         parameter, and check types match before updating innermost block.
12471         (write_dollar_variable): Update innermost block for registers.
12472         * parser-defs.h (enum innermost_block_tracker_type): New enum.
12473         (innermost_block_tracker::innermost_block_tracker): Initialise
12474         m_types member.
12475         (innermost_block_tracker::reset): Take type parameter.
12476         (innermost_block_tracker::update): Take type parameter, and pass
12477         type through as needed.
12478         (innermost_block_tracker::m_types): New member.
12479         * varobj.c (varobj_create): Pass type when reseting innermost
12480         block.
12481
12482 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12483
12484         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
12485         * ada-lang.c (resolve_subexp): Likewise.
12486         * breakpoint.c (set_breakpoint_condition) Likewise.
12487         (watch_command_1) Likewise.
12488         * c-exp.y (variable): Likewise.
12489         * d-exp.y (PrimaryExpression): Likewise.
12490         * f-exp.y (variable): Likewise.
12491         * go-exp.y (variable): Likewise.
12492         * m2-exp.y (variable): Likewise.
12493         * objfiles.c (objfile::~objfile): Likewise.
12494         * p-exp.y (variable): Likewise.
12495         * parse.c (innermost_block): Change type.
12496         * parser-defs.h (class innermost_block_tracker): New.
12497         (innermost_block): Change to innermost_block_tracker.
12498         * printcmd.c (display_command): Switch to innermost_block API.
12499         (do_one_display): Likewise.
12500         * rust-exp.y (do_one_display): Likewise.
12501         * symfile.c (clear_symtab_users): Likewise.
12502         * varobj.c (varobj_create): Switch to innermost_block API, replace
12503         use of innermost_block with block stored on varobj object.
12504
12505 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12506
12507         * expression.h (innermost_block): Remove declaration.
12508         * varobj.c: Add 'parser-defs.h' include.
12509
12510 2018-01-19  Tom Tromey  <tom@tromey.com>
12511
12512         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
12513         symbols in the static and global blocks.
12514
12515 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
12516
12517         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
12518         gdb_ptrace.h, and move including gdb_wait.h ...
12519         * nat/linux-ptrace.h: ... to here.
12520
12521 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
12522
12523         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
12524         inf_ptrace_detach_success.
12525         (inf_ptrace_detach_success): Add inferior parameter, use it
12526         instead of inferior_ptid, pass it to detach_inferior.
12527         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
12528         parameter.
12529         * inferior.c (detach_inferior): Add overload that takes an
12530         inferior object.
12531         * inferior.h (detach_inferior): Likewise.
12532         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
12533         use inferior_ptid, adjust call to inf_ptrace_detach_success.
12534         * linux-thread-db.c (thread_db_detach): Use inf parameter.
12535
12536 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
12537
12538         * target.h (struct target_ops) <to_detach>: Add inferior
12539         parameter.
12540         (target_detach): Likewise.
12541         * target.c (dispose_inferior): Pass inferior down.
12542         (target_detach): Pass inferior down.  Assert that it is equal to
12543         the current inferior.
12544         * aix-thread.c (aix_thread_detach): Pass inferior down.
12545         * corefile.c (core_file_command): Pass current_inferior() down.
12546         * corelow.c (core_detach): Add inferior parameter.
12547         * darwin-nat.c (darwin_detach): Likewise.
12548         * gnu-nat.c (gnu_detach): Likewise.
12549         * inf-ptrace.c (inf_ptrace_detach): Likewise.
12550         * infcmd.c (detach_command): Pass current_inferior() down to
12551         target_detach.
12552         * infrun.c (follow_fork_inferior): Pass parent_inf to
12553         target_detach.
12554         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
12555         target_detach.
12556         * linux-nat.c (linux_nat_detach): Add inferior parameter.
12557         * linux-thread-db.c (thread_db_detach): Likewise.
12558         * nto-procfs.c (procfs_detach): Likewise.
12559         * procfs.c (procfs_detach): Likewise.
12560         * record.c (record_detach): Likewise.
12561         * record.h (struct inferior): Forward-declare.
12562         (record_detach): Add inferior parameter.
12563         * remote-sim.c (gdbsim_detach): Likewise.
12564         * remote.c (remote_detach_1): Likewise.
12565         (remote_detach): Likewise.
12566         (extended_remote_detach): Likewise.
12567         * sol-thread.c (sol_thread_detach): Likewise.
12568         * target-debug.h (target_debug_print_inferior_p): New macro.
12569         * target-delegates.c: Re-generate.
12570         * top.c (kill_or_detach): Pass inferior down to target_detach.
12571         * windows-nat.c (windows_detach): Add inferior parameter.
12572
12573 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
12574
12575         * target.h (struct target_ops) <to_detach>: Remove args
12576         parameter.
12577         (target_detach): Likewise.
12578         * target.c (dispose_inferior): Adjust.
12579         (target_detach): Remove args parameter, adjust.
12580         * aix-thread.c (aix_thread_detach): Adjust.
12581         * corefile.c (core_file_command): Adjust.
12582         * corelow.c (core_detach): Adjust.
12583         * darwin-nat.c (darwin_detach): Adjust.
12584         * gnu-nat.c (gnu_detach): Adjust.
12585         * inf-ptrace.c (inf_ptrace_detach): Adjust.
12586         * infcmd.c (detach_command): Adjust
12587         * infrun.c (follow_fork_inferior): Adjust.
12588         (handle_vfork_child_exec_or_exit): Adjust.
12589         * linux-fork.c (linux_fork_detach): Remove args parameter.
12590         * linux-fork.h (linux_fork_detach): Likewise.
12591         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
12592         * linux-thread-db.c (thread_db_detach): Likewise.
12593         * nto-procfs.c (procfs_detach): Likewise.
12594         * procfs.c (procfs_detach): Likewise.
12595         (do_detach): Remove signo parameter.
12596         * record.c (record_detach): Remove args parameter.
12597         * record.h (record_detach): Likewise.
12598         * remote-sim.c (gdbsim_detach): Likewise.
12599         * remote.c (remote_detach_1): Likewise.
12600         (remote_detach): Likewise.
12601         (extended_remote_detach): Likewise.
12602         * sol-thread.c (sol_thread_detach): Likewise.
12603         * target-delegates.c: Re-generate.
12604         * top.c (struct qt_args) <args>: Remove field.
12605         (kill_or_detach): Don't pass args.
12606         (quit_force): Don't set args.
12607         * windows-nat.c (windows_detach): Remove args parameter.
12608
12609 2018-01-19  Yao Qi  <yao.qi@linaro.org>
12610
12611         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
12612         (arm_linux_init_abi): Install it.
12613
12614 2018-01-19  Yao Qi  <yao.qi@linaro.org>
12615
12616         * osabi.c (gdb_osabi_names): Extend the regexp for
12617         arm-linux-gnueabihf.
12618
12619 2018-01-18  Yao Qi  <yao.qi@linaro.org>
12620
12621         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
12622         m_abbrevs.
12623         (abbrev_table::add_abbrev): Update.
12624         (abbrev_table::lookup_abbrev): Update.
12625
12626 2018-01-18  Yao Qi  <yao.qi@linaro.org>
12627
12628         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
12629
12630 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
12631
12632         * compile/compile.c (compile_to_object): Convert "triplet_rx"
12633         to "std::string".
12634
12635 2018-01-17  Tom Tromey  <tom@tromey.com>
12636
12637         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
12638
12639 2018-01-17  Tom Tromey  <tom@tromey.com>
12640
12641         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
12642         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
12643         (create_array_type_with_stride): Update.
12644         * dwarf2read.c (set_die_type): Update.
12645
12646 2018-01-17  Tom Tromey  <tom@tromey.com>
12647
12648         * dwarf2read.c (delayed_method_info): Remove typedef.
12649         (dwarf2_cu::method_info): Now a std::vector.
12650         (add_to_method_list): Update.
12651         (free_delayed_list): Remove.
12652         (compute_delayed_physnames): Update.
12653         (process_full_comp_unit, process_full_type_unit): Clear the method
12654         list.  Remove cleanups.
12655         (psymtab_include_file_name): Add name_holder parameter.  Use
12656         unique_xmalloc_ptr.
12657         (dwarf_decode_lines): Update.
12658
12659 2018-01-17  Tom Tromey  <tom@tromey.com>
12660             Simon Marchi  <simon.marchi@ericsson.com>
12661
12662         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
12663         (dwarf2_per_objfile::free_cached_comp_units)
12664         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
12665         (init_cutu_and_read_dies_no_follow): Update.
12666         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
12667         (dwarf2_cu::~dwarf2_cu): New.
12668         (free_heap_comp_unit, free_stack_comp_unit): Remove.
12669         (age_cached_comp_units, free_one_cached_comp_unit): Update.
12670
12671 2018-01-17  Tom Tromey  <tom@tromey.com>
12672             Simon Marchi  <simon.marchi@ericsson.com>
12673
12674         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
12675         (struct die_reader_specs) <abbrev_table>: New member.
12676         (struct abbrev_table): Add constructor.
12677         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
12678         <abbrev_obstack>: Now an auto_obstack.
12679         (abbrev_table_up): New typedef.
12680         (init_cu_die_reader): Add abbrev_table parameter.
12681         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
12682         Add result_dwo_abbrev_table.
12683         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
12684         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
12685         Update.
12686         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
12687         parameter.
12688         (skip_children): Update.
12689         (abbrev_table::alloc_abbrev): Rename from
12690         abbrev_table_alloc_abbrev.
12691         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
12692         (abbrev_table::lookup_abbrev): Rename from
12693         abbrev_table_lookup_abbrev.
12694         (abbrev_table_read_table): Return abbrev_table_up.
12695         (abbrev_table_free, abbrev_table_free_cleanup)
12696         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
12697         (load_partial_dies): Update.
12698
12699 2018-01-17  Tom Tromey  <tom@tromey.com>
12700
12701         * dwarf2read.c (dwarf2_compute_name): Update comment.
12702         (read_func_scope, read_variable): Update.
12703         (new_symbol): Remove.
12704         (new_symbol_full): Rename to new_symbol.
12705
12706 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
12707
12708         PR gdb/16577
12709         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
12710         a warning instead of throwing an error, set section size to 0 and return
12711         NULL.
12712         * gdb_bfd.h (gdb_bfd_map_section): Update description.
12713
12714 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
12715
12716         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
12717         std::string.
12718         (linux_ptrace_attach_fail_reason_string): Likewise.
12719         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
12720         Likewise.
12721         (linux_ptrace_attach_fail_reason_string): Likewise.
12722         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
12723
12724 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
12725
12726         * linux-nat.c (linux_nat_attach): Remove xstrdup.
12727
12728 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
12729
12730         PR gdb/21559
12731         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
12732         checking for fs_base/gs_base fields in struct user_regs_struct.
12733         * configure: Regenerate.
12734
12735 2018-01-17  Yao Qi  <yao.qi@linaro.org>
12736
12737         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
12738         function.
12739         (aarch64_linux_init_abi): Install it to gdbarch hook
12740         gcc_target_options.
12741
12742 2018-01-15  Pedro Alves  <palves@redhat.com>
12743
12744         * common/signals-state-save-restore.c
12745         (save_original_signals_state): Fix typos.
12746
12747 2017-01-12  Tom Tromey  <tom@tromey.com>
12748             Sergio Durigan Junior  <sergiodj@redhat.com>
12749
12750         * Makefile.in (install-only): Install gdb-add-index.
12751
12752 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
12753
12754         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
12755
12756 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12757
12758         * infrun.c (keep_going_pass_signal): Clear step-over info when
12759         insert_breakpoints fails.
12760
12761 2018-01-11  Pedro Alves  <palves@redhat.com>
12762
12763         PR gdb/22583
12764         * infrun.c (resume): Rename to ...
12765         (resume_1): ... this.
12766         (resume): Reimplement as wrapper around resume_1.
12767
12768 2018-01-11  Pedro Alves  <palves@redhat.com>
12769
12770         PR remote/22597
12771         * remote.c (remote_parse_stop_reply): Default to the last-set
12772         general thread instead of to 'magic_null_ptid'.
12773
12774 2018-01-10  Pedro Alves  <palves@redhat.com>
12775
12776         * language.h (language_get_symbol_name_matcher): Rename ...
12777         (get_symbol_name_matcher): ... this.
12778         * language.c (language_get_symbol_name_matcher): Ditto.
12779         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
12780         callers adjusted.
12781
12782 2018-01-10  Pedro Alves  <palves@redhat.com>
12783
12784         PR gdb/22670
12785         * dwarf2read.c
12786         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
12787         Adjust to use language_get_symbol_name_matcher instead of
12788         language_defn::la_get_symbol_name_matcher.
12789         * language.c (language_get_symbol_name_matcher): If in Ada mode
12790         and the lookup name is a verbatim match, return Ada's matcher.
12791         * language.h (language_get_symbol_name_matcher): Adjust comment.
12792         (ada_lookup_name_info::verbatim_p):: New method.
12793
12794 2018-01-10  Pedro Alves  <palves@redhat.com>
12795
12796         PR gdb/22670
12797         * ada-lang.c (ada_collect_symbol_completion_matches): If the
12798         minsym's language is language_auto or language_cplus, pass down
12799         language_ada instead.
12800         * symtab.c (compare_symbol_name): Don't frob symbol language here.
12801
12802 2018-01-10  Pedro Alves  <palves@redhat.com>
12803
12804         PR gdb/22670
12805         * minsyms.c (linkage_name_str): New function.
12806         (iterate_over_minimal_symbols): Use it.
12807
12808 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12809
12810         * NEWS: Document that 'info proc' now works on FreeBSD.
12811
12812 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12813
12814         * configure.ac: Check for kinfo_getfile in libutil.
12815         * configure: Regenerate.
12816         * config.in: Regenerate.
12817         * fbsd-nat.c: Include "fbsd-tdep.h".
12818         (fbsd_fetch_cmdline): New.
12819         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
12820         rather than calling error.
12821         (fbsd_info_proc): New.
12822         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
12823         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
12824         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
12825
12826 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12827
12828         * fbsd-nat.c (struct free_deleter): Remove.
12829         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
12830
12831 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12832
12833         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
12834         NULL for an empty pathname.
12835
12836 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12837
12838         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
12839         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
12840         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
12841         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
12842         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
12843         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
12844         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
12845         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
12846         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
12847         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
12848         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
12849         (fbsd_core_fetch_timeval, fbsd_print_sigset)
12850         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
12851         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
12852         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
12853
12854 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
12855
12856         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
12857         (gnu_xfer_auxv): New function.
12858         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
12859         TARGET_OBJECT_AUXV.
12860
12861 2018-01-08  Yao Qi  <yao.qi@linaro.org>
12862             Simon Marchi  <simon.marchi@ericsson.com>
12863
12864         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
12865         common/selftest.c.
12866         (COMMON_OBS): Remove selftest.o.
12867         * configure.ac: Append selftest-arch.c and common/selftest.c to
12868         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
12869         * configure: Re-generated.
12870         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
12871         GDB_SELF_TEST.
12872         (maintenance_info_selftests): Likewise.
12873
12874 2018-01-08  Xavier Roirand  <roirand@adacore.com>
12875
12876         * ada-valprint.c (val_print_packed_array_elements): Use
12877         proper number of elements when printing an array indexed
12878         by an enumeration type.
12879
12880 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12881
12882         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
12883         (dw2_get_file_names_reader): Adjust.
12884         (lookup_dwo_signatured_type): Adjust.
12885         (lookup_dwp_signatured_type): Adjust.
12886         (lookup_signatured_type): Adjust.
12887         (create_type_unit_group): Adjust.
12888         (get_type_unit_group): Adjust.
12889         (process_psymtab_comp_unit_reader): Adjust.
12890         (build_type_psymtabs_reader): Adjust.
12891         (scan_partial_symbols): Adjust.
12892         (add_partial_symbol): Adjust.
12893         (add_partial_subprogram): Adjust.
12894         (peek_die_abbrev): Adjust.
12895         (fixup_go_packaging): Adjust.
12896         (process_imported_unit_die): Adjust.
12897         (dwarf2_compute_name): Adjust.
12898         (dwarf2_physname): Adjust.
12899         (read_import_statement): Adjust.
12900         (handle_DW_AT_stmt_list): Adjust.
12901         (read_file_scope): Adjust.
12902         (read_func_scope): Adjust.
12903         (read_lexical_block_scope): Adjust.
12904         (read_call_site_scope): Adjust.
12905         (read_variable): Adjust.
12906         (dwarf2_rnglists_process): Adjust.
12907         (dwarf2_ranges_process): Adjust.
12908         (dwarf2_ranges_read): Adjust.
12909         (dwarf2_get_pc_bounds): Adjust.
12910         (dwarf2_record_block_ranges): Adjust.
12911         (dwarf2_add_field): Adjust.
12912         (dwarf2_add_member_fn): Adjust.
12913         (read_structure_type): Adjust.
12914         (process_structure_scope): Adjust.
12915         (read_enumeration_type): Adjust.
12916         (read_array_type): Adjust.
12917         (mark_common_block_symbol_computed): Adjust.
12918         (read_common_block): Adjust.
12919         (read_namespace_type): Adjust.
12920         (read_namespace): Adjust.
12921         (read_module_type): Adjust.
12922         (read_tag_pointer_type): Adjust.
12923         (read_tag_ptr_to_member_type): Adjust.
12924         (read_tag_string_type): Adjust.
12925         (read_subroutine_type): Adjust.
12926         (read_typedef): Adjust.
12927         (read_base_type): Adjust.
12928         (attr_to_dynamic_prop): Adjust.
12929         (read_subrange_type): Adjust.
12930         (read_unspecified_type): Adjust.
12931         (dwarf2_read_abbrevs): Adjust.
12932         (load_partial_dies): Adjust.
12933         (read_partial_die): Adjust.
12934         (find_partial_die): Adjust.
12935         (guess_partial_die_structure_name): Adjust.
12936         (fixup_partial_die): Adjust.
12937         (read_attribute_value): Adjust.
12938         (read_addr_index): Adjust.
12939         (read_addr_index_from_leb128): Adjust.
12940         (read_str_index): Adjust.
12941         (dwarf2_string_attr): Adjust.
12942         (get_debug_line_section): Adjust.
12943         (dwarf_decode_line_header): Adjust.
12944         (lnp_state_machine::check_line_address): Adjust.
12945         (dwarf_decode_lines_1): Adjust.
12946         (dwarf_decode_lines): Adjust.
12947         (dwarf2_start_symtab): Adjust.
12948         (var_decode_location): Adjust.
12949         (new_symbol_full): Adjust.
12950         (dwarf2_const_value_data): Adjust.
12951         (dwarf2_const_value_attr): Adjust.
12952         (dwarf2_const_value): Adjust.
12953         (die_type): Adjust.
12954         (die_containing_type): Adjust.
12955         (build_error_marker_type): Adjust.
12956         (lookup_die_type): Adjust.
12957         (guess_full_die_structure_name): Adjust.
12958         (anonymous_struct_prefix): Adjust.
12959         (determine_prefix): Adjust.
12960         (dwarf2_name): Adjust.
12961         (follow_die_ref_or_sig): Adjust.
12962         (follow_die_offset): Adjust.
12963         (follow_die_ref): Adjust.
12964         (follow_die_sig_1): Adjust.
12965         (follow_die_sig): Adjust.
12966         (get_signatured_type): Adjust.
12967         (get_DW_AT_signature_type): Adjust.
12968         (decode_locdesc): Adjust.
12969         (dwarf_decode_macros): Adjust.
12970         (cu_debug_loc_section): Adjust.
12971         (fill_in_loclist_baton): Adjust.
12972         (dwarf2_symbol_mark_computed): Adjust.
12973         (init_one_comp_unit): Don't assign
12974         dwarf2_cu::dwarf2_per_objfile.
12975         (set_die_type): Adjust.
12976
12977 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
12978
12979         * dwarf2read.c (struct mapped_debug_names): Add constructor.
12980         <dwarf2_per_objfile>: New field.
12981         (dwarf2_per_objfile): Remove global.
12982         (get_dwarf2_per_objfile): New function.
12983         (set_dwarf2_per_objfile): New function.
12984         (dwarf2_build_psymtabs_hard): Change objfile parameter to
12985         dwarf2_per_objfile.
12986         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12987         (read_abbrev_offset): Likewise.
12988         (read_indirect_string): Likewise.
12989         (read_indirect_line_string): Likewise.
12990         (read_indirect_string_at_offset): Likewise.
12991         (read_indirect_string_from_dwz): Likewise.
12992         (dwarf2_find_containing_comp_unit): Change objfile parameter to
12993         dwarf2_per_objfile.
12994         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12995         (create_all_comp_units): Change objfile parameter to
12996         dwarf2_per_objfile.
12997         (create_all_type_units): Likewise.
12998         (process_queue): Add dwarf2_per_objfile parameter.
12999         (read_and_check_comp_unit_head): Likewise.
13000         (lookup_dwo_unit_in_dwp): Likewise.
13001         (get_dwp_file): Likewise.
13002         (process_cu_includes): Likewise.
13003         (struct free_dwo_file_cleanup_data): New struct.
13004         (dwarf2_has_info): Use get_dwarf2_per_objfile and
13005         set_dwarf2_per_objfile.
13006         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
13007         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
13008         context, adjust calls.
13009         (dw2_instantiate_symtab): Likewise.
13010         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
13011         (dw2_get_cu): Likewise.
13012         (create_cu_from_index_list): Change objfile parameter to
13013         dwarf2_per_objfile.
13014         (create_cus_from_index_list): Get dwarf2_per_objfile from
13015         context, adjust calls.
13016         (create_cus_from_index): Likewise.
13017         (create_signatured_type_table_from_index): Change objfile
13018         parameter to dwarf2_per_objfile.
13019         (create_signatured_type_table_from_debug_names): Change objfile
13020         parameter to dwarf2_per_objfile.
13021         (create_addrmap_from_index): Likewise.
13022         (create_addrmap_from_aranges): Likewise.
13023         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
13024         (dw2_setup): Remove.
13025         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
13026         context.
13027         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
13028         get_dwarf2_per_objfile.
13029         (dw2_forget_cached_source_info): Likewise.
13030         (dw2_map_symtabs_matching_filename): Likewise.
13031         (struct dw2_symtab_iterator) <index>: Remove.
13032         <dwarf2_per_objfile>: New field.
13033         (dw2_symtab_iter_init): Replace index parameter with
13034         dwarf2_per_objfile.
13035         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
13036         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
13037         (dw2_print_stats): Likewise.
13038         (dw2_dump): Likewise.
13039         (dw2_expand_symtabs_for_function): Likewise.
13040         (dw2_expand_all_symtabs): Likewise.
13041         (dw2_expand_symtabs_with_fullname): Likewise.
13042         (dw2_expand_marked_cus): Replace index and objfile parameters
13043         with dwarf2_per_objfile.
13044         (dw_expand_symtabs_matching_file_matcher): Add
13045         dwarf2_per_objfile parameter and adjust calls.
13046         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
13047         adjust calls.
13048         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
13049         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
13050         adjust calls.
13051         (create_cus_from_debug_names_list): Replace objfile parameter
13052         with dwarf2_per_objfile and adjust calls.
13053         (create_cus_from_debug_names): Likewise.
13054         (dwarf2_read_debug_names): Likewise.
13055         (mapped_debug_names::namei_to_name): Adjust call.
13056         (dw2_debug_names_iterator::next): Likewise.
13057         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
13058         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
13059         (dw2_debug_names_dump): Likewise.
13060         (dw2_debug_names_expand_symtabs_for_function): Likewise.
13061         (dw2_debug_names_expand_symtabs_matching): Likewise.
13062         (dwarf2_initialize_objfile): Likewise.
13063         (dwarf2_build_psymtabs): Likewise.
13064         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
13065         this_cu.
13066         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
13067         (read_and_check_comp_unit_head): Likewise.
13068         (read_abbrev_offset): Likewise.
13069         (create_debug_type_hash_table): Likewise.
13070         (create_debug_types_hash_table): Likewise.
13071         (create_all_type_units): Replace objfile parameter with
13072         dwarf2_per_objfile.
13073         (add_type_unit): Add dwarf2_per_objfile parameter.
13074         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
13075         with dwarf2_per_objfile.
13076         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
13077         (lookup_dwp_signatured_type): Likewise.
13078         (lookup_signatured_type): Likewise.
13079         (read_cutu_die_from_dwo): Likewise.
13080         (init_tu_and_read_dwo_dies): Likewise.
13081         (init_cutu_and_read_dies): Likewise.
13082         (init_cutu_and_read_dies_no_follow): Likewise.
13083         (allocate_type_unit_groups_table): Add objfile parameter.
13084         (create_type_unit_group): Use dwarf2_per_objfile from cu.
13085         (get_type_unit_group): Likewise.
13086         (process_psymtab_comp_unit): Update call.
13087         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
13088         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
13089         (print_tu_stats): Likewise.
13090         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
13091         in void* parameter.
13092         (build_type_psymtabs): Change objfile parameter to
13093         dwarf2_per_objfile.
13094         (process_skeletonless_type_unit): Use dwarf2_per_objfile
13095         passed in void* parameter.
13096         (process_skeletonless_type_units): Change objfile parameter to
13097         dwarf2_per_objfile.
13098         (set_partial_user): Likewise.
13099         (dwarf2_build_psymtabs_hard): Likewise.
13100         (read_comp_units_from_section): Likewise.
13101         (create_all_comp_units): Likewise.
13102         (scan_partial_symbols): Update calls.
13103         (add_partial_symbol): Likewise.
13104         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
13105         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
13106         (process_queue): Add dwarf2_per_objfile parameter.
13107         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
13108         (compute_compunit_symtab_includes): Likewise.
13109         (process_cu_includes): Add dwarf2_per_objfile parameter.
13110         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
13111         (process_full_type_unit): Likewise.
13112         (process_imported_unit_die): Update call.
13113         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
13114         (read_file_scope): Likewise.
13115         (allocate_dwo_file_hash_table): Add objfile parameter.
13116         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
13117         (create_cus_hash_table): Likewise.
13118         (create_dwp_hash_table): Likewise.
13119         (create_dwo_unit_in_dwp_v1): Likewise.
13120         (create_dwp_v2_section): Likewise.
13121         (create_dwo_unit_in_dwp_v2): Likewise.
13122         (lookup_dwo_unit_in_dwp): Likewise.
13123         (try_open_dwop_file): Likewise.
13124         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
13125         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
13126         cleanup to include a reference to dwarf2_per_objfile.
13127         (open_dwp_file): Add dwarf2_per_objfile parameter.
13128         (open_and_init_dwp_file): Likewise.
13129         (get_dwp_file): Likewise.
13130         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
13131         (queue_and_load_all_dwo_tus): Update call.
13132         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
13133         data.
13134         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
13135         (dwarf2_ranges_process): Likewise.
13136         (dwarf2_get_pc_bounds): Likewise.
13137         (mark_common_block_symbol_computed): Likewise.
13138         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
13139         (dwarf2_read_abbrevs): Update call.
13140         (read_partial_die): Use dwarf2_per_objfile from cu.
13141         (find_partial_die): Likewise.
13142         (fixup_partial_die): Likewise.
13143         (read_attribute_value): Likewise.
13144         (read_indirect_string_at_offset_from): Add objfile parameter.
13145         (read_indirect_string_at_offset): Add dwarf2_per_objfile
13146         parameter.
13147         (read_indirect_string_from_dwz): Add objfile parameter.
13148         (read_indirect_string): Add objfile parameter.
13149         (read_addr_index_1): Add dwarf2_per_objfile parameter.
13150         (read_addr_index): Use dwarf2_per_objfile from cu.
13151         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
13152         call dw2_setup.
13153         (read_str_index): Use dwarf2_per_objfile from cu.
13154         (get_debug_line_section): Likewise.
13155         (read_formatted_entries): Add dwarf2_per_objfile parameter.
13156         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
13157         (new_symbol_full): Use dwarf2_per_objfile from cu.
13158         (build_error_marker_type): Likewise.
13159         (lookup_die_type): Likewise.
13160         (determine_prefix): Likewise.
13161         (follow_die_offset): Likewise.
13162         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
13163         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
13164         (dwarf2_fetch_die_type_sect_off): Likewise.
13165         (dwarf2_get_die_type): Likewise.
13166         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
13167         (get_signatured_type): Likewise.
13168         (get_DW_AT_signature_type): Likewise.
13169         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
13170         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
13171         (cu_debug_loc_section): Likewise.
13172         (fill_in_loclist_baton): Likewise.
13173         (dwarf2_symbol_mark_computed): Likewise.
13174         (dwarf2_find_containing_comp_unit): Change objfile parameter to
13175         dwarf2_per_objfile.
13176         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
13177         parameter.
13178         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
13179         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
13180         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
13181         (set_die_type): Use dwarf2_free_objfile from cu.
13182         (get_die_type_at_offset): Likewise.
13183         (dwarf2_per_objfile_free): Don't assign global variable.
13184         (debug_names) <constructor>: Add dwarf2_per_objfile
13185         parameter, update m_debugstrlookup construction.
13186         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
13187         parameter.
13188         <m_dwarf2_per_objfile>: New field.
13189         <lookup>: Use m_dwarf2_per_objfile.
13190         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
13191         (psyms_seen_size): Likewise.
13192         (write_gdbindex): Replace objfile parameter with
13193         dwarf2_per_objfile.
13194         (write_debug_names): Likewise.
13195         (write_psymtabs_to_index): Likewise.
13196         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
13197         calls.
13198
13199 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
13200
13201         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
13202         <dwarf2_per_objfile>: New field.
13203         (struct dwarf2_per_cu_data) <objfile>: Remove.
13204         <dwarf2_per_objfile>: New field.
13205         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
13206         of objfile.
13207         (create_signatured_type_table_from_index): Likewise.
13208         (create_debug_type_hash_table): Likewise.
13209         (fill_in_sig_entry_from_dwo_entry): Likewise.
13210         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
13211         (create_type_unit_group): Assign dwarf2_per_objfile instead of
13212         objfile.
13213         (create_partial_symtab): Access objfile through
13214         dwarf2_per_objfile.
13215         (process_psymtab_comp_unit_reader): Likewise.
13216         (read_comp_units_from_section): Likewise.
13217         (scan_partial_symbols): Likewise.
13218         (add_partial_symbol): Likewise.
13219         (add_partial_subprogram): Likewise.
13220         (peek_die_abbrev): Likewise.
13221         (fixup_go_packaging): Likewise.
13222         (process_full_comp_unit): Likewise.
13223         (process_full_type_unit): Likewise.
13224         (process_imported_unit_die): Likewise.
13225         (dwarf2_compute_name): Likewise.
13226         (dwarf2_physname): Likewise.
13227         (read_import_statement): Likewise.
13228         (create_cus_hash_table): Assign dwarf2_physname instead of
13229         objfile.
13230         (read_func_scope): Access objfile through dwarf2_per_objfile.
13231         (read_lexical_block_scope): Likewise.
13232         (read_call_site_scope): Likewise.
13233         (read_variable): Likewise.
13234         (dwarf2_rnglists_process): Likewise.
13235         (dwarf2_ranges_process): Likewise.
13236         (dwarf2_ranges_read): Likewise.
13237         (dwarf2_record_block_ranges): Likewise.
13238         (dwarf2_add_field): Likewise.
13239         (dwarf2_add_member_fn): Likewise.
13240         (read_structure_type): Likewise.
13241         (process_structure_scope): Likewise.
13242         (read_enumeration_type): Likewise.
13243         (read_array_type): Likewise.
13244         (read_common_block): Likewise.
13245         (read_namespace_type): Likewise.
13246         (read_namespace): Likewise.
13247         (read_module_type): Likewise.
13248         (read_tag_pointer_type): Likewise.
13249         (read_tag_ptr_to_member_type): Likewise.
13250         (read_tag_string_type): Likewise.
13251         (read_subroutine_type): Likewise.
13252         (read_typedef): Likewise.
13253         (read_base_type): Likewise.
13254         (attr_to_dynamic_prop): Likewise.
13255         (read_subrange_type): Likewise.
13256         (read_unspecified_type): Likewise.
13257         (load_partial_dies): Likewise.
13258         (read_partial_die): Likewise.
13259         (find_partial_die): Likewise.
13260         (guess_partial_die_structure_name): Likewise.
13261         (fixup_partial_die): Likewise.
13262         (read_attribute_value): Likewise.
13263         (read_addr_index_from_leb128): Likewise.
13264         (dwarf2_read_addr_index): Likewise.
13265         (dwarf2_string_attr): Likewise.
13266         (lnp_state_machine::check_line_address): Likewise.
13267         (dwarf_decode_lines_1): Likewise.
13268         (dwarf_decode_lines): Likewise.
13269         (dwarf2_start_symtab): Likewise.
13270         (var_decode_location): Likewise.
13271         (new_symbol_full): Likewise.
13272         (dwarf2_const_value_data): Likewise.
13273         (dwarf2_const_value_attr): Likewise.
13274         (dwarf2_const_value): Likewise.
13275         (die_type): Likewise.
13276         (die_containing_type): Likewise.
13277         (lookup_die_type): Likewise.
13278         (guess_full_die_structure_name): Likewise.
13279         (anonymous_struct_prefix): Likewise.
13280         (dwarf2_name): Likewise.
13281         (follow_die_ref_or_sig): Likewise.
13282         (follow_die_offset): Likewise.
13283         (follow_die_ref): Likewise.
13284         (dwarf2_fetch_die_loc_sect_off): Likewise.
13285         (dwarf2_fetch_constant_bytes): Likewise.
13286         (dwarf2_fetch_die_type_sect_off): Likewise.
13287         (dwarf2_get_die_type): Likewise.
13288         (follow_die_sig): Likewise.
13289         (decode_locdesc): Likewise.
13290         (dwarf2_per_cu_objfile): Likewise.
13291         (dwarf2_per_cu_text_offset): Likewise.
13292         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
13293         objfile.
13294         (set_die_type): Access objfile through
13295         dwarf2_per_objfile.
13296
13297 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
13298
13299         * valprint.c (converted_character_d): Remove typedef.
13300         (DEF_VEC_O (converted_character_d)): Remove.
13301         (count_next_character): Use std::vector.
13302         (print_converted_chars_to_obstack): Likewise.
13303         (generic_printstr): Likewise.
13304
13305 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
13306
13307         * xml-support.h (struct gdb_xml_value): Add constructor.
13308         <value>: Change type to unique_xmalloc_ptr.
13309         (gdb_xml_value_s): Remove typedef.
13310         (DEF_VEC_O (gdb_xml_value_s)): Remove.
13311         (gdb_xml_element_start_handler): Change parameter type to
13312         std::vector.
13313         (xml_find_attribute): Likewise.
13314         * xml-support.c (xml_find_attribute): Change parameter type to
13315         std::vector and adjust.
13316         (gdb_xml_values_cleanup): Remove.
13317         (gdb_xml_parser::start_element): Adjust to std::vector.
13318         (xinclude_start_include): Change paraeter type to std::vector
13319         and adjust.
13320         * btrace.c (check_xml_btrace_version): Likewise.
13321         (parse_xml_btrace_block): Likewise.
13322         (parse_xml_btrace_pt_config_cpu): Likewise.
13323         (parse_xml_btrace_pt): Likewise.
13324         (parse_xml_btrace_conf_bts): Likewise.
13325         (parse_xml_btrace_conf_pt): Likewise.
13326         * memory-map.c (memory_map_start_memory): Likewise.
13327         (memory_map_start_property): Likewise.
13328         * osdata.c (osdata_start_osdata): Likewise.
13329         (osdata_start_item): Likewise.
13330         (osdata_start_column): Likewise.
13331         * remote.c (start_thread): Likewise.
13332         * solib-aix.c (library_list_start_library): Likewise.
13333         (library_list_start_list): Likewise.
13334         * solib-svr4.c (library_list_start_library): Likewise.
13335         (svr4_library_list_start_list): Likewise.
13336         * solib-target.c (library_list_start_segment): Likewise.
13337         (library_list_start_section): Likewise.
13338         (library_list_start_library): Likewise.
13339         (library_list_start_list): Likewise.
13340         * tracepoint.c (traceframe_info_start_memory): Likewise.
13341         (traceframe_info_start_tvar): Likewise.
13342         * xml-syscall.c (syscall_start_syscall): Likewise.
13343         * xml-tdesc.c (tdesc_start_target): Likewise.
13344         (tdesc_start_feature): Likewise.
13345         (tdesc_start_reg): Likewise.
13346         (tdesc_start_union): Likewise.
13347         (tdesc_start_struct): Likewise.
13348         (tdesc_start_flags): Likewise.
13349         (tdesc_start_enum): Likewise.
13350         (tdesc_start_field): Likewise.
13351         (tdesc_start_enum_value): Likewise.
13352         (tdesc_start_vector): Likewise.
13353
13354 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
13355
13356         * extension.h (struct xmethod_worker) <clone>: Remove.
13357         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
13358         Remove.
13359         (python_xmethod_worker::clone): Remove.
13360         * valops.c (find_overload_match): Use std::move instead of
13361         clone.
13362
13363 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
13364
13365         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
13366         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
13367         <free_xmethod_worker_data>: Remove.
13368         <get_matching_xmethod_workers>: Chance VEC to std::vector.
13369         <get_xmethod_arg_types>: Remove.
13370         <get_xmethod_result_type>: Remove.
13371         <invoke_xmethod>: Remove.
13372         * extension.c (new_xmethod_worker): Remove.
13373         (clone_xmethod_worker): Remove.
13374         (get_matching_xmethod_workers): Return void, pass std::vector by
13375         pointer.
13376         (get_xmethod_arg_types): Rename to...
13377         (xmethod_worker::get_arg_types): ... this, and adjust.
13378         (get_xmethod_result_type): Rename to...
13379         (xmethod_worker::get_result_type): ... this, and adjust.
13380         (invoke_xmethod): Remove.
13381         (free_xmethod_worker): Remove.
13382         (free_xmethod_worker_vec): Remove.
13383         * extension.h (enum ext_lang_rc): Move here from
13384         extension-priv.h.
13385         (struct xmethod_worker): Add constructor and destructor.
13386         <data>: Remove.
13387         <value>: Remove.
13388         <invoke, clone, do_get_result_type, do_get_arg_types>: New
13389         virtual pure methods.
13390         <get_arg_types, get_result_type>: New methods.
13391         (xmethod_worker_ptr): Remove typedef.
13392         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
13393         (xmethod_worker_vec): Remove typedef.
13394         (xmethod_worker_up): New typedef.
13395         (invoke_xmethod): Remove.
13396         (clone_xmethod_worker): Remove.
13397         (free_xmethod_worker): Remove.
13398         (free_xmethod_worker_vec): Remove.
13399         (get_xmethod_arg_types): Remove.
13400         (get_xmethod_result_type): Remove.
13401         * valops.c (find_method_list): Use std::vector, don't use
13402         intermediate vector.
13403         (value_find_oload_method_list): Use std::vector.
13404         (find_overload_match): Use std::vector.
13405         (find_oload_champ): Use std::vector.
13406         * value.c (value_free): Use operator delete.
13407         (value_of_xmethod): Rename to...
13408         (value_from_xmethod): ... this.  Don't assign
13409         xmethod_worker::value, take rvalue-reference.
13410         (result_type_of_xmethod): Adjust.
13411         (call_xmethod): Adjust.
13412         * value.h: Include extension.h.
13413         (struct xmethod_worker): Don't forward-declare.
13414         (value_of_xmethod): Rename to...
13415         (value_from_xmethod): ... this, take rvalue-reference.
13416         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
13417         (struct python_xmethod_worker): ... this, add constructor and
13418         destructor.
13419         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
13420         (gdbpy_free_xmethod_worker_data): Rename to...
13421         (python_xmethod_worker::~python_xmethod_worker): ... this and
13422         adjust.
13423         (gdbpy_clone_xmethod_worker_data): Rename to...
13424         (python_xmethod_worker::clone): ... this and adjust.
13425         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
13426         temporary vector.
13427         (gdbpy_get_xmethod_arg_types): Rename to...
13428         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
13429         (gdbpy_get_xmethod_result_type): Rename to...
13430         (python_xmethod_worker::do_get_result_type): ... this and
13431         adjust.
13432         (gdbpy_invoke_xmethod): Rename to...
13433         (python_xmethod_worker::invoke): ... this and adjust.
13434         (new_python_xmethod_worker): Rename to...
13435         (python_xmethod_worker::python_xmethod_worker): ... this and
13436         adjust.
13437         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
13438         Remove.
13439         (gdbpy_free_xmethod_worker_data): Remove.
13440         (gdbpy_get_matching_xmethod_workers): Use std::vector.
13441         (gdbpy_get_xmethod_arg_types): Remove.
13442         (gdbpy_get_xmethod_result_type): Remove.
13443         (gdbpy_invoke_xmethod): Remove.
13444         * python/python.c (python_extension_ops): Remove obsolete
13445         callbacks.
13446
13447 2018-01-05  Pedro Alves  <palves@redhat.com>
13448
13449         PR gdb/18653
13450         * common/signals-state-save-restore.c
13451         (save_original_signals_state): New parameter 'quiet'.  Warn if we
13452         find a custom handler preinstalled, instead of internal erroring.
13453         But only warn if !quiet.
13454         * common/signals-state-save-restore.h
13455         (save_original_signals_state): New parameter 'quiet'.
13456         * main.c (captured_main_1): Move save_original_signals_state call
13457         after option handling, and pass QUIET.
13458
13459 2018-01-05  Pedro Alves  <palves@redhat.com>
13460
13461         * spu-tdep.c (spu_catch_start): Pass
13462         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
13463
13464 2018-01-05  Pedro Alves  <palves@redhat.com>
13465
13466         PR gdb/22670
13467         * ada-lang.c (literal_symbol_name_matcher): New function.
13468         (ada_get_symbol_name_matcher): Use it for
13469         symbol_name_match_type::SEARCH_NAME.
13470         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
13471         it down instead of assuming symbol_name_match_type::FULL.
13472         * block.h (block_lookup_symbol): New parameter 'match_type'.
13473         * c-valprint.c (print_unpacked_pointer): Use
13474         lookup_symbol_search_name instead of lookup_symbol.
13475         * compile/compile-object-load.c (get_out_value_type): Pass down
13476         symbol_name_match_type::SEARCH_NAME.
13477         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
13478         symbol_name_match_type::FULL.
13479         * cp-support.c (cp_get_symbol_name_matcher): Handle
13480         symbol_name_match_type::SEARCH_NAME.
13481         * infrun.c (insert_exception_resume_breakpoint): Use
13482         lookup_symbol_search_name.
13483         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
13484         * psymtab.c (maintenance_check_psymtabs): Use
13485         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
13486         * stack.c (print_frame_args): Use lookup_symbol_search_name and
13487         SYMBOL_SEARCH_NAME.
13488         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
13489         if symbol_name_match_type::SEARCH_NAME.
13490         (lookup_symbol_in_language): Pass down
13491         symbol_name_match_type::FULL.
13492         (lookup_symbol_search_name): New.
13493         (lookup_language_this): Pass down
13494         symbol_name_match_type::SEARCH_NAME.
13495         (lookup_symbol_aux, lookup_local_symbol): New parameter
13496         'match_type'.  Pass it down.
13497         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
13498         (lookup_symbol_search_name): New declaration.
13499         (lookup_symbol_in_block): New 'match_type' parameter.
13500
13501 2018-01-05  Pedro Alves  <palves@redhat.com>
13502
13503         PR gdb/22670
13504         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
13505         ada_lookup_symbol.
13506         (ada_lookup_symbol): Reimplement in terms of
13507         ada_lookup_symbol_list, bits factored out from
13508         ada_lookup_encoded_symbol.
13509
13510 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
13511
13512         * ada-exp.y (write_object_renaming): When subscripting an array
13513         using a symbol as the index, pass the block in call to
13514         ada_lookup_encoded_symbol when looking that symbol up.
13515
13516 2018-01-05  Jerome Guitton  <guitton@adacore.com>
13517
13518         * ada-lang.c (ada_array_length): Use ada_index_type instead of
13519         TYPE_INDEX_TYPE.
13520
13521 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
13522
13523         * ada-lang.c (ada_to_fixed_value_create): Add handling of
13524         the case where VALUE_LVAL (val0) is not lval_memory.
13525
13526 2018-01-05  Xavier Roirand  <roirand@adacore.com>
13527
13528         * ada-valprint.c (print_optional_low_bound): Handle
13529         character-indexed array printing like boolean-indexed array
13530         printing.
13531
13532 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
13533
13534         * NEWS: Create a new section for the next release branch.
13535         Rename the section of the current branch, now that it has
13536         been cut.
13537
13538 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
13539
13540         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
13541         * version.in: Bump version to 8.1.50.DATE-git.
13542
13543 2018-01-03  Xavier Roirand  <roirand@adacore.com>
13544
13545         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
13546         Add field.
13547         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
13548         Add field.
13549         (default_exception_support_info) <catch_handlers_sym>: Add field.
13550         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
13551         (ada_exception_name_addr_1): Add "catch handlers" handling.
13552         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
13553         Update all callers.
13554         (create_excep_cond_exprs) <ex>: Add parameter.
13555         (re_set_exception): Update create_excep_cond_exprs call.
13556         (print_it_exception, print_one_exception, print_mention_exception)
13557         (print_recreate_exception): Add "catch handler" handling.
13558         (allocate_location_catch_handlers, re_set_catch_handlers)
13559         (check_status_catch_handlers, print_it_catch_handlers)
13560         (print_one_catch_handlers, print_mention_catch_handlers)
13561         (print_recreate_catch_handlers): New function.
13562         (catch_handlers_breakpoint_ops): New variable.
13563         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
13564         Add parameter.  Add "catch handler" handling.
13565         (ada_exception_sym_name, ada_exception_breakpoint_ops):
13566         Add "catch handler" handling.
13567         (ada_exception_catchpoint_cond_string): Add "catch handler"
13568         handling.
13569         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
13570         call.
13571         (catch_ada_handlers_command): New function.
13572         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
13573         operations structure.
13574         (_initialize_ada_language): Add "catch handlers" command entry.
13575         * NEWS: Document "catch handlers" feature.
13576
13577 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
13578
13579         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
13580         account when creating the array type of the slice.
13581         (ada_value_slice): Likewise.
13582
13583 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
13584
13585         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
13586         New enum value.
13587         (create_array_type_with_stride): Add byte_stride_prop parameter.
13588         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
13589         New parameter.  Update all callers in this file.
13590         (array_type_has_dynamic_stride): New function.
13591         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
13592         of arrays with dynamic byte strides.
13593         * dwarf2read.c (read_array_type): Add support for dynamic
13594         DW_AT_byte_stride attributes.
13595
13596 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
13597
13598         * dwarf2read.c (read_unspecified_type): Treat
13599         DW_TAG_enumeration_type DIEs from Ada units as stubs.
13600
13601 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
13602
13603         Update copyright year range in all GDB files.
13604
13605 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
13606
13607         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
13608         and gdb/testsuite/gdb.base/step-line.c.
13609
13610 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
13611
13612         * copyright.py (main): Dump the contents of
13613         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
13614         even if BY_HAND is empty.
13615
13616 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
13617
13618         * top.c (print_gdb_version): Update Copyright year in version
13619         message.
13620
13621 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
13622
13623         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
13624
13625 For older changes see ChangeLog-2017.
13626 \f
13627 Local Variables:
13628 mode: change-log
13629 left-margin: 8
13630 fill-column: 74
13631 version-control: never
13632 coding: utf-8
13633 End: