Make save_infcall_*_state return unique pointers
[external/binutils.git] / gdb / ChangeLog
1 2018-09-17  Tom Tromey  <tom@tromey.com>
2
3         * infrun.c (save_infcall_suspend_state): Return
4         infcall_suspend_state_up.
5         (save_infcall_control_state): Return infcall_control_state_up.
6         * inferior.h (save_infcall_suspend_state)
7         (save_infcall_control_state): Declare later.  Return unique
8         pointers.
9
10 2018-09-17  Tom Tromey  <tom@tromey.com>
11
12         * infrun.c (struct stop_context): Declare constructor,
13         destructor, "changed" method.
14         (stop_context::stop_context): Rename from save_stop_context.
15         (stop_context::~stop_context): Rename from
16         release_stop_context_cleanup.
17         (normal_stop): Update.
18         (stop_context::changed): Rename from stop_context_changed.  Return
19         bool.
20
21 2018-09-17  Tom Tromey  <tom@tromey.com>
22
23         * inferior.h (struct infcall_suspend_state_deleter): New.
24         (infcall_suspend_state_up): New typedef.
25         (struct infcall_control_state_deleter): New.
26         (infcall_control_state_up): New typedef.
27         (make_cleanup_restore_infcall_suspend_state)
28         (make_cleanup_restore_infcall_control_state): Don't declare.
29         * infcall.c (call_function_by_hand_dummy): Update.
30         * infrun.c (do_restore_infcall_suspend_state_cleanup)
31         (make_cleanup_restore_infcall_suspend_state): Remove.
32         (do_restore_infcall_control_state_cleanup)
33         (make_cleanup_restore_infcall_control_state): Remove.
34
35 2018-09-17  Tom Tromey  <tom@tromey.com>
36
37         * gdbthread.h (struct thread_control_state): Add initializer.
38         (class thread_info) <control>: Remove initializer.
39         * inferior.h (struct inferior_control_state): Add initializer.
40         (class inferior) <control>: Remove initializer.
41         (exit_inferior_1): Update.
42         * infrun.c (struct infcall_control_state): Add constructors.
43         (save_infcall_control_state): Use new.
44         (restore_infcall_control_state, discard_infcall_control_state):
45         Use delete.
46
47 2018-09-17  Tom Tromey  <tom@tromey.com>
48
49         * infrun.c (struct infcall_suspend_state) <registers>: Now a
50         unique_ptr.
51         <siginfo_data>: Now a unique_xmalloc_ptr.
52         (save_infcall_suspend_state, restore_infcall_suspend_state)
53         (discard_infcall_suspend_state)
54         (get_infcall_suspend_state_regcache): Update.
55
56 2018-09-17  Tom Tromey  <tom@tromey.com>
57
58         * gdbthread.h (struct thread_suspend_state): Add initializers.
59         (class thread_info) <suspend>: Remove initializer.
60         * infrun.c (struct infcall_suspend_state): Add initializers.
61         (save_infcall_suspend_state): Use new.
62         (discard_infcall_suspend_state): Use delete.
63
64 2018-09-16  Tom Tromey  <tom@tromey.com>
65
66         * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
67         Remove.
68         * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
69         rvalue reference.  Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
70         (py_varobj_iter_new): Likewise.
71         (py_varobj_get_iterator): Use gdbpy_ref.
72
73 2018-09-16  Tom Tromey  <tom@tromey.com>
74
75         * python/py-threadevent.c (py_get_event_thread): Simplify.
76         * python/py-inferior.c (infpy_thread_from_thread_handle):
77         Return immediately after calling thread_to_thread_object.  Use
78         Py_RETURN_NONE.
79         (thread_to_thread_object): Set the exception on a NULL return.
80
81 2018-09-16  Simon Marchi  <simon.marchi@polymtl.ca>
82
83         * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
84
85 2018-09-16  Tom Tromey  <tom@tromey.com>
86
87         * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
88         Remove.
89
90 2018-09-16  Tom Tromey  <tom@tromey.com>
91
92         * python/python-internal.h (thread_to_thread_object): Change
93         return type.
94         * python/py-inferior.c (thread_to_thread_object): Return a new
95         reference.
96         (infpy_thread_from_thread_handle): Update.
97         * python/py-infthread.c (gdbpy_selected_thread): Update.
98         * python/py-stopevent.c (create_stop_event_object): Update.
99         * python/py-threadevent.c (py_get_event_thread): Return a new
100         reference.
101         (py_get_event_thread): Update.
102         * python/py-event.h (py_get_event_thread): Change return type.
103         * python/py-continueevent.c (create_continue_event_object):
104         Update.
105
106 2018-09-16  Tom Tromey  <tom@tromey.com>
107
108         * python/py-progspace.c (pspy_get_objfiles): Update.
109         * python/python-internal.h (objfile_to_objfile_object): Change
110         return type.
111         * python/py-newobjfileevent.c (create_new_objfile_event_object):
112         Update.
113         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
114         Update.
115         * python/python.c (gdbpy_get_current_objfile): Update.
116         (gdbpy_objfiles): Update.
117         * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
118         Update.
119         (objfile_to_objfile_object): Return a new reference.
120         * python/py-symtab.c (stpy_get_objfile): Update.
121         * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
122         Update.
123
124 2018-09-16  Tom Tromey  <tom@tromey.com>
125
126         * python/py-inferior.c (infpy_get_progspace): Update.
127         * python/python-internal.h (pspace_to_pspace_object): Change
128         return type.
129         * python/py-newobjfileevent.c
130         (create_clear_objfiles_event_object): Update.
131         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
132         Update.
133         * python/python.c (gdbpy_get_current_progspace): Update.
134         (gdbpy_progspaces): Update.
135         * python/py-progspace.c (pspace_to_pspace_object): Return a new
136         reference.
137         * python/py-objfile.c (objfpy_get_progspace): Update.
138         * python/py-prettyprint.c (find_pretty_printer_from_progspace):
139         Update.
140
141 2018-09-16  Tom Tromey  <tom@tromey.com>
142
143         * python/lib/gdb/__init__.py (current_progspace, objfiles)
144         (solib_name, block_for_pc, find_pc_line): New functions.
145         (execute_unwinders): Update.
146         * python/py-block.c (gdbpy_block_for_pc): Remove.
147         * python/py-inferior.c (infpy_get_progspace): New function.
148         (inferior_object_getset) <progspace>: Add.
149         * python/py-progspace.c (pspy_objfiles): Rewrite.
150         (pspy_solib_name, pspy_block_for_pc)
151         (pspy_find_pc_line, pspy_is_valid): New functions.
152         (progspace_object_methods): Add entries for solib_name,
153         block_for_pc, find_pc_line, is_valid.
154         * python/python-internal.h (gdbpy_block_for_pc)
155         (build_objfiles_list): Don't declare.
156         * python/python.c: Don't include solib.h.
157         (gdbpy_solib_name, gdbpy_find_pc_line)
158         (gdbpy_get_current_progspace, build_objfiles_list)
159         (gdbpy_objfiles): Remove.
160         (GdbMethods) <current_progspace, objfiles, block_for_pc,
161         solib_name, find_pc_line>: Remove entries.
162
163 2018-09-16  Tom Tromey  <tom@tromey.com>
164
165         * top.c (new_ui_command): Use GNU style for metasyntactic
166         variables.
167         * breakpoint.c (stopat_command): Use GNU style for metasyntactic
168         variables.
169         * maint.c (maintenance_translate_address): Remove "<>" around
170         text.
171         * interps.c (interpreter_exec_cmd): Use GNU style for
172         metasyntactic variables.
173         * nto-procfs.c (nto_procfs_target_info): Use GNU style for
174         metasyntactic variables.
175         * tracepoint.c (tfind_range_command): Use GNU style for
176         metasyntactic variables.
177         (tfind_outside_command): Likewise.
178         (_initialize_tracepoint): Likewise.
179         * remote.c (extended_remote_target::create_inferior): Use GNU
180         style for metasyntactic variables.
181         * sparc64-tdep.c (adi_examine_command): Use GNU style for
182         metasyntactic variables.
183         (adi_assign_command): Likewise.
184
185 2018-09-16  Tom Tromey  <tom@tromey.com>
186
187         * disasm.c (show_disassembler_options_sfunc): Use GNU style for
188         metasyntactic variables.  Print message if no disassembler options
189         are available.
190
191 2018-09-15  Tom Tromey  <tom@tromey.com>
192
193         * infcmd.c (get_inferior_args): Return const char *.
194         * inferior.h (get_inferior_args): Return type now const.
195         * linux-tdep.c (linux_fill_prpsinfo): Update.
196         * procfs.c (procfs_target::make_corefile_notes): Update.
197
198 2018-09-07  Tom Tromey  <tom@tromey.com>
199
200         * python/python.c (execute_gdb_command): Call bpstat_do_actions
201         inside the TRY.
202
203 2018-09-14  Sandra Loosemore  <sandra@codesourcery.com>
204
205         * nios2-tdep.c (nios2_type_align): New.
206         (nios2_gdb_arch_init): Install type_align hook.
207
208 2018-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
209
210         * eval.c (fake_method::fake_method): Call xzalloc directly for a
211         type that is neither object file owned, nor gdbarch owned.
212         * gdbtypes.c (get_type_gdbarch): Add an assert that returned
213         gdbarch is non-NULL.
214         (alloc_type_instance): Allocate non-objfile owned types on the
215         gdbarch obstack.
216         (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
217         using TYPE_ALLOC to ensure memory is allocated on the correct
218         obstack.
219         * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
220         obstack, or the gdbarch obstack.
221         (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
222
223 2018-09-14  Tom Tromey  <tom@tromey.com>
224
225         * infcall.c (call_function_by_hand_dummy): Remove unnecessary
226         block.
227
228 2018-09-14  Tom Tromey  <tom@tromey.com>
229
230         * nat/fork-inferior.c (get_startup_shell): Remove "static".
231
232 2018-09-13  Tom Tromey  <tom@tromey.com>
233
234         * python/py-inferior.c (infpy_thread_from_thread_handle): Now
235         static.
236
237 2018-09-13  Tom Tromey  <tom@tromey.com>
238
239         * exec.c (try_open_exec_file): Use std::string.
240
241 2018-09-13  Tom Tromey  <tom@tromey.com>
242
243         * utils.h (gdb_bfd_errmsg): Return std::string.
244         * exec.c (exec_file_attach): Update.
245         * compile/compile-object-load.c (compile_object_load): Update.
246         * utils.c (gdb_bfd_errmsg): Return std::string.
247
248 2018-09-13  Tom Tromey  <tom@tromey.com>
249
250         * procfs.c (struct procinfo_deleter): New.
251         (procinfo_up): New typedef.
252         (do_destroy_procinfo_cleanup): Remove.
253         (procfs_target::info_proc): Use procinfo_up.  Remove cleanups.
254
255 2018-09-13  Tom Tromey  <tom@tromey.com>
256
257         * source.c (add_path): Use gdb::unique_xmalloc_ptr.
258
259 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
260 2018-09-13  Tom Tromey  <tom@tromey.com>
261
262         * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
263         (pspy_get_objfiles): New function.
264         (progspace_object_methods): New.
265         (pspace_object_type): Add tp_methods callback.
266         * python/python-internal.h (build_objfiles_list): New
267         declaration.
268         * python/python.c (build_objfiles_list): New function.
269         (gdbpy_objfiles): Implement using build_objfiles_list.
270         * NEWS: Mention the Progspace.objfiles method.
271
272 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
273
274         * python/py-inferior.c (infpy_get_progspace): New function.
275         (inferior_object_getset): Add progspace property.
276         * NEWS: Mention the new property.
277
278 2018-09-13  Tom Tromey  <tom@tromey.com>
279
280         PR rust/23650:
281         * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
282
283 2018-09-13  Tom Tromey  <tom@tromey.com>
284
285         PR rust/23626:
286         * rust-lang.c (rust_enum_variant): Now static.
287         (rust_empty_enum_p): New function.
288         (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
289         Handle empty enum.
290
291 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
292
293         * python/py-inferior.c (infpy_repr): New.
294         (inferior_object_type): Register infpy_repr.
295         * python/py-objfile.c (objfpy_repr): New.
296         (objfile_object_type): Register objfpy_repr.
297
298 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
299
300         * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
301
302 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
303
304         * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
305         typo.
306
307 2018-09-12  Sergio Durigan Junior  <sergiodj@redhat.com>
308
309         * common/common-utils.c: Don't include '<sys/stat.h>'.
310         (is_regular_file): Move to...
311         * common/filestuff.c (is_regular_file): ... here.
312         * common/common-utils.h (is_regular_file): Move to...
313         * common/filestuff.h (is_regular_file): ... here.
314
315 2018-09-12  Simon Marchi  <simon.marchi@ericsson.com>
316
317         * skip.c (debug_skip): New variable.
318         (skiplist_entry::do_skip_file_p): Add debug output.
319         (skiplist_entry::do_skip_gfile_p): Likewise.
320         (skiplist_entry::skip_function_p): Likewise.
321         (_initialize_step_skip): Create debug command.
322         * NEWS: Mention set/show debug skip.
323
324 2018-09-11  Xavier Roirand  <roirand@adacore.com>
325
326         * darwin-nat.c (should_disable_startup_with_shell):
327         New function.
328         (darwin_nat_target::create_inferior): Add call.
329
330 2018-09-11  Xavier Roirand  <roirand@adacore.com>
331
332         * darwin-nat.h (struct darwin_thread_info) <gdb_port,
333         inf_port, msg_state>: Initialize.
334         (struct darwin_thread_info) <signaled, single_step>: Change
335         type and initialize.
336         (struct darwin_thread_info) <event>: Initialize.
337
338 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
339
340         PR gdb/23555
341         PR gdb/23558
342         * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
343         guesses.
344
345 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
346
347         Revert:
348         2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
349
350         PR gdb/23555
351         PR gdb/23558
352         * gnulib/aclocal.m4: Regenerate.
353         * gnulib/config.in: Regenerate.
354         * gnulib/configure: Regenerate.
355         * gnulib/import/Makefile.am: Update.
356         * gnulib/import/Makefile.in: Update.
357         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
358         * gnulib/import/_Noreturn.h: ... this.
359         * gnulib/import/alloca.in.h: Update.
360         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
361         * gnulib/import/arg-nonnull.h: ... this.
362         * gnulib/import/assure.h: Update.
363         * gnulib/import/at-func.c: Update.
364         * gnulib/import/basename-lgpl.c: Update.
365         * gnulib/import/extra/snippet/c++defs.h: Rename to...
366         * gnulib/import/c++defs.h: ... this.
367         * gnulib/import/canonicalize-lgpl.c: Update.
368         * gnulib/import/cdefs.h: Update.
369         * gnulib/import/chdir-long.c: Update.
370         * gnulib/import/chdir-long.h: Update.
371         * gnulib/import/cloexec.c: Update.
372         * gnulib/import/cloexec.h: Update.
373         * gnulib/import/close.c: Update.
374         * gnulib/import/closedir.c: Update.
375         * gnulib/import/config.charset: Update.
376         * gnulib/import/dirent-private.h: Update.
377         * gnulib/import/dirent.in.h: Update.
378         * gnulib/import/dirfd.c: Update.
379         * gnulib/import/dirname-lgpl.c: Update.
380         * gnulib/import/dirname.h: Update.
381         * gnulib/import/dosname.h: Update.
382         * gnulib/import/dup-safer-flag.c: Update.
383         * gnulib/import/dup-safer.c: Update.
384         * gnulib/import/dup.c: Update.
385         * gnulib/import/dup2.c: Update.
386         * gnulib/import/errno.in.h: Update.
387         * gnulib/import/error.c: Update.
388         * gnulib/import/error.h: Update.
389         * gnulib/import/exitfail.c: Update.
390         * gnulib/import/exitfail.h: Update.
391         * gnulib/import/extra/update-copyright: Update.
392         * gnulib/import/fchdir.c: Update.
393         * gnulib/import/fcntl.c: Update.
394         * gnulib/import/fcntl.in.h: Update.
395         * gnulib/import/fd-hook.c: Update.
396         * gnulib/import/fd-hook.h: Update.
397         * gnulib/import/fd-safer-flag.c: Update.
398         * gnulib/import/fd-safer.c: Update.
399         * gnulib/import/fdopendir.c: Update.
400         * gnulib/import/filename.h: Update.
401         * gnulib/import/filenamecat-lgpl.c: Update.
402         * gnulib/import/filenamecat.h: Update.
403         * gnulib/import/flexmember.h: Update.
404         * gnulib/import/float+.h: Update.
405         * gnulib/import/float.c: Update.
406         * gnulib/import/float.in.h: Update.
407         * gnulib/import/fnmatch.c: Update.
408         * gnulib/import/fnmatch.in.h: Update.
409         * gnulib/import/fnmatch_loop.c: Update.
410         * gnulib/import/fpucw.h: Update.
411         * gnulib/import/frexp.c: Update.
412         * gnulib/import/frexpl.c: Update.
413         * gnulib/import/fstat.c: Update.
414         * gnulib/import/fstatat.c: Update.
415         * gnulib/import/getcwd-lgpl.c: Update.
416         * gnulib/import/getcwd.c: Update.
417         * gnulib/import/getdtablesize.c: Update.
418         * gnulib/import/getlogin_r.c: Update.
419         * gnulib/import/getprogname.c: Update.
420         * gnulib/import/getprogname.h: Update.
421         * gnulib/import/gettext.h: Update.
422         * gnulib/import/gettimeofday.c: Update.
423         * gnulib/import/glob-libc.h: Update.
424         * gnulib/import/glob.c: Update.
425         * gnulib/import/glob.in.h: Update.
426         * gnulib/import/glob_internal.h: Update.
427         * gnulib/import/glob_pattern_p.c: Update.
428         * gnulib/import/globfree.c: Update.
429         * gnulib/import/hard-locale.c: Update.
430         * gnulib/import/hard-locale.h: Update.
431         * gnulib/import/intprops.h: Update.
432         * gnulib/import/inttypes.in.h: Update.
433         * gnulib/import/isnan.c: Update.
434         * gnulib/import/isnand-nolibm.h: Update.
435         * gnulib/import/isnand.c: Update.
436         * gnulib/import/isnanl-nolibm.h: Update.
437         * gnulib/import/isnanl.c: Update.
438         * gnulib/import/itold.c: Update.
439         * gnulib/import/libc-config.h: Update.
440         * gnulib/import/limits.in.h: Update.
441         * gnulib/import/localcharset.c: Update.
442         * gnulib/import/localcharset.h: Update.
443         * gnulib/import/localtime-buffer.c: Update.
444         * gnulib/import/localtime-buffer.h: Update.
445         * gnulib/import/lstat.c: Update.
446         * gnulib/import/m4/00gnulib.m4: Update.
447         * gnulib/import/m4/__inline.m4: Update.
448         * gnulib/import/m4/absolute-header.m4: Update.
449         * gnulib/import/m4/alloca.m4: Update.
450         * gnulib/import/m4/builtin-expect.m4: Update.
451         * gnulib/import/m4/canonicalize.m4: Update.
452         * gnulib/import/m4/chdir-long.m4: Update.
453         * gnulib/import/m4/close.m4: Update.
454         * gnulib/import/m4/closedir.m4: Update.
455         * gnulib/import/m4/configmake.m4: Update.
456         * gnulib/import/m4/d-ino.m4: Update.
457         * gnulib/import/m4/d-type.m4: Update.
458         * gnulib/import/m4/dirent_h.m4: Update.
459         * gnulib/import/m4/dirfd.m4: Update.
460         * gnulib/import/m4/dirname.m4: Update.
461         * gnulib/import/m4/double-slash-root.m4: Update.
462         * gnulib/import/m4/dup.m4: Update.
463         * gnulib/import/m4/dup2.m4: Update.
464         * gnulib/import/m4/eealloc.m4: Update.
465         * gnulib/import/m4/environ.m4: Update.
466         * gnulib/import/m4/errno_h.m4: Update.
467         * gnulib/import/m4/error.m4: Update.
468         * gnulib/import/m4/exponentd.m4: Update.
469         * gnulib/import/m4/exponentl.m4: Update.
470         * gnulib/import/m4/extensions.m4: Update.
471         * gnulib/import/m4/extern-inline.m4: Update.
472         * gnulib/import/m4/fchdir.m4: Update.
473         * gnulib/import/m4/fcntl-o.m4: Update.
474         * gnulib/import/m4/fcntl.m4: Update.
475         * gnulib/import/m4/fcntl_h.m4: Update.
476         * gnulib/import/m4/fdopendir.m4: Update.
477         * gnulib/import/m4/filenamecat.m4: Update.
478         * gnulib/import/m4/flexmember.m4: Update.
479         * gnulib/import/m4/float_h.m4: Update.
480         * gnulib/import/m4/fnmatch.m4: Update.
481         * gnulib/import/m4/fnmatch_h.m4: Update.
482         * gnulib/import/m4/fpieee.m4: Update.
483         * gnulib/import/m4/frexp.m4: Update.
484         * gnulib/import/m4/frexpl.m4: Update.
485         * gnulib/import/m4/fstat.m4: Update.
486         * gnulib/import/m4/fstatat.m4: Update.
487         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
488         * gnulib/import/m4/getcwd-path-max.m4: Update.
489         * gnulib/import/m4/getcwd.m4: Update.
490         * gnulib/import/m4/getdtablesize.m4: Update.
491         * gnulib/import/m4/getlogin.m4: Update.
492         * gnulib/import/m4/getlogin_r.m4: Update.
493         * gnulib/import/m4/getpagesize.m4: Update.
494         * gnulib/import/m4/getprogname.m4: Update.
495         * gnulib/import/m4/gettimeofday.m4: Update.
496         * gnulib/import/m4/glibc21.m4: Update.
497         * gnulib/import/m4/glob.m4: Update.
498         * gnulib/import/m4/glob_h.m4: Update.
499         * gnulib/import/m4/gnulib-cache.m4: Update.
500         * gnulib/import/m4/gnulib-common.m4: Update.
501         * gnulib/import/m4/gnulib-comp.m4: Update.
502         * gnulib/import/m4/gnulib-tool.m4: Update.
503         * gnulib/import/m4/hard-locale.m4: Update.
504         * gnulib/import/m4/include_next.m4: Update.
505         * gnulib/import/m4/inttypes-pri.m4: Update.
506         * gnulib/import/m4/inttypes.m4: Update.
507         * gnulib/import/m4/isnand.m4: Update.
508         * gnulib/import/m4/isnanl.m4: Update.
509         * gnulib/import/m4/largefile.m4: Update.
510         * gnulib/import/m4/limits-h.m4: Update.
511         * gnulib/import/m4/localcharset.m4: Update.
512         * gnulib/import/m4/locale-fr.m4: Update.
513         * gnulib/import/m4/locale-ja.m4: Update.
514         * gnulib/import/m4/locale-zh.m4: Update.
515         * gnulib/import/m4/localtime-buffer.m4: Update.
516         * gnulib/import/m4/longlong.m4: Update.
517         * gnulib/import/m4/lstat.m4: Update.
518         * gnulib/import/m4/malloc.m4: Update.
519         * gnulib/import/m4/malloca.m4: Update.
520         * gnulib/import/m4/math_h.m4: Update.
521         * gnulib/import/m4/mbrtowc.m4: Update.
522         * gnulib/import/m4/mbsinit.m4: Update.
523         * gnulib/import/m4/mbsrtowcs.m4: Update.
524         * gnulib/import/m4/mbstate_t.m4: Update.
525         * gnulib/import/m4/memchr.m4: Update.
526         * gnulib/import/m4/memmem.m4: Update.
527         * gnulib/import/m4/mempcpy.m4: Update.
528         * gnulib/import/m4/memrchr.m4: Update.
529         * gnulib/import/m4/mkdir.m4: Update.
530         * gnulib/import/m4/mkstemp.m4: Update.
531         * gnulib/import/m4/mmap-anon.m4: Update.
532         * gnulib/import/m4/mode_t.m4: Update.
533         * gnulib/import/m4/msvc-inval.m4: Update.
534         * gnulib/import/m4/msvc-nothrow.m4: Update.
535         * gnulib/import/m4/multiarch.m4: Update.
536         * gnulib/import/m4/nocrash.m4: Update.
537         * gnulib/import/m4/off_t.m4: Update.
538         * gnulib/import/m4/onceonly.m4: Update.
539         * gnulib/import/m4/open-cloexec.m4: Update.
540         * gnulib/import/m4/open.m4: Update.
541         * gnulib/import/m4/openat.m4: Update.
542         * gnulib/import/m4/opendir.m4: Update.
543         * gnulib/import/m4/pathmax.m4: Update.
544         * gnulib/import/m4/rawmemchr.m4: Update.
545         * gnulib/import/m4/readdir.m4: Update.
546         * gnulib/import/m4/readlink.m4: Update.
547         * gnulib/import/m4/realloc.m4: Update.
548         * gnulib/import/m4/rename.m4: Update.
549         * gnulib/import/m4/rewinddir.m4: Update.
550         * gnulib/import/m4/rmdir.m4: Update.
551         * gnulib/import/m4/save-cwd.m4: Update.
552         * gnulib/import/m4/secure_getenv.m4: Update.
553         * gnulib/import/m4/setenv.m4: Update.
554         * gnulib/import/m4/signal_h.m4: Update.
555         * gnulib/import/m4/ssize_t.m4: Update.
556         * gnulib/import/m4/stat-time.m4: Update.
557         * gnulib/import/m4/stat.m4: Update.
558         * gnulib/import/m4/std-gnu11.m4: Update.
559         * gnulib/import/m4/stdbool.m4: Update.
560         * gnulib/import/m4/stddef_h.m4: Update.
561         * gnulib/import/m4/stdint.m4: Update.
562         * gnulib/import/m4/stdio_h.m4: Update.
563         * gnulib/import/m4/stdlib_h.m4: Update.
564         * gnulib/import/m4/strchrnul.m4: Update.
565         * gnulib/import/m4/strdup.m4: Update.
566         * gnulib/import/m4/strerror.m4: Update.
567         * gnulib/import/m4/string_h.m4: Update.
568         * gnulib/import/m4/strstr.m4: Update.
569         * gnulib/import/m4/strtok_r.m4: Update.
570         * gnulib/import/m4/sys_socket_h.m4: Update.
571         * gnulib/import/m4/sys_stat_h.m4: Update.
572         * gnulib/import/m4/sys_time_h.m4: Update.
573         * gnulib/import/m4/sys_types_h.m4: Update.
574         * gnulib/import/m4/tempname.m4: Update.
575         * gnulib/import/m4/time_h.m4: Update.
576         * gnulib/import/m4/unistd-safer.m4: Update.
577         * gnulib/import/m4/unistd_h.m4: Update.
578         * gnulib/import/m4/warn-on-use.m4: Update.
579         * gnulib/import/m4/wchar_h.m4: Update.
580         * gnulib/import/m4/wchar_t.m4: Update.
581         * gnulib/import/m4/wctype_h.m4: Update.
582         * gnulib/import/m4/wint_t.m4: Update.
583         * gnulib/import/malloc.c: Update.
584         * gnulib/import/malloc/scratch_buffer.h: Update.
585         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
586         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
587         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
588         * gnulib/import/malloca.c: Update.
589         * gnulib/import/malloca.h: Update.
590         * gnulib/import/malloca.valgrind: Update.
591         * gnulib/import/math.in.h: Update.
592         * gnulib/import/mbrtowc.c: Update.
593         * gnulib/import/mbsinit.c: Update.
594         * gnulib/import/mbsrtowcs-impl.h: Update.
595         * gnulib/import/mbsrtowcs-state.c: Update.
596         * gnulib/import/mbsrtowcs.c: Update.
597         * gnulib/import/memchr.c: Update.
598         * gnulib/import/memmem.c: Update.
599         * gnulib/import/mempcpy.c: Update.
600         * gnulib/import/memrchr.c: Update.
601         * gnulib/import/mkdir.c: Update.
602         * gnulib/import/mkstemp.c: Update.
603         * gnulib/import/msvc-inval.c: Update.
604         * gnulib/import/msvc-inval.h: Update.
605         * gnulib/import/msvc-nothrow.c: Update.
606         * gnulib/import/msvc-nothrow.h: Update.
607         * gnulib/import/open.c: Update.
608         * gnulib/import/openat-die.c: Update.
609         * gnulib/import/openat-priv.h: Update.
610         * gnulib/import/openat-proc.c: Update.
611         * gnulib/import/openat.c: Update.
612         * gnulib/import/openat.h: Update.
613         * gnulib/import/opendir.c: Update.
614         * gnulib/import/pathmax.h: Update.
615         * gnulib/import/pipe-safer.c: Update.
616         * gnulib/import/rawmemchr.c: Update.
617         * gnulib/import/readdir.c: Update.
618         * gnulib/import/readlink.c: Update.
619         * gnulib/import/realloc.c: Update.
620         * gnulib/import/ref-add.sin: Update.
621         * gnulib/import/ref-del.sin: Update.
622         * gnulib/import/rename.c: Update.
623         * gnulib/import/rewinddir.c: Update.
624         * gnulib/import/rmdir.c: Update.
625         * gnulib/import/same-inode.h: Update.
626         * gnulib/import/save-cwd.c: Update.
627         * gnulib/import/save-cwd.h: Update.
628         * gnulib/import/scratch_buffer.h: Update.
629         * gnulib/import/secure_getenv.c: Update.
630         * gnulib/import/setenv.c: Update.
631         * gnulib/import/signal.in.h: Update.
632         * gnulib/import/stat-time.c: Update.
633         * gnulib/import/stat-time.h: Update.
634         * gnulib/import/stat-w32.c: Update.
635         * gnulib/import/stat-w32.h: Update.
636         * gnulib/import/stat.c: Update.
637         * gnulib/import/stdbool.in.h: Update.
638         * gnulib/import/stddef.in.h: Update.
639         * gnulib/import/stdint.in.h: Update.
640         * gnulib/import/stdio.in.h: Update.
641         * gnulib/import/stdlib.in.h: Update.
642         * gnulib/import/str-two-way.h: Update.
643         * gnulib/import/strchrnul.c: Update.
644         * gnulib/import/strdup.c: Update.
645         * gnulib/import/streq.h: Update.
646         * gnulib/import/strerror-override.c: Update.
647         * gnulib/import/strerror-override.h: Update.
648         * gnulib/import/strerror.c: Update.
649         * gnulib/import/string.in.h: Update.
650         * gnulib/import/stripslash.c: Update.
651         * gnulib/import/strnlen1.c: Update.
652         * gnulib/import/strnlen1.h: Update.
653         * gnulib/import/strstr.c: Update.
654         * gnulib/import/strtok_r.c: Update.
655         * gnulib/import/sys_stat.in.h: Update.
656         * gnulib/import/sys_time.in.h: Update.
657         * gnulib/import/sys_types.in.h: Update.
658         * gnulib/import/tempname.c: Update.
659         * gnulib/import/tempname.h: Update.
660         * gnulib/import/time.in.h: Update.
661         * gnulib/import/unistd--.h: Update.
662         * gnulib/import/unistd-safer.h: Update.
663         * gnulib/import/unistd.in.h: Update.
664         * gnulib/import/unsetenv.c: Update.
665         * gnulib/import/verify.h: Update.
666         * gnulib/import/extra/snippet/warn-on-use.h: Update.
667         * gnulib/import/wchar.in.h: Update.
668         * gnulib/import/wctype.in.h: Update.
669         * gnulib/import/xalloc-oversized.h: Update.
670         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
671         "53e2c179f26a890fa6685af4b6c1397ee370433b".
672
673 2018-09-10  Simon Marchi  <simon.marchi@ericsson.com>
674
675         * record-btrace.c (get_thread_current_frame): Remove
676         old_inferior_ptid.
677
678 2018-09-10  Jerome Guitton  <guitton@adacore.com>
679
680         * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
681         with check_tag to 1 if and only if the type is tagged and the
682         component being searched cannot been found in the current
683         view. Otherwise, always call ada_to_fixed_type with
684         check_tag to 0.
685
686 2018-09-10  Xavier Roirand  <roirand@adacore.com>
687
688         * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
689         declaration.
690         * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
691         * ada-varobj.c (ada_varobj_get_number_of_children,
692         ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
693
694 2018-09-10  Xavier Roirand  <roirand@adacore.com>
695
696         * ada-valprint.c (ada_value_print): Use type instead of
697         enclosing type.
698
699 2018-09-10  Xavier Roirand  <roirand@adacore.com>
700
701         * ada-lang.c (ada_value_subscript): Handle case when parameter is
702         an array of access to unconstrained array.
703
704 2018-09-10  Xavier Roirand  <roirand@adacore.com>
705
706         * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
707         (ada_check_typedef): Use it.
708
709 2018-09-10  Xavier Roirand  <roirand@adacore.com>
710
711         * ada-varobj.c (ada_varobj_describe_struct_child)
712         (ada_varobj_describe_child): Handle union case like struct one.
713
714 2018-09-10  Tom Tromey  <tom@tromey.com>
715
716         PR python/18380:
717         * python/python.c (_initialize_python): Make example in "python"
718         help work in Python 3.
719
720 2018-09-10  Eli Zaretskii  <eliz@gnu.org>
721
722         * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
723         INSTALL_PROGRAM to install gdb-add-index.sh.  Don't append
724         $(EXEEXT) to the script, as it is not a program.
725
726 2018-09-09  Simon Marchi  <simon.marchi@ericsson.com>
727
728         * python/py-prettyprint.c (pretty_print_one_value): Return
729         gdbpy_ref<>.
730         (print_string_repr): Adjust.
731         (apply_varobj_pretty_printer): Return gdbpy_ref<>.
732         * python/python-internal.h (apply_varobj_pretty_printer): Return
733         gdbpy_ref<>.
734         * varobj.c (varobj_value_get_print_value): Adjust.
735
736 2018-09-08  Tom Tromey  <tom@tromey.com>
737
738         PR python/16047:
739         * python/py-prettyprint.c (pretty_print_one_value): Check for
740         to_string method.
741
742 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
743
744         * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
745         replace_operator_with_call.
746
747 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
748
749         * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
750
751 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
752
753         * ada-typeprint.c (print_range): Print the bounds using TYPE
754         rather than its TYPE_TARGET_TYPE.
755
756 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
757
758         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
759         call to ada_to_fixed_value_create.
760
761 2018-09-08  Jerome Guitton  <guitton@adacore.com>
762
763         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
764
765 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
766
767         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
768         by calls to error.
769
770 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
771
772         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
773         Move update of loop variable "fi".
774
775 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
776
777         * ada-lang.c (value_assign_to_component): In the case of
778         big-endian targets, extract the bits of the given VAL
779         using an src_offset of zero if container is not a scalar.
780
781 2018-09-06  Simon Ser  <contact@emersion.fr>
782
783         PR gdb/23105
784         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
785         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
786         * fbsd-tdep.c (fbsd_make_note_desc): New.
787         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
788         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
789         * target.h (enum target_object) Add FreeBSD-specific
790         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
791
792 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
793
794         * compile/compile-c.h (generate_c_for_variable_locations):
795         Change reference to pointer.
796         * compile/compile-c-support.c (compile_program) <compute>:
797         Likewise.
798         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
799         (generate_c_for_for_one_variable): Likewise
800         (generate_c_for_variable_locations): Likewise
801         * compile/compile-c-types.c (compile_c_instance::convert_type):
802         Likewise
803         * compile/compile-cplus-symbols.c (convert_one_symbol):
804         std::move the scope passed to enter_scope.
805         * compile/compile-cplus-types.c
806         (compile_cplus_instance::enter_scope): Make parameter
807         rvalue-reference.
808         (compile_cplus_instance::new_scope): Change reference to
809         pointer.
810         (compile_cplus_instance::convert_type): Likewise
811         (compile_cplus_convert_typedef): std::move the scope passed to
812         enter_scope.
813         (compile_cplus_convert_struct_or_union): Likewise.
814         (compile_cplus_convert_enum): Likewise.
815         (compile_cplus_convert_namespace): Likewise.
816         * compile/compile-cplus.h (compile_cplus_instance)
817         <enter_scope>: Make parameter rvalue-reference.
818         * compile/compile-internal.h (compile_instance)
819         <get_cached_type>: Likewise
820         * compile/compile-loc2c.c (push): Likewise
821         (pushf): Likewise
822         (unary): Likewise
823         (binary): Likewise
824         (print_label): Likewise
825         (pushf_register_address): Likewise
826         (pushf_register): Likewise
827         (do_compile_dwarf_expr_to_c): Likewise
828         (compile_dwarf_expr_to_c): Likewise
829         (compile_dwarf_bounds_to_c): Likewise
830         * compile/compile.c (compile_instance::get_cached_type):
831         Likewise
832         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
833         (compile_dwarf_bounds_to_c): Likewise
834         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
835         (dwarf2_compile_property_to_c): Likewise
836         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
837         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
838         Likewise
839
840 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
841
842         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
843         * tui/tui-data.c (init_content_element): Don't initialize it.
844
845 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
846
847         * tui/tui-data.h (struct tui_win_info)
848         <detail::opaque>: Remove.
849         * tui/tui-data.c (init_win_info): Remove assignment.
850
851 2018-09-05  Tom Tromey  <tom@tromey.com>
852
853         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
854         -Wformat-nonliteral.
855         * target-float.c (host_float_ops<T>::to_string)
856         (host_float_ops<T>::from_string): Use
857         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
858         * configure: Rebuild.
859
860 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
861
862         * printcmd.c (printf_c_string): Use
863         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
864         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
865
866 2018-09-05  Tom Tromey  <tom@tromey.com>
867
868         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
869
870 2018-09-05  Tom de Vries  <tdevries@suse.de>
871
872         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
873         with resolve_abstract_p == true.
874         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
875         defaulting to false. Propagate resolve_abstract_p to
876         dwarf2_fetch_die_loc_sect_off.
877         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
878         parameter, defaulting to false.
879         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
880         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
881         parameter.
882         * dwarf2read.h (struct die_info): Forward-declare.
883         (die_info_ptr): New typedef.
884         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
885
886 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
887
888         GDB 8.2 released.
889
890 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
891             Pedro Alves  <palves@redhat.com>
892
893         * gnulib/Makefile.in (aclocal_m4_deps): Move to
894         "aclocal-m4-deps.mk".  Include file here.
895         $(srcdir)/aclocal.m4: Add "configure.ac".
896         * gnulib/aclocal-m4-deps.mk: New file.
897         * gnulib/update-gnulib.sh: Automatically update
898         "aclocal-m4-deps.mk".
899
900 2018-09-04  Tom Tromey  <tom@tromey.com>
901
902         * configure: Rebuild.
903         * configure.ac: Remove multi-ice code.
904
905 2018-09-04  Tom Tromey  <tom@tromey.com>
906
907         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
908         (ada-exp.o): Update.
909
910 2018-09-04  Tom Tromey  <tom@tromey.com>
911
912         * Makefile.in (printcmd.o, target-float.o): Remove.
913         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
914
915 2018-09-04  Tom Tromey  <tom@tromey.com>
916
917         * gnulib/Makefile.in: Remove obsolete comment.
918         * Makefile.in: Remove obsolete comment.
919
920 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
921
922         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
923         line with '+'.
924
925 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
926
927         * riscv-tdep.c: Add 'prologue-value.h' include.
928         (struct riscv_unwind_cache): New struct.
929         (riscv_debug_unwinder): New global.
930         (riscv_scan_prologue): Update arguments, capture register details
931         from prologue scan.
932         (riscv_skip_prologue): Reformat arguments line, move end of
933         prologue calculation into riscv_scan_prologue.
934         (riscv_frame_cache): Update return type, create
935         riscv_unwind_cache, scan the prologue, and fill in remaining cache
936         details.
937         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
938         (riscv_frame_prev_register): Use the trad_frame within the
939         riscv_unwind_cache.
940         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
941         flag.
942
943 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
944
945         * trad-frame.h (trad_frame_set_realreg): Declare.
946         (trad_frame_set_addr): Declare.
947         * trad-frame.c (trad_frame_set_realreg): Define new function.
948         (trad_frame_set_addr): Define new function.
949         (trad_frame_set_reg_realreg): Use new function.
950         (trad_frame_set_reg_addr): Use new function.
951
952 2018-09-01  Keith Seitz  <keiths@redhat.com>
953
954         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
955         pulongest instead of "%lld".
956         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
957         ATTRIBUTE_UNUSED.
958
959 2018-08-31  Tom Tromey  <tom@tromey.com>
960
961         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
962         variant part type.
963
964 2018-08-31  Pedro Alves  <palves@redhat.com>
965
966         * gdbarch.h: Regenerate.
967
968 2018-08-31  Pedro Alves  <palves@redhat.com>
969
970         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
971         * target.h (Hardware watchpoint interfaces): Describe
972         continuable/steppable/non-steppable watchpoints.
973         * gdbarch.h, gdbarch.c: Regenerate.
974
975 2018-08-31  Pedro Alves  <palves@redhat.com>
976
977         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
978         Delete.
979         * s390-linux-nat.c
980         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
981         * target.h (target_ops::have_continuable_watchpoint): Delete.
982         (target_have_continuable_watchpoint): Delete.
983         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
984         * target-delegates.c: Regenerate.
985
986 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
987
988         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
989         the files present in "gnulib/import/m4/".
990
991 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
992
993         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
994         c.sw, c.swsp, and c.sdsp.
995
996 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
997
998         * riscv-tdep.c (struct riscv_inferior_data): Delete.
999         (riscv_read_misa_reg): Don't cache value read into inferior data.
1000         (riscv_new_inferior_data): Delete.
1001         (riscv_inferior_data_cleanup): Delete.
1002         (riscv_inferior_data): Delete.
1003         (riscv_invalidate_inferior_data): Delete.
1004         (_initialize_riscv_tdep): Remove initialisation of inferior data.
1005
1006 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
1007
1008         * compile/compile-cplus-types.c
1009         (compile_cplus_instance::leave_scope): Take the address of scope
1010         object.
1011         (compile_cplus_instance::convert_qualified_base): Compare quals
1012         to 0.
1013
1014 2018-08-30  Keith Seitz  <keiths@redhat.com>
1015
1016         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
1017         Use "%s" and host_address_to_string instead of "%p" in printf.
1018
1019 2018-08-29  Keith Seitz  <keiths@redhat.com>
1020
1021         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
1022         and compile-cplus-types.c.
1023         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
1024         * c-lang.c (cplus_language_defn): Set C++ compile functions.
1025         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
1026         Declare.
1027         * compile/compile-c-support.c: Include compile-cplus.h.
1028         (load_libcompile): Templatize.
1029         (get_compile_context): "New" function.
1030         (c_get_compile_context): Use get_compile_context.
1031         (cplus_get_compile_context): New function.
1032         (cplus_push_user_expression, cplus_pop_user_expression)
1033         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
1034         (cplus_compute_program): Define new structs/functions.
1035         * compile/compile-cplus-symmbols.c: New file.
1036         * compile/compile-cplus-types.c: New file.
1037         * compile/compile-cplus.h: New file.
1038         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
1039         Declare.
1040         * compile/compile-object-load.c (get_out_value_type): Use
1041         strncmp_iw when comparing symbol names.
1042         (compile_object_load): Add mst_bss and mst_data.
1043         * compile/compile.c (_initialize_compile): Remove
1044         -Wno-implicit-function-declaration from `compile_args'.
1045         * compile/gcc-cp-plugin.h: New file.
1046         * NEWS: Mention C++ compile support and new debug options.
1047
1048 2018-08-29  Keith Seitz  <keiths@redhat.com>
1049
1050         * linespec.c (collect_info::add_symbol): Make virtual.
1051         (struct symbol_searcher_collect_info): New struct.
1052         (symbol_searcher::find_all_symbols): New method.
1053         * symtab.h (class symbol_searcher): New class.
1054
1055 2018-08-29  Keith Seitz  <keiths@redhat.com>
1056
1057         * linespec.c (struct linespec) <function_symbols, label_symbols>:
1058         Change to vector of block_symbol.  Update all users.
1059         (struct collect_info) <symbols>: Likewise.
1060         (collect_info::add_symbol): Take block_symbol as argument.
1061         Update all callers.
1062         (decode_compound_collector) <m_symbols>: Change type to vector
1063         of block_symbol.  Update all users.
1064         (decode_compound_collector::operator ()): Change parameter type
1065         to block_symbol.
1066         (find_method, find_function_symbols, find_linespec_symbols)
1067         (find_label_symbols_in_block, find_label_symbols): Change symbol
1068         vectors to block_symbol vectors.
1069         * symtab.h (symbol_found_callback_ftype): Change parameter type to
1070         block_symbol.
1071
1072 2018-08-29  Keith Seitz  <keiths@redhat.com>
1073
1074         * linespec.c (symbolp): Remove typedef and VEC definitions.
1075         (bound_minimal_symbol_d): Likewise.
1076
1077 2018-08-29  Keith Seitz  <keiths@redhat.com>
1078
1079         * linespec.c (decode_compound_collector::decode_compound_collector):
1080         Remove initialization for `m_symtabs'.
1081         (decode_compound_collector::release_symbols): Change return type
1082         to std::vector.  Update all callers.
1083         (class decode_compound_collector) <m_symbols>: Change type to
1084         std::vector.
1085         (lookup_prefix_sym): Change return type to std::vector.  Update all
1086         callers.
1087         (compare_symbols): Remove.
1088         (std_compare_symbols): Rename to `compare_symbols'.
1089         (find_method): Change `sym_classes' parameter to std::vector.
1090         Update all callers.  Use std::sort to sort sym_classes.
1091         (find_linespec_symbols): Remove cleanup.
1092
1093 2018-08-29  Keith Seitz  <keiths@redhat.com>
1094
1095         * linespec.c (struct linespec) <minimal_symbols>: Change type to
1096         std::vector.  Update all users.
1097         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
1098         (struct collect_info) <minimal_symbols>: Likewise.
1099         (compare_msymbols): Return bool.  Change parameters to const
1100         bound_minimal_symbol references.
1101         (find_method, find_function_symbols, find_linespec_symbols): Change
1102         `minsyms' parameter to std::vector.  Update all callers.
1103
1104 2018-08-29  Keith Seitz  <keiths@redhat.com>
1105
1106         * linespec.c (struct linespec) <label_symbols>: Change type to
1107         std::vector.  Update all users.
1108         (find_label_symbols_in_block): Change `result' parameter to
1109         std::vector.  Update all callers.
1110         (find_label_symbols): Return std::vector.  Update all callers.
1111
1112 2018-08-29  Keith Seitz  <keiths@redhat.com>
1113
1114         * linespec.c (struct linespec) <function_symbols>: Change type to
1115         std::vector.  Update all users.
1116         (struct collect_info) <function_symbols>: Likewise.
1117         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
1118         (std_compare_symbols): New function.
1119         (find_method, find_function_symbols, find_linespec_symbols)
1120         (find_label_symbols_in_block): Change `symbols' parameter to
1121         std::vector.  Update all callers.
1122         (find_label_symbols): Likewise for `function_symbols' and
1123         `label_funcs_ret'.
1124
1125 2018-08-29  Keith Seitz  <keiths@redhat.com>
1126
1127         * linespec.c (symtab_vector_up): Define.
1128         (struct linespec) <file_symtabs>: Change type to std::vector *.
1129         Update all uses.
1130         (struct collect_info) <file_symtabs>: Likewise.
1131         (collect_symtabs_from_filename): Return symtab_vector_up.
1132         Update all callers.
1133         (decode_objc): Remove cleanup.
1134         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
1135         (symtab_collector::release_symtabs): Return symtab_vector_up.
1136         Update all callers.
1137         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
1138         Update all users.
1139         (collect_symtabs_from_filename, symtabs_from_filename): Return
1140         symtab_vector_up.  Update all callers.
1141
1142 2018-08-29  Tom Tromey  <tom@tromey.com>
1143
1144         * csky-tdep.c (csky_analyze_prologue): Use
1145         core_addr_to_string_nz.
1146
1147 2018-08-29  Tom Tromey  <tom@tromey.com>
1148
1149         * windows-nat.c (struct xlate_exception) <them>: Change type to
1150         DWORD.
1151         (xlate): Fix formatting.  Remove last entry.
1152         (struct xlate_exception, xlate): Comment out.
1153         (windows_nat_target::resume): Use ranged for.
1154
1155 2018-08-29  Jim Wilson  <jimw@sifive.com>
1156
1157         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
1158         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
1159         of NT_PRFPREG.
1160         (riscv_linux_nat_target::store_registers): Likewise.
1161
1162 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
1163
1164         PR gdb/23555
1165         PR gdb/23558
1166         * gnulib/aclocal.m4: Regenerate.
1167         * gnulib/config.in: Regenerate.
1168         * gnulib/configure: Regenerate.
1169         * gnulib/import/Makefile.am: Update.
1170         * gnulib/import/Makefile.in: Update.
1171         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
1172         * gnulib/import/_Noreturn.h: ... this.
1173         * gnulib/import/alloca.in.h: Update.
1174         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
1175         * gnulib/import/arg-nonnull.h: ... this.
1176         * gnulib/import/assure.h: Update.
1177         * gnulib/import/at-func.c: Update.
1178         * gnulib/import/basename-lgpl.c: Update.
1179         * gnulib/import/extra/snippet/c++defs.h: Rename to...
1180         * gnulib/import/c++defs.h: ... this.
1181         * gnulib/import/canonicalize-lgpl.c: Update.
1182         * gnulib/import/cdefs.h: Update.
1183         * gnulib/import/chdir-long.c: Update.
1184         * gnulib/import/chdir-long.h: Update.
1185         * gnulib/import/cloexec.c: Update.
1186         * gnulib/import/cloexec.h: Update.
1187         * gnulib/import/close.c: Update.
1188         * gnulib/import/closedir.c: Update.
1189         * gnulib/import/config.charset: Update.
1190         * gnulib/import/dirent-private.h: Update.
1191         * gnulib/import/dirent.in.h: Update.
1192         * gnulib/import/dirfd.c: Update.
1193         * gnulib/import/dirname-lgpl.c: Update.
1194         * gnulib/import/dirname.h: Update.
1195         * gnulib/import/dosname.h: Update.
1196         * gnulib/import/dup-safer-flag.c: Update.
1197         * gnulib/import/dup-safer.c: Update.
1198         * gnulib/import/dup.c: Update.
1199         * gnulib/import/dup2.c: Update.
1200         * gnulib/import/errno.in.h: Update.
1201         * gnulib/import/error.c: Update.
1202         * gnulib/import/error.h: Update.
1203         * gnulib/import/exitfail.c: Update.
1204         * gnulib/import/exitfail.h: Update.
1205         * gnulib/import/extra/update-copyright: Update.
1206         * gnulib/import/fchdir.c: Update.
1207         * gnulib/import/fcntl.c: Update.
1208         * gnulib/import/fcntl.in.h: Update.
1209         * gnulib/import/fd-hook.c: Update.
1210         * gnulib/import/fd-hook.h: Update.
1211         * gnulib/import/fd-safer-flag.c: Update.
1212         * gnulib/import/fd-safer.c: Update.
1213         * gnulib/import/fdopendir.c: Update.
1214         * gnulib/import/filename.h: Update.
1215         * gnulib/import/filenamecat-lgpl.c: Update.
1216         * gnulib/import/filenamecat.h: Update.
1217         * gnulib/import/flexmember.h: Update.
1218         * gnulib/import/float+.h: Update.
1219         * gnulib/import/float.c: Update.
1220         * gnulib/import/float.in.h: Update.
1221         * gnulib/import/fnmatch.c: Update.
1222         * gnulib/import/fnmatch.in.h: Update.
1223         * gnulib/import/fnmatch_loop.c: Update.
1224         * gnulib/import/fpucw.h: Update.
1225         * gnulib/import/frexp.c: Update.
1226         * gnulib/import/frexpl.c: Update.
1227         * gnulib/import/fstat.c: Update.
1228         * gnulib/import/fstatat.c: Update.
1229         * gnulib/import/getcwd-lgpl.c: Update.
1230         * gnulib/import/getcwd.c: Update.
1231         * gnulib/import/getdtablesize.c: Update.
1232         * gnulib/import/getlogin_r.c: Update.
1233         * gnulib/import/getprogname.c: Update.
1234         * gnulib/import/getprogname.h: Update.
1235         * gnulib/import/gettext.h: Update.
1236         * gnulib/import/gettimeofday.c: Update.
1237         * gnulib/import/glob-libc.h: Update.
1238         * gnulib/import/glob.c: Update.
1239         * gnulib/import/glob.in.h: Update.
1240         * gnulib/import/glob_internal.h: Update.
1241         * gnulib/import/glob_pattern_p.c: Update.
1242         * gnulib/import/globfree.c: Update.
1243         * gnulib/import/hard-locale.c: Update.
1244         * gnulib/import/hard-locale.h: Update.
1245         * gnulib/import/intprops.h: Update.
1246         * gnulib/import/inttypes.in.h: Update.
1247         * gnulib/import/isnan.c: Update.
1248         * gnulib/import/isnand-nolibm.h: Update.
1249         * gnulib/import/isnand.c: Update.
1250         * gnulib/import/isnanl-nolibm.h: Update.
1251         * gnulib/import/isnanl.c: Update.
1252         * gnulib/import/itold.c: Update.
1253         * gnulib/import/libc-config.h: Update.
1254         * gnulib/import/limits.in.h: Update.
1255         * gnulib/import/localcharset.c: Update.
1256         * gnulib/import/localcharset.h: Update.
1257         * gnulib/import/localtime-buffer.c: Update.
1258         * gnulib/import/localtime-buffer.h: Update.
1259         * gnulib/import/lstat.c: Update.
1260         * gnulib/import/m4/00gnulib.m4: Update.
1261         * gnulib/import/m4/__inline.m4: Update.
1262         * gnulib/import/m4/absolute-header.m4: Update.
1263         * gnulib/import/m4/alloca.m4: Update.
1264         * gnulib/import/m4/builtin-expect.m4: Update.
1265         * gnulib/import/m4/canonicalize.m4: Update.
1266         * gnulib/import/m4/chdir-long.m4: Update.
1267         * gnulib/import/m4/close.m4: Update.
1268         * gnulib/import/m4/closedir.m4: Update.
1269         * gnulib/import/m4/configmake.m4: Update.
1270         * gnulib/import/m4/d-ino.m4: Update.
1271         * gnulib/import/m4/d-type.m4: Update.
1272         * gnulib/import/m4/dirent_h.m4: Update.
1273         * gnulib/import/m4/dirfd.m4: Update.
1274         * gnulib/import/m4/dirname.m4: Update.
1275         * gnulib/import/m4/double-slash-root.m4: Update.
1276         * gnulib/import/m4/dup.m4: Update.
1277         * gnulib/import/m4/dup2.m4: Update.
1278         * gnulib/import/m4/eealloc.m4: Update.
1279         * gnulib/import/m4/environ.m4: Update.
1280         * gnulib/import/m4/errno_h.m4: Update.
1281         * gnulib/import/m4/error.m4: Update.
1282         * gnulib/import/m4/exponentd.m4: Update.
1283         * gnulib/import/m4/exponentl.m4: Update.
1284         * gnulib/import/m4/extensions.m4: Update.
1285         * gnulib/import/m4/extern-inline.m4: Update.
1286         * gnulib/import/m4/fchdir.m4: Update.
1287         * gnulib/import/m4/fcntl-o.m4: Update.
1288         * gnulib/import/m4/fcntl.m4: Update.
1289         * gnulib/import/m4/fcntl_h.m4: Update.
1290         * gnulib/import/m4/fdopendir.m4: Update.
1291         * gnulib/import/m4/filenamecat.m4: Update.
1292         * gnulib/import/m4/flexmember.m4: Update.
1293         * gnulib/import/m4/float_h.m4: Update.
1294         * gnulib/import/m4/fnmatch.m4: Update.
1295         * gnulib/import/m4/fnmatch_h.m4: Update.
1296         * gnulib/import/m4/fpieee.m4: Update.
1297         * gnulib/import/m4/frexp.m4: Update.
1298         * gnulib/import/m4/frexpl.m4: Update.
1299         * gnulib/import/m4/fstat.m4: Update.
1300         * gnulib/import/m4/fstatat.m4: Update.
1301         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
1302         * gnulib/import/m4/getcwd-path-max.m4: Update.
1303         * gnulib/import/m4/getcwd.m4: Update.
1304         * gnulib/import/m4/getdtablesize.m4: Update.
1305         * gnulib/import/m4/getlogin.m4: Update.
1306         * gnulib/import/m4/getlogin_r.m4: Update.
1307         * gnulib/import/m4/getpagesize.m4: Update.
1308         * gnulib/import/m4/getprogname.m4: Update.
1309         * gnulib/import/m4/gettimeofday.m4: Update.
1310         * gnulib/import/m4/glibc21.m4: Update.
1311         * gnulib/import/m4/glob.m4: Update.
1312         * gnulib/import/m4/glob_h.m4: Update.
1313         * gnulib/import/m4/gnulib-cache.m4: Update.
1314         * gnulib/import/m4/gnulib-common.m4: Update.
1315         * gnulib/import/m4/gnulib-comp.m4: Update.
1316         * gnulib/import/m4/gnulib-tool.m4: Update.
1317         * gnulib/import/m4/hard-locale.m4: Update.
1318         * gnulib/import/m4/include_next.m4: Update.
1319         * gnulib/import/m4/inttypes-pri.m4: Update.
1320         * gnulib/import/m4/inttypes.m4: Update.
1321         * gnulib/import/m4/isnand.m4: Update.
1322         * gnulib/import/m4/isnanl.m4: Update.
1323         * gnulib/import/m4/largefile.m4: Update.
1324         * gnulib/import/m4/limits-h.m4: Update.
1325         * gnulib/import/m4/localcharset.m4: Update.
1326         * gnulib/import/m4/locale-fr.m4: Update.
1327         * gnulib/import/m4/locale-ja.m4: Update.
1328         * gnulib/import/m4/locale-zh.m4: Update.
1329         * gnulib/import/m4/localtime-buffer.m4: Update.
1330         * gnulib/import/m4/longlong.m4: Update.
1331         * gnulib/import/m4/lstat.m4: Update.
1332         * gnulib/import/m4/malloc.m4: Update.
1333         * gnulib/import/m4/malloca.m4: Update.
1334         * gnulib/import/m4/math_h.m4: Update.
1335         * gnulib/import/m4/mbrtowc.m4: Update.
1336         * gnulib/import/m4/mbsinit.m4: Update.
1337         * gnulib/import/m4/mbsrtowcs.m4: Update.
1338         * gnulib/import/m4/mbstate_t.m4: Update.
1339         * gnulib/import/m4/memchr.m4: Update.
1340         * gnulib/import/m4/memmem.m4: Update.
1341         * gnulib/import/m4/mempcpy.m4: Update.
1342         * gnulib/import/m4/memrchr.m4: Update.
1343         * gnulib/import/m4/mkdir.m4: Update.
1344         * gnulib/import/m4/mkstemp.m4: Update.
1345         * gnulib/import/m4/mmap-anon.m4: Update.
1346         * gnulib/import/m4/mode_t.m4: Update.
1347         * gnulib/import/m4/msvc-inval.m4: Update.
1348         * gnulib/import/m4/msvc-nothrow.m4: Update.
1349         * gnulib/import/m4/multiarch.m4: Update.
1350         * gnulib/import/m4/nocrash.m4: Update.
1351         * gnulib/import/m4/off_t.m4: Update.
1352         * gnulib/import/m4/onceonly.m4: Update.
1353         * gnulib/import/m4/open-cloexec.m4: Update.
1354         * gnulib/import/m4/open.m4: Update.
1355         * gnulib/import/m4/openat.m4: Update.
1356         * gnulib/import/m4/opendir.m4: Update.
1357         * gnulib/import/m4/pathmax.m4: Update.
1358         * gnulib/import/m4/rawmemchr.m4: Update.
1359         * gnulib/import/m4/readdir.m4: Update.
1360         * gnulib/import/m4/readlink.m4: Update.
1361         * gnulib/import/m4/realloc.m4: Update.
1362         * gnulib/import/m4/rename.m4: Update.
1363         * gnulib/import/m4/rewinddir.m4: Update.
1364         * gnulib/import/m4/rmdir.m4: Update.
1365         * gnulib/import/m4/save-cwd.m4: Update.
1366         * gnulib/import/m4/secure_getenv.m4: Update.
1367         * gnulib/import/m4/setenv.m4: Update.
1368         * gnulib/import/m4/signal_h.m4: Update.
1369         * gnulib/import/m4/ssize_t.m4: Update.
1370         * gnulib/import/m4/stat-time.m4: Update.
1371         * gnulib/import/m4/stat.m4: Update.
1372         * gnulib/import/m4/std-gnu11.m4: Update.
1373         * gnulib/import/m4/stdbool.m4: Update.
1374         * gnulib/import/m4/stddef_h.m4: Update.
1375         * gnulib/import/m4/stdint.m4: Update.
1376         * gnulib/import/m4/stdio_h.m4: Update.
1377         * gnulib/import/m4/stdlib_h.m4: Update.
1378         * gnulib/import/m4/strchrnul.m4: Update.
1379         * gnulib/import/m4/strdup.m4: Update.
1380         * gnulib/import/m4/strerror.m4: Update.
1381         * gnulib/import/m4/string_h.m4: Update.
1382         * gnulib/import/m4/strstr.m4: Update.
1383         * gnulib/import/m4/strtok_r.m4: Update.
1384         * gnulib/import/m4/sys_socket_h.m4: Update.
1385         * gnulib/import/m4/sys_stat_h.m4: Update.
1386         * gnulib/import/m4/sys_time_h.m4: Update.
1387         * gnulib/import/m4/sys_types_h.m4: Update.
1388         * gnulib/import/m4/tempname.m4: Update.
1389         * gnulib/import/m4/time_h.m4: Update.
1390         * gnulib/import/m4/unistd-safer.m4: Update.
1391         * gnulib/import/m4/unistd_h.m4: Update.
1392         * gnulib/import/m4/warn-on-use.m4: Update.
1393         * gnulib/import/m4/wchar_h.m4: Update.
1394         * gnulib/import/m4/wchar_t.m4: Update.
1395         * gnulib/import/m4/wctype_h.m4: Update.
1396         * gnulib/import/m4/wint_t.m4: Update.
1397         * gnulib/import/malloc.c: Update.
1398         * gnulib/import/malloc/scratch_buffer.h: Update.
1399         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
1400         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
1401         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
1402         * gnulib/import/malloca.c: Update.
1403         * gnulib/import/malloca.h: Update.
1404         * gnulib/import/malloca.valgrind: Update.
1405         * gnulib/import/math.in.h: Update.
1406         * gnulib/import/mbrtowc.c: Update.
1407         * gnulib/import/mbsinit.c: Update.
1408         * gnulib/import/mbsrtowcs-impl.h: Update.
1409         * gnulib/import/mbsrtowcs-state.c: Update.
1410         * gnulib/import/mbsrtowcs.c: Update.
1411         * gnulib/import/memchr.c: Update.
1412         * gnulib/import/memmem.c: Update.
1413         * gnulib/import/mempcpy.c: Update.
1414         * gnulib/import/memrchr.c: Update.
1415         * gnulib/import/mkdir.c: Update.
1416         * gnulib/import/mkstemp.c: Update.
1417         * gnulib/import/msvc-inval.c: Update.
1418         * gnulib/import/msvc-inval.h: Update.
1419         * gnulib/import/msvc-nothrow.c: Update.
1420         * gnulib/import/msvc-nothrow.h: Update.
1421         * gnulib/import/open.c: Update.
1422         * gnulib/import/openat-die.c: Update.
1423         * gnulib/import/openat-priv.h: Update.
1424         * gnulib/import/openat-proc.c: Update.
1425         * gnulib/import/openat.c: Update.
1426         * gnulib/import/openat.h: Update.
1427         * gnulib/import/opendir.c: Update.
1428         * gnulib/import/pathmax.h: Update.
1429         * gnulib/import/pipe-safer.c: Update.
1430         * gnulib/import/rawmemchr.c: Update.
1431         * gnulib/import/readdir.c: Update.
1432         * gnulib/import/readlink.c: Update.
1433         * gnulib/import/realloc.c: Update.
1434         * gnulib/import/ref-add.sin: Update.
1435         * gnulib/import/ref-del.sin: Update.
1436         * gnulib/import/rename.c: Update.
1437         * gnulib/import/rewinddir.c: Update.
1438         * gnulib/import/rmdir.c: Update.
1439         * gnulib/import/same-inode.h: Update.
1440         * gnulib/import/save-cwd.c: Update.
1441         * gnulib/import/save-cwd.h: Update.
1442         * gnulib/import/scratch_buffer.h: Update.
1443         * gnulib/import/secure_getenv.c: Update.
1444         * gnulib/import/setenv.c: Update.
1445         * gnulib/import/signal.in.h: Update.
1446         * gnulib/import/stat-time.c: Update.
1447         * gnulib/import/stat-time.h: Update.
1448         * gnulib/import/stat-w32.c: Update.
1449         * gnulib/import/stat-w32.h: Update.
1450         * gnulib/import/stat.c: Update.
1451         * gnulib/import/stdbool.in.h: Update.
1452         * gnulib/import/stddef.in.h: Update.
1453         * gnulib/import/stdint.in.h: Update.
1454         * gnulib/import/stdio.in.h: Update.
1455         * gnulib/import/stdlib.in.h: Update.
1456         * gnulib/import/str-two-way.h: Update.
1457         * gnulib/import/strchrnul.c: Update.
1458         * gnulib/import/strdup.c: Update.
1459         * gnulib/import/streq.h: Update.
1460         * gnulib/import/strerror-override.c: Update.
1461         * gnulib/import/strerror-override.h: Update.
1462         * gnulib/import/strerror.c: Update.
1463         * gnulib/import/string.in.h: Update.
1464         * gnulib/import/stripslash.c: Update.
1465         * gnulib/import/strnlen1.c: Update.
1466         * gnulib/import/strnlen1.h: Update.
1467         * gnulib/import/strstr.c: Update.
1468         * gnulib/import/strtok_r.c: Update.
1469         * gnulib/import/sys_stat.in.h: Update.
1470         * gnulib/import/sys_time.in.h: Update.
1471         * gnulib/import/sys_types.in.h: Update.
1472         * gnulib/import/tempname.c: Update.
1473         * gnulib/import/tempname.h: Update.
1474         * gnulib/import/time.in.h: Update.
1475         * gnulib/import/unistd--.h: Update.
1476         * gnulib/import/unistd-safer.h: Update.
1477         * gnulib/import/unistd.in.h: Update.
1478         * gnulib/import/unsetenv.c: Update.
1479         * gnulib/import/verify.h: Update.
1480         * gnulib/import/extra/snippet/warn-on-use.h: Update.
1481         * gnulib/import/wchar.in.h: Update.
1482         * gnulib/import/wctype.in.h: Update.
1483         * gnulib/import/xalloc-oversized.h: Update.
1484         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
1485         "53e2c179f26a890fa6685af4b6c1397ee370433b".
1486
1487 2018-08-16  Gary Benson <gbenson@redhat.com>
1488
1489         PR gdb/13000:
1490         * gdb/main.c (captured_main_1): Exit with nonzero status
1491         in batch mode if the last command to be executed failed.
1492         * NEWS: Mention the above.
1493
1494 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
1495
1496         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
1497         end of warning message.
1498
1499 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
1500
1501         PR gdb/22943:
1502         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
1503         (aarch64_extract_return_value): Use
1504         aapcs_is_vfp_call_or_return_candidate.
1505         (aarch64_return_in_memory): Likewise.
1506         (aarch64_store_return_value): Likewise.
1507
1508 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
1509
1510         * aarch64-tdep.c
1511         (aapcs_is_vfp_call_or_return_candidate): Make static
1512         (pass_in_v_or_stack): Remove function.
1513         (pass_in_v_vfp_candidate): New function.
1514         (aarch64_push_dummy_call): Check for float register candidates.
1515
1516 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
1517
1518         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
1519         (aapcs_is_vfp_call_or_return_candidate_1): New function.
1520         (aapcs_is_vfp_call_or_return_candidate): Likewise.
1521
1522 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
1523
1524         PR build/23399
1525         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
1526         (struct ipa_sym_addresses): Rename to...
1527         (struct ipa_sym_addresses_common): ... this.
1528         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
1529
1530 2018-08-28  Tom Tromey  <tom@tromey.com>
1531
1532         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1533         (token_fifo): Now a std::vector.
1534         (yylex, c_parse): Update.
1535         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1536         (token_fifo): Now a std::vector.
1537         (yylex, d_parse): Update.
1538         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1539         (token_fifo): Now a std::vector.
1540         (yylex, go_parse): Update.
1541
1542 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
1543
1544         * parser-defs.h (struct type_stack) <elements>: Change type to
1545         std::vector<union type_stack_elt>.
1546         <depth, size>: Remove.
1547         * parse.c (parse_exp_in_context_1): Adjust.
1548         (type_stack_reserve): Remove.
1549         (check_type_stack_depth): Remove.
1550         (insert_into_type_stack): Adjust to std::vector.
1551         (insert_type): Likewise.
1552         (push_type): Likewise.
1553         (push_type_int): Likewise.
1554         (insert_type_address_space): Likewise.
1555         (pop_type): Likewise.
1556         (pop_type_int): Likewise.
1557         (pop_typelist): Likewise.
1558         (pop_type_stack): Likewise.
1559         (append_type_stack): Likewise.
1560         (push_type_stack): Likewise.
1561         (get_type_stack): Likewise.
1562         (type_stack_cleanup): Likewise.
1563         (push_typelist): Likewise.
1564         (follow_types): Likewise.
1565         (_initialize_parse): Likewise.
1566
1567 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
1568
1569         * NEWS: Mention csky target.
1570
1571 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
1572             Hafiz Abid Qadeer  <abidh@codesourcery.com>
1573             Don Breazeal  <donb@codesourcery.com>
1574
1575         * csky-linux-tdep.c: New file.
1576         * csky-tdep.c: Likewise.
1577         * csky-tdep.h: Likewise.
1578         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
1579         csky-tdep.o.
1580         (HFILES_NO_SRCDIR): Add csky-tdep.h.
1581         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
1582         * configure.tgt: Add csky support.
1583
1584 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
1585
1586         * python/py-framefilter.c (py_print_frame): Print frame architecture
1587         when printing on an MI output.
1588
1589 2018-08-27  Tom Tromey  <tom@tromey.com>
1590
1591         PR build/23087:
1592         * configure: Rebuild.
1593         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
1594
1595 2018-08-27  Tom Tromey  <tom@tromey.com>
1596
1597         * aarch64-linux-tdep.c
1598         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
1599         casts to int.
1600
1601 2018-08-27  Tom Tromey  <tom@tromey.com>
1602
1603         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
1604         unsigned.
1605         (ppc64_standard_linkage1, ppc64_standard_linkage2)
1606         (ppc64_standard_linkage3, ppc64_standard_linkage4)
1607         (ppc64_standard_linkage5, ppc64_standard_linkage6)
1608         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
1609         unsigned.
1610
1611 2018-08-27  Tom Tromey  <tom@tromey.com>
1612
1613         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
1614         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
1615
1616 2018-08-27  Tom Tromey  <tom@tromey.com>
1617
1618         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
1619         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
1620         ULONGEST_MAX.
1621         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
1622         ULONGEST_MAX.
1623         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
1624         ULONGEST_MAX.
1625         * sparc-linux-tdep.c (sparc32_linux_sigframe)
1626         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
1627         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
1628         ULONGEST_MAX.
1629         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
1630         (ppc64_linux_sigaction_tramp_frame)
1631         (ppc32_linux_sighandler_tramp_frame)
1632         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
1633         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
1634         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
1635         * mn10300-linux-tdep.c (am33_linux_sigframe)
1636         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
1637         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
1638         * mips-linux-tdep.c (mips_linux_o32_sigframe)
1639         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
1640         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
1641         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
1642         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
1643         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
1644         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
1645         * microblaze-linux-tdep.c
1646         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
1647         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
1648         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
1649         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
1650         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
1651         * common/common-types.h (ULONGEST_MAX): New define.
1652         (CORE_ADDR_MAX): Fix formatting.
1653         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
1654         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
1655         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
1656         (arm_linux_rt_sigreturn_tramp_frame)
1657         (arm_eabi_linux_sigreturn_tramp_frame)
1658         (arm_eabi_linux_rt_sigreturn_tramp_frame)
1659         (thumb2_eabi_linux_sigreturn_tramp_frame)
1660         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
1661         (arm_linux_restart_syscall_tramp_frame)
1662         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
1663         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
1664         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
1665         ULONGEST_MAX.
1666         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
1667
1668 2018-08-27  Tom Tromey  <tom@tromey.com>
1669
1670         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
1671         CORE_ADDR_MAX.
1672         * mips-tdep.c (mips_deal_with_atomic_sequence)
1673         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
1674         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
1675         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
1676         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
1677         CORE_ADDR_MAX.
1678         * aarch64-tdep.c (aarch64_software_single_step): Use
1679         CORE_ADDR_MAX.
1680
1681 2018-08-27  Tom Tromey  <tom@tromey.com>
1682
1683         * linespec.c (complete_linespec_component): Add cast to "char".
1684         * completer.c (completion_tracker::build_completion_result): Add
1685         cast to "char".
1686
1687 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
1688
1689         * solist.h (struct solist, struct target_so_ops): Fix
1690         indentation.
1691
1692 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
1693
1694         * ada-tasks.c (ada_task_info_s): Remove typedef.
1695         (DEF_VEC_O(ada_task_info_s)): Remove.
1696         (struct ada_tasks_inferior_data): Initialize fields.
1697         <task_list>: Make an std::vector.
1698         (get_ada_tasks_inferior_data): Allocate with new.
1699         (ada_get_task_number): Adjust.
1700         (get_task_number_from_id): Likewise.
1701         (valid_task_id): Likewise.
1702         (ada_get_task_info_from_ptid): Likewise.
1703         (iterate_over_live_ada_tasks): Likewise.
1704         (add_ada_task): Likewise.
1705         (read_known_tasks): Likewise.
1706         (ada_build_task_list): Likewise.
1707         (print_ada_task_info): Likewise.
1708         (info_task): Likewise.
1709         (task_command_1): Likewise.
1710
1711 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
1712
1713         * ada-lang.c (add_angle_brackets): Return std::string.
1714
1715 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
1716
1717         * python/py-threadevent.c (py_get_event_thread): Initialize
1718         pythread.
1719
1720 2018-08-24  Pedro Alves  <palves@redhat.com>
1721
1722         * python/py-bpevent.c (create_breakpoint_event_object): Use
1723         copy-initialization.
1724         * python/py-continueevent.c (emit_continue_event): Use
1725         copy-initialization.
1726         * python/py-exitedevent.c (create_exited_event_object): Return a
1727         gdbpy_ref<>.
1728         (emit_exited_event): Use copy-initialization.
1729         * python/py-inferior.c (python_new_inferior)
1730         (python_inferior_deleted, add_thread_object): Use
1731         copy-initialization.
1732         * python/py-infevents.c (create_inferior_call_event_object)
1733         (create_register_changed_event_object)
1734         (create_memory_changed_event_object): Return a gdbpy_ref<>.
1735         (emit_inferior_call_event, emit_memory_changed_event)
1736         (emit_register_changed_event): Use copy-initialization.
1737         * python/py-newobjfileevent.c (create_new_objfile_event_object):
1738         Return a gdbpy_ref<>.
1739         (emit_new_objfile_event): Use copy-initialization.
1740         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
1741         (emit_clear_objfiles_event): Use copy-initialization.
1742         * python/py-signalevent.c (create_signal_event_object): Use
1743         copy-initialization.
1744         * python/py-threadevent.c (create_thread_event_object): Use
1745         copy-initialization.
1746
1747 2018-08-24  Pedro Alves  <palves@redhat.com>
1748             Simon Marchi  <simon.marchi@ericsson.com>
1749
1750         PR gdb/23379
1751         * python/py-continueevent.c: Include "gdbthread.h".
1752         (create_continue_event_object): Add intro comment.  Add 'ptid'
1753         parameter.  Use it to find thread to pass to
1754         create_thread_event_object.
1755         (emit_continue_event): Pass PTID down to
1756         create_continue_event_object.
1757         * python/py-event.h (py_get_event_thread): Declare.
1758         (create_thread_event_object): Remove default from 'thread'
1759         parameter.
1760         * python/py-stopevent.c (create_stop_event_object): Use
1761         py_get_event_thread.
1762         * python/py-threadevent.c (get_event_thread): Rename to ...
1763         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
1764         and use it to find the thread.
1765         (create_thread_event_object): Assert that THREAD isn't null.
1766         Don't find the event thread here.
1767
1768 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
1769
1770         * block.h (blockrange, blockranges): New struct declarations.
1771         (struct block): Add new field named `ranges'.
1772         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
1773         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
1774         macros for accessing ranges in struct block.
1775         (make_blockranges): New declaration.
1776         block.c (make_blockranges): New function.
1777         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
1778         for block.
1779         * symtab.h (find_pc_partial_function): Add new parameter `block'.
1780         * blockframe.c (cache_pc_function_block): New static global.
1781         (clear_pc_function_cache): Clear cache_pc_function_block.
1782         (find_pc_partial_function): Move comment to symtab.h.  Add
1783         support for non-contiguous blocks.
1784         * cli/cli-cmds.c (block.h): Include.
1785         (print_disassembly): Handle printing of non-contiguous blocks.
1786         (disassemble_current_function): Likewise.
1787         (disassemble_command): Likewise.
1788
1789         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
1790         BLOCK_START.
1791         * blockframe.c (get_pc_function_start): Likewise.
1792         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
1793         (gcc_symbol_address): Likewise.
1794         * compile/compile-object-run.c (compile_object_run): Likewise.
1795         * compile/compile.c (get_expr_block_and_pc): Likewise.
1796         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
1797         (func_addr_to_tail_call_list): Likewise.
1798         * findvar.c (default_read_var_value): Likewise.
1799         * inline-frame.c (inline_frame_this_id): Likewise.
1800         (skip-inline_frames): Likewise.
1801         * infcmd.c (until_next_command): Likewise.
1802         * linespec.c (convert_linespec_to_sals): Likewise.
1803         * parse.c (parse_exp_in_context_1): Likewise.
1804         * printcmd.c (build_address_symbolic): likewise.
1805         (info_address_command): Likewise.
1806         symtab.c (find_function_start_sal): Likewise.
1807         (skip_prologue_sal): Likewise.
1808         (find_function_alias_target): Likewise.
1809         (find_gnu_ifunc): Likewise.
1810         * stack.c (find_frame_funname): Likewise.
1811         * symtab.c (fixup_symbol_section): Likewise.
1812         (find_function_start_sal): Likewise.
1813         (skip_prologue_sal): Likewsie.
1814         (find_function_alias_target): Likewise.
1815         (find_gnu_ifunc): Likewise.
1816         * tracepoint.c (info_scope_command): Likewise.
1817         * value.c (value_fn_field): Likewise.
1818
1819         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
1820         in place of find_pc_partial_function.
1821         * blockframe.c (find_function_entry_range_from_pc): New function.
1822         * symtab.h (find_function_entry_range_from_pc): Declare and document.
1823         * objfiles.c (objfile_relocate1): Relocate start and end addresses
1824         for each range in a block.
1825
1826
1827 2018-08-23  Xavier Roirand  <roirand@adacore.com>
1828
1829         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
1830         incrementation.
1831
1832 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
1833
1834         * solib-svr4.c (read_program_headers_from_bfd): Return
1835         gdb::optional<gdb::byte_vector>.
1836         (svr4_exec_displacement): Adjust.
1837
1838 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
1839
1840         * solib-svr4.c (read_program_header): Return
1841         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
1842         (find_program_interpreter): Return
1843         gdb::optional<gdb::byte_vector>.
1844         (scan_dyntag_auxv): Adjust.
1845         (enable_break): Adjust.
1846         (svr4_exec_displacement): Adjust.
1847
1848 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
1849
1850         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
1851         * inf-child.c (inf_child_target::terminal_save_inferior): New.
1852
1853 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
1854
1855         * guile/scm-string.c (gdbscm_scm_from_printf): Use
1856         string_vprintf.
1857         * guile/scm-utils.c (gdbscm_printf): Likewise.
1858         * serial.c (serial_printf): Likewise.
1859         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
1860
1861 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
1862
1863         * stack.c (print_frame): Print frame architecture when printing on
1864         an MI output.
1865         * NEWS: Mention new "arch" attribute in frame output.
1866
1867 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
1868
1869         * arch/aarch64.h (aarch64_regnum): Update comment.
1870
1871 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
1872
1873         * NEWS: Add SVE to 8.2 section.
1874
1875 2018-08-21  Pedro Alves  <palves@redhat.com>
1876
1877         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
1878         out from gdbscm_parse_function_args.
1879         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
1880         gdbscm_parse_function_args_1.
1881
1882 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
1883
1884         PR gdb/17816
1885         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
1886         operator.
1887
1888 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
1889
1890         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
1891
1892 2018-08-19  Michael Spang  <spang@google.com>
1893
1894         PR gdb/11786
1895         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
1896         for PT_TLS segments.
1897
1898 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
1899
1900         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
1901         dwarf_variable_value.
1902         * dwarf2-frame.c (class dwarf_expr_executor):
1903         Add override for dwarf_variable_value.
1904         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
1905         (class symbol_needs_eval_context): Likewise.
1906         (indirect_synthetic_pointer): Add forward declaration.
1907         (sect_variable_value): New function.
1908         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
1909         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
1910         for DW_OP_GNU_variable_value.
1911
1912 2018-08-16  Tom Tromey  <tom@tromey.com>
1913
1914         * top.c (read_command_file): Update.
1915         (command_line_input): Remove "repeat" argument.
1916         * ada-lang.c (get_selections): Update.
1917         * linespec.c (decode_line_2): Update.
1918         * defs.h (command_line_input): Remove argument.
1919         * cli/cli-script.c (read_next_line): Update.
1920         * python/py-gdb-readline.c: Update.
1921
1922 2018-08-17  Tom Tromey  <tom@tromey.com>
1923
1924         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
1925         command_line_input.
1926
1927 2018-08-15  Tom Tromey  <tom@tromey.com>
1928
1929         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
1930
1931 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
1932
1933         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
1934         If used, use find_pc_partial_function to find address range
1935         to disassemble.
1936         * mi/mi-main.c (mi_cmd_list_features): Report
1937         "data-disassemble-a-option" feature.
1938         * NEWS: Mention new -data-disassemble option -a.
1939
1940 2018-08-13  Tom Tromey  <tom@tromey.com>
1941
1942         * common/common-defs.h (_FORTIFY_SOURCE): Define.
1943
1944 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
1945
1946         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
1947         (aarch64_linux_collect_sve_regset): Likewise.
1948         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
1949         * regcache.h (regcache_map_entry_size): New function.
1950
1951 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
1952
1953         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
1954         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
1955         (SVE_HEADER_VL_LENGTH): Likewise.
1956         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
1957         (SVE_HEADER_FLAGS_LENGTH): Likewise.
1958         (SVE_HEADER_RESERVED_LENGTH): Likewise.
1959         (SVE_HEADER_SIZE_OFFSET): Likewise.
1960         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
1961         (SVE_HEADER_VL_OFFSET): Likewise.
1962         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
1963         (SVE_HEADER_FLAGS_OFFSET): Likewise.
1964         (SVE_HEADER_RESERVED_OFFSET): Likewise.
1965         (SVE_HEADER_SIZE): Likewise.
1966         (aarch64_linux_core_read_vq): Add function.
1967         (aarch64_linux_core_read_description): Check for SVE section.
1968
1969 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
1970
1971         * aarch64-fbsd-tdep.c
1972         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
1973         collect_size.
1974         * aarch64-linux-tdep.c
1975         (aarch64_linux_iterate_over_regset_sections): Likewise.
1976         * alpha-linux-tdep.c
1977         (alpha_linux_iterate_over_regset_sections):
1978         * alpha-nbsd-tdep.c
1979         (alphanbsd_iterate_over_regset_sections): Likewise.
1980         * amd64-fbsd-tdep.c
1981         (amd64fbsd_iterate_over_regset_sections): Likewise.
1982         * amd64-linux-tdep.c
1983         (amd64_linux_iterate_over_regset_sections): Likewise.
1984         * arm-bsd-tdep.c
1985         (armbsd_iterate_over_regset_sections): Likewise.
1986         * arm-fbsd-tdep.c
1987         (arm_fbsd_iterate_over_regset_sections): Likewise.
1988         * arm-linux-tdep.c
1989         (arm_linux_iterate_over_regset_sections): Likewise.
1990         * corelow.c (get_core_registers_cb): Likewise.
1991         (core_target::fetch_registers): Likewise.
1992         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
1993         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
1994         * gdbarch.h (void): Regenerate.
1995         * gdbarch.sh: Add supply_size and collect_size.
1996         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
1997         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
1998         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
1999         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
2000         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
2001         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
2002         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
2003         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
2004         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
2005         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
2006         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
2007         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
2008         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
2009         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
2010         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
2011         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
2012         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
2013         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
2014         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
2015         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
2016         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
2017         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
2018         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
2019         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
2020         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
2021         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
2022         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
2023         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
2024         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
2025         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
2026
2027 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
2028
2029         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
2030         with string_printf.
2031
2032 2018-08-10  Keith Seitz  <keiths@redhat.com>
2033
2034         * compile/compile-c-support.c (add_code_header, add_code_footer):
2035         Move into policy class.
2036         (c_push_user_expression, pop_user_expression_nop)
2037         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
2038         (compile_program): New host class.
2039         (c_compile_program): New typedef.
2040         (c_compute_porgram): Use c_compile_program.
2041
2042 2018-08-10  Keith Seitz  <keiths@redhat.com>
2043
2044         * compile/compile-internal.h (compile_instance::~compile_instance):
2045         Remove calls to htab_delete.
2046         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
2047         * compile.c (compile_instance::compile_instance): Initialize
2048         htab unique pointers.
2049         (compile_instance::get_cached_type, compile_instance::insert_type)
2050         (compile_instance::error_symbol_once): Update for unique_ptr.
2051
2052 2018-08-10  Keith Seitz  <keiths@redhat.com>
2053
2054         * compile/compile-c-symbols.c (struct symbol_error)
2055         (hash_symbol_error, eq_symbol_error, del_symbol_error)
2056         (compile_instance::insert_symbol_error)
2057         (compile_instance::error_symbol_once): Move to ...
2058         * compile/compile.c: ... here.
2059
2060 2018-08-10  Keith Seitz  <keiths@redhat.com>
2061
2062         * compile/compile-c-support.c (c_get_compile_context): Use `new'
2063         instead of `new_compile_instance'.
2064         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
2065         Update description.
2066         If the symbol error map is not initialized, create it.
2067         (generate_c_for_for_one_symbol): Do not check/initialize
2068         the symbol error map.
2069         * compile/compile-c-types.c (compile_c_instance): Make a class.
2070         Update all callers.
2071         (compile_instance::compile_instance): Initialize the type cache.
2072         (get_cached_type): New function.
2073         (insert_type): Update description.
2074         (compile_c_instance::m_default_cflags): Define.
2075         (convert_type): Update description.  Use get_cached_type.
2076         (delete_instance): Moved to destructor.
2077         (new_compile_instance): Moved to constructor.
2078         * compile/compile-c.h (compile_c_instance): Make class inheriting
2079         from compile_instance.
2080         <base>: Remove field.
2081         <type_map, symbol_err_map>: Move to base class.
2082         <c_plugin>: Rename to `m_plugin' and remove pointer type.
2083         * compile/compile-internal.h (compile_instance): Make class.
2084         <type_map_t, symbol_err_map_t>: Define.
2085         <fe>: Rename to `m_gcc_fe'.
2086         <scope, block, gcc_target_options>: Add `m_' prefix.
2087         <m_type_map, m_symbol_err_map>: New fields, moved from
2088         compile_c_instance.
2089         <destroy>: Remove.
2090         (convert_type, new_compile_instance): Remove.
2091         * compile/compile.c (cleanup_compile_instance): Remove.
2092         (compile_to_object): Use unique_ptr to eliminate cleanups.
2093         (compile_instance::set_print_callback, compile_instance::version)
2094         (compile_instance::set_verbose)
2095         (compile_instance::set_driver_filename)
2096         (compile_instance::set_triplet_regexp)
2097         (compile_instance::set_arguments)
2098         (compile_instance::set_source_file)
2099         (compile_instance::compile): Define.
2100
2101 2018-08-10  Keith Seitz  <keiths@redhat.com>
2102
2103         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
2104         * compile/compile-c-types.c: Define GCC_METHODN macros and include
2105         gcc-c-fe.def to define C plugin.
2106         (delete_instance): Delete `c_plugin'.
2107         (new_compile_instance): Initialize `c_plugin'.
2108         * compile/compile-c.h: Include gcc_c_plugin.h.
2109         (struct compile_c_instance) <c_plugin>: New member.
2110         * gcc-c-plugin.h: New file.
2111         Update all callers with API change.
2112
2113 2018-08-10  Keith Seitz  <keiths@redhat.com>
2114
2115         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
2116         (HFILES_NO_SRCDIR): ... to here.
2117         Add compile-internal.h and compile-c.h.
2118         * compile/compile-c-support.c: Include compile-c.h.
2119         * compile/compile-c-symbols.c: Include compile-c.h.
2120         (generate_c_for_variable_locations): Update comment.
2121         * compile/compile-c-types.c: Include compile-c.h.
2122         * compile/compile-c.h: New file -- moved C language declarations
2123         from other files here.
2124         * compile/compile-internal.h: Do not include hashtab.h or
2125         common/enum-flags.h.
2126         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
2127         (gcc_convert_symbol, gcc_symbol_address)
2128         (generate_c_for_variable_locations, c_get_mode_for_size)
2129         (c_get_range_decl_name): Definitions moved to compile-c.h.
2130         * compile/compile-loc2c.c: Include compile-c.h.
2131
2132 2018-08-10  Keith Seitz  <keiths@redhat.com>
2133
2134         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
2135         (c_symbol_substitution_name): ... this.
2136         Update all callers.
2137
2138 2018-08-10  Keith Seitz  <keiths@redhat.com>
2139
2140         * compile/compile-c-support.c (c_compute_program): Use
2141         unique_xmalloc_ptr to eliminate cleanup.
2142         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
2143         Return a unique_xmalloc_ptr and eliminate cleanup.
2144         * compile/compile-internal.h (generate_c_for_variable_locations):
2145         Return unique_xmalloc_ptr and update description.
2146
2147 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
2148
2149         * corelow.c (core_target::get_core_register_section): Rename
2150         min_size to section_min_size.
2151
2152 2018-08-09  Jim Wilson  <jimw@sifive.com>
2153
2154         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
2155         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
2156         * NEWS: Mention new GNU/Linux RISC-V target.
2157         * configure.host: Add riscv*-*-linux*.
2158         * configure.nat: Add riscv*.
2159         * configure.tgt: Add riscv*-*-linux*.
2160         * riscv-linux-nat.c: New file.
2161         * riscv-linux-tdep.c: New file.
2162
2163 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
2164
2165         * infrun.c (resume): Make static, add forward declaration.
2166         (proceed): Update header comment.
2167         * infrun.h (resume): Delete declaration.
2168
2169 2018-08-09  Tom Tromey  <tom@tromey.com>
2170
2171         * riscv-tdep.h: Minor formatting fixes.
2172
2173 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
2174
2175         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
2176         * dwarf-index-cache.c (create_dir_and_check): Likewise.
2177         (test_mkdir_recursive): Likewise.
2178         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
2179
2180 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
2181
2182         * valarith.c (value_subscripted_rvalue): If an array is not in
2183         memory, and we don't know the upper bound, then we can't know that
2184         the requested element exists or not.
2185
2186 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
2187
2188         * target.c (str_comma_list_concat_elem): Fix typo in comment.
2189         (target_options_to_string): Add comment.
2190
2191 2018-08-08  Tom Tromey  <tom@tromey.com>
2192
2193         * unittests/scoped_mmap-selftests.c: Check result of "write".
2194
2195 2018-08-08  Jim Wilson  <jimw@sifive.com>
2196
2197         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
2198         (decode_register_index_short): New.
2199         (decode_j_type_insn, decode_cj_type_insn): New.
2200         (decode_b_type_insn, decode_cb_type_insn): New.
2201         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
2202         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
2203         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
2204         is_c_sw_insn instead of is_sw_insn.
2205         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
2206         (riscv_software_single_step): New.
2207         * riscv-tdep.h (riscv_software_single_step): Declare.
2208
2209         * riscv-tdep.c (riscv_isa_xlen): Drop static.
2210         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
2211
2212 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
2213
2214         PR gdb/18050:
2215         * target.c (dispose_inferior): Don't dispose of inferiors that are
2216         already killed.
2217
2218 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
2219
2220         * remote.c (remote_target::download_tracepoint): Change char* to
2221         const char*.
2222
2223 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
2224
2225         * target.h (target_options_to_string): Return an std::string.
2226         * target.c (str_comma_list_concat_elem): Return void, use
2227         std::string.
2228         (do_option): Likewise.
2229         (target_options_to_string): Return an std::string.
2230         * linux-nat.c (linux_nat_target::wait): Adjust.
2231         * target-debug.h (target_debug_print_options): Adjust.
2232
2233 2018-08-07  Tom Tromey  <tom@tromey.com>
2234
2235         * Makefile.in (CPPFLAGS): New variable.
2236         (INTERNAL_CPPFLAGS): Use it.
2237
2238 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2239
2240         * NEWS: Mention the index cache.
2241
2242 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2243
2244         * common/pathstuff.h (get_standard_cache_dir): New.
2245         * common/pathstuff.c (get_standard_cache_dir): New.
2246         * build-id.h (build_id_to_string): New.
2247         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
2248         DEBUG_STR_SUFFIX): Move to here.
2249         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
2250         DEBUG_STR_SUFFIX): Move from there.
2251         (write_psymtabs_to_index): Make non-static, add basename
2252         parameter.  Write to temporary files, rename when done.
2253         (save_gdb_index_command): Adjust call to
2254         write_psymtabs_to_index.
2255         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
2256         field.
2257         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
2258         (get_gdb_index_contents_from_cache): New.
2259         (get_gdb_index_contents_from_cache_dwz): New.
2260         (dwarf2_initialize_objfile): Read index from cache.
2261         (dwarf2_build_psymtabs): Save to index.
2262         * dwarf-index-cache.h: New file.
2263         * dwarf-index-cache.c: New file.
2264         * dwarf-index-write.h: New file.
2265
2266 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2267
2268         * gnulib/aclocal.m4: Re-generate.
2269         * gnulib/config.in: Re-generate.
2270         * gnulib/configure: Re-generate.
2271         * gnulib/import/Makefile.am: Re-generate.
2272         * gnulib/import/Makefile.in: Re-generate.
2273         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
2274         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2275         * gnulib/import/m4/mkdir.m4: New file.
2276         * gnulib/import/mkdir.c: New file.
2277         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
2278         module.
2279
2280 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2281
2282         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
2283         * common/scoped_mmap.c: New file.
2284         * common/scoped_mmap.h (destroy): New method.
2285         (~scoped_mmap, reset): Use destroy.
2286         (scoped_mmap): New move constructor.
2287         (mmap_file): New declaration.
2288         * unittests/scoped_mmap-selftests.c (test_normal,
2289         test_invalid_filename, run_tests): New functions.
2290         (_initialize_scoped_mmap_selftests): Register selftest.
2291
2292 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2293
2294         * dwarf2read.c (read_gdb_index_from_section): Rename to...
2295         (read_gdb_index_from_buffer): ... this.  Remove section
2296         parameter, add buffer parameter.
2297         (get_gdb_index_contents_ftype,
2298         get_gdb_index_contents_dwz_ftype): New typedefs.
2299         (dwarf2_read_gdb_index): Add callback parameters to get the
2300         index contents.
2301         (get_gdb_index_contents_from_section): New.
2302         (dwarf2_initialize_objfile): Update call to
2303         dwarf2_read_gdb_index.
2304
2305 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2306
2307         * common/filestuff.h (gdb_fopen_cloexec): New overload.
2308         (gdb_open_cloexec): Likewise.
2309         * nat/linux-osdata.c (command_from_pid): Use string_printf.
2310         (commandline_from_pid): Likewise.
2311         (linux_xfer_osdata_threads): Likewise.
2312         (linux_xfer_osdata_fds): Likewise.
2313         * ada-lang.c (is_package_name): Likewise.
2314         * auxv.c (procfs_xfer_auxv): Likewise.
2315         * breakpoint.c (print_one_breakpoint_location): Use
2316         uiout::field_fmt.
2317         (print_one_catch_solib): Use string_printf.
2318         * coff-pe-read.c (add_pe_exported_sym): Likewise.
2319         (add_pe_forwarded_sym): Likewise.
2320         * dwarf2read.c (create_type_unit_group): Likewise.
2321         (build_error_marker_type): Likewise.
2322         * infcall.c (get_function_name): Likewise.
2323         * valprint.c (print_converted_chars_to_obstack): Likewise.
2324         * xtensa-tdep.c (xtensa_register_type): Likewise.
2325
2326 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
2327
2328         * remote.c (remote_target::download_tracepoint): Fix format
2329         string errors.
2330
2331 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2332
2333         * tracefile.c: Include common/byte-vector.h.
2334         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
2335         with trace_regblock_size if needed.  Update uses of buf.
2336
2337 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2338
2339         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
2340         std::vector<unsigned char>.
2341         * tracepoint.c (collection_list::collection_list): Remove
2342         m_regs_mask initializer from initializer list.  Resize
2343         m_regs_mask using the largest remote register number.
2344         (collection_list::add_remote_register): Remove size check on
2345         m_regs_mask.  Use at to access element.
2346         (collection_list::stringify): Change type of temp_buf to
2347         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
2348         stringify the register mask.  Use pack_hex_byte for the register
2349         mask.
2350
2351 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2352
2353         * tracepoint.h (class collection_list) <add_register>: Remove.
2354         <add_remote_register, add_ax_registers, add_local_register>:
2355         Declare.
2356         <add_memrange>: Add scope parameter.
2357         * tracepoint.c (encode_actions_1): Likewise.
2358         (collection_list::add_register): Rename to ...
2359         (collection_list::add_remote_register): ... this.  Update
2360         comment.
2361         (collection_list::add_ax_registers, add_local_register): New
2362         methods.
2363         (collection_list::add_memrange): Add scope parameter.  Call
2364         add_local_register instead of add_register.
2365         (finalize_tracepoint_aexpr): New function.
2366         (collection_list::collect_symbol): Update calls to add_memrange.
2367         Call add_local_register instead of add_register.  Call
2368         add_ax_registers.  Call finalize_tracepoint_aexpr.
2369         (encode_actions_1): Get remote regnos for $reg action.  Call
2370         add_remote_register, add_ax_registers, and add_local_register.
2371         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
2372         (validate_actionline): Call finalize_tracepoint_aexpr.
2373
2374 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2375
2376         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
2377         Replace array buf with gdb::char_vector buf, of size
2378         get_remote_packet_size ().  Replace references to buf and
2379         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
2380         and xsnprintf with snprintf.  Raise errors if the buffer is too
2381         small.
2382
2383 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2384
2385         * remote.c (remote_target::download_tracepoint): Fix the has_more
2386         predicate in the QTDP action list iteration.
2387
2388 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2389
2390         * remote.c (remote_target::download_tracepoint): Fix indentation
2391         in for block.
2392
2393 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2394
2395         * proc-api.c (_initialize_proc_api): Remove c, unused.
2396         * procfs.c (procfs_init_inferior): Remove signals, unused.
2397         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
2398         unused.
2399
2400 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
2401             Andrew Burgess  <andrew.burgess@embecosm.com>
2402
2403         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
2404         'W_STOPCODE (0)' as this could be ambiguous.
2405
2406 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
2407
2408         * ser-tcp.c (net_open): Fix thinko when deciding whether to
2409         disable TCP's Nagle algorithm (use "ai_protocol" instead of
2410         "ai_socktype").
2411
2412 2018-08-02  Tom Tromey  <tom@tromey.com>
2413
2414         PR symtab/16842.
2415         * dwarf2read.c (read_func_scope): Set symtab on template parameter
2416         symbols.
2417         (process_structure_scope): Likewise.
2418
2419 2018-08-02  Xavier Roirand  <roirand@adacore.com>
2420
2421         PR gdb/22629:
2422         * darwin-nat.c (darwin_kill_inferior): Fix handling of
2423         kill inferior.
2424
2425 2018-08-02  Tom Tromey  <tom@tromey.com>
2426
2427         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
2428         (darwin_suspend_inferior, darwin_resume_inferior)
2429         (darwin_decode_notify_message, darwin_resume_inferior_threads)
2430         (darwin_check_new_threads): Check result of get_darwin_inferior.
2431
2432 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
2433
2434         GDB 8.1.1 released.
2435
2436 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
2437
2438         * varobj.c (varobj_get_path_expr_parent): Report an error if
2439         parent is a dynamic varobj.
2440
2441 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
2442
2443         * gnulib/aclocal.m4: Re-generate.
2444         * gnulib/config.in: Re-generate.
2445         * gnulib/configure: Re-generate.
2446         * gnulib/import/Makefile.in: Re-generate.
2447         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2448         * gnulib/import/m4/onceonly.m4: Re-generate.
2449
2450 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
2451
2452         * target-descriptions.c (struct xml_test_tdesc): New.
2453         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
2454         (record_xml_tdesc): Update.
2455         (maintenance_check_xml_descriptions): Update.
2456         * target-descriptions.h (record_xml_tdesc): Update comment.
2457
2458 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
2459
2460         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
2461         checking array bounds are defined.
2462
2463 2018-07-30  Tom Tromey  <tom@tromey.com>
2464
2465         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
2466         irreflexivity violation.
2467
2468 2018-07-30  Tom Tromey  <tom@tromey.com>
2469
2470         * cli/cli-decode.c (lookup_cmd): Remove lint code.
2471         * value.c (unpack_long): Remove lint code.
2472         * valops.c (value_ind): Remove lint code.
2473         * valarith.c (value_x_binop, value_x_unop, value_equal)
2474         (value_pos): Remove lint code.
2475
2476 2018-07-28  Tom de Vries  <tdevries@suse.de>
2477
2478         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
2479         with undefined upper bound as <optimized out>.
2480
2481 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
2482
2483         * gcore.in: Rename variable "name" to "prefix".  Expand
2484         "usage" text.
2485
2486 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
2487
2488         * windows-nat.c (windows_nat_target::create_inferior): Update to
2489         call close() in global namespace.
2490
2491 2018-07-26  Tom Tromey  <tom@tromey.com>
2492
2493         * dwarf-index-write.c (add_address_entry): Don't add objfile
2494         offsets.
2495         * dbxread.c (find_stab_function): Rename from
2496         find_stab_function_addr.  Return a bound_minimal_symbol.
2497         (read_dbx_symtab): Use raw_text_low, raw_text_high.
2498         Don't add objfile offsets.
2499         (end_psymtab): Use raw_text_low, raw_text_high,
2500         MSYMBOL_VALUE_RAW_ADDRESS.
2501         (read_ofile_symtab): Update.
2502         (process_one_symbol): Update.
2503         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
2504         offsets.
2505         (dw2_relocate): Remove.
2506         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
2507         searching addrmap.
2508         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
2509         Update.
2510         (process_psymtab_comp_unit_reader, add_partial_symbol)
2511         (add_partial_subprogram, dwarf2_ranges_read): Update.
2512         (load_partial_dies): Update.
2513         (add_address_entry): Don't add objfile offsets.
2514         (dwarf2_build_include_psymtabs): Update.
2515         (create_addrmap_from_aranges): Don't add objfile offsets.
2516         (dw2_find_pc_sect_compunit_symtab): Update.
2517         * mdebugread.c (parse_symbol): Don't add objfile offsets.
2518         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
2519         Update.
2520         (parse_partial_symbols): Don't add objfile offsets.  Use
2521         raw_text_low, raw_text_high.  Update.
2522         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
2523         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
2524         or call 'relocate' quick function.  Clear psymbol_map.
2525         * psympriv.h (struct partial_symbol) <address>: Add section
2526         offset.
2527         <set_unrelocated_address>: Rename from set_address.
2528         <raw_text_low, raw_text_high>: New methods.
2529         <text_low, text_high>: Add objfile parameter.
2530         (add_psymbol_to_bcache): Add 'section' parameter.  Call
2531         set_unrelocated_address.
2532         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2533         (find_pc_psymbol): Update.
2534         (fixup_psymbol_section, relocate_psymtabs): Remove.
2535         (dump_psymtab, psym_functions): Update.
2536         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
2537         parameter.
2538         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
2539         (start_psymtab_common): Update.
2540         * symfile-debug.c (debug_qf_relocate): Remove.
2541         (debug_sym_quick_functions): Update.
2542         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
2543         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
2544         Update.
2545
2546 2018-07-26  Tom Tromey  <tromey@redhat.com>
2547
2548         * dbxread.c (end_psymtab): Use text_high_valid and
2549         text_low_valid.
2550         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
2551         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
2552         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
2553         Update comment.
2554         <text_low_valid, text_high_valid>: New fields.
2555         <set_text_low, set_text_high>: Update.
2556         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
2557
2558 2018-07-26  Tom Tromey  <tom@tromey.com>
2559
2560         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
2561         Update.
2562         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
2563         textlow and texthigh fields.
2564         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
2565         Update.
2566         * mdebugread.c (parse_lines, parse_partial_symbols)
2567         (psymtab_to_symtab_1): Update.
2568         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
2569         Rename fields.  Update comment.  Now private.
2570         <text_low, text_high, set_text_low, set_text_high>: New methods.
2571         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2572         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
2573         (start_psymtab_common, maintenance_info_psymtabs)
2574         (maintenance_check_psymtabs): Update.
2575         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
2576         texthigh fields.
2577         (scan_xcoff_symtab): Update.
2578
2579 2018-07-26  Tom Tromey  <tromey@redhat.com>
2580
2581         * psympriv.h (struct partial_symbol) <unrelocated_address,
2582         address, set_address>: New methods.
2583         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
2584         (fixup_psymbol_section, relocate_psymtabs): Update.
2585         (print_partial_symbols): Add 'objfile' parameter.  Update.
2586         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
2587         Update.
2588
2589 2018-07-26  Tom Tromey  <tom@tromey.com>
2590
2591         * dwarf-index-write.c (write_psymbols, debug_names::insert)
2592         (debug_names::write_psymbols): Update.
2593         * psympriv.h (struct partial_symbol): Derive from
2594         general_symbol_info.
2595         <obj_section>: New method.
2596         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
2597         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2598         (find_pc_sect_psymbol, fixup_psymbol_section)
2599         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
2600         (print_partial_symbols, recursively_search_psymtabs)
2601         (compare_psymbols, psymbol_hash, psymbol_compare)
2602         (add_psymbol_to_bcache, maintenance_check_psymtabs)
2603         (psymbol_name_matches, psym_fill_psymbol_map): Update.
2604
2605 2018-07-26  Tom Tromey  <tromey@redhat.com>
2606
2607         * dbxread.c (end_psymtab): Remove dead code.
2608
2609 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
2610
2611         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
2612         DWARF unwinders are disabled.
2613         * dwarf2-frame.c: Add dwarf2read.h include.
2614         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
2615         disabled.
2616         (dwarf2_frame_unwinders_enabled_p): Define.
2617         (show_dwarf_unwinders_enabled_p): New function.
2618         (_initialize_dwarf2_frame): Register switch to control DWARF
2619         unwinder use.
2620         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
2621         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
2622         (show_dwarf_cmdlist): Remove static keyword.
2623         * dwarf2read.h (set_dwarf_cmdlist): Declare.
2624         (show_dwarf_cmdlist): Declare.
2625         * NEWS: Document new feature.
2626
2627 2018-07-26  Tom de Vries  <tdevries@suse.de>
2628
2629         PR breakpoints/23366
2630         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
2631
2632 2018-07-26  Tom de Vries  <tdevries@suse.de>
2633
2634         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
2635         DW_AT_count can't be translated to a dynamic prop.
2636
2637 2018-07-25  Tom de Vries  <tdevries@suse.de>
2638
2639         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
2640         try/catch.
2641
2642 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
2643
2644         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
2645
2646 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
2647
2648         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
2649
2650 2018-07-24  Keith Seitz  <keiths@redhat.comt
2651
2652         PR symtab/23010
2653         * dwarf2read.c (dw2_add_symbol_to_list): New function.
2654         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
2655         instead of add_symbol_to_list.
2656         (read_file_scope): Call prepare_one_comp_unit before reading
2657         any other DIEs.
2658
2659 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
2660
2661         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
2662
2663 2018-07-24  Tom Tromey  <tom@tromey.com>
2664
2665         * utils.c (malloc, realloc, free): Don't declare.
2666         * configure, config.in: Rebuild.
2667         * configure.ac: Don't check for declarations of free, malloc, or
2668         realloc.
2669
2670 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
2671
2672         * aarch64-linux-nat.c
2673         (aarch64_linux_nat_target::stopped_data_address): Remove unused
2674         variable.
2675         * arm-linux-nat.c (fetch_regs): Likewise.
2676         (store_regs): Likewise.
2677         (fetch_vfp_regs): Likewise.
2678         (store_vfp_regs): Likewise.
2679         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
2680         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
2681         (arm_linux_nat_target::insert_watchpoint): Likewise.
2682         (arm_linux_nat_target::remove_watchpoint): Likewise.
2683         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
2684         Likewise.
2685         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
2686         Likewise.
2687         * ppc-linux-nat.c (fetch_register): Likewise.
2688         (fetch_all_gp_regs): Likewise.
2689         (fetch_ppc_registers): Likewise.
2690         (store_all_gp_regs): Likewise.
2691         (store_ppc_registers): Likewise.
2692         (hwdebug_insert_point): Likewise.
2693         (can_use_watchpoint_cond_accel): Likewise.
2694         * remote-sim.c (gdb_os_write_stdout): Likewise.
2695
2696 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
2697             Tom Tromey  <tom@tromey.com>
2698
2699         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
2700         test for it.
2701         * configure: Rebuild.
2702
2703 2018-07-22  Tom Tromey  <tom@tromey.com>
2704
2705         * regformats/regdat.sh: Define xmltarget_${name} inside
2706         #ifndef IN_PROCESS_AGENT.
2707
2708 2018-07-22  Tom Tromey  <tom@tromey.com>
2709
2710         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
2711
2712 2018-07-22  Tom Tromey  <tom@tromey.com>
2713
2714         * symfile.c (reread_symbols): Notify iter, not objfile.
2715
2716 2018-07-22  Tom Tromey  <tom@tromey.com>
2717
2718         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
2719         Use arch_ops.
2720         (ravenscar_thread_target::prepare_to_store): Likewise.
2721
2722 2018-07-22  Tom Tromey  <tom@tromey.com>
2723
2724         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
2725         unused variable.  Call value_fetch_lazy when needed.
2726         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
2727         Remove unused variable.  Call value_fetch_lazy when needed.
2728
2729 2018-07-22  Tom Tromey  <tom@tromey.com>
2730
2731         * m32c-tdep.c (mark_dma): Return void.
2732         (make_regs): Remove unused declarations.
2733
2734 2018-07-22  Tom Tromey  <tom@tromey.com>
2735
2736         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
2737         cmdscm_get_valid_command_smob_arg_unsafe for effect.
2738         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
2739         bkscm_get_valid_block_smob_arg_unsafe for effect.
2740
2741 2018-07-22  Tom Tromey  <tom@tromey.com>
2742
2743         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
2744         value_type.
2745
2746 2018-07-22  Tom Tromey  <tom@tromey.com>
2747
2748         * windows-nat.c (saved_context): Conditionally define.
2749         * remote.c (remote_target::remote_btrace_maybe_reopen):
2750         Conditionally declare "warned".
2751         * inflow.c (sigquit_ours): Conditionally define.
2752         (new_tty): Move "tty" declaration inside #if.
2753         * guile/guile.c (guile_datadir): Conditionally define.
2754         * charset.c (set_be_le_names): Move some declarations inside #if.
2755         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
2756         #if.
2757         (parse_xml_btrace_conf): Likewise.
2758
2759 2018-07-22  Tom Tromey  <tom@tromey.com>
2760
2761         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
2762
2763 2018-07-22  Tom Tromey  <tom@tromey.com>
2764
2765         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
2766         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
2767         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
2768         * buildsym-legacy.c (get_macro_table): Remove unused variable.
2769         * stack.c (frame_apply_level_command): Remove unused variable.
2770         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
2771         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
2772         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
2773         unused variable.
2774         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
2775         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
2776         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
2777         variable.
2778         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
2779         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
2780         variable.
2781         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
2782         Remove unused variable.
2783         * cli/cli-script.c (recurse_read_control_structure): Remove unused
2784         variable.
2785         * common/tdesc.c (print_xml_feature::visit): Remove unused
2786         variable.
2787         * compile/compile-object-load.c (store_regs): Remove unused
2788         variables.
2789         * complaints.c (clear_complaints): Remove unused variable.
2790         * corelow.c (core_target_open): Remove unused variable.
2791         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
2792         variable.
2793         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
2794         variable.
2795         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
2796         variable.
2797         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
2798         variable.
2799         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
2800         variable.
2801         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
2802         variable.
2803         * ia64-tdep.c (examine_prologue): Remove unused variable.
2804         * infcall.c (run_inferior_call): Remove unused variable.
2805         * inferior.c (exit_inferior): Remove unused variable.
2806         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
2807         * linespec.c (decode_line_2): Remove unused variable.
2808         * linux-nat.c (super_close): Remove.
2809         * linux-tdep.c (linux_info_proc): Remove unused variable.
2810         * mi/mi-main.c (mi_execute_command): Remove unused variable.
2811         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
2812         Remove unused variable.
2813         * parse.c (find_minsym_type_and_address): Remove unused variable.
2814         * printcmd.c (info_symbol_command, printf_floating): Remove unused
2815         variable.
2816         * python/py-breakpoint.c (bppy_set_commands): Remove unused
2817         variable.
2818         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
2819         variables.
2820         * record-btrace.c (record_btrace_target::store_registers): Remove
2821         unused variable.
2822         (cmd_show_record_btrace_cpu): Remove unused variable.
2823         * riscv-tdep.c (riscv_register_reggroup_p)
2824         (riscv_push_dummy_call, riscv_return_value): Remove unused
2825         variable.
2826         * rust-exp.y (literal): Remove unused variable.
2827         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
2828         unused variable.
2829         <STRUCTOP_ANONYMOUS>: Likewise.
2830         * s390-linux-tdep.c (s390_linux_init_abi_31)
2831         (s390_linux_init_abi_64): Remove unused variable.
2832         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
2833         (file_select_thread, net_windows_open, _initialize_ser_windows):
2834         Remove unused variables.
2835         * symtab.c (find_pc_sect_line): Remove unused variable.
2836         * target-memory.c (compute_garbled_blocks): Remove unused
2837         variable.
2838         (target_write_memory_blocks): Remove unused variable.
2839         * target.c (target_stack::unpush): Remove unused variables.
2840         * tracepoint.c (start_tracing, all_tracepoint_actions)
2841         (merge_uploaded_trace_state_variables)
2842         (print_one_static_tracepoint_marker): Remove unused variable.
2843         * unittests/basic_string_view/element_access/char/1.cc (test01):
2844         Remove unused variable.
2845         * windows-nat.c (windows_continue, windows_add_all_dlls)
2846         (do_initial_windows_stuff, windows_nat_target::create_inferior):
2847         Remove unused variables.
2848
2849 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
2850
2851         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
2852         attr_profile in HAVE_ELF.
2853         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
2854         HAVE_ELF.
2855
2856 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
2857
2858         * frame.c (frame_register_unwind): Change parameter name.
2859         (frame_unwind_register): Likewise.
2860         (frame_unwind_register_value): Likewise.
2861         (frame_unwind_register_signed): Likewise.
2862         (frame_unwind_register_unsigned): Likewise.
2863         * frame.h (frame_register_unwind): Likewise.
2864         (frame_unwind_register): Likewise.
2865         (frame_unwind_register_value): Likewise.
2866         (frame_unwind_register_signed): Likewise.
2867         (frame_unwind_register_unsigned): Likewise.
2868         (frame_unwind_arch): Likewise.
2869
2870 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
2871
2872         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
2873         ISA maintenance.
2874
2875 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
2876
2877         * mips-linux-nat.c (mips_linux_nat_target::read_description):
2878         Call `get_ptrace_pid' rather than extracting the ptrace PID by
2879         hand.
2880
2881 2018-07-20  Keith Seitz  <keiths@redhat.com>
2882
2883         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
2884         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
2885         m_compunit_symtab, m_language>: Add "m_" prefix.
2886         Update all uses.
2887         * buildsym.c: Update all uses.
2888
2889 2018-07-20  Tom Tromey  <tom@tromey.com>
2890
2891         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
2892         * buildsym.h (record_line_ftype): Remove typedef.
2893
2894 2018-07-20  Tom Tromey  <tom@tromey.com>
2895
2896         * buildsym-legacy.h (augment_type_symtab): Don't declare.
2897         (end_expandable_symtab): Likewise.
2898         (end_symtab_get_static_block): Likewise.
2899         (end_symtab_from_static_block): Likewise.
2900         * buildsym-legacy.c (augment_type_symtab): Remove.
2901         (end_expandable_symtab): Remove.
2902         (end_symtab_get_static_block): Remove.
2903         (end_symtab_from_static_block): Remove.
2904
2905 2018-07-20  Tom Tromey  <tom@tromey.com>
2906
2907         * dwarf2read.c: Include buildsym.h.
2908         (struct dwarf2_cu) <builder>: New method.
2909         (fixup_go_packaging): Update.
2910         (process_full_comp_unit, process_full_type_unit): Update.  Don't
2911         use scoped_free_pendings.
2912         (using_directives): Add "cu" parameter, remove "language".
2913         (read_import_statement, setup_type_unit_groups, )
2914         (read_func_scope, read_lexical_block_scope)
2915         (dwarf2_record_block_ranges, read_namespace): Update.
2916         (lnp_state_machine::lnp_state_machine): Add cu parameter.
2917         (lnp_state_machine::handle_end_sequence): Update.
2918         (class lnp_state_machine) <m_cu>: New member.
2919         <m_record_line_callback>: Remove.
2920         <m_currently_recording_lines>: New member.
2921         (lnp_state_machine::handle_set_file): Update.
2922         (noop_record_line): Remove.
2923         (dwarf_record_line_p): Add cu parameter.
2924         (dwarf_record_line_1, dwarf_finish_line): Likewise.
2925         (lnp_state_machine::record_line)
2926         (lnp_state_machine::lnp_state_machine)
2927         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
2928         (dwarf_decode_lines): Update.
2929         (dwarf2_start_subfile): Add cu parameter.
2930         (dwarf2_start_symtab, new_symbol): Update.
2931         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
2932         Remove dwarf2_per_objfile parameter.
2933         (dwarf_decode_macros): Update.
2934
2935 2018-07-20  Tom Tromey  <tom@tromey.com>
2936
2937         * stabsread.c (define_symbol): Update.
2938         * buildsym-legacy.h (get_buildsym_compunit): Declare.
2939         * dwarf2read.c (new_symbol): Update.
2940         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
2941         * cp-namespace.c: Include buildsym.h.
2942         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
2943         * buildsym-legacy.c (get_buildsym_compunit): New function.
2944
2945 2018-07-20  Tom Tromey  <tom@tromey.com>
2946
2947         * xcoffread.c: Include buildsym-legacy.h.
2948         * windows-nat.c: Include buildsym-legacy.h.
2949         * stabsread.c: Include buildsym-legacy.h.
2950         * mdebugread.c: Include buildsym-legacy.h.
2951         * buildsym-legacy.h: New file.
2952         * buildsym-legacy.c: New file, from buildsym.c.
2953         * go32-nat.c: Include buildsym-legacy.h.
2954         * dwarf2read.c: Include buildsym-legacy.h.
2955         * dbxread.c: Include buildsym-legacy.h.
2956         * cp-namespace.c: Include buildsym-legacy.h.
2957         * coffread.c: Include buildsym-legacy.h.
2958         * buildsym.h: Move some contents to buildsym-legacy.h.
2959         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
2960         buildsym-legacy.c.
2961         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
2962
2963 2018-07-20  Tom Tromey  <tom@tromey.com>
2964
2965         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
2966         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
2967         (buildsym_compunit::buildsym_compunit)
2968         (buildsym_compunit::~buildsym_compunit)
2969         (buildsym_compunit::get_macro_table): Define.
2970
2971 2018-07-20  Tom Tromey  <tom@tromey.com>
2972
2973         * buildsym.c (reset_symtab_globals): Remove.
2974         (buildsym_compunit::end_symtab_from_static_block): Update.
2975         (buildsym_compunit::augment_type_symtab): Update.
2976         (end_symtab_from_static_block): Call free_buildsym_compunit.
2977         (augment_type_symtab, end_symtab, end_expandable_symtab):
2978         Likewise.
2979
2980 2018-07-20  Tom Tromey  <tom@tromey.com>
2981
2982         * arch-utils.c: Do not include buildsym.h.
2983         * mipsread.c: Do not include buildsym.h.
2984         * machoread.c: Do not include buildsym.h.
2985         * elfread.c: Do not include buildsym.h.
2986
2987 2018-07-20  Tom Tromey  <tom@tromey.com>
2988
2989         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
2990         initialization.
2991         (buildsym_compunit): Add new constructor.
2992         (struct buildsym_compunit) <get_last_source_file, finish_block,
2993         record_block_range, start_subfile, patch_subfile_names,
2994         push_subfile, pop_subfile, record_line, get_compunit_symtab,
2995         set_last_source_start_addr, get_last_source_start_addr,
2996         get_local_using_directives, set_local_using_directives,
2997         get_global_using_directives, outermost_context_p,
2998         get_current_context_stack, get_context_stack_depth,
2999         get_current_subfile, get_local_symbols, get_file_symbols,
3000         get_global_symbols, record_debugformat, record_producer,
3001         push_context, pop_context, end_symtab_get_static_block,
3002         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
3003         New public methods.
3004         <record_pending_block, finish_block_internal, make_blockvector,
3005         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
3006         private methods.
3007         Update all users.
3008
3009 2018-05-22  Tom Tromey  <tom@tromey.com>
3010
3011         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
3012         parameter.
3013         (finish_block_internal): Update.
3014
3015 2018-07-20  Tom Tromey  <tom@tromey.com>
3016
3017         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
3018         parameter.
3019         (finish_block_internal): Update.
3020
3021 2018-07-20  Tom Tromey  <tom@tromey.com>
3022
3023         * buildsym.h (EXTERN): Don't define or undef.
3024         * buildsym.c (EXTERN): Don't define.
3025
3026 2018-07-20  Tom Tromey  <tom@tromey.com>
3027
3028         * buildsym.c: Remove TODO comment.
3029
3030 2018-07-20  Tom Tromey  <tom@tromey.com>
3031
3032         * coffread.c (coff_symtab_read): Update.
3033         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
3034         (xcoff_new_init): Update.
3035         * mipsread.c (mipscoff_new_init): Update.
3036         * mdebugread.c (mdebug_build_psymtabs): Update.
3037         * elfread.c (elf_new_init): Update.
3038         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
3039         Update.
3040         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
3041         (coffstab_build_psymtabs, elfstab_build_psymtabs)
3042         (stabsect_build_psymtabs): Update.
3043         * buildsym.h (buildsym_init): Don't declare.
3044         * buildsym.c: Update comment.
3045         (prepare_for_building): Remove.
3046         (start_symtab, restart_symtab): Update.
3047         (reset_symtab_globals): Update comment.
3048         (buildsym_init): Remove.
3049
3050 2018-07-20  Tom Tromey  <tom@tromey.com>
3051
3052         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
3053         * stabsread.c (patch_block_stabs, define_symbol, read_type)
3054         (read_enum_type, common_block_start, common_block_end)
3055         (cleanup_undefined_types_1, finish_global_stabs): Update.
3056         * mdebugread.c (psymtab_to_symtab_1): Update.
3057         * dwarf2read.c (fixup_go_packaging, read_func_scope)
3058         (read_lexical_block_scope, new_symbol): Update.
3059         * dbxread.c (process_one_symbol): Update.
3060         * coffread.c (coff_symtab_read, process_coff_symbol)
3061         (coff_read_enum_type): Update.
3062         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
3063         declare.
3064         (get_local_symbols, get_file_symbols, get_global_symbols): New
3065         functions.
3066         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
3067         m_global_symbols.
3068         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
3069         (~scoped_free_pendings): Update.
3070         (finish_block, prepare_for_building, reset_symtab_globals)
3071         (end_symtab_get_static_block, end_symtab_with_blockvector)
3072         (augment_type_symtab, push_context): Update.
3073         (get_local_symbols, get_file_symbols, get_global_symbols): New
3074         functions.
3075         (buildsym_init): Update.
3076
3077 2018-07-20  Tom Tromey  <tom@tromey.com>
3078
3079         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
3080         (process_full_type_unit): Likewise.
3081         (dwarf2_start_symtab): Set list_in_scope.
3082
3083 2018-07-20  Tom Tromey  <tom@tromey.com>
3084
3085         * dwarf2read.c (process_psymtab_comp_unit_reader)
3086         (build_type_psymtabs_reader): Do not set list_in_scope.
3087
3088 2018-07-20  Tom Tromey  <tom@tromey.com>
3089
3090         * buildsym.c (free_pendings): Remove.
3091         (add_symbol_to_list, scoped_free_pendings)
3092         (finish_block_internal, buildsym_init): Update.
3093
3094 2018-07-20  Tom Tromey  <tom@tromey.com>
3095
3096         * xcoffread.c (read_xcoff_symtab): Update.
3097         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
3098         Update.
3099         * dbxread.c (process_one_symbol): Update.
3100         * coffread.c (coff_symtab_read): Update.
3101         * buildsym.h (finish_block): Update.
3102         * buildsym.c (finish_block): Remove "listhead" argument.
3103         (end_symtab_get_static_block): Update.
3104
3105 2018-07-20  Tom Tromey  <tom@tromey.com>
3106
3107         * buildsym.h (class scoped_free_pendings): Remove constructor.
3108         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
3109         method.
3110         <m_pending_block_obstack, m_pending_blocks>: New members.
3111         (pending_block_obstack, pending_blocks): Remove.
3112         (scoped_free_pendings::scoped_free_pendings): Default.
3113         (~scoped_free_pendings): Update.
3114         (free_pending_blocks): Remove.
3115         (finish_block_internal, record_pending_block, make_blockvector)
3116         (end_symtab_get_static_block, augment_type_symtab, push_context)
3117         (buildsym_init): Update.
3118
3119 2018-07-20  Tom Tromey  <tom@tromey.com>
3120
3121         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
3122         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
3123         members.
3124         (pending_addrmap, pending_addrmap_obstack)
3125         (pending_addrmap_interesting): Remove.
3126         (scoped_free_pendings, record_block_range, make_blockvector)
3127         (prepare_for_building, reset_symtab_globals, buildsym_init):
3128         Update.
3129
3130 2018-07-20  Tom Tromey  <tom@tromey.com>
3131
3132         * xcoffread.c (process_linenos): Update.
3133         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
3134         * mdebugread.c (psymtab_to_symtab_1): Update.
3135         * dwarf2read.c (setup_type_unit_groups)
3136         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
3137         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
3138         * dbxread.c (process_one_symbol): Update.
3139         * coffread.c (coff_symtab_read, enter_linenos)
3140         (process_coff_symbol): Update.
3141         * buildsym.h (current_subfile): Don't declare.
3142         (get_current_subfile): Declare.
3143         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
3144         member.
3145         (start_subfile, free_buildsym_compunit, push_subfile)
3146         (prepare_for_building, start_symtab): Update.
3147         (get_current_subfile): New function.
3148
3149 2018-07-20  Tom Tromey  <tom@tromey.com>
3150
3151         * coffread.c (coff_symtab_read): Update.
3152         * xcoffread.c (read_xcoff_symtab): Update.
3153         * dwarf2read.c (new_symbol): Update.
3154         (read_func_scope, read_lexical_block_scope): Update.
3155         * dbxread.c (process_one_symbol): Update.
3156         * buildsym.h (context_stack, context_stack_depth): Don't declare.
3157         (outermost_context_p): Remove macro.
3158         (outermost_context_p, get_current_context_stack)
3159         (get_context_stack_depth): Declare.
3160         (pop_context): Return struct context_stack.
3161         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
3162         member.
3163         (context_stack_size): Remove.
3164         (INITIAL_CONTEXT_STACK_SIZE): Remove.
3165         (prepare_for_building, end_symtab_get_static_block)
3166         (augment_type_symtab, push_context): Update.
3167         (pop_context): Return struct context_stack.
3168         (outermost_context_p, get_current_context_stack)
3169         (get_context_stack_depth): New functions.
3170         (buildsym_init): Update.
3171
3172 2018-07-20  Tom Tromey  <tom@tromey.com>
3173
3174         * rust-exp.y: Now a pure parser.  Update all rules.
3175         (%union): Move earlier.
3176         (current_parser, work_obstack): Remove globals.
3177         (rust_parser, ~rust_parser): Update.
3178         (class rust_parser) <copy_name, concat3, crate_name, super_name,
3179         lex_character, lex_number, lex_string, lex_identifier,
3180         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
3181         convert_name, convert_params_to_expression,
3182         convert_ast_to_expression, ast_basic_type, ast_operation,
3183         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
3184         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
3185         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
3186         ast_array_type, ast_slice_type, ast_reference_type,
3187         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
3188         (rust_parse): Update.
3189         (rustyyerror, rustyylex): Add parser parameter.
3190         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
3191         (rust_lex_stringish_test, rust_lex_test_sequence)
3192         (rust_lex_test_trailing_dot, rust_lex_test_completion)
3193         (rust_lex_test_push_back, rust_lex_tests): Update.
3194
3195 2018-07-19  Pedro Alves  <palves@redhat.com>
3196
3197         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
3198         gdb::unique_xmalloc_ptr.
3199         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
3200         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
3201         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
3202         copy-initialization.
3203         * guile/scm-pretty-print.c (ppscm_print_children): Use
3204         gdb::unique_xmalloc_ptr instead of cleanups.
3205         (gdbscm_apply_val_pretty_printer): Remove cleanups.
3206         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
3207         gdb::unique_xmalloc_ptr.
3208         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
3209         Adjust to use gdb::unique_xmalloc_ptr.
3210         * guile/scm-utils.c (extract_arg): Adjust.
3211         * guile/scm-value.c (gdbscm_value_field): Adjust to use
3212         gdb::unique_xmalloc_ptr instead of a cleanup.
3213
3214 2018-07-19  Tom Tromey  <tom@tromey.com>
3215
3216         * utils.c (do_value_free_to_mark)
3217         (make_cleanup_value_free_to_mark): Remove.
3218         * utils.h (make_cleanup_value_free_to_mark): Remove.
3219
3220 2018-07-19  Pedro Alves  <palves@redhat.com>
3221
3222         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
3223         forwarding reference.
3224
3225 2018-07-18  Pedro Alves  <palves@redhat.com>
3226
3227         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
3228         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
3229         cleanup.
3230
3231 2018-07-18  Pedro Alves  <palves@redhat.com>
3232
3233         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
3234         exceptions.
3235         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
3236         (gdbscm_wrap): New.
3237         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
3238         directly instead of a cleanup.
3239         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
3240         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
3241         (vlscm_binop_gdbthrow): New, factored out from ...
3242         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
3243         (vlscm_rich_compare): Use gdbscm_wrap.
3244         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
3245         instead of a cleanup.
3246         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
3247         cleanup.
3248         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
3249         Use xfree directly instead of a cleanup.
3250         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
3251         Adjust to use gdbscm_wrap and scoped_value_mark.
3252         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
3253         (gdbscm_value_address, gdbscm_value_dereference)
3254         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
3255         scoped_value_mark.
3256         (gdbscm_value_dynamic_type): Use scoped_value_mark.
3257         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
3258         scoped_value_mark.
3259         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
3260         gdbscm_wrap and scoped_value_mark.
3261         (gdbscm_value_to_string): Use xfree directly instead of a
3262         cleanup.  Move 'buffer' unique_ptr to TRY scope.
3263         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
3264         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
3265         scoped_value_mark.
3266         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
3267         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
3268         scoped_value_mark.
3269         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
3270         gdbscm_wrap.
3271
3272 2018-07-18  Tom de Vries  <tdevries@suse.de>
3273
3274         * findvar.c (default_read_var_value): Also resolve dynamic type for
3275         LOC_OPTIMIZED_OUT vars.
3276
3277 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
3278
3279         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
3280         decoding.
3281
3282 2018-07-17  Tom Tromey  <tom@tromey.com>
3283
3284         * guile/scm-param.c (pascm_set_func, pascm_show_func)
3285         (compute_enum_list, pascm_set_param_value_x)
3286         (gdbscm_parameter_value): Update.
3287         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
3288         (gdbscm_scm_to_host_string): Update.
3289         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
3290         Update.
3291         * guile/scm-cmd.c (cmdscm_add_completion): Update.
3292         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
3293         * guile/scm-string.c (gdbscm_scm_to_string): Return
3294         unique_xmalloc_ptr.
3295         (gdbscm_scm_to_host_string): Likewise.
3296
3297 2018-07-17  Tom Tromey  <tom@tromey.com>
3298
3299         * guile/guile.c (gdbscm_eval_from_control_command): Update.
3300         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
3301         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
3302         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
3303         unique_xmalloc_ptr.
3304
3305 2018-07-17  Tom Tromey  <tom@tromey.com>
3306
3307         * guile/scm-param.c (pascm_signal_setshow_error): Update.
3308         * guile/guile-internal.h (gdbscm_exception_message_to_string):
3309         Update.
3310         * guile/scm-cmd.c (cmdscm_function): Update.
3311         * guile/scm-pretty-print.c
3312         (ppscm_print_exception_unless_memory_error): Update.
3313         * guile/scm-exception.c (gdbscm_exception_message_to_string):
3314         Return unique_xmalloc_ptr.
3315
3316 2018-07-17  Tom Tromey  <tom@tromey.com>
3317
3318         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
3319         Use string_printf.
3320
3321 2018-07-17  Jim Wilson  <jimw@sifive.com>
3322
3323         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
3324         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
3325         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
3326         unecessary braces after EF_RISCV_RVC test.  Delete call to
3327         set_gdbarch_decr_pc_after_break.
3328
3329         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
3330         RISCV_LAST_FP_REGNUM + 1.
3331         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
3332
3333 2018-07-17  Tom Tromey  <tom@tromey.com>
3334
3335         * configure.ac: Remove --disable-gdbcli.
3336         * configure: Rebuild.
3337         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
3338         (SUBDIR_CLI_CFLAGS): Remove.
3339         (SFILES): Use SUBDIR_CLI_SRCS.
3340         (COMMON_OBS): Use SUBDIR_CLI_OBS.
3341
3342 2018-07-17  Tom Tromey  <tom@tromey.com>
3343
3344         PR gdb/18624:
3345         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
3346
3347 2018-07-16  Jim Wilson  <jimw@sifive.com>
3348
3349         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
3350
3351 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
3352
3353         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
3354         variable.
3355         (libunwind_frame_sniffer): Likewise.
3356         (libunwind_frame_prev_register): Likewise.
3357         (libunwind_sigtramp_frame_sniffer): Likewise.
3358         * ia64-tdep.c (ia64_access_reg): Likewise.
3359         (ia64_access_rse_reg): Likewise.
3360         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
3361         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
3362
3363 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
3364
3365         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
3366
3367 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
3368
3369         * remote-sim.c (gdbsim_target::close,
3370         gdbsim_target::mourn_inferior): Remove unused variables.
3371
3372 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
3373
3374         * ia64-tdep.c (ktab_buf): New global.
3375         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
3376         (get_kernel_table): Adjust.
3377
3378 2018-07-16  Tom Tromey  <tom@tromey.com>
3379
3380         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
3381         * dwarf2read.c (using_directives, new_symbol): Use
3382         outermost_context_p.
3383         * dbxread.c (process_one_symbol): Use outermost_context_p.
3384         * coffread.c (coff_symtab_read): Use outermost_context_p.
3385
3386 2018-07-16  Tom Tromey  <tom@tromey.com>
3387
3388         * dwarf2read.c (using_directives, read_func_scope)
3389         (read_lexical_block_scope): Update.
3390         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
3391         * buildsym.h (local_using_directives, global_using_directives):
3392         Don't declare.
3393         (get_local_using_directives, set_local_using_directives)
3394         (get_global_using_directives): Declare.
3395         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
3396         m_global_using_directives>: New members.
3397         (finish_block_internal, prepare_for_building)
3398         (reset_symtab_globals, end_symtab_get_static_block)
3399         (push_context): Update.
3400         (get_local_using_directives, set_local_using_directives)
3401         (get_global_using_directives): New functions.
3402         (buildsym_init): Update.
3403
3404 2018-07-16  Tom Tromey  <tom@tromey.com>
3405
3406         * xcoffread.c (xcoff_initial_scan): Don't call
3407         free_pending_blocks.
3408         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
3409         * buildsym.h (class scoped_free_pendings): Add constructor.
3410         (free_pending_blocks): Don't declare.
3411         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
3412         (free_pending_blocks): Now static.
3413
3414 2018-07-16  Tom Tromey  <tom@tromey.com>
3415
3416         * buildsym.h (push_subfile, pop_subfile): Update declarations.
3417         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
3418         member.
3419         (struct subfile_stack): Remove.
3420         (subfile_stack): Remove.
3421         (push_subfile, pop_subfile, buildsym_init): Update.
3422
3423 2018-07-16  Tom Tromey  <tom@tromey.com>
3424
3425         * buildsym.c (push_subfile): Use gdb_assert.
3426         (pop_subfile): Use gdb_assert.
3427
3428 2018-07-16  Tom Tromey  <tom@tromey.com>
3429
3430         * buildsym.h (merge_symbol_lists): Remove.
3431         * buildsym.c (merge_symbol_lists): Remove.
3432
3433 2018-07-16  Tom Tromey  <tom@tromey.com>
3434
3435         * stabsread.c (scan_file_globals): Update comment.
3436         * stabsread.h (scan_file_globals): Move from buildsym.h.
3437         * buildsym.h (scan_file_globals): Move to stabsread.h.
3438
3439 2018-07-16  Tom Tromey  <tom@tromey.com>
3440
3441         * xcoffread.c (xcoff_new_init): Update.
3442         * mipsread.c (mipscoff_new_init): Update.
3443         * mdebugread.c (mdebug_build_psymtabs): Update.
3444         * elfread.c (elf_new_init): Update.
3445         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
3446         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
3447         * buildsym.h (buildsym_new_init): Don't declare.
3448         * buildsym.c (buildsym_new_init): Remove.
3449
3450 2018-07-16  Tom Tromey  <tom@tromey.com>
3451
3452         * stabsread.h (within_function): Move from buildsym.h.
3453         * stabsread.c (start_stabs): Clear within_function.
3454         * coffread.c (coff_start_symtab): Clear within_function.
3455         * buildsym.h (within_function): Move to stabsread.h.
3456         * buildsym.c (prepare_for_building): Update.
3457
3458 2018-07-16  Tom Tromey  <tom@tromey.com>
3459
3460         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
3461         * dwarf2read.c (dwarf2_start_symtab): Don't set
3462         processing_gcc_compilation.
3463         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
3464
3465 2018-07-16  Tom Tromey  <tom@tromey.com>
3466
3467         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
3468         (next_symbol_text_func): Move from buildsym.h.
3469         * stabsread.c (hashname): Move from buildsym.c.
3470         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
3471         (next_symbol_text_func, hashname): Move to stabsread.h.
3472         * buildsym.c: Don't include bcache.h
3473         (hashname): Move to stasbread.c.
3474
3475 2018-07-16  Tom Tromey  <tom@tromey.com>
3476
3477         * buildsym.h (context_stack_size): Don't declare.
3478         * buildsym.c (context_stack_size): New global.
3479
3480 2018-07-16  Tom Tromey  <tom@tromey.com>
3481
3482         * dbxread.c (processing_acc_compilation): New global.
3483         * buildsym.h (processing_acc_compilation): Don't declare.
3484
3485 2018-07-16  Tom Tromey  <tom@tromey.com>
3486
3487         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
3488         * dbxread.c (read_ofile_symtab): Update.
3489         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
3490         * buildsym.h (last_source_start_addr): Remove.
3491         (set_last_source_start_addr, get_last_source_start_addr):
3492         Declare.
3493         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
3494         parameter.
3495         (struct buildsym_compunit) <m_last_source_start_addr>: New
3496         member.
3497         (prepare_for_building): Remove start_addr parameter.
3498         (start_symtab, restart_symtab, end_symtab_get_static_block)
3499         (end_symtab_with_blockvector): Update.
3500         (set_last_source_start_addr, get_last_source_start_addr): New
3501         functions.
3502
3503 2018-07-16  Tom Tromey  <tom@tromey.com>
3504
3505         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
3506         member.
3507         (have_line_numbers): Remove.
3508         (record_line, prepare_for_building, end_symtab_get_static_block)
3509         (augment_type_symtab): Update.
3510
3511 2018-07-16  Tom Tromey  <tom@tromey.com>
3512
3513         * buildsym.c (~buildsym_compunit): Free the macro table.
3514         (struct buildsym_compunit) <get_macro_table, release_macros>: New
3515         methods.
3516         <m_pending_macros>: New member.
3517         (pending_macros): Remove.
3518         (~scoped_free_pendings, get_macro_table, prepare_for_building)
3519         (reset_symtab_globals, end_symtab_get_static_block)
3520         (end_symtab_with_blockvector, augment_type_symtab)
3521         (buildsym_init): Update.
3522
3523 2018-07-16  Tom Tromey  <tom@tromey.com>
3524
3525         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
3526         parameter.
3527         (buildsym_compunit::set_last_source_file): New method.
3528         <m_last_source_file>: New member.
3529         (prepare_for_building): Remove "name" parameter.
3530         (start_symtab, restart_symtab, reset_symtab_globals): Update.
3531         (last_source_file): Remove.
3532         (set_last_source_file, get_last_source_file): Update.
3533
3534 2018-07-16  Tom Tromey  <tom@tromey.com>
3535
3536         * buildsym.c (prepare_for_building): Add assert.
3537
3538 2018-07-16  Tom Tromey  <tom@tromey.com>
3539
3540         * buildsym.c (~buildsym_compunit): Update.
3541         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
3542         (start_subfile, patch_subfile_names)
3543         (end_symtab_with_blockvector): Update.
3544
3545 2018-07-16  Tom Tromey  <tom@tromey.com>
3546
3547         * buildsym.c (struct buildsym_compunit): Add constructor,
3548         destructor, initializers.
3549         (start_buildsym_compunit): Remove.
3550         (free_buildsym_compunit): Use "delete".
3551         (start_symtab, restart_symtab): Use "new".
3552
3553 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
3554
3555         * symfile.c (set_objfile_default_section_offset): Remove struct
3556         keyword.
3557
3558 2018-07-14  Stafford Horne  <shorne@gmail.com>
3559
3560         * (Responsible Maintainers): Add myself as or1k maintainer.
3561
3562 2018-07-13  Tom Tromey  <tom@tromey.com>
3563
3564         * symfile.c (set_objfile_default_section_offset): Use extra braces
3565         around initializer.
3566
3567 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3568
3569         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
3570         non-branching basr.
3571
3572 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3573
3574         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3575         unittests/cli-utils-selftests.c
3576         * unittests/cli-utils-selftests.c: New file.
3577
3578 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3579
3580         * NEWS: Mention new commands. Mention change to 'thread apply'.
3581
3582 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3583
3584         * thread.c (thr_try_catch_cmd): New function.
3585         (thread_apply_all_command): Handle qcs flags.
3586         (thread_apply_command): Handle qcs flags.
3587         (taas_command): New function.
3588         (tfaas_command): New function.
3589         (_initialize_thread): Update to setup the new commands 'taas
3590         and 'tfaas'. Change doc string for 'thread apply'.
3591
3592 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3593
3594         * stack.c: (trailing_outermost_frame): New function, mostly
3595         extracted from backtrace_command_1.
3596         (leading_innermost_frame): New function.
3597         (backtrace_command_1): Update to call trailing_outermost_frame.
3598         (frame_apply_command_count): New function.
3599         (frame_apply_level_command): New function.
3600         (frame_apply_all_command): New function.
3601         (frame_apply_command): New function.
3602         (faas_command): New function.
3603         (frame_cmd_list): New variable.
3604         (_initialize_stack): Update to setup the new commands 'frame apply'
3605         and 'faas'.
3606
3607 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3608
3609         * cli-utils.c (number_or_range_parser::get_number): Only handle
3610         numbers or convenience var as numbers.
3611         (parse_flags): New function.
3612         (parse_flags_qcs): New function.
3613         (number_or_range_parser::finished): Ensure parsing end is detected
3614         before end of string.
3615         * cli-utils.h (parse_flags): New function.
3616         (parse_flags_qcs): New function.
3617         (number_or_range_parser): Remove m_finished bool.
3618         (number_or_range_parser::skip_range): Set m_in_range to false.
3619
3620 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
3621
3622         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
3623         on Windows.
3624
3625 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
3626             Jan Kratochvil  <jan.kratochvil@redhat.com>
3627             Paul Fertser  <fercerpav@gmail.com>
3628             Tsutomu Seki  <sekiriki@gmail.com>
3629             Pedro Alves  <palves@redhat.com>
3630
3631         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3632         'unittests/parse-connection-spec-selftests.c'.
3633         (COMMON_SFILES): Add 'common/netstuff.c'.
3634         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
3635         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
3636         * common/netstuff.c: New file.
3637         * common/netstuff.h: New file.
3638         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
3639         (wait_for_connect): Update comment.  New parameter
3640         'gdb::optional<int> sock' instead of 'struct serial *scb'.
3641         Use 'sock' directly instead of 'scb->fd'.
3642         (try_connect): New function, with code from 'net_open'.
3643         (net_open): Rewrite main loop to deal with multiple
3644         sockets/addresses.  Handle IPv6-style hostnames; implement
3645         support for IPv6 connections.
3646         * unittests/parse-connection-spec-selftests.c: New file.
3647
3648 2018-07-11  Pedro Alves  <palves@redhat.com>
3649
3650         PR gdb/23377
3651         * remote.c (remote_target::remote_detach_pid): Call
3652         set_current_process.
3653
3654 2018-07-11  Pedro Alves  <palves@redhat.com>
3655
3656         * h8300-tdep.c (h8300_gdbarch_init): Remove
3657         set_gdbarch_ecoff_reg_to_regnum calls.
3658
3659 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
3660
3661         PR c++/23373
3662         * c-typeprint.c (c_type_print_base_struct_union): Don't print
3663         offsets/sizes for static members of a class/struct.
3664
3665 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
3666
3667         * target-descriptions.c (tdesc_register_bitsize): Rename.
3668         * target-descriptions.h (tdesc_register_bitsize): Likewise.
3669         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
3670         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
3671
3672 2018-07-10  Tom Tromey  <tom@tromey.com>
3673
3674         * breakpoint.c (moribund_locations): Now static and a
3675         std::vector.
3676         (breakpoint_init_inferior, moribund_breakpoint_here_p)
3677         (build_bpstat_chain, update_global_location_list)
3678         (breakpoint_retire_moribund): Update.
3679         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
3680         VEC.
3681
3682 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
3683
3684         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
3685         (riscv_register_reggroup_p): Use new function, remove unneeded
3686         parenthesis.
3687         (riscv_push_dummy_call): Extend assert to compare against xlen or
3688         flen based on register type.
3689
3690 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
3691
3692         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
3693
3694 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
3695
3696         * remote.c (show_hardware_watchpoint_limit): New function.
3697         (show_hardware_watchpoint_length_limit): New function.
3698         (show_hardware_breakpoint_limit): New function.
3699         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
3700         where appropriate, update help text.
3701
3702 2018-07-09  Tom Tromey  <tom@tromey.com>
3703
3704         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
3705         (CLIBS): Don't mention NAT_CLIBS.
3706
3707 2018-07-09  Tom Tromey  <tom@tromey.com>
3708
3709         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
3710         (LIBGDB_OBS, clean mostlyclean): Update.
3711         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
3712
3713 2018-07-09  Tom Tromey  <tom@tromey.com>
3714
3715         * Makefile.in (%.c: %.y): Use ECHO_YACC.
3716         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
3717         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
3718
3719 2018-07-09  Tom Tromey  <tom@tromey.com>
3720
3721         * Makefile.in (ALLDEPFILES): Remove exec.c.
3722         (COMMON_OBS): Remove exec.o.
3723         (COMMON_SFILES): Add exec.c.
3724
3725 2018-07-09  Tom Tromey  <tom@tromey.com>
3726
3727         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
3728
3729 2018-07-09  Tom Tromey  <tom@tromey.com>
3730
3731         * Makefile.in (clean mostlyclean): Remove stamp-version.
3732         (version.c): Depend on stamp-version.
3733         (stamp-version): New rule, from version.c rule.
3734
3735 2018-07-09  Tom Tromey  <tom@tromey.com>
3736
3737         * Makefile.in (init.c): Depend on stamp-init.
3738         (stamp-init): New rule, from init.c rule.
3739         (clean mostlyclean): Remove stamp-init.
3740
3741 2018-07-09  Tom Tromey  <tom@tromey.com>
3742
3743         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
3744         SUBDIR_GCC_COMPILE_SRCS.
3745
3746 2018-07-09  Tom Tromey  <tom@tromey.com>
3747
3748         * Makefile.in (init.c): Remove some unused sed rules.
3749
3750 2018-07-09  Tom Tromey  <tom@tromey.com>
3751
3752         * Makefile.in (TSOBS): Remove.
3753         (INIT_FILES): Update.
3754         (LIBGDB_OBS): Update.
3755         (COMMON_SFILES): Add inflow.c.
3756         (SFILES): Remove inflow.c.
3757
3758 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
3759
3760         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
3761
3762 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
3763
3764         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
3765         get_saveloc_name, is_signal_frame_name, step_name,
3766         init_remote_name, create_addr_space_name,
3767         destroy_addr_space_name, search_unwind_table_name,
3768         find_dyn_list_name): Constify.
3769
3770 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
3771
3772         * darwin-nat.c (darwin_pthread_kill): New function.
3773         (darwin_resume_thread): Use darwin_pthread_kill.
3774
3775 2018-07-05  Tom de Vries  <tdevries@suse.de>
3776
3777         * macroexp.c (macro_buffer) <operator=>: New member function.
3778
3779 2018-07-04  Tom Tromey  <tom@tromey.com>
3780
3781         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
3782
3783 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
3784
3785         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
3786         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
3787         * maint.c: Likewise.
3788         * top.c: Likewise.
3789
3790 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
3791
3792         * NEWS: Create a new section for the next release branch.
3793         Rename the section of the current branch, now that it has
3794         been cut.
3795
3796 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
3797
3798         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
3799         * version.in: Bump version to 8.2.50.DATE-git.
3800
3801 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
3802             Pedro Alves  <palves@redhat.com>
3803
3804         * linux-nat.c (linux_init_ptrace): Rename to ...
3805         (linux_init_ptrace_procfs): ... this.  Call
3806         linux_proc_init_warnings.
3807         (linux_nat_target::post_attach)
3808         (linux_nat_target::post_startup_inferior): Adjust.
3809         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
3810         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
3811
3812 2018-07-04  Tom de Vries  <tdevries@suse.de>
3813
3814         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
3815         check ...
3816         (read_comp_unit_head): ... here.
3817
3818 2018-07-03  Tom Tromey  <tom@tromey.com>
3819
3820         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
3821         (stop_tracing, tstatus_command)
3822         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
3823         (print_one_static_tracepoint_marker): Update.
3824         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
3825         std::vector.
3826         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
3827         VEC.
3828         (all_tracepoints, static_tracepoints_here): Return std::vector.
3829
3830 2018-07-03  Tom Tromey  <tom@tromey.com>
3831
3832         * common/ptid.c (ptid_equal): Remove.
3833         * common/ptid.h (ptid_equal): Don't declare.
3834         * ada-tasks.c: Update.
3835         * breakpoint.c: Update.
3836         * common/agent.c: Update.
3837         * corelow.c: Update.
3838         * darwin-nat-info.c: Update.
3839         * darwin-nat.c: Update.
3840         * dcache.c: Update.
3841         * dtrace-probe.c: Update.
3842         * dummy-frame.c: Update.
3843         * fbsd-nat.c: Update.
3844         * frame.c: Update.
3845         * gdbthread.h: Update.
3846         * gnu-nat.c: Update.
3847         * go32-nat.c: Update.
3848         * inf-loop.c: Update.
3849         * inf-ptrace.c: Update.
3850         * infcall.c: Update.
3851         * infcmd.c: Update.
3852         * inflow.c: Update.
3853         * infrun.c: Update.
3854         * linux-fork.c: Update.
3855         * linux-nat.c: Update.
3856         * linux-thread-db.c: Update.
3857         * mi/mi-cmd-var.c: Update.
3858         * mi/mi-interp.c: Update.
3859         * mi/mi-main.c: Update.
3860         * nto-procfs.c: Update.
3861         * ppc-linux-tdep.c: Update.
3862         * procfs.c: Update.
3863         * python/py-inferior.c: Update.
3864         * python/py-record-btrace.c: Update.
3865         * python/py-record.c: Update.
3866         * ravenscar-thread.c: Update.
3867         * regcache.c: Update.
3868         * remote-sim.c: Update.
3869         * remote.c: Update.
3870         * sol-thread.c: Update.
3871         * solib.c: Update.
3872         * target.c: Update.
3873         * tui/tui-stack.c: Update.
3874         * varobj.c: Update.
3875         * windows-nat.c: Update.
3876         * windows-tdep.c: Update.
3877
3878 2018-07-03  Tom Tromey  <tom@tromey.com>
3879
3880         * common/ptid.c (ptid_match): Remove.
3881         * common/ptid.h (ptid_match): Don't declare.
3882         * fbsd-nat.c: Update.
3883         * infcmd.c: Update.
3884         * infrun.c: Update.
3885         * linux-nat.c: Update.
3886         * record-btrace.c: Update.
3887         * regcache.c: Update.
3888         * remote.c: Update.
3889
3890 2018-07-03  Tom Tromey  <tom@tromey.com>
3891
3892         * common/ptid.c (ptid_tid_p): Remove.
3893         * common/ptid.h (ptid_tid_p): Don't declare.
3894         * sol-thread.c: Update.
3895
3896 2018-07-03  Tom Tromey  <tom@tromey.com>
3897
3898         * common/ptid.c (ptid_lwp_p): Remove.
3899         * common/ptid.h (ptid_lwp_p): Don't declare.
3900         * fbsd-nat.c: Update.
3901         * linux-nat.c: Update.
3902         * nat/linux-procfs.c: Update.
3903         * nat/x86-linux-dregs.c: Update.
3904         * sol-thread.c: Update.
3905
3906 2018-07-03  Tom Tromey  <tom@tromey.com>
3907
3908         * common/ptid.c (ptid_is_pid): Remove.
3909         * common/ptid.h (ptid_is_pid): Don't declare.
3910         * infrun.c: Update.
3911         * linux-nat.c: Update.
3912         * mi/mi-interp.c: Update.
3913         * remote.c: Update.
3914         * thread.c: Update.
3915
3916 2018-07-03  Tom Tromey  <tom@tromey.com>
3917
3918         * common/ptid.c (ptid_get_tid): Remove.
3919         * common/ptid.h (ptid_get_tid): Don't declare.
3920         * ada-tasks.c: Update.
3921         * aix-thread.c: Update.
3922         * bsd-uthread.c: Update.
3923         * darwin-nat.c: Update.
3924         * fbsd-nat.c: Update.
3925         * i386-darwin-nat.c: Update.
3926         * infrun.c: Update.
3927         * linux-tdep.c: Update.
3928         * nto-procfs.c: Update.
3929         * ppc-ravenscar-thread.c: Update.
3930         * python/py-infthread.c: Update.
3931         * ravenscar-thread.c: Update.
3932         * sol-thread.c: Update.
3933         * sparc-ravenscar-thread.c: Update.
3934         * windows-nat.c: Update.
3935
3936 2018-07-03  Tom Tromey  <tom@tromey.com>
3937
3938         * common/ptid.c (ptid_get_lwp): Remove.
3939         * common/ptid.h (ptid_get_lwp): Don't declare.
3940         * aarch64-linux-nat.c: Update.
3941         * ada-tasks.c: Update.
3942         * aix-thread.c: Update.
3943         * amd64-linux-nat.c: Update.
3944         * arm-linux-nat.c: Update.
3945         * corelow.c: Update.
3946         * fbsd-nat.c: Update.
3947         * fbsd-tdep.c: Update.
3948         * gnu-nat.c: Update.
3949         * i386-cygwin-tdep.c: Update.
3950         * i386-gnu-nat.c: Update.
3951         * i386-linux-nat.c: Update.
3952         * ia64-linux-nat.c: Update.
3953         * inf-ptrace.c: Update.
3954         * infrun.c: Update.
3955         * linux-fork.c: Update.
3956         * linux-nat.c: Update.
3957         * linux-tdep.c: Update.
3958         * linux-thread-db.c: Update.
3959         * mips-linux-nat.c: Update.
3960         * nat/aarch64-linux-hw-point.c: Update.
3961         * nat/aarch64-linux.c: Update.
3962         * nat/linux-btrace.c: Update.
3963         * nat/linux-osdata.c: Update.
3964         * nat/linux-procfs.c: Update.
3965         * nat/x86-linux-dregs.c: Update.
3966         * obsd-nat.c: Update.
3967         * ppc-fbsd-nat.c: Update.
3968         * ppc-linux-nat.c: Update.
3969         * procfs.c: Update.
3970         * python/py-infthread.c: Update.
3971         * ravenscar-thread.c: Update.
3972         * remote.c: Update.
3973         * s390-linux-nat.c: Update.
3974         * sol-thread.c: Update.
3975         * sol2-tdep.c: Update.
3976         * spu-linux-nat.c: Update.
3977         * x86-linux-nat.c: Update.
3978         * xtensa-linux-nat.c: Update.
3979
3980 2018-07-03  Tom Tromey  <tom@tromey.com>
3981
3982         * common/ptid.c (ptid_get_pid): Remove.
3983         * common/ptid.h (ptid_get_pid): Don't declare.
3984         * aarch64-linux-nat.c: Update.
3985         * ada-lang.c: Update.
3986         * aix-thread.c: Update.
3987         * alpha-bsd-nat.c: Update.
3988         * amd64-fbsd-nat.c: Update.
3989         * amd64-linux-nat.c: Update.
3990         * arm-linux-nat.c: Update.
3991         * arm-nbsd-nat.c: Update.
3992         * auxv.c: Update.
3993         * break-catch-syscall.c: Update.
3994         * breakpoint.c: Update.
3995         * bsd-uthread.c: Update.
3996         * corelow.c: Update.
3997         * ctf.c: Update.
3998         * darwin-nat.c: Update.
3999         * fbsd-nat.c: Update.
4000         * fbsd-tdep.c: Update.
4001         * gcore.c: Update.
4002         * gnu-nat.c: Update.
4003         * hppa-nbsd-nat.c: Update.
4004         * hppa-obsd-nat.c: Update.
4005         * i386-fbsd-nat.c: Update.
4006         * ia64-linux-nat.c: Update.
4007         * inf-ptrace.c: Update.
4008         * infcmd.c: Update.
4009         * inferior.c: Update.
4010         * inferior.h: Update.
4011         * inflow.c: Update.
4012         * infrun.c: Update.
4013         * linux-fork.c: Update.
4014         * linux-nat.c: Update.
4015         * linux-tdep.c: Update.
4016         * linux-thread-db.c: Update.
4017         * m68k-bsd-nat.c: Update.
4018         * mi/mi-interp.c: Update.
4019         * mi/mi-main.c: Update.
4020         * mips-linux-nat.c: Update.
4021         * mips-nbsd-nat.c: Update.
4022         * mips64-obsd-nat.c: Update.
4023         * nat/aarch64-linux-hw-point.c: Update.
4024         * nat/aarch64-linux.c: Update.
4025         * nat/linux-btrace.c: Update.
4026         * nat/linux-osdata.c: Update.
4027         * nat/linux-procfs.c: Update.
4028         * nat/x86-linux-dregs.c: Update.
4029         * nto-procfs.c: Update.
4030         * obsd-nat.c: Update.
4031         * ppc-linux-nat.c: Update.
4032         * ppc-nbsd-nat.c: Update.
4033         * ppc-obsd-nat.c: Update.
4034         * proc-service.c: Update.
4035         * procfs.c: Update.
4036         * python/py-inferior.c: Update.
4037         * python/py-infthread.c: Update.
4038         * ravenscar-thread.c: Update.
4039         * record.c: Update.
4040         * remote-sim.c: Update.
4041         * remote.c: Update.
4042         * rs6000-nat.c: Update.
4043         * s390-linux-nat.c: Update.
4044         * sh-nbsd-nat.c: Update.
4045         * sol-thread.c: Update.
4046         * sparc-nat.c: Update.
4047         * sparc64-tdep.c: Update.
4048         * spu-linux-nat.c: Update.
4049         * spu-tdep.c: Update.
4050         * target-debug.h: Update.
4051         * target.c: Update.
4052         * thread.c: Update.
4053         * tid-parse.c: Update.
4054         * tracefile-tfile.c: Update.
4055         * vax-bsd-nat.c: Update.
4056         * windows-nat.c: Update.
4057         * x86-linux-nat.c: Update.
4058         * x86-nat.c: Update.
4059
4060 2018-07-03  Tom Tromey  <tom@tromey.com>
4061
4062         * common/ptid.c (pid_to_ptid): Remove.
4063         * common/ptid.h (pid_to_ptid): Don't declare.
4064         * aix-thread.c: Update.
4065         * arm-linux-nat.c: Update.
4066         * common/ptid.c: Update.
4067         * common/ptid.h: Update.
4068         * corelow.c: Update.
4069         * ctf.c: Update.
4070         * darwin-nat.c: Update.
4071         * fbsd-nat.c: Update.
4072         * fork-child.c: Update.
4073         * gnu-nat.c: Update.
4074         * go32-nat.c: Update.
4075         * inf-ptrace.c: Update.
4076         * infcmd.c: Update.
4077         * inferior.c: Update.
4078         * infrun.c: Update.
4079         * linux-fork.c: Update.
4080         * linux-nat.c: Update.
4081         * nat/aarch64-linux-hw-point.c: Update.
4082         * nat/fork-inferior.c: Update.
4083         * nat/x86-linux-dregs.c: Update.
4084         * nto-procfs.c: Update.
4085         * obsd-nat.c: Update.
4086         * procfs.c: Update.
4087         * progspace.c: Update.
4088         * remote.c: Update.
4089         * rs6000-nat.c: Update.
4090         * s390-linux-nat.c: Update.
4091         * sol-thread.c: Update.
4092         * spu-linux-nat.c: Update.
4093         * target.c: Update.
4094         * top.c: Update.
4095         * tracefile-tfile.c: Update.
4096         * windows-nat.c: Update.
4097
4098 2018-07-03  Tom Tromey  <tom@tromey.com>
4099
4100         * common/ptid.h (ptid_build): Don't declare.
4101         * common/ptid.c (ptid_build): Remove.
4102         * aix-thread.c: Update.
4103         * bsd-kvm.c: Update.
4104         * bsd-uthread.c: Update.
4105         * common/agent.c: Update.
4106         * common/ptid.c: Update.
4107         * common/ptid.h: Update.
4108         * corelow.c: Update.
4109         * darwin-nat.c: Update.
4110         * fbsd-nat.c: Update.
4111         * gnu-nat.c: Update.
4112         * linux-fork.c: Update.
4113         * linux-nat.c: Update.
4114         * linux-thread-db.c: Update.
4115         * nat/linux-osdata.c: Update.
4116         * nat/linux-procfs.c: Update.
4117         * nto-procfs.c: Update.
4118         * obsd-nat.c: Update.
4119         * proc-service.c: Update.
4120         * procfs.c: Update.
4121         * ravenscar-thread.c: Update.
4122         * remote-sim.c: Update.
4123         * remote.c: Update.
4124         * sol-thread.c: Update.
4125         * target.c: Update.
4126         * windows-nat.c: Update.
4127
4128 2018-07-03  Tom Tromey  <tom@tromey.com>
4129
4130         * infrun.c (follow_exec): Use exit_inferior_silent.
4131         * inferior.c (exit_inferior_num_silent): Remove.
4132         * inferior.h (exit_inferior_num_silent): Don't declare.
4133
4134 2018-07-03  Tom Tromey  <tom@tromey.com>
4135
4136         PR cli/23340:
4137         * darwin-nat.c (darwin_attach_pid): Reset inferior and
4138         inferior_ptid on error.
4139
4140 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
4141             Simon Marchi  <simon.marchi@polymtl.ca>
4142
4143         PR tdep/8282
4144         * disasm.h (gdb_disassembler): Add
4145         `m_disassembler_options_holder'. member
4146         * disasm.c (get_all_disassembler_options): New function.
4147         (gdb_disassembler::gdb_disassembler): Use it.
4148         (gdb_buffered_insn_length_init_dis): Likewise.
4149         (gdb_buffered_insn_length): Adjust accordingly.
4150         (set_disassembler_options): Handle options with arguments.
4151         (show_disassembler_options_sfunc): Likewise.  Add a leading new
4152         line if showing options with descriptions.
4153         (disassembler_options_completer): Adapt to using the
4154         `disasm_options_and_args_t' structure.
4155         * mips-tdep.c (mips_disassembler_options): New variable.
4156         (mips_disassembler_options_o32): Likewise.
4157         (mips_disassembler_options_n32): Likewise.
4158         (mips_disassembler_options_n64): Likewise.
4159         (gdb_print_insn_mips): Don't set `disassembler_options'.
4160         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
4161         functions.
4162         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
4163         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
4164         `gdbarch_disassembler_options_implicit' and
4165         `gdbarch_valid_disassembler_options'.
4166         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
4167         `disasm_options_and_args_t' structure.
4168         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
4169         method.
4170         (valid_disassembler_options): Switch from `disasm_options_t' to
4171         the `disasm_options_and_args_t' structure.
4172         * NEWS: Document `set disassembler-options' support for the MIPS
4173         target.
4174         * gdbarch.h: Regenerate.
4175         * gdbarch.c: Regenerate.
4176
4177 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
4178
4179         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
4180
4181 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
4182
4183         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
4184         parameter in call to amd64_target_description.
4185         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
4186         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
4187         (amd64fbsd_init_abi): Likewise.
4188         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
4189         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
4190         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
4191         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
4192
4193 2018-06-29  Pedro Alves  <palves@redhat.com>
4194
4195         * gdb/amd64-tdep.h (amd64_create_target_description): Add
4196         "segments" parameter.
4197         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
4198         (_initialize_amd64_tdep): Update call to
4199         amd64_create_target_description.
4200         (amd64_target_description): Add "segments" parameter.  Adjust
4201         the implementation to use it.
4202         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
4203         call to amd64_create_target_description.
4204         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
4205         * gdb/arch/amd64.h (amd64_create_target_description): Add
4206         "segments" register.
4207         * gdb/arch/amd64.c (amd64_create_target_description): Add
4208         "segments" parameter.  Call create_feature_i386_64bit_segments
4209         only if SEGMENTS is true.
4210         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
4211         call to amd64_create_target_description.
4212
4213 2018-06-29  Pedro Alves  <palves@redhat.com>
4214
4215         * thread.c (thread_target_id_str): New, factored out from ...
4216         (print_thread_info_1): ... here.  Use it to compute the max
4217         "Target Id" column width.
4218
4219 2018-06-29  Pedro Alves  <palves@redhat.com>
4220
4221         * remote.c (remote_target::extra_thread_info): Delete
4222         'display_buf' and 'n' locals.  from the cache, regardless of
4223         packet mechanims is in use.  Use cache for qThreadExtra and qP
4224         methods too.
4225
4226 2018-06-29  Pedro Alves  <palves@redhat.com>
4227
4228         * blockframe.c (find_pc_sect_containing_function): New function.
4229         * breakpoint.c (print_breakpoint_location): Don't call
4230         find_pc_sect_function.
4231         * linespec.c (create_sals_line_offset): Record the location's
4232         symbol in the sal.
4233         * linespec.c (convert_address_location_to_sals): Fill in sal's
4234         symbol with find_pc_sect_containing_function.
4235         * symtab.c (find_function_start_sal): Rename to ...
4236         (find_function_start_sal_1): ... this.
4237         (find_function_start_sal): Reimplement as wrapper around
4238         find_function_start_sal_1, and use
4239         find_pc_sect_containing_function to fill in the sal's symbol.
4240         (find_function_start_sal(symbol*, bool)): Adjust.
4241         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
4242         comments.
4243         (find_pc_sect_containing_function): Declare.
4244
4245 2018-06-29  Pedro Alves  <palves@redhat.com>
4246
4247         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
4248         true if the the location has no symbol.
4249
4250 2018-06-28  Tom Tromey  <tom@tromey.com>
4251
4252         * NEWS: Mention --enable-codesign.
4253         * silent-rules.mk (ECHO_SIGN): New variable.
4254         * configure.ac: Add --enable-codesign.
4255         * configure: Rebuild.
4256         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
4257         (gdb$(EXEEXT)): Optionally invoke codesign.
4258
4259 2018-06-28  Pedro Alves  <palves@redhat.com>
4260
4261         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
4262         comments.
4263         (switch_to_thread_no_regs): Adjust comment.
4264         * infcmd.c (stop_pc): Delete.
4265         (post_create_inferior, info_program_command): Replace references
4266         to stop_pc with references to thread_info->suspend.stop_pc.
4267         * inferior.h (stop_pc): Delete declaration.
4268         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
4269         (handle_inferior_event_1, handle_signal_stop)
4270         (process_event_stop_test, keep_going_stepped_thread)
4271         (handle_step_into_function, handle_step_into_function_backward)
4272         (print_stop_location): Replace references to stop_pc with
4273         references to thread_info->suspend.stop_pc.
4274         (struct infcall_suspend_state) <stop_pc>: Delete field.
4275         (save_infcall_suspend_state, restore_infcall_suspend_state):
4276         Remove references to inf_stat->stop_pc.
4277         * linux-fork.c (fork_load_infrun_state): Likewise.
4278         * record-btrace.c (record_btrace_set_replay): Likewise.
4279         * record-full.c (record_full_goto_entry): Likewise.
4280         * remote.c (print_one_stopped_thread): Likewise.
4281         * target.c (target_resume): Extend comment.
4282         * thread.c (set_executing_thread): New.
4283         (set_executing): Use it.
4284         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
4285         Remove references to stop_pc.
4286
4287 2018-06-28  Pedro Alves  <palves@redhat.com>
4288
4289         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
4290         Moving fetching stop_pc until after ecs->event_thread is refreshed.
4291
4292 2018-06-28  Tom Tromey  <tom@tromey.com>
4293
4294         * coffread.c (coff_symfile_finish): Update.
4295         * xcoffread.c (xcoff_symfile_finish): Update.
4296         * elfread.c (elf_symfile_finish): Update.
4297         * symfile.h (dwarf2_free_objfile): Don't declare.
4298         * dwarf2read.c (_initialize_dwarf2_read): Use
4299         register_objfile_data_with_cleanup.
4300         (dwarf2_free_objfile): Now static.  Change signature.
4301
4302 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4303
4304         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
4305         option "-o" to add-symbol-file-load to add an offset to each
4306         section's load address.
4307         * symfile.c (set_objfile_default_section_offset): New function.
4308
4309 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4310
4311         * symfile.c (add_symbol_file_command): Make sure that sections
4312         with the same name are sorted in the same order.
4313
4314 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4315
4316         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
4317         require the second argument.  If omitted, load sections at the
4318         addresses specified in the file.
4319
4320 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4321
4322         * symfile.c (symbol_file_command, symbol_file_add_main_1)
4323         (_initialize_symfile): Add option "-o" to symbol-file to add an
4324         offset to each section of the symbol file.
4325
4326 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4327
4328         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
4329
4330 2018-06-27  Tom Tromey  <tom@tromey.com>
4331
4332         * stack.c (_initialize_stack): Update "func" help text.
4333
4334 2018-06-27  Tom Tromey  <tom@tromey.com>
4335
4336         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
4337         std::vector.
4338         (unwind_infopy_str, pyuw_create_unwind_info)
4339         (unwind_infopy_add_saved_register, pyuw_sniffer)
4340         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
4341         Update.
4342         (struct saved_reg): Add constructor.
4343         <value>: Now a gdbpy_ref<>.
4344
4345 2018-06-27  Tom Tromey  <tom@tromey.com>
4346
4347         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
4348
4349 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4350
4351         * gdb-gdb.py.in: Format using autopep8.
4352
4353 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4354
4355         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
4356         (type_lookup_function): Recognize CORE_ADDR values.
4357
4358 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4359
4360         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
4361         print tag_name.
4362
4363 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4364
4365         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
4366         <__lt__>: Add.
4367
4368 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4369
4370         * gdb-gdb.py: Move to...
4371         * gdb-gdb.py.in: ... here.
4372         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
4373         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
4374         dependencies.
4375         (distclean): Remove gdb-gdb.py when cleaning.
4376         (gdb-gdb.py, gdb-gdb.gdb): New rules.
4377         * configure: Re-generate.
4378
4379 2018-06-27  Pedro Alves  <palves@redhat.com>
4380
4381         * proc-service.c (get_ps_regcache): New.
4382         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4383         (ps_lsetfpregs): Use it.
4384
4385 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
4386
4387         PR gdb/21695
4388         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
4389         (dwarf_decode_lines_1): Adjust.
4390
4391 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4392
4393         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
4394         override.
4395         <info_proc>: Likewise.
4396
4397 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
4398
4399         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
4400         to windows_fetch_one_register, and only handle the case of
4401         fetching one register.  Move the code that reloads the context
4402         and iterates over all registers if R is negative to...
4403         (windows_nat_target::fetch_registers): ... here.
4404         (do_windows_store_inferior_registers): Rename to
4405         windows_store_one_register, and only handle the case of storing
4406         one register.  Move the code that handles the case where r is
4407         negative to...
4408         (windows_nat_target::store_registers) ... here.
4409
4410 2018-06-26  Tom Tromey  <tom@tromey.com>
4411
4412         PR rust/22574:
4413         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
4414         * rust-lang.c (rust_print_struct_def): Add podata parameter.
4415         Update.
4416         (rust_internal_print_type): Add podata parameter.
4417         (rust_print_type): Update.
4418
4419 2018-06-26  Tom Tromey  <tom@tromey.com>
4420
4421         * typeprint.h (struct print_offset_data) <update, finish,
4422         maybe_print_hole>: New methods.
4423         <indentation>: New constant.
4424         * typeprint.c (print_offset_data::indentation): Define.
4425         (print_offset_data::maybe_print_hole, print_offset_data::update)
4426         (print_offset_data::finish): Move from c-typeprint.c and rename.
4427         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
4428         (print_spaces_filtered_with_print_options): Update.
4429         (c_print_type_union_field_offset, maybe_print_hole)
4430         (c_print_type_struct_field_offset): Move to typeprint.c and
4431         rename.
4432         (c_type_print_base_struct_union): Update.
4433
4434 2018-06-25  Pedro Alves  <palves@redhat.com>
4435
4436         * gdbthread.h (thread_info_ref, delete_thread)
4437         (delete_thread_silent, first_thread_of_inferior)
4438         (any_thread_of_inferior, switch_to_thread)
4439         (enable_thread_stack_temporaries)
4440         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4441         (get_last_thread_stack_temporary)
4442         (value_in_thread_stack_temporaries, can_access_registers_thread):
4443         Spell out "struct thread_info" instead of just "thread_info".
4444         * inferior.h (notice_new_inferior): Likewise.
4445
4446 2018-06-25  Pedro Alves  <palves@redhat.com>
4447
4448         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
4449         pass thread_info pointer to delete_thread.
4450         (windows_nat_target::detach): Pass inferior pointer to
4451         detach_inferior.
4452         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
4453         delete_thread.
4454         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
4455         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
4456         and pass a thread_info pointer to delete_thread.
4457         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
4458         pass thread_info pointer to delete_thread.
4459         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
4460         delete_thread_silent call.
4461         * procfs.c (procfs_target::detach): Pass inferior pointer to
4462         detach_inferior.
4463         (procfs_target::wait): Pass thread_info pointer to delete_thread.
4464         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
4465         delete_thread_silent call.
4466         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
4467         pass thread_info pointer to delete_thread.
4468         (windows_nat_target::detach): Pass inferior pointer to
4469         delete_inferior.
4470
4471 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
4472
4473         * regcache.c (readable_regcache::read_part): Fix asserts.
4474         (reg_buffer::raw_collect_part): New function.
4475         (regcache::write_part): Fix asserts.
4476         (reg_buffer::raw_supply_part): New function.
4477         (regcache::transfer_regset_register): New helper function.
4478         (regcache::transfer_regset): Call new functions.
4479         (regcache_supply_regset): Use gdb_byte*.
4480         (regcache::supply_regset): Likewise.
4481         (regcache_collect_regset): Likewise.
4482         (regcache::collect_regset): Likewise.
4483         * regcache.h (reg_buffer::raw_collect_part): New declaration.
4484         (reg_buffer::raw_supply_part): Likewise.
4485         (regcache::transfer_regset_register): Likewise.
4486         (regcache::transfer_regset): Use gdb_byte*.
4487
4488 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
4489
4490         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
4491
4492 2018-06-21  Pedro Alves  <palves@redhat.com>
4493
4494         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
4495         instead of a ptid_t.  All callers adjusted.
4496         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
4497         adjusted.
4498         (print_ada_task_info, display_current_task_id, task_command_1):
4499         Adjust.
4500         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
4501         inferior_thread.
4502         (breakpoint_kind): Adjust.
4503         (remove_breakpoints_pid): Rename to ...
4504         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
4505         pointer.  All callers adjusted.
4506         (bpstat_clear_actions): Use inferior_thread.
4507         (get_bpstat_thread): New.
4508         (bpstat_do_actions): Use it.
4509         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
4510         to take a thread_info pointer.  All callers adjusted.
4511         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
4512         (breakpoint_re_set_thread): Use inferior_thread.
4513         * breakpoint.h (struct inferior): Forward declare.
4514         (bpstat_stop_status): Update.
4515         (remove_breakpoints_pid): Delete.
4516         (remove_breakpoints_inf): New.
4517         * bsd-uthread.c (bsd_uthread_target::wait)
4518         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
4519         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
4520         (maint_btrace_packet_history_cmd)
4521         (maint_btrace_clear_packet_history_cmd): Adjust.
4522         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
4523         inferior_thread.
4524         * cli/cli-interp.c: Include "inferior.h".
4525         * common/refcounted-object.h (struct
4526         refcounted_object_ref_policy): New.
4527         * compile/compile-object-load.c: Include gdbthread.h.
4528         (store_regs): Use inferior_thread.
4529         * corelow.c (core_target::close): Use current_inferior.
4530         (core_target_open): Adjust to use first_thread_of_inferior and use
4531         the current inferior.
4532         * ctf.c (ctf_target::close): Adjust to use current_inferior.
4533         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
4534         <thread>: ... this new field.  All references adjusted.
4535         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
4536         Take a thread_info pointer instead of a ptid_t.
4537         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
4538         (dummy_frame_discard, register_dummy_frame_dtor): Take a
4539         thread_info pointer instead of a ptid_t.
4540         * elfread.c: Include "inferior.h".
4541         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
4542         Use inferior_thread.
4543         * eval.c (evaluate_subexp): Likewise.
4544         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
4545         inferior_thread.
4546         * gdb_proc_service.h (struct thread_info): Forward declare.
4547         (struct ps_prochandle) <ptid>: Delete, replaced by ...
4548         <thread>: ... this new field.  All references adjusted.
4549         * gdbarch.h, gdbarch.c: Regenerate.
4550         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
4551         'thread' parameter.  All implementations and callers adjusted.
4552         * gdbthread.h (thread_info) <set_running>: New method.
4553         (delete_thread, delete_thread_silent): Take a thread_info pointer
4554         instead of a ptid.
4555         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
4556         (first_thread_of_process): Delete, replaced by ...
4557         (first_thread_of_inferior): ... this new function.  All callers
4558         adjusted.
4559         (any_live_thread_of_process): Delete, replaced by ...
4560         (any_live_thread_of_inferior): ... this new function.  All callers
4561         adjusted.
4562         (switch_to_thread, switch_to_no_thread): Declare.
4563         (is_executing): Delete.
4564         (enable_thread_stack_temporaries): Update comment.
4565         <enable_thread_stack_temporaries>: Take a thread_info pointer
4566         instead of a ptid_t.  Incref the thread.
4567         <~enable_thread_stack_temporaries>: Decref the thread.
4568         <m_ptid>: Delete
4569         <m_thr>: New.
4570         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4571         (get_last_thread_stack_temporary)
4572         (value_in_thread_stack_temporaries, can_access_registers_thread):
4573         Take a thread_info pointer instead of a ptid_t.  All callers
4574         adjusted.
4575         * infcall.c (get_call_return_value): Use inferior_thread.
4576         (run_inferior_call): Work with thread pointers instead of ptid_t.
4577         (call_function_by_hand_dummy): Work with thread pointers instead
4578         of ptid_t.  Use thread_info_ref.
4579         * infcmd.c (proceed_thread_callback): Access thread's state
4580         directly.
4581         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
4582         access thread's state directly.
4583         (continue_command): Use inferior_thread.
4584         (info_program_command): Use find_thread_ptid and access thread
4585         state directly.
4586         (proceed_after_attach_callback): Use thread state directly.
4587         (notice_new_inferior): Take a thread_info pointer instead of a
4588         ptid_t.  All callers adjusted.
4589         (exit_inferior): Take an inferior pointer instead of a pid.  All
4590         callers adjusted.
4591         (exit_inferior_silent): New.
4592         (detach_inferior): Delete.
4593         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
4594         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
4595         (detach_inferior_command, kill_inferior_command): Use
4596         find_inferior_id instead of valid_gdb_inferior_id and
4597         gdb_inferior_id_to_pid.
4598         (inferior_command): Use inferior and thread pointers.
4599         * inferior.h (struct thread_info): Forward declare.
4600         (notice_new_inferior): Take a thread_info pointer instead of a
4601         ptid_t.  All callers adjusted.
4602         (detach_inferior): Delete declaration.
4603         (exit_inferior, exit_inferior_silent): Take an inferior pointer
4604         instead of a pid.  All callers adjusted.
4605         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
4606         (valid_gdb_inferior_id): Delete.
4607         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
4608         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
4609         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
4610         ...
4611         <inf>: ... this new field.
4612         <step_ptid>: Delete, replaced by ...
4613         <step_thread>: ... this new field.
4614         (get_displaced_stepping_state): Take an inferior pointer instead
4615         of a pid.  All callers adjusted.
4616         (displaced_step_in_progress_any_inferior): Adjust.
4617         (displaced_step_in_progress_thread): Take a thread pointer instead
4618         of a ptid_t.  All callers adjusted.
4619         (displaced_step_in_progress, add_displaced_stepping_state): Take
4620         an inferior pointer instead of a pid.  All callers adjusted.
4621         (get_displaced_step_closure_by_addr): Adjust.
4622         (remove_displaced_stepping_state): Take an inferior pointer
4623         instead of a pid.  All callers adjusted.
4624         (displaced_step_prepare_throw, displaced_step_prepare)
4625         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
4626         All callers adjusted.
4627         (start_step_over): Adjust.
4628         (infrun_thread_ptid_changed): Remove bit updating ptids in the
4629         displaced step queue.
4630         (do_target_resume): Adjust.
4631         (fetch_inferior_event): Use inferior_thread.
4632         (context_switch, get_inferior_stop_soon): Take an
4633         execution_control_state pointer instead of a ptid_t.  All callers
4634         adjusted.
4635         (switch_to_thread_cleanup): Delete.
4636         (stop_all_threads): Use scoped_restore_current_thread.
4637         * inline-frame.c: Include "gdbthread.h".
4638         (inline_state) <inline_state>: Take a thread pointer instead of a
4639         ptid_t.  All callers adjusted.
4640         <ptid>: Delete, replaced by ...
4641         <thread>: ... this new field.
4642         (find_inline_frame_state): Take a thread pointer instead of a
4643         ptid_t.  All callers adjusted.
4644         (skip_inline_frames, step_into_inline_frame)
4645         (inline_skipped_frames, inline_skipped_symbol): Take a thread
4646         pointer instead of a ptid_t.  All callers adjusted.
4647         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
4648         (inline_skipped_frames, inline_skipped_symbol): Likewise.
4649         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
4650         pointers directly.
4651         * linux-nat.c (get_detach_signal): Likewise.
4652         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
4653         (thread_db_notice_clone): Adjust.
4654         (thread_db_find_new_threads_silently)
4655         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
4656         a thread pointer instead of a ptid_t.  All callers adjusted.
4657         * mi/mi-cmd-var.c: Include "inferior.h".
4658         (mi_cmd_var_update_iter): Update to use thread pointers.
4659         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
4660         inferior directly.
4661         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
4662         out to ...
4663         (mi_output_running): ... this new function.
4664         (mi_on_resume_1): Adjust to use it.
4665         (mi_user_selected_context_changed): Adjust to use inferior_thread.
4666         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
4667         directly.
4668         (interrupt_thread_callback): : Adjust to use thread and inferior
4669         pointers.
4670         * proc-service.c: Include "gdbthread.h".
4671         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
4672         * progspace-and-thread.c: Include "inferior.h".
4673         * progspace.c: Include "inferior.h".
4674         * python/py-exitedevent.c (create_exited_event_object): Adjust to
4675         hold a reference to an inferior_object.
4676         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
4677         inferior_thread.
4678         * python/py-inferior.c (struct inferior_object): Give the type a
4679         tag name instead of a typedef.
4680         (python_on_normal_stop): No need to check if the current thread is
4681         listed.
4682         (inferior_to_inferior_object): Change return type to
4683         inferior_object.  All callers adjusted.
4684         (find_thread_object): Delete, bits factored out to ...
4685         (thread_to_thread_object): ... this new function.
4686         * python/py-infthread.c (create_thread_object): Use
4687         inferior_to_inferior_object.
4688         (thpy_is_stopped): Use thread pointer directly.
4689         (gdbpy_selected_thread): Use inferior_thread.
4690         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
4691         field, replaced with ...
4692         <thread>: ... this new field.  All users adjusted.
4693         (btpy_insn_or_gap_new): Drop const.
4694         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
4695         callers adjusted.
4696         * python/py-record.c: Include "gdbthread.h".
4697         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
4698         a ptid_t.  All callers adjusted.
4699         (gdbpy_current_recording): Use inferior_thread.
4700         * python/py-record.h (recpy_record_object) <ptid>: Delete
4701         field, replaced with ...
4702         <thread>: ... this new field.  All users adjusted.
4703         (recpy_element_object) <ptid>: Delete
4704         field, replaced with ...
4705         <thread>: ... this new field.  All users adjusted.
4706         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
4707         a ptid_t.  All callers adjusted.
4708         * python/py-threadevent.c: Include "gdbthread.h".
4709         (get_event_thread): Use thread_to_thread_object.
4710         * python/python-internal.h (struct inferior_object): Forward
4711         declare.
4712         (find_thread_object, find_inferior_object): Delete declarations.
4713         (thread_to_thread_object, inferior_to_inferior_object): New
4714         declarations.
4715         * record-btrace.c: Include "inferior.h".
4716         (require_btrace_thread): Use inferior_thread.
4717         (record_btrace_frame_sniffer)
4718         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
4719         (get_thread_current_frame): Use scoped_restore_current_thread and
4720         switch_to_thread.
4721         (get_thread_current_frame): Use thread pointer directly.
4722         (record_btrace_replay_at_breakpoint): Use thread's inferior
4723         pointer directly.
4724         * record-full.c: Include "inferior.h".
4725         * regcache.c: Include "gdbthread.h".
4726         (get_thread_arch_regcache): Use the inferior's address space
4727         directly.
4728         (get_thread_regcache, registers_changed_thread): New.
4729         * regcache.h (get_thread_regcache(thread_info *thread)): New
4730         overload.
4731         (registers_changed_thread): New.
4732         (remote_target) <remote_detach_1>: Swap order of parameters.
4733         (remote_add_thread): <remote_add_thread>: Return the new thread.
4734         (get_remote_thread_info(ptid_t)): New overload.
4735         (remote_target::remote_notice_new_inferior): Use thread pointers
4736         directly.
4737         (remote_target::process_initial_stop_replies): Use
4738         thread_info::set_running.
4739         (remote_target::remote_detach_1, remote_target::detach)
4740         (extended_remote_target::detach): Adjust.
4741         * stack.c (frame_show_address): Use inferior_thread.
4742         * target-debug.h (target_debug_print_thread_info_pp): New.
4743         * target-delegates.c: Regenerate.
4744         * target.c (default_thread_address_space): Delete.
4745         (memory_xfer_partial_1): Use current_inferior.
4746         (target_detach): Use current_inferior.
4747         (target_thread_address_space): Delete.
4748         (generic_mourn_inferior): Use current_inferior.
4749         * target.h (struct target_ops) <thread_address_space>: Delete.
4750         (target_thread_address_space): Delete.
4751         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
4752         pointers directly.
4753         (delete_thread_1, delete_thread, delete_thread_silent): Take a
4754         thread pointer instead of a ptid_t.  Adjust all callers.
4755         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
4756         (first_thread_of_process): Delete, replaced by ...
4757         (first_thread_of_inferior): ... this new function.  All callers
4758         adjusted.
4759         (any_thread_of_process): Rename to ...
4760         (any_thread_of_inferior): ... this, and take an inferior pointer.
4761         (any_live_thread_of_process): Rename to ...
4762         (any_live_thread_of_inferior): ... this, and take an inferior
4763         pointer.
4764         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4765         (value_in_thread_stack_temporaries)
4766         (get_last_thread_stack_temporary): Take a thread pointer instead
4767         of a ptid_t.  Adjust all callers.
4768         (thread_info::set_running): New.
4769         (validate_registers_access): Use inferior_thread.
4770         (can_access_registers_ptid): Rename to ...
4771         (can_access_registers_thread): ... this, and take a thread
4772         pointer.
4773         (print_thread_info_1): Adjust to compare thread pointers instead
4774         of ptids.
4775         (switch_to_no_thread, switch_to_thread): Make extern.
4776         (scoped_restore_current_thread::~scoped_restore_current_thread):
4777         Use m_thread pointer directly.
4778         (scoped_restore_current_thread::scoped_restore_current_thread):
4779         Use inferior_thread.
4780         (thread_command): Use thread pointer directly.
4781         (thread_num_make_value_helper): Use inferior_thread.
4782         * top.c (execute_command): Use inferior_thread.
4783         * tui/tui-interp.c: Include "inferior.h".
4784         * varobj.c (varobj_create): Use inferior_thread.
4785         (value_of_root_1): Use find_thread_global_id instead of
4786         global_thread_id_to_ptid.
4787
4788 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
4789
4790         * regcache.c (readable_regcache::read_part): Avoid memcpy when
4791         possible.
4792         (regcache::write_part): Likewise.
4793         (readable_regcache::cooked_read_part): Update comment.
4794         (readable_regcache::cooked_write_part): Likewise.
4795         * regcache.h: (readable_regcache::read_part): Likewise.
4796         (regcache::write_part): Likewise.
4797
4798 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
4799             Dirk Schubert  <dirk.schubert@arm.com>
4800
4801         * aarch64-linux-nat.c (post_attach): New.
4802         (aarch64_linux_nat_target::post_attach): Override post_attach to
4803         record the number of hardware debug registers.
4804
4805 2018-06-20  Tom Tromey  <tom@tromey.com>
4806
4807         * python/py-param.c (add_setshow_generic): Make parameters const.
4808         (parmpy_init): Update.
4809
4810 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
4811
4812         * regcache.h (regcache_cooked_read_ftype): Rename to...
4813         (register_read_ftype): ...this, change type to function_view.
4814         (class reg_buffer) <save>: Remove src parameter.
4815         (readonly_detached_regcache) <readonly_detached_regcache>: Make
4816         parameter non-const in first overload.  Remove src parameter in
4817         second overload.
4818         * regcache.c (do_cooked_read): Remove.
4819         (readonly_detached_regcache::readonly_detached_regcache): Make
4820         parameter non-const, adjust call to other constructor.
4821         (reg_buffer::save): Remove src parameter.
4822         * frame.c (do_frame_register_read): Remove.
4823         (frame_save_as_regcache): Use lambda function.
4824         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
4825         parameter to ppu2spu_data *.
4826         (ppu2spu_sniffer): Use lambda function.
4827
4828 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
4829
4830         * record-full.c (record_full_target::insert_breakpoint): Remove
4831         "struct" keyword, add const.
4832
4833 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
4834
4835         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
4836         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
4837         * configure.ac: Remove AC_PREREQ, add missing quoting.
4838         * gnulib/configure.ac: Modernize usage of
4839         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
4840         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
4841         (AUTOMAKE_VERSION): Bump to 1.15.1.
4842         * configure: Re-generate.
4843         * config.in: Re-generate.
4844         * aclocal.m4: Re-generate.
4845         * gnulib/aclocal.m4: Re-generate.
4846         * gnulib/config.in: Re-generate.
4847         * gnulib/configure: Re-generate.
4848         * gnulib/import/Makefile.in: Re-generate.
4849
4850 2018-06-19  Pedro Alves  <palves@redhat.com>
4851
4852         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
4853         (lookup_minimal_symbol_by_pc_section): ... here with
4854         gdb_assert_not_reached added.
4855
4856 2018-06-19  Pedro Alves  <palves@redhat.com>
4857
4858         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
4859         parameter with a block parameter.  Compare location's block symbol
4860         with the frame's block instead of addresses.
4861         (skip_inline_frames): Pass the current block instead of the
4862         frame's address.  Break out as soon as we determine the frame
4863         should not be skipped.
4864
4865 2018-06-18  Tom Tromey  <tom@tromey.com>
4866
4867         * solib-aix.c (solib_aix_get_section_offsets): Return
4868         unique_xmalloc_ptr.
4869         (solib_aix_solib_create_inferior_hook): Update.
4870
4871 2018-06-18  Tom Tromey  <tom@tromey.com>
4872
4873         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
4874
4875 2018-06-18  Tom Tromey  <tom@tromey.com>
4876
4877         * solib-frv.c (frv_relocate_main_executable): Use
4878         unique_xmalloc_ptr.
4879         * solib-dsbt.c (dsbt_relocate_main_executable): Use
4880         unique_xmalloc_ptr.
4881
4882 2018-06-18  Tom Tromey  <tom@tromey.com>
4883
4884         * objfiles.h (inhibit_section_map_updates): Update.
4885         (resume_section_map_updates, resume_section_map_updates_cleanup):
4886         Remove.
4887         * solib-svr4.c (svr4_handle_solib_event): Update.
4888         * objfiles.c (inhibit_section_map_updates): Return
4889         scoped_restore_tmpl<int>.
4890         (resume_section_map_updates, resume_section_map_updates_cleanup):
4891         Remove.
4892
4893 2018-06-18  Tom Tromey  <tom@tromey.com>
4894
4895         * valprint.h (read_string): Update.
4896         * valprint.c (read_string): Change type of "buffer".
4897         (val_print_string): Update.
4898         * python/py-value.c (valpy_string): Update.
4899         * language.h (struct language_defn) <la_get_string>: Change
4900         type of "buffer".
4901         (default_get_string, c_get_string): Update.
4902         * language.c (default_get_string): Change type of "buffer".
4903         * guile/scm-value.c (gdbscm_value_to_string): Update.
4904         * c-lang.c (c_get_string): Change type of "buffer".
4905
4906 2018-06-18  Tom Tromey  <tom@tromey.com>
4907
4908         * ser-mingw.c (struct pipe_state_destroyer): New.
4909         (pipe_state_up): New typedef.
4910         (cleanup_pipe_state): Remove.
4911         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
4912
4913 2018-06-18  Tom Tromey  <tom@tromey.com>
4914
4915         * rust-lang.h (rust_yyerror): Don't declare.
4916         * rust-lang.c (rust_language_defn): Update.
4917         * rust-exp.y (yyerror): Now static.
4918         * parse.c (parse_exp_in_context_1): Update.
4919         * p-lang.h (p_yyerror): Don't declare.
4920         * p-lang.c (p_language_defn): Update.
4921         * p-exp.y (yyerror): Now static.
4922         * opencl-lang.c (opencl_language_defn): Update.
4923         * objc-lang.c (objc_language_defn): Update.
4924         * m2-lang.h (m2_yyerror): Don't declare.
4925         * m2-lang.c (m2_language_defn): Update.
4926         * m2-exp.y (yyerror): Now static.
4927         * language.h (struct language_defn) <la_error>: Remove.
4928         * language.c (unk_lang_error): Remove.
4929         (unknown_language_defn, auto_language_defn): Remove.
4930         * go-lang.h (go_yyerror): Don't declare.
4931         * go-lang.c (go_language_defn): Update.
4932         * go-exp.y (yyerror): Now static.
4933         * f-lang.h (f_yyerror): Don't declare.
4934         * f-lang.c (f_language_defn): Update.
4935         * f-exp.y (yyerror): Now static.
4936         * d-lang.h (d_yyerror): Don't declare.
4937         * d-lang.c (d_language_defn): Update.
4938         * d-exp.y (yyerror): Now static.
4939         * c-lang.h (c_yyerror): Don't declare.
4940         * c-lang.c (c_language_defn, cplus_language_defn)
4941         (asm_language_defn, minimal_language_defn): Update.
4942         * c-exp.y (yyerror): Now static.
4943         * ada-lang.h (ada_yyerror): Don't declare.
4944         * ada-lang.c (ada_language_defn): Update.
4945         * ada-exp.y (yyerror): Now static.
4946
4947 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
4948
4949         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
4950         (store_sveregs_to_thread): Likewise.
4951         (aarch64_linux_fetch_inferior_registers): Check for SVE.
4952         (aarch64_linux_store_inferior_registers): Likewise.
4953         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
4954         function.
4955         (aarch64_sve_regs_copy_to_regcache): Likewise.
4956         (aarch64_sve_regs_copy_from_regcache): Likewise.
4957         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
4958         declaration.
4959         (aarch64_sve_regs_copy_to_regcache): Likewise.
4960         (aarch64_sve_regs_copy_from_regcache): Likewise.
4961         (sve_context): Structure from Linux headers.
4962         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
4963         (SVE_SIG_ZREG_SIZE): Likewise.
4964         (SVE_SIG_PREG_SIZE): Likewise.
4965         (SVE_SIG_FFR_SIZE): Likewise.
4966         (SVE_SIG_REGS_OFFSET): Likewise.
4967         (SVE_SIG_ZREGS_OFFSET): Likewise.
4968         (SVE_SIG_ZREG_OFFSET): Likewise.
4969         (SVE_SIG_ZREGS_SIZE): Likewise.
4970         (SVE_SIG_PREGS_OFFSET): Likewise.
4971         (SVE_SIG_PREG_OFFSET): Likewise.
4972         (SVE_SIG_PREGS_SIZE): Likewise.
4973         (SVE_SIG_FFR_OFFSET): Likewise.
4974         (SVE_SIG_REGS_SIZE): Likewise.
4975         (SVE_SIG_CONTEXT_SIZE): Likewise.
4976         (SVE_PT_REGS_MASK): Likewise.
4977         (SVE_PT_REGS_FPSIMD): Likewise.
4978         (SVE_PT_REGS_SVE): Likewise.
4979         (SVE_PT_VL_INHERIT): Likewise.
4980         (SVE_PT_VL_ONEXEC): Likewise.
4981         (SVE_PT_REGS_OFFSET): Likewise.
4982         (SVE_PT_FPSIMD_OFFSET): Likewise.
4983         (SVE_PT_FPSIMD_SIZE): Likewise.
4984         (SVE_PT_SVE_ZREG_SIZE): Likewise.
4985         (SVE_PT_SVE_PREG_SIZE): Likewise.
4986         (SVE_PT_SVE_FFR_SIZE): Likewise.
4987         (SVE_PT_SVE_FPSR_SIZE): Likewise.
4988         (SVE_PT_SVE_FPCR_SIZE): Likewise.
4989         (__SVE_SIG_TO_PT): Likewise.
4990         (SVE_PT_SVE_OFFSET): Likewise.
4991         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
4992         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
4993         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
4994         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
4995         (SVE_PT_SVE_PREG_OFFSET): Likewise.
4996         (SVE_PT_SVE_PREGS_SIZE): Likewise.
4997         (SVE_PT_SVE_FFR_OFFSET): Likewise.
4998         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
4999         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
5000         (SVE_PT_SVE_SIZE): Likewise.
5001         (SVE_PT_SIZE): Likewise.
5002         (HAS_SVE_STATE): New define.
5003
5004 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
5005
5006         * nat/aarch64-sve-linux-sigcontext.h: New file.
5007         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
5008         new files.
5009         (SVE_VQ_MIN): Likewise.
5010         (SVE_VQ_MAX): Likewise.
5011         (SVE_VL_MIN): Likewise.
5012         (SVE_VL_MAX): Likewise.
5013         (SVE_NUM_ZREGS): Likewise.
5014         (SVE_NUM_PREGS): Likewise.
5015         (sve_vl_valid): Likewise.
5016         (struct user_sve_header): Likewise.
5017
5018 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
5019             Richard Bunt <Richard.Bunt@arm.com>
5020
5021         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
5022         was requested by GDB.
5023
5024 2018-06-15  Tom de Vries  <tdevries@suse.de>
5025
5026         * MAINTAINERS (Write After Approval): Add Tom de Vries.
5027
5028 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
5029
5030         * gnulib/update-gnulib.sh: Print expected versions of
5031         autoconf/aclocal.
5032
5033 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
5034
5035         * arch-utils.c (default_type_align): Use type_length_units.
5036         * gdbtypes.c (type_align): Use type_length_units.
5037
5038 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5039
5040         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
5041         of 'define' command.
5042
5043 2018-06-14  Tom de Vries  <tdevries@suse.de>
5044
5045         PR cli/22573
5046         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
5047         get_no_prettyformat_print_options.
5048
5049 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
5050
5051         * sparc-nat.h: Include target.h.
5052         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
5053         <fetch_registers>: Remove this argument in function call.
5054         <store_registers>: Remove this argument in function call, remove
5055         extra semicolon.
5056         <low_forget_process>: Call sparc64_forget_process instead of
5057         sparc_forget_process.
5058
5059 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5060
5061         * procfs.c (_initialize_procfs): Use add_inf_child_target.
5062         (procfs_target::make_corefile_notes): Adjust to new
5063         target_read_alloc return type.
5064
5065 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
5066             Stephen Roberts  <stephen.roberts@arm.com>
5067
5068         PR gdb/22882
5069         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
5070         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
5071         Move should_notify_stop local into more inner scope.
5072
5073 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
5074             Stephen Roberts  <stephen.roberts@arm.com>
5075
5076         PR gdb/22882
5077         * infrun.c (resume_1): Add call to mark_async_event_handler.
5078
5079 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
5080
5081         * infrun.c (do_target_wait): Change old version of $pc printed.
5082
5083 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
5084
5085         * dwarf2read.c (read_index_from_section): Rename to...
5086         (read_gdb_index_from_section): ... this, update all callers.
5087         (dwarf2_read_index): Rename to...
5088         (dwarf2_read_gdb_index): ... this, update all callers.
5089
5090 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
5091
5092         * gdb/hppa-linux-nat.c
5093         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
5094         hppa_linux_nat_target::fetch_registers.
5095
5096 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
5097
5098         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
5099         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
5100         (AARCH64_DWARF_SVE_FFR): Likewise.
5101         (AARCH64_DWARF_SVE_P0): Likewise.
5102         (AARCH64_DWARF_SVE_Z0): Likewise.
5103
5104 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
5105
5106         * common/common-regcache.h (raw_compare): New function.
5107         * regcache.c (regcache::raw_compare): Likewise.
5108         * regcache.h (regcache::raw_compare): New declaration.
5109
5110 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
5111
5112         * common/common-regcache.h (reg_buffer_common): New structure.
5113         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
5114         (reg_buffer::raw_supply): Likewise.
5115         (reg_buffer::raw_supply_integer): Likewise.
5116         (reg_buffer::raw_supply_zeroed): Likewise.
5117         (reg_buffer::raw_collect): Likewise.
5118         (reg_buffer::raw_collect_integer): Likewise.
5119         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
5120         (reg_buffer::raw_supply): Likewise.
5121         (reg_buffer::raw_supply_integer): Likewise.
5122         (reg_buffer::raw_supply_zeroed): Likewise.
5123         (reg_buffer::raw_collect): Likewise.
5124         (reg_buffer::raw_collect_integer): Likewise.
5125
5126 2018-06-10  Tom Tromey  <tom@tromey.com>
5127
5128         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
5129         (class remote_state) <stop_reply_queue>: Now std::vector.
5130         (remote_state::~remote_state)
5131         (remote_target::stop_reply_queue_length): Update.
5132         (struct queue_iter_param, remove_child_of_pending_fork)
5133         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
5134         (check_pending_event_prevents_wildcard_vcont_callback)
5135         (remove_stop_reply_for_inferior)
5136         (remove_stop_reply_of_remote_state)
5137         (remote_notif_remove_once_on_match)
5138         (stop_reply_match_ptid_and_ws)
5139         (remote_kill_child_of_pending_fork): Remove.
5140         (remote_target::remove_new_fork_children)
5141         (remote_target::check_pending_events_prevent_wildcard_vcont)
5142         (remote_target::discard_pending_stop_replies)
5143         (remote_target::discard_pending_stop_replies_in_queue)
5144         (remote_target::remote_notif_remove_queued_reply)
5145         (remote_target::queued_stop_reply)
5146         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
5147         (remote_target::wait, remote_target::kill_new_fork_children)
5148         (remote_target::async): Update.
5149
5150 2018-06-10  Tom Tromey  <tom@tromey.com>
5151
5152         * record-full.c (record_full_arch_list_cleanups): Remove.
5153         (record_full_message): Use try/catch.
5154         (record_full_wait_cleanups): Remove.
5155         (record_full_wait_1): Use try/catch.
5156         (record_full_restore): Likewise.
5157
5158 2018-06-10  Tom Tromey  <tom@tromey.com>
5159
5160         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
5161         declare VEC.  Add constructor.
5162         <in_target_beneath>: Now bool.
5163         (record_full_breakpoints): Now a std::vector, static.
5164         (record_full_sync_record_breakpoints)
5165         (record_full_init_record_breakpoints)
5166         (record_full_target::insert_breakpoint)
5167         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
5168
5169 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
5170
5171         * dwarf2read.c (process_cu_includes): Remove struct keyword.
5172         * serial.c (serial_interface_lookup): Remove struct keyword.
5173
5174 2018-06-10  Tom Tromey  <tom@tromey.com>
5175
5176         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
5177         method.
5178         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
5179         a method.
5180         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
5181         method.
5182         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
5183         "beneath" as a method.
5184         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
5185         Use "beneath" as a method.
5186
5187 2018-06-10  Tom Tromey  <tom@tromey.com>
5188
5189         * tracefile.c (struct trace_file_writer_deleter): New.
5190         <operator()>: Rename from trace_file_writer_xfree.
5191         (trace_file_writer_up): New typedef.
5192         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
5193
5194 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
5195
5196         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
5197         <m_registers, m_register_status>: Change type to
5198         std::unique_ptr.
5199         * regcache.c (reg_buffer::reg_buffer): Use new instead of
5200         XCNEWVEC.
5201
5202 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
5203
5204         * common/common-regcache.h (enum register_status): Add
5205         underlying type "signed char".
5206         * regcache.h (reg_buffer) <m_register_status>: Change type to
5207         register_status *.
5208         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
5209         register_status instead of signed char.
5210         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
5211         (reg_buffer::get_register_status): Remove cast.
5212         (readable_regcache::raw_read): Remove cast.
5213         (readable_regcache::cooked_read): Remove cast.
5214
5215 2018-06-09  Tom Tromey  <tom@tromey.com>
5216
5217         * source.c (reverse_search_command, forward_search_command): Use
5218         scoped_fd.
5219
5220 2018-06-09  Tom Tromey  <tom@tromey.com>
5221
5222         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
5223         (serial_ops_list): Now static, std::vector.
5224         (serial_interface_lookup, serial_add_interface): Update.
5225
5226 2018-06-09  Tom Tromey  <tom@tromey.com>
5227
5228         * dwarf2read.c (process_cu_includes): Update.
5229         (process_full_comp_unit): Update.
5230         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
5231         std::vector.
5232
5233 2018-06-08  Paul Koning  <paul_koning@dell.com>
5234
5235         PR gdb/23252
5236
5237         * python/python.c (do_start_initialization):
5238         Avoid call to internal Python API.
5239         (init__gdb_module): New function.
5240
5241 2018-06-08  Gary Benson <gbenson@redhat.com>
5242
5243         * linux-thread-db.c (valprint.h): New include.
5244         (struct check_thread_db_info): New structure.
5245         (check_thread_db_on_load, tdb_testinfo): New static globals.
5246         (check_thread_db, check_thread_db_callback): New functions.
5247         (try_thread_db_load_1): Run integrity checks if requested.
5248         (maintenance_check_libthread_db): New function.
5249         (_initialize_thread_db): Register "maint check libthread-db"
5250         and "maint set/show check-libthread-db".
5251         * NEWS: Mention the above new commands.
5252
5253 2018-06-08  Tom Tromey  <tom@tromey.com>
5254
5255         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
5256         now a method.
5257
5258 2018-06-08  Tom Tromey  <tom@tromey.com>
5259
5260         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
5261
5262 2018-06-08  Tom Tromey  <tom@tromey.com>
5263
5264         * common/btrace-common.h (struct btrace_data): Add constructor,
5265         destructor, move assignment operator.
5266         <empty, clear, fini>: New methods.
5267         <format>: Initialize.
5268         (btrace_data_init, btrace_data_fini, btrace_data_clear)
5269         (btrace_data_empty): Don't declare.
5270         * common/btrace-common.c (btrace_data_init): Remove.
5271         (btrace_data::fini): Rename from btrace_data_fini.
5272         (btrace_data::empty): Rename from btrace_data_empty.
5273         (btrace_data::clear): Rename from btrace_data_clear.  Return
5274         bool.
5275         * btrace.h (make_cleanup_btrace_data): Don't declare.
5276         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
5277         (parse_xml_btrace): Update.
5278         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
5279         (maint_btrace_clear_packet_history_cmd): Update.
5280
5281 2018-06-07  Pedro Alves  <palves@redhat.com>
5282
5283         * target.h (target_ops) <beneath>: Now a method.  All references
5284         updated.
5285         (class target_stack): New.
5286         * target.c (g_target_stack): New.
5287         (g_current_top_target): Delete.
5288         (current_top_target): Get the top target out of g_target_stack.
5289         (target_stack::push, target_stack::unpush): New.
5290         (push_target, unpush_target): Reimplement.
5291         (target_is_pushed): Reimplement in terms of g_target_stack.
5292         (target_ops::beneath, target_stack::find_beneath): New.
5293
5294 2018-06-07  Pedro Alves  <palves@redhat.com>
5295
5296         * target.h (find_target_beneath): Delete declaration.
5297         * target.c (find_target_beneath): Delete definition.
5298         * aix-thread.c: All callers of find_target_beneath adjusted to
5299         call target_ops::beneath instead.
5300         * bsd-uthread.c: Likewise.
5301         * linux-thread-db.c: Likewise.
5302         * ravenscar-thread.c: Likewise.
5303         * sol-thread.c: Likewise.
5304         * spu-multiarch.c: Likewise.
5305
5306 2018-06-07  Pedro Alves  <palves@redhat.com>
5307
5308         * target.h (target_ops) <beneath>: Now a method.  All references
5309         updated.
5310         (target_ops) <m_beneath>: New.
5311         * target.c (target_ops::beneath): New.
5312         * corelow.c: Adjust all references to target_ops::beneath.
5313         * linux-thread-db.c: Likewise.
5314         * make-target-delegates: Likewise.
5315         * record-btrace.c: Likewise.
5316         * record-full.c: Likewise.
5317         * remote.c: Likewise.
5318         * target.c: Likewise.
5319         * target-delegates.c: Regenerate.
5320
5321 2018-06-07  Pedro Alves  <palves@redhat.com>
5322
5323         * target.h (target_stack): Delete.
5324         (current_top_target): Declare function.
5325         * target.c (target_stack): Delete.
5326         (g_current_top_target): New.
5327         (current_top_target): New function.
5328         * auxv.c: Use current_top_target instead of target_stack
5329         throughout.
5330         * avr-tdep.c: Likewise.
5331         * breakpoint.c: Likewise.
5332         * corefile.c: Likewise.
5333         * elfread.c: Likewise.
5334         * eval.c: Likewise.
5335         * exceptions.c: Likewise.
5336         * frame.c: Likewise.
5337         * gdbarch-selftests.c: Likewise.
5338         * gnu-v3-abi.c: Likewise.
5339         * ia64-tdep.c: Likewise.
5340         * ia64-vms-tdep.c: Likewise.
5341         * infcall.c: Likewise.
5342         * infcmd.c: Likewise.
5343         * infrun.c: Likewise.
5344         * linespec.c: Likewise.
5345         * linux-tdep.c: Likewise.
5346         * minsyms.c: Likewise.
5347         * ppc-linux-nat.c: Likewise.
5348         * ppc-linux-tdep.c: Likewise.
5349         * procfs.c: Likewise.
5350         * regcache.c: Likewise.
5351         * remote.c: Likewise.
5352         * rs6000-tdep.c: Likewise.
5353         * s390-linux-nat.c: Likewise.
5354         * s390-tdep.c: Likewise.
5355         * solib-aix.c: Likewise.
5356         * solib-darwin.c: Likewise.
5357         * solib-dsbt.c: Likewise.
5358         * solib-spu.c: Likewise.
5359         * solib-svr4.c: Likewise.
5360         * solib-target.c: Likewise.
5361         * sparc-tdep.c: Likewise.
5362         * sparc64-tdep.c: Likewise.
5363         * spu-tdep.c: Likewise.
5364         * symfile.c: Likewise.
5365         * symtab.c: Likewise.
5366         * target-descriptions.c: Likewise.
5367         * target-memory.c: Likewise.
5368         * target.c: Likewise.
5369         * target.h: Likewise.
5370         * tracefile-tfile.c: Likewise.
5371         * tracepoint.c: Likewise.
5372         * valops.c: Likewise.
5373         * valprint.c: Likewise.
5374         * value.c: Likewise.
5375         * windows-tdep.c: Likewise.
5376         * mi/mi-main.c: Likewise.
5377
5378 2018-06-07  Tom Tromey  <tom@tromey.com>
5379
5380         * valprint.h (build_address_symbolic): Declare.
5381         * printcmd.c (print_address_symbolic): Update.
5382         (build_address_symbolic): Change "name" and "filename" to
5383         std::string.
5384         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
5385         Update.
5386         * defs.h (build_address_symbolic): Remove declaration.
5387
5388 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
5389
5390         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
5391         (aarch64_vnv_type): Add function.
5392         (aarch64_pseudo_register_name): Add V regs for SVE.
5393         (aarch64_pseudo_register_type): Likewise.
5394         (aarch64_pseudo_register_reggroup_p): Likewise.
5395         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
5396         (aarch64_pseudo_read_value): Add V regs for SVE.
5397         (aarch64_pseudo_write_2): Use V0 offset for SVE
5398         (aarch64_pseudo_write): Add V regs for SVE.
5399         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
5400
5401 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
5402
5403         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
5404         (sve_vl_from_vq): Likewise.
5405
5406 2018-06-05  Tom Tromey  <tom@tromey.com>
5407
5408         * cli/cli-cmds.c (show_version): Update.
5409         * top.c (print_gdb_version): Add "interactive" parameter.
5410         Update.
5411         * main.c (captured_main_1): Update.
5412         * top.h (print_gdb_version): Add "interactive" parameter and a
5413         comment.
5414
5415 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
5416
5417         * common/enum-flags.h: Add trailing semicolon to example in
5418         comment.
5419
5420 2018-06-05  Tom Tromey  <tom@tromey.com>
5421
5422         PR cli/12326:
5423         * NEWS: Add entry about pager.
5424         * utils.c (pagination_disabled_for_command): New global.
5425         (prompt_for_continue): Allow "c" response to prompt.
5426         (reinitialize_more_filter): Clear
5427         pagination_disabled_for_command.
5428         (fputs_maybe_filtered): Check pagination_disabled_for_command.
5429
5430 2018-06-04  Tom Tromey  <tom@tromey.com>
5431
5432         * ada-lang.h (ada_lookup_symbol_list): Update.
5433         * ada-lang.c (resolve_subexp): Update.
5434         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
5435         parameter.
5436         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
5437         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
5438         results parameter to std::vector.
5439         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
5440         Update.
5441         * ada-exp.y (block_lookup): Update.
5442         (select_possible_type_sym): Change type of syms.  Remove nsyms
5443         parameter.
5444         (write_var_or_type, write_name_assoc): Update.
5445
5446 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
5447
5448         * windows-nat.c (windows_nat_target::xfer_partial): Return
5449         TARGET_XFER_E_IO if we need to delegate to the target beneath
5450         but BENEATH is NULL.
5451
5452 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
5453
5454         * Makefile.in (config.status): Add configure.nat as a
5455         dependency.
5456
5457 2018-06-04  Tom Tromey  <tom@tromey.com>
5458
5459         * cp-name-parser.y (cpname_state): Add method declarations.
5460         (HANDLE_QUAL): Update.
5461         (cpname_state::d_grab, cpname_state::fill_comp)
5462         (cpname_state::make_operator, cpname_state::make_dtor)
5463         (cpname_state::make_builtin_type, cpname_state::make_name)
5464         (cpname_state::d_qualify, cpname_state::d_int_type)
5465         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
5466         (%union): Move earlier.
5467
5468 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5469
5470         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
5471
5472 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5473
5474         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
5475         (aarch64_pseudo_write_1): Likewise.
5476         (aarch64_pseudo_read_value): Use helper.
5477         (aarch64_pseudo_write): Likewise.
5478
5479 2018-06-04  Pedro Alves  <palves@redhat.com>
5480
5481         * darwin-nat.c (darwin_ops): Delete.
5482         (darwin_attach_pid): Use get_native_target.
5483
5484 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5485
5486         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
5487         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
5488
5489 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5490
5491         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
5492         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
5493         (aarch64_gdbarch_init): Check for SVE.
5494         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
5495
5496 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5497
5498         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
5499         * aarch64-tdep.h (aarch64_read_description): Likewise.
5500         * arch/aarch64.c (aarch64_create_target_description): Likewise.
5501         * arch/aarch64.h (aarch64_create_target_description): Likewise.
5502         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
5503         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
5504         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
5505
5506 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
5507
5508         * value.c (value_fetch_lazy_bitfield): New.
5509         (value_fetch_lazy_memory): New.
5510         (value_fetch_lazy_register): New.
5511         (value_fetch_lazy): Factor out to smaller functions.
5512
5513 2018-06-01  Tom Tromey  <tom@tromey.com>
5514
5515         * cp-name-parser.y (backslashable, represented): Now const.
5516
5517 2018-06-01  Tom Tromey  <tom@tromey.com>
5518
5519         * cp-name-parser.y: Include parser-defs.h.
5520         (parser_fprintf): Remove declaration.
5521
5522 2018-06-01  Tom Tromey  <tom@tromey.com>
5523
5524         * cp-name-parser.y: Use %pure-parser, %lex-param, and
5525         %parse-param.
5526         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
5527         (global_result): Remove globals.
5528         (struct cpname_state): New.
5529         (yyparse): Don't declare.
5530         (yylex, yyerror): Move declarations after %union.
5531         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
5532         (make_name): Add state parameter.
5533         Update all callers.
5534         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
5535         parameter.
5536         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
5537         Update.
5538         (yylex): Add lvalp, state parameters.
5539         (yyerror): Add state parameter.
5540         (cp_demangled_name_to_comp): Update.
5541
5542 2018-06-01  Tom Tromey  <tom@tromey.com>
5543
5544         * cp-name-parser.y (parser_fprintf): Declare.
5545         (GDB_YY_REMAP_PREFIX): Define.
5546         Include yy-remap.h.  Don't redefine yy* identifiers.
5547
5548 2018-06-01  Tom Tromey  <tom@tromey.com>
5549
5550         * python/py-type.c (typy_legacy_template_argument): Update.
5551         * cp-support.h (cp_demangled_name_to_comp): Update.
5552         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
5553         parameter to be a "std::string *".
5554         (main): Update.
5555
5556 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
5557
5558         * ada-lex.l: Include "diagnostics.h" instead of
5559         "common/diagnostics.h".
5560         * unittests/environ-selftests.c: Likewise.
5561         * common/diagnostics.h: Moved to ../include.
5562
5563 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
5564
5565         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
5566         to language_mode_manual while calling breakpoint_re_set_one.
5567
5568 2018-06-01  Tom Tromey  <tom@tromey.com>
5569
5570         * valops.c (value_cast_structs, destructor_name_p): Update.
5571         * symtab.c (gdb_mangle_name): Update.
5572         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
5573         Update.
5574         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
5575         (pascal_object_print_value_fields, pascal_object_print_value):
5576         Update.
5577         * p-typeprint.c (pascal_type_print_derivation_info): Update.
5578         * linespec.c (find_methods): Update.
5579         * gdbtypes.h (type_name_no_tag): Remove.
5580         (type_name_or_error): Rename from type_name_no_tag_or_error.
5581         * gdbtypes.c (type_name_no_tag): Remove.
5582         (type_name_or_error): Rename from type_name_no_tag_or_error.
5583         (lookup_struct_elt_type, check_typedef): Update.
5584         * expprint.c (print_subexp_standard): Update.
5585         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
5586         * d-namespace.c (d_lookup_nested_symbol): Update.
5587         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
5588         (cp_print_class_member): Update.
5589         * cp-namespace.c (cp_lookup_nested_symbol): Update.
5590         * completer.c (add_struct_fields): Update.
5591         * c-typeprint.c (cp_type_print_derivation_info)
5592         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
5593         Update.
5594         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
5595         (ada_prefer_type, ada_is_exception_sym): Update.
5596
5597 2018-06-01  Tom Tromey  <tom@tromey.com>
5598
5599         * valops.c (enum_constant_from_type, value_namespace_elt)
5600         (value_maybe_namespace_elt): Update.
5601         * valarith.c (find_size_for_pointer_math): Update.
5602         * target-descriptions.c (make_gdb_type): Update.
5603         * symmisc.c (print_symbol): Update.
5604         * stabsread.c (define_symbol, read_type)
5605         (complain_about_struct_wipeout, add_undefined_type)
5606         (cleanup_undefined_types_1): Update.
5607         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
5608         (rust_range_type_p, val_print_struct, rust_print_struct_def)
5609         (rust_internal_print_type, rust_composite_type)
5610         (rust_evaluate_funcall, rust_evaluate_subexp)
5611         (rust_inclusive_range_type_p): Update.
5612         * python/py-type.c (typy_get_tag): Update.
5613         * p-typeprint.c (pascal_type_print_base): Update.
5614         * mdebugread.c (parse_symbol, parse_type): Update.
5615         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
5616         Update.
5617         * guile/scm-type.c (gdbscm_type_tag): Update.
5618         * go-lang.c (sixg_string_p): Update.
5619         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
5620         Update.
5621         * gdbtypes.h (struct main_type) <tag_name>: Remove.
5622         (TYPE_TAG_NAME): Remove.
5623         * gdbtypes.c (type_name_no_tag): Simplify.
5624         (check_typedef, check_types_equal, recursive_dump_type)
5625         (copy_type_recursive, arch_composite_type): Update.
5626         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
5627         in summary mode when needed.
5628         * eval.c (evaluate_funcall): Update.
5629         * dwarf2read.c (fixup_go_packaging, read_structure_type)
5630         (process_structure_scope, read_enumeration_type)
5631         (read_namespace_type, read_module_type, determine_prefix): Update.
5632         * cp-support.c (inspect_type): Update.
5633         * coffread.c (process_coff_symbol, decode_base_type): Update.
5634         * c-varobj.c (c_is_path_expr_parent): Update.
5635         * c-typeprint.c (c_type_print_base_struct_union): Update.
5636         (c_type_print_base_1): Update.  Print struct/class/union/enum in
5637         summary when using C language.
5638         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
5639         (gen_maybe_namespace_elt): Update.
5640         * ada-lang.c (ada_type_name): Simplify.
5641         (empty_record, ada_template_to_fixed_record_type_1)
5642         (template_to_static_fixed_type)
5643         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
5644
5645 2018-06-01  Tom Tromey  <tom@tromey.com>
5646
5647         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
5648         c_print_type.
5649         * c-typeprint.c (c_print_type_1): Add "language" parameter.
5650         (c_print_type): Update.
5651         (c_print_type): New overload.
5652         (c_type_print_varspec_prefix, c_type_print_args)
5653         (c_type_print_varspec_suffix, c_print_type_no_offsets)
5654         (c_type_print_base_struct_union, c_type_print_base_1)
5655         (cp_type_print_method_args): Add "language" parameter.
5656         (c_type_print_base): Update.
5657         * c-lang.h (c_print_type): Add new overload.
5658
5659 2018-06-01  Tom Tromey  <tom@tromey.com>
5660
5661         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
5662         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
5663
5664 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
5665
5666         * aarch64-tdep.c (aarch64_sve_register_names): New const
5667         var.
5668         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
5669         (AARCH64_SVE_Z_REGS_NUM): New define.
5670         (AARCH64_SVE_P_REGS_NUM): Likewise.
5671         (AARCH64_SVE_NUM_REGS): Likewise.
5672
5673 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
5674
5675         * nat/linux-ptrace.h [__alpha__]
5676         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
5677         definitions.
5678
5679 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
5680
5681         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
5682         the endianness selected.
5683         * NEWS: Document `set endian auto' mode operation update.
5684
5685 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
5686
5687         * Makefile.in: Add new header.
5688         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
5689         (sve_vl_from_vg): Likewise.
5690         (sve_vq_from_vl): Likewise.
5691         (sve_vl_from_vq): Likewise.
5692         (sve_vq_from_vg): Likewise.
5693         (sve_vg_from_vq): Likewise.
5694         * configure.nat: Add new c file.
5695         * nat/aarch64-sve-linux-ptrace.c: New file.
5696         * nat/aarch64-sve-linux-ptrace.h: New file.
5697
5698 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
5699
5700         * aarch64-linux-nat.c (aarch64_linux_read_description):
5701         Add parmeter zero.
5702         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
5703         Likewise.
5704         * aarch64-tdep.c (tdesc_aarch64_list): Add.
5705         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
5706         (aarch64_gdbarch_init): Add parmeter zero.
5707         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
5708         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
5709         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
5710         parmeter.
5711         * doc/gdb.texinfo: Describe SVE feature
5712         * features/aarch64-sve.c: New file.
5713
5714 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
5715
5716         PR gdb/23210
5717         * gdbarch.sh (significant_addr_bit): Default to zero when
5718         not set by target architecture.
5719         * gdbarch.c: Re-generated.
5720         * utils.c (address_significant): Update.
5721
5722 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
5723
5724         * stack.c (func_command): Remove trailing newline in call to error.
5725
5726 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5727
5728         * regcache.h (regcache_raw_collect): Remove, update callers to
5729         use regcache::raw_collect.
5730         * regcache.c (regcache_raw_collect): Remove.
5731
5732 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5733
5734         * regcache.h (regcache_raw_supply): Remove, update callers to
5735         use detached_regcache::raw_supply.
5736         * regcache.c (regcache_raw_supply): Remove.
5737
5738 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5739
5740         * regcache.h (regcache_cooked_write_part): Remove, update
5741         callers to use regcache::cooked_write_part.
5742         * regcache.c (regcache_cooked_write_part): Remove.
5743
5744 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5745
5746         * regcache.h (regcache_cooked_read_part): Remove, update callers
5747         to use readable_regcache::cooked_read_part.
5748         * regcache.c (regcache_cooked_read_part): Remove.
5749
5750 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5751
5752         * regcache.h (regcache_cooked_read_value): Remove, update
5753         callers to use readable_regcache::cooked_read_value.
5754         * regcache.c (regcache_cooked_read_value): Remove.
5755
5756 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5757
5758         * regcache.h (regcache_cooked_write): Remove, update callers to
5759         use regcache::cooked_write.
5760         * regcache.c (regcache_cooked_write): Remove.
5761
5762 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5763
5764         * regcache.h (regcache_invalidate): Remove, update callers to
5765         use detached_regcache::invalidate instead.
5766         * regcache.c (regcache_invalidate): Remove.
5767
5768 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5769
5770         * regcache.h (regcache_raw_write_part): Remove, update callers
5771         to use regcache::raw_write_part instead.
5772         * regcache.c (regcache_raw_write_part): Remove.
5773
5774 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5775
5776         * regcache.h (regcache_raw_read_part): Remove, update callers to
5777         use readable_regcache::raw_read_part instead.
5778         * regcache.c (regcache_raw_read_part): Remove.
5779
5780 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5781
5782         * regcache.h (regcache_cooked_read): Remove, update callers to
5783         use readable_regcache::cooked_read instead.
5784         * regcache.c (regcache_cooked_read): Remove.
5785
5786 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5787
5788         * regcache.h (regcache_raw_write): Remove, update callers to use
5789         regcache::raw_write instead.
5790         * regcache.c (regcache_raw_write): Remove.
5791
5792 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5793
5794         * regcache.h (regcache_raw_read): Remove, update callers to use
5795         readable_regcache::raw_read instead.
5796         * regcache.c (regcache_raw_read): Remove.
5797
5798 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5799
5800         * regcache.h (regcache_raw_update): Remove, update callers to
5801         use readable_regcache::raw_update instead.
5802         * regcache.c (regcache_raw_update): Remove.
5803
5804 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5805
5806         * regcache.h (regcache_register_status): Remove, update callers
5807         to use reg_buffer::get_register_status directly instead.
5808         * regcache.c (regcache_register_status): Remove.
5809
5810 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5811
5812         * regcache.h (regcache_get_ptid): Remove, update all callers to
5813         call regcache::ptid instead.
5814         * regcache.c (regcache_get_ptid): Remove.
5815
5816 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5817
5818         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
5819
5820 2018-05-30  Pedro Alves  <palves@redhat.com>
5821
5822         * common/common-exceptions.h (exception_rethrow): Use
5823         ATTRIBUTE_NORETURN.
5824
5825 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
5826
5827         * breakpoint.c (print_solib_event, check_status_catch_solib):
5828         Remove struct keyword in range-based for loops.
5829         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
5830         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
5831         Likewise.
5832         * linespec.c (find_superclass_methods, search_minsyms_for_name):
5833         Likewise.
5834         * symfile.c (addr_info_make_relative): Likewise.
5835         * thread.c (value_in_thread_stack_temporaries): Likewise.
5836
5837 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
5838
5839         PR gdb/16841
5840         * valops.c (value_struct_elt_for_reference): Call check_typedef on
5841         aggregate type to get its real type before accessing it.
5842
5843 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
5844
5845         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
5846         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
5847         * coff-pe-read.c (add_pe_forwarded_sym): Replace
5848         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
5849         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
5850         * jit.c (jit_breakpoint_re_set_internal): Likewise.
5851         * printcmd.c (info_address_command): Likewise.
5852
5853 2018-05-29  Tom Tromey  <tom@tromey.com>
5854
5855         * windows-nat.c (handle_exception): Update fall-through comment.
5856
5857 2018-05-29  Tom Tromey  <tom@tromey.com>
5858
5859         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
5860         (struct program_space) <added_solibs>: Now a std::vector.
5861         * breakpoint.c (print_solib_event): Update.
5862         (check_status_catch_solib): Update.
5863         * progspace.c (clear_program_space_solib_cache): Update.
5864         * solib.c (update_solib_list): Update.
5865
5866 2018-05-29  Tom Tromey  <tom@tromey.com>
5867
5868         * python/py-type.c (typy_richcompare): Update.
5869         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
5870         * gdbtypes.h (types_deeply_equal): Return bool.
5871         (types_equal): Likewise.
5872         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
5873         declare VEC.
5874         (check_types_equal): Change worklist to std::vector.  Return
5875         bool.
5876         (struct type_equality_entry): Add constructor.
5877         (compare_maybe_null_strings): Return bool.
5878         (check_types_worklist): Return bool.  Change worklist to
5879         std::vector.
5880         (types_deeply_equal): Use std::vector.
5881         (types_equal): Return bool.
5882         (compare_maybe_null_strings): Simplify.
5883
5884 2018-05-29  Tom Tromey  <tom@tromey.com>
5885
5886         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
5887
5888 2018-05-29  Tom Tromey  <tom@tromey.com>
5889
5890         * objc-lang.h: Don't include cp-support.h.
5891         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
5892         declare VEC.
5893
5894 2018-05-27  Tom Tromey  <tom@tromey.com>
5895
5896         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
5897
5898 2018-05-25  Tom Tromey  <tom@tromey.com>
5899
5900         * value.c (value::location): Initialize.
5901
5902 2018-05-25  Tom Tromey  <tom@tromey.com>
5903
5904         * dbxread.c (init_bincl_list): Remove.
5905         (bincl_list): Now a std::vector.
5906         (bincls_allocated, next_bincl): Remove.
5907         (free_bincl_list, do_free_bincl_list_cleanup)
5908         (make_cleanup_free_bincl_list): Remove.
5909         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
5910         unique_xmalloc_ptr.
5911         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
5912         (struct header_file_location): Add constructor.
5913         (add_bincl_to_list): Remove.
5914
5915 2018-05-25  Tom Tromey  <tom@tromey.com>
5916
5917         * tui/tui.c (tui_enable): Update.
5918         * mi/mi-interp.c (mi_interp::init): Update.
5919         * interps.h (class interp) <name>: New method.
5920         <m_name>: Rename from name.
5921         (~scoped_restore_interp): Update.
5922         * interps.c (interp::interp): Update.
5923         (interp_add, interp_set, interp_lookup_existing)
5924         (current_interp_named_p): Update.
5925
5926 2018-05-25  Tom Tromey  <tom@tromey.com>
5927
5928         * interps.c (interp_name): Remove.
5929         * mi/mi-interp.c (mi_interp::init): Update.
5930         * interps.h (interp_name): Remove.
5931         (~scoped_restore_interp): Update.
5932         * tui/tui.c (tui_enable): Update.
5933
5934 2018-05-25  Tom Tromey  <tom@tromey.com>
5935
5936         * utils.c (fputs_maybe_filtered): Update.
5937         * linespec.c (decode_line_full): Update.
5938         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
5939         (mi_print_breakpoint_for_event, mi_solib_loaded)
5940         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
5941         (mi_user_selected_context_changed): Update.
5942         * mi/mi-main.c (mi_execute_command): Update.
5943         * cli/cli-script.c (execute_control_command): Update.
5944         * python/python.c (execute_gdb_command): Update.
5945         * solib.c (info_sharedlibrary_command): Update.
5946         * interps.c (interp_ui_out): Remove.
5947         * interps.h (interp_ui_out): Remove.
5948
5949 2018-05-25  Tom Tromey  <tom@tromey.com>
5950
5951         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
5952         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
5953         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
5954
5955 2018-05-25  Tom Tromey  <tom@tromey.com>
5956
5957         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
5958         * interps.c (interp_exec): Use scoped_restore.
5959
5960 2018-05-25  Tom Tromey  <tom@tromey.com>
5961
5962         * remote.c (remote_target::remote_file_get): Use
5963         gdb::byte_vector.
5964         (remote_target::remote_file_put): Likewise.
5965
5966 2018-05-25  Tom Tromey  <tom@tromey.com>
5967
5968         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
5969         a std::string.
5970         (get_pe_section_index, add_pe_exported_sym): Update.
5971         (read_pe_exported_syms): Use gdb::def_vector.
5972
5973 2018-05-25  Tom Tromey  <tom@tromey.com>
5974
5975         * frame.c (remove_prev_frame): Remove.
5976         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
5977
5978 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
5979
5980         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
5981         Remove prototypes.
5982         * mips-linux-nat.c (supply_fpregset): Always call
5983         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
5984         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
5985         `mips_fill_fpregset'.
5986         * mips-linux-tdep.c (mips_supply_fpregset)
5987         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
5988         (mips_fill_fpregset_wrapper): Remove functions.
5989         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
5990         (mips_linux_fpregset): Remove variable.
5991         (mips_linux_iterate_over_regset_sections): Use
5992         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
5993         (mips_linux_o32_sigframe_init): Remove comment.
5994
5995 2018-05-25  Pedro Alves  <palves@redhat.com>
5996
5997         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
5998         (struct readahead_cache, struct packet_reg, struct
5999         remote_arch_state, class remote_state): Move higher up in the
6000         file.
6001         (remote_target::m_remote_state): Now an object instead of a pointer.
6002         (remote_target::get_remote_state): Adjust.
6003
6004 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
6005
6006         * stack.c (select_and_print_frame): Delete.
6007         (struct function_bounds): Move struct within function.
6008         (func_command): Most content moved into new function
6009         find_frame_for_function, use new function, print result, add
6010         function comment.
6011         (find_frame_for_function): New function, now returns a result.
6012
6013 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6014
6015         * stack.c (iterate_over_block_arg_vars): Fix comment.
6016         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
6017
6018 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
6019
6020         PR gdb/23203
6021         * frame.c
6022         (scoped_restore_selected_frame::scoped_restore_selected_frame):
6023         Define.
6024         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
6025         Define.
6026         * frame.h (class scoped_restore_selected_frame): New class.
6027         * stack.c (print_frame_local_vars): Remove catching and rethrowing
6028         of any exception, use scoped_restore_selected_frame to restore the
6029         frame instead.
6030
6031 2018-05-24  Pedro Alves  <palves@redhat.com>
6032
6033         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
6034         override.
6035
6036 2018-05-23  Tom Tromey  <tom@tromey.com>
6037
6038         * complaints.c (struct complaints): Remove.
6039         (symfile_complaint_book): Remove.
6040         (series): New global.
6041         (complaint_internal): Update.
6042         (clear_complaints): Update.
6043
6044 2018-05-23  Tom Tromey  <tom@tromey.com>
6045
6046         * complaints.c (counters): New global.
6047         (struct complain): Remove.
6048         (struct complaints) <root>: Remove.
6049         (complaint_sentinel): Remove.
6050         (symfile_complaint_book): Update.
6051         (find_complaint) Remove.
6052         (complaint_internal, clear_complaints): Update.
6053
6054 2018-05-23  Tom Tromey  <tom@tromey.com>
6055
6056         * complaints.c (struct complain) <file, line>: Remove.
6057         (find_complaint): Remove file, line parameters.
6058         (complaint_internal): Update.
6059
6060 2018-05-23  Tom Tromey  <tom@tromey.com>
6061
6062         * complaints.c (vcomplaint): Remove.
6063         (complaint_internal) Merge in contents of vcomplaint.
6064
6065 2018-05-23  Tom Tromey  <tom@tromey.com>
6066
6067         * complaints.c (struct complaints) <explanation>: Remove.
6068         (symfile_explanations): Remove.
6069         (symfile_complaint_book): Update.
6070         (vcomplaint): Update.
6071         (struct explanation): Remove.
6072
6073 2018-05-23  Tom Tromey  <tom@tromey.com>
6074
6075         * complaints.c (symfile_complaints): Remove.
6076         (complaint_internal): Remove "complaints" parameter.
6077         (clear_complaints, vcomplaint): Remove "c" parameter.
6078         (get_complaints): Remove.
6079         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
6080         (dwarf2_debug_line_missing_file_complaint)
6081         (dwarf2_debug_line_missing_end_sequence_complaint)
6082         (dwarf2_complex_location_expr_complaint)
6083         (dwarf2_const_value_length_mismatch_complaint)
6084         (dwarf2_section_buffer_overflow_complaint)
6085         (dwarf2_macro_malformed_definition_complaint)
6086         (dwarf2_invalid_attrib_class_complaint)
6087         (create_addrmap_from_index, dw2_symtab_iter_next)
6088         (dw2_expand_marked_cus)
6089         (dw2_debug_names_iterator::find_vec_in_debug_names)
6090         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
6091         (create_debug_type_hash_table, init_cutu_and_read_dies)
6092         (partial_die_parent_scope, add_partial_enumeration)
6093         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
6094         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
6095         (read_import_statement, read_file_scope, create_dwo_cu_reader)
6096         (create_cus_hash_table, create_dwp_hash_table)
6097         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
6098         (dwarf2_rnglists_process, dwarf2_ranges_process)
6099         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
6100         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
6101         (handle_struct_member_die, process_structure_scope)
6102         (read_array_type, read_common_block, read_module_type)
6103         (read_tag_pointer_type, read_typedef, read_base_type)
6104         (read_subrange_type, load_partial_dies, partial_die_info::read)
6105         (partial_die_info::read, partial_die_info::read)
6106         (partial_die_info::read, read_checked_initial_length_and_offset)
6107         (dwarf2_string_attr, read_formatted_entries)
6108         (dwarf_decode_line_header)
6109         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
6110         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
6111         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
6112         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6113         (get_signatured_type, get_DW_AT_signature_type)
6114         (decode_locdesc, file_file_name, consume_improper_spaces)
6115         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
6116         (dwarf_decode_macro_bytes, dwarf_decode_macros)
6117         (dwarf2_symbol_mark_computed, set_die_type)
6118         (read_attribute_value): Update.
6119         * stap-probe.c (handle_stap_probe, get_stap_base_address):
6120         Update.
6121         * dbxread.c (unknown_symtype_complaint)
6122         (lbrac_mismatch_complaint, repeated_header_complaint)
6123         (set_namestring, function_outside_compilation_unit_complaint)
6124         (read_dbx_symtab, process_one_symbol): Update.
6125         * gdbtypes.c (stub_noname_complaint): Update.
6126         * windows-nat.c (handle_unload_dll): Update.
6127         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
6128         (decode_base_type): Update.
6129         * xcoffread.c (bf_notfound_complaint, ef_complaint)
6130         (eb_complaint, record_include_begin, record_include_end)
6131         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
6132         (process_xcoff_symbol, read_symbol)
6133         (function_outside_compilation_unit_complaint)
6134         (scan_xcoff_symtab): Update.
6135         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
6136         * buildsym.c (finish_block_internal, make_blockvector)
6137         (end_symtab_get_static_block, augment_type_symtab): Update.
6138         * dtrace-probe.c (dtrace_process_dof)
6139         (dtrace_static_probe_ops::get_probes): Update.
6140         * complaints.h (struct complaint): Don't declare.
6141         (symfile_complaints): Remove.
6142         (complaint_internal): Remove "complaints" parameter.
6143         (complaint): Likewise.
6144         (clear_complaints): Likewise.
6145         * symfile.c (syms_from_objfile_1, finish_new_objfile)
6146         (reread_symbols): Update.
6147         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
6148         (dwarf2_frame_cache, decode_frame_entry): Update.
6149         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
6150         * objc-lang.c (lookup_objc_class, lookup_child_selector)
6151         (info_selectors_command): Update.
6152         * macrotab.c (macro_include, check_for_redefinition)
6153         (macro_undef): Update.
6154         * objfiles.c (filter_overlapping_sections): Update.
6155         * stabsread.c (invalid_cpp_abbrev_complaint)
6156         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
6157         (define_symbol, error_type, read_type, rs6000_builtin_type)
6158         (stabs_method_name_from_physname, read_member_functions)
6159         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
6160         (attach_fields_to_type, complain_about_struct_wipeout)
6161         (read_range_type, read_args, common_block_start)
6162         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
6163         Update.
6164         * mdebugread.c (index_complaint, unknown_ext_complaint)
6165         (basic_type_complaint, bad_tag_guess_complaint)
6166         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
6167         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
6168         (parse_procedure, parse_lines)
6169         (function_outside_compilation_unit_complaint)
6170         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
6171         (bad_tag_guess_complaint, reg_value_complaint): Update.
6172         * cp-support.c (demangled_name_complaint): Update.
6173         * macroscope.c (sal_macro_scope): Update.
6174         * dwarf-index-write.c (class debug_names): Update.
6175
6176 2018-05-23  Tom Tromey  <tom@tromey.com>
6177
6178         * complaints.c (clear_complaints): Remove "noisy" parameter.
6179         * complaints.h (clear_complaints): Update.
6180         * symfile.c (syms_from_objfile_1, finish_new_objfile)
6181         (reread_symbols): Update.
6182
6183 2018-05-23  Tom Tromey  <tom@tromey.com>
6184
6185         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
6186         SUBSEQUENT_MESSAGE.
6187         (vcomplaint, clear_complaints): Update.
6188         (symfile_explanations): Remove some messages.
6189
6190 2018-05-23  Tom Tromey  <tom@tromey.com>
6191
6192         * complaints.c (internal_complaint): Remove.
6193         * complaints.h (internal_complaint): Remove.
6194
6195 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
6196
6197         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
6198
6199 2018-05-22  Pedro Alves  <palves@redhat.com>
6200
6201         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
6202         (remote_fileio_badfd, remote_fileio_return_errno)
6203         (remote_fileio_return_success, remote_fileio_func_open)
6204         (remote_fileio_func_open, remote_fileio_func_close)
6205         (remote_fileio_func_read, remote_fileio_func_write)
6206         (remote_fileio_func_lseek, remote_fileio_func_rename)
6207         (remote_fileio_func_unlink, remote_fileio_func_stat)
6208         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
6209         (remote_fileio_func_isatty, remote_fileio_func_system): Add
6210         remote_target parameter.
6211         (remote_fio_func_map) <func>: Add remote_target parameter.
6212         (do_remote_fileio_request, remote_fileio_request):
6213         * remote-fileio.h (remote_fileio_request):
6214         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
6215         remote_target parameter.
6216         (remote_notif_process, handle_notification): Adjust to pass down
6217         the remote.
6218         (remote_notif_state_allocate): Add remote_target parameter.  Save
6219         it.
6220         * remote-notif.h (struct remote_target): Forward declare.
6221         (struct notif_client) <parse, ack, can_get_pending_events>: Add
6222         remote_target parameter.
6223         (struct remote_notif_state) <remote>: New field.
6224         (remote_notif_ack, remote_notif_parse): Add remote_target
6225         parameter.
6226         (remote_notif_state_allocate, remote_notif_state_allocate): Add
6227         remote_target parameter.
6228         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
6229         (threads_listing_context, rmt_thread_action, protocol_feature)
6230         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
6231         (packet_result, struct threads_listing_context, remote_state):
6232         Move definitions and declarations higher up.
6233         (remote_target) <~remote_target>: Declare.
6234         (remote_download_command_source, remote_file_put, remote_file_get)
6235         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
6236         (remote_hostio_pread_vFile, remote_hostio_send_command)
6237         (remote_hostio_set_filesystem, remote_hostio_open)
6238         (remote_hostio_close, remote_hostio_unlink, remote_state)
6239         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
6240         (get_memory_write_packet_size, get_memory_read_packet_size)
6241         (append_pending_thread_resumptions, remote_detach_1)
6242         (append_resumption, remote_resume_with_vcont)
6243         (add_current_inferior_and_thread, wait_ns, wait_as)
6244         (process_stop_reply, remote_notice_new_inferior)
6245         (process_initial_stop_replies, remote_add_thread)
6246         (btrace_sync_conf, remote_btrace_maybe_reopen)
6247         (remove_new_fork_children, kill_new_fork_children)
6248         (discard_pending_stop_replies, stop_reply_queue_length)
6249         (check_pending_events_prevent_wildcard_vcont)
6250         (discard_pending_stop_replies_in_queue, stop_reply)
6251         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
6252         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
6253         (remote_interrupt_as, remote_interrupt_ns)
6254         (remote_get_noisy_reply, remote_query_attached)
6255         (remote_add_inferior, remote_current_thread, get_current_thread)
6256         (set_thread, set_general_thread, set_continue_thread)
6257         (set_general_process, write_ptid)
6258         (remote_unpack_thread_info_response, remote_get_threadinfo)
6259         (parse_threadlist_response, remote_get_threadlist)
6260         (remote_threadlist_iterator, remote_get_threads_with_ql)
6261         (remote_get_threads_with_qxfer)
6262         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
6263         (get_offsets, remote_check_symbols, remote_supported_packet)
6264         (remote_query_supported, remote_packet_size)
6265         (remote_serial_quit_handler, remote_detach_pid)
6266         (remote_vcont_probe, remote_resume_with_hc)
6267         (send_interrupt_sequence, interrupt_query)
6268         (remote_notif_get_pending_events, fetch_register_using_p)
6269         (send_g_packet, process_g_packet, fetch_registers_using_g)
6270         (store_register_using_P, store_registers_using_G)
6271         (set_remote_traceframe, check_binary_download)
6272         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
6273         (remote_xfer_live_readonly_partial, remote_read_bytes)
6274         (remote_send_printf, remote_flash_write, readchar)
6275         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
6276         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
6277         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
6278         (extended_remote_disable_randomization, extended_remote_run)
6279         (send_environment_packet, extended_remote_environment_support)
6280         (extended_remote_set_inferior_cwd, remote_write_qxfer)
6281         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
6282         (packet_command): Now methods of ...
6283         (remote_target): ... this class.
6284         (m_remote_state) <remote_target>: New field.
6285         (struct remote_state) <stop_reply_queue,
6286         remote_async_inferior_event_token, wait_forever_enabled_p>: New
6287         fields.
6288         (remote_state::remote_state): Allocate stop_reply_queue.
6289         (remote_state): Delete global.
6290         (get_remote_state_raw): Delete.
6291         (remote_target::get_remote_state): Allocate m_remote_state on
6292         demand.
6293         (get_current_remote_target): New.
6294         (remote_ops, extended_remote_ops): Delete.
6295         (wait_forever_enabled_p, remote_async_inferior_event_token):
6296         Delete, moved to struct remote_state.
6297         (remote_target::close): Delete self.  Destruction bits split to
6298         ...
6299         (remote_target::~remote_target): ... this.
6300         (show_memory_packet_size): Adjust to use
6301         get_current_remote_target.
6302         (struct protocol_feature) <func>: Add remote_target parameter.
6303         All callers adjusted.
6304         (curr_quit_handler_target): New.
6305         (remote_serial_quit_handler): Reimplement.
6306         (remote_target::open_1): Adjust to use get_current_remote_target.
6307         Heap-allocate remote_target/extended_remote_target instances.
6308         (vcont_builder::vcont_builder): Add remote_target parameter, and
6309         save it in m_remote.  All callers adjusted.
6310         (vcont_builder::m_remote): New field.
6311         (vcont_builder::restart, vcont_builder::flush)
6312         (vcont_builder::push_action): Use it.
6313         (remote_target::commit_resume): Use it.
6314         (struct queue_iter_param) <remote>: New field.
6315         (remote_target::remove_new_fork_children): Fill in 'remote' field.
6316         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
6317         (check_pending_event_prevents_wildcard_vcont_callback)
6318         (remote_target::check_pending_events_prevent_wildcard_vcont)
6319         (remote_target::discard_pending_stop_replies)
6320         (remote_target::discard_pending_stop_replies_in_queue)
6321         (remote_target::remote_notif_remove_queued_reply): Fill in
6322         'remote' field.
6323         (remote_notif_get_pending_events): New.
6324         (remote_target::readchar, remote_target::remote_serial_write):
6325         Save/restore curr_quit_handler_target.
6326         (putpkt): New.
6327         (kill_new_fork_children): Fill in 'remote' field.
6328         (packet_command): Use get_current_remote_target, defer to
6329         remote_target method of same name.
6330         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
6331         parameter, and save it in m_remote.  All callers adjusted.
6332         (scoped_remote_fd::release): Use m_remote.
6333         (scoped_remote_fd::m_remote): New field.
6334         (remote_file_put, remote_file_get, remote_file_delete): Use
6335         get_current_remote_target, defer to remote_target method of same
6336         name.
6337         (remote_btrace_reset): Add remote_state paremeter.  Update all
6338         callers.
6339         (remote_async_inferior_event_handler). Pass down 'data'.
6340         (remote_new_objfile): Use get_current_remote_target.
6341         (remote_target::vcont_r_supported): New.
6342         (set_range_stepping): Use get_current_remote_target and
6343         remote_target::vcont_r_supported.
6344         (_initialize_remote): Don't allocate 'remote_state' and
6345         'stop_reply_queue' globals.
6346         * remote.h (struct remote_target): Forward declare.
6347         (getpkt, putpkt, remote_notif_get_pending_events): Add
6348         'remote_target' parameter.
6349
6350 2018-05-22  Pedro Alves  <palves@redhat.com>
6351
6352         * remote.c (vcont_builder): Now a class.  Make all data members
6353         private.
6354         (vcont_builder) <vcont_builder, restart, flush, push_action>:
6355         Declare methods.
6356         (vcont_builder_restart): Rename to ...
6357         (vcont_builder::restart): ... this.
6358         (vcont_builder_flush): Rename to ...
6359         (vcont_builder::flush): ... this.
6360         (vcont_builder_push_action): Rename to ...
6361         (vcont_builder::push_action): ... this.
6362         (remote_target::commit_resume): Adjust.
6363
6364 2018-05-22  Pedro Alves  <palves@redhat.com>
6365
6366         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
6367         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
6368         (get_fixed_memory_packet_size): New.
6369         (get_memory_packet_size): Use it.
6370         (set_memory_packet_size): Don't override the config size with
6371         DEFAULT_MAX_MEMORY_PACKET_SIZE.
6372         (show_memory_packet_size): Use get_fixed_memory_packet_size.
6373         Don't refer to get_memory_packet_size if not connected to a remote
6374         target.  Show "(default)" if configured size is 0.
6375
6376 2018-05-22  Pedro Alves  <palves@redhat.com>
6377
6378         * remote.c (remote_target::mourn_inferior): Move
6379         discard_pending_stop_replies call here from ...
6380         (_initialize_remote): ... here.
6381
6382 2018-05-22  Pedro Alves  <palves@redhat.com>
6383
6384         * remote.c (compare_section_command): Remove set_general_process
6385         call.
6386
6387 2018-05-22  Pedro Alves  <palves@redhat.com>
6388
6389         * remote.c (struct packet_reg, struct remote_arch_state):
6390         Move higher up in the file.
6391         (remote_state) <m_arch_states>: Store remote_arch_state values
6392         instead of remote_arch_state pointers.
6393         (remote_state::get_remote_arch_state): Adjust.
6394
6395 2018-05-22  Pedro Alves  <palves@redhat.com>
6396
6397         * remote.c: Include <unordered_map>.
6398         (remote_state): Now a class.
6399         (remote_state) <get_remote_arch_state>: Declare method.
6400         <get_remote_arch_state>: New field.
6401         (remote_arch_state) <remote_arch_state>: Declare ctor.
6402         <regs>: Now a unique_ptr.
6403         (remote_gdbarch_data_handle): Delete.
6404         (get_remote_arch_state): Delete.
6405         (remote_state::get_remote_arch_state): New.
6406         (get_remote_state): Adjust to call remote_state's
6407         get_remote_arch_state method.
6408         (init_remote_state): Delete, bits factored out to ...
6409         (remote_arch_state::remote_arch_state): ... this new method.
6410         (get_remote_packet_size, get_memory_packet_size)
6411         (process_g_packet, remote_target::fetch_registers)
6412         (remote_target::prepare_to_store, store_registers_using_G)
6413         (remote_target::store_registers, remote_target::get_trace_status):
6414         Adjust to call remote_state's method.
6415         (_initialize_remote): Remove reference to
6416         remote_gdbarch_data_handle.
6417
6418 2018-05-22  Pedro Alves  <palves@redhat.com>
6419
6420         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
6421         pread>: New method declarations.
6422         (remote_target::open_1): Adjust.
6423         (readahead_cache_invalidate): Rename to ...
6424         (readahead_cache::invalidate): ... this, and adjust to be a class
6425         method.
6426         (readahead_cache_invalidate_fd): Rename to ...
6427         (readahead_cache::invalidate_fd): ... this, and adjust to be a
6428         class method.
6429         (remote_hostio_pwrite): Adjust.
6430         (remote_hostio_pread_from_cache): Rename to ...
6431         (readahead_cache::pread): ... this, and adjust to be a class
6432         method.
6433         (remote_hostio_close): Adjust.
6434
6435 2018-05-22  Pedro Alves  <palves@redhat.com>
6436
6437         * remote.c (remote_hostio_close_cleanup): Delete.
6438         (class scoped_remote_fd): New.
6439         (remote_file_put, remote_file_get): Use it.
6440
6441 2018-05-22  Pedro Alves  <palves@redhat.com>
6442
6443         (struct vCont_action_support): Use bool and initialize all fields.
6444         (struct readahead_cache): Initialize all fields.
6445         (remote_state): Use bool and initialize all fields.
6446         (remote_state::remote_state, remote_state::~remote_state): New.
6447         (new_remote_state): Delete.
6448         (_initialize_remote): Use new to allocate remote_state.
6449
6450 2018-05-22  Pedro Alves  <palves@redhat.com>
6451             張俊芝  <zjz@zjz.name>
6452
6453         PR gdb/22973
6454         * c-exp.y: Include "c-support.h".
6455         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
6456         of tolower.  Use c_ident_is_alpha to scan names.
6457         * c-lang.c: Include "c-support.h".
6458         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
6459         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
6460         * c-support.h: New file, with bits factored out from ...
6461         * cp-name-parser.y: ... this file.
6462         Include "c-support.h".
6463         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
6464         c-support.h and renamed.
6465         (symbol_end, yylex): Adjust.
6466
6467 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6468
6469         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
6470         parameter type to CORE_ADDR.
6471         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
6472         parameter type in declaration to CORE_ADDR.
6473         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
6474         target_auxv_search to get AT_HWCAP and use the result to get the
6475         target description.
6476         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
6477         to CORE_ADDR. Remove the cast of the return value to unsigned
6478         long. Fix error predicate of target_auxv_search.
6479         (ppc_linux_nat_target::read_description): Change the type of the
6480         hwcap variable to CORE_ADDR.
6481
6482 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6483
6484         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
6485         if the size of fpscr is larger than 32 bits.
6486
6487 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6488
6489         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
6490         (ppc32_linux_vsxregmap): New global.
6491         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
6492         regcache_supply_regset, and regcache_collect_regset.
6493         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
6494         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
6495         (fetch_vsx_register, store_vsx_register): Remove.
6496         (fetch_vsx_registers): Add regno parameter. Get regset using
6497         ppc_linux_vsxregset. Use regset to supply registers.
6498         (store_vsx_registers): Add regno parameter. Get regset using
6499         ppc_linux_vsxregset. Use regset to collect registers.
6500         (fetch_register): Call fetch_vsx_registers instead of
6501         fetch_vsx_register.
6502         (store_register): Call store_vsx_registers instead of
6503         store_vsx_register.
6504         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
6505         new regno parameter.
6506         (store_ppc_registers): Call store_vsx_registers with -1 for the
6507         new regno parameter.
6508         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
6509         (ppc_collect_vsxregset): Remove.
6510
6511 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6512
6513         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
6514         offset fields.
6515         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
6516         for vector register offset fields.
6517         (ppc64_fbsd_reg_offsets): Likewise.
6518         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
6519         to vector register offset fields.
6520         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
6521         to vector register offset fields.
6522         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
6523         vector register offset fields.
6524         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
6525         initializers for vector register offset fields.
6526         (rs6000_aix64_reg_offsets): Likewise.
6527         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
6528         (ppc_supply_vrregset): Remove.
6529         (ppc_collect_vrregset): Remove.
6530         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
6531         (ppc_linux_vrregset) : New function.
6532         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
6533         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
6534         (ppc32_linux_vrregset): Remove.
6535         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
6536         and use result instead of ppc32_linux_vrregset.
6537         (ppc32_linux_reg_offsets): Remove initializers for vector register
6538         offset fields.
6539         (ppc64_linux_reg_offsets): Likewise.
6540         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
6541         * ppc-linux-nat.c: Include regset.h.
6542         (gdb_vrregset_t): Adjust comment to account for little-endian
6543         mode.
6544         (supply_vrregset, fill_vrregset): Remove.
6545         (fetch_altivec_register, store_altivec_register): Remove.
6546         (fetch_altivec_registers): Add regno parameter. Get regset using
6547         ppc_linux_vrregset. Use regset to supply registers.
6548         (store_altivec_registers): Add regno parameter. Get regset using
6549         ppc_linux_vrregset. Use regset to collect registers.
6550         (fetch_register): Call fetch_altivec_registers instead of
6551         fetch_altivec_register.
6552         (store_register): Call store_altivec_registers instead of
6553         store_altivec_register.
6554         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
6555         the new regno parameter.
6556         (store_ppc_registers): Call store_altivec_registers with -1 for
6557         the new regno parameter.
6558
6559 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6560
6561         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
6562         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
6563         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
6564         (gdb_vrregset_t): Change array type size to
6565         PPC_LINUX_SIZEOF_VRREGSET.
6566         (gdb_vsxregset_t): Change array type size to
6567         PPC_LINUX_SIZEOF_VSXREGSET.
6568         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
6569         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
6570         PPC_LINUX_SIZEOF_VSXREGSET.
6571
6572 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6573
6574         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
6575         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
6576         nat/ppc-linux.c.
6577         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
6578         ppc_linux_target_wordsize with tid.
6579         (ppc_linux_nat_target::read_description): Call ppc_linux_target
6580         wordsize with tid.
6581         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
6582         (ppc64_64bit_inferior_p): Add static and inline specifiers.
6583         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
6584         tid parameter. Remove static specifier.
6585         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
6586         (ppc_linux_target_wordsize): New declaration.
6587
6588 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6589
6590         * arch/ppc-linux-common.c: New file.
6591         * arch/ppc-linux-common.h: New file.
6592         * arch/ppc-linux-tdesc.h: New file.
6593         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
6594         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
6595         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
6596         arch/ppc-linux-tdesc.h.
6597         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
6598         arch/ppc-linux-tdesc.h.
6599         (ppc_linux_nat_target::read_description): Remove target
6600         description matching code. Fill a ppc_linux_features struct and
6601         call ppc_linux_match_description with it. Move comment about ISA
6602         2.05 to ppc-linux-common.c.
6603         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
6604         arch/ppc-linux-tdesc.h.
6605         (ppc_linux_core_read_description): Remove target description
6606         matching code. Fill a ppc_linux_features struct and call
6607         ppc_linux_match_description with it.
6608         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
6609         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
6610         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
6611         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
6612         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
6613         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
6614         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
6615         (tdesc_powerpc_e500l): Remove.
6616
6617 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
6618
6619         * ada-lang.c (catch_assert_command): Pass empty string instead
6620         of NULL for excep_string argument.
6621
6622 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
6623
6624         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
6625         the width of the requested register exceeds the width of the
6626         `ptrace' data type.
6627
6628 2018-05-21  Tom Tromey  <tom@tromey.com>
6629
6630         * printcmd.c (output_command): Remove.
6631         (output_command_const): Rename to output_command.
6632         * valprint.h (output_command): Rename from output_command_const.
6633         * tracepoint.c (trace_dump_actions): Call output_command.
6634
6635 2018-05-21  Tom Tromey  <tom@tromey.com>
6636
6637         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
6638         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
6639         * ada-lang.h (create_ada_exception_catchpoint): Update.
6640         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
6641         std::string.
6642         (create_excep_cond_exprs, ~ada_catchpoint)
6643         (should_stop_exception, print_one_exception)
6644         (print_mention_exception, print_recreate_exception): Update.
6645         (ada_get_next_arg): Remove.
6646         (catch_ada_exception_command_split): Use std::string.  Change type
6647         of "excep_string", "cond_string".
6648         (catch_ada_exception_command): Update.
6649         (create_ada_exception_catchpoint): Change type of excep_string.
6650         (ada_exception_sal): Remove excep_string parameter.
6651         (~ada_catchpoint): Remove.
6652
6653 2018-05-21  Tom Tromey  <tom@tromey.com>
6654
6655         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
6656         cleanup.
6657
6658 2018-05-21  Tom Tromey  <tom@tromey.com>
6659
6660         * ada-lang.c (ada_exception_message_1, ada_exception_message):
6661         Return unique_xmalloc_ptr.
6662         (print_it_exception): Update.
6663
6664 2018-05-21  Tom Tromey  <tom@tromey.com>
6665
6666         * tracepoint.c (trace_dump_actions): Use std::string.
6667
6668 2018-05-21  Tom Tromey  <tom@tromey.com>
6669
6670         * symfile.c (reread_symbols): Use std::string for original_name.
6671
6672 2018-05-21  Tom Tromey  <tom@tromey.com>
6673
6674         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
6675         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
6676         constructor.
6677
6678 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
6679
6680         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
6681         instance to...
6682         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
6683         * objfiles.c (get_objfile_bfd_data): Allocate
6684         objfile_per_bfd_storage with obstack_new when allocating on
6685         obstack.
6686
6687 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
6688
6689         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
6690         OBSTACK_ZALLOC.
6691         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
6692         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
6693         * mdebugread.c (mdebug_build_psymtabs): Likewise.
6694         (add_pending): Likewise.
6695         (parse_symbol): Likewise.
6696         (parse_partial_symbols): Likewise.
6697         (psymtab_to_symtab_1): Likewise.
6698         (new_psymtab): Likewise.
6699         (elfmdebug_build_psymtabs): Likewise.
6700         * minsyms.c (terminate_minimal_symbol_table): Likewise.
6701         * objfiles.c (get_objfile_bfd_data): Likewise.
6702         (objfile_register_static_link): Likewise.
6703         * psymtab.c (allocate_psymtab): Likewise.
6704         * stabsread.c (read_member_functions): Likewise.
6705         * xcoffread.c (xcoff_end_psymtab): Likewise.
6706
6707 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
6708
6709         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
6710         compiler supports std::is_trivially_constructible.
6711         * common/poison.h: Include obstack.h.
6712         (IsMallocable): Define to is_trivially_constructible if the
6713         compiler supports it, define to true_type otherwise.
6714         (xobnew): New.
6715         (XOBNEW): Redefine.
6716         (xobnewvec): New.
6717         (XOBNEWVEC): Redefine.
6718         * gdb_obstack.h (obstack_zalloc): New.
6719         (OBSTACK_ZALLOC): Redefine.
6720         (obstack_calloc): New.
6721         (OBSTACK_CALLOC): Redefine.
6722         (obstack_new): New.
6723         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
6724         (gdbarch_obstack): New declaration in gdbarch.h, definition in
6725         gdbarch.c.
6726         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
6727         obstack_calloc/obstack_zalloc.
6728         (gdbarch_obstack_zalloc): Remove.
6729         * target-descriptions.c (tdesc_data_init): Use obstack_new.
6730
6731 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6732
6733         * stack.c (backtrace_command_1): Remove useless variable int i.
6734
6735 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6736
6737         * stack.c (print_frame_info): Fix comment.
6738
6739 2018-05-18  Tom Tromey  <tom@tromey.com>
6740
6741         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
6742         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
6743         (~dwarf2_per_objfile): Update
6744         (dwarf2_get_dwz_file): Use new.
6745         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
6746         unique_ptr.
6747
6748 2018-05-18  Tom Tromey  <tom@tromey.com>
6749
6750         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
6751         unique_ptr.
6752         * dwarf2read.c (struct dwp_file): Add constructor and
6753         initializers.
6754         (open_and_init_dwp_file): Return a unique_ptr.
6755         (dwarf2_per_objfile, create_dwp_hash_table)
6756         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
6757         (lookup_dwo_unit_in_dwp): Update.
6758         (open_and_init_dwp_file, get_dwp_file): Update.
6759
6760 2018-05-18  Tom Tromey  <tom@tromey.com>
6761
6762         * dwarf2read.c (dwarf2_per_objfile): Update.
6763         (struct mapped_index): Add initializers.
6764         (dwarf2_read_index): Use new.
6765         (dw2_symtab_iter_init): Update.
6766         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
6767         unique_ptr.
6768
6769 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
6770
6771         * dwarf2read.c (mapped_index) <total_size>: Remove.
6772
6773 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
6774
6775         * unittests/format_pieces-selftests.c (test_format_specifier):
6776         Add ARI comments.
6777
6778 2018-05-18  Tom Tromey  <tom@tromey.com>
6779
6780         * c-typeprint.c (maybe_print_hole): New function.
6781         (c_print_type_struct_field_offset): Update.
6782         (c_type_print_base_struct_union): Call maybe_print_hole.
6783
6784 2018-05-17  Keith Seitz  <keiths@redhat.com>
6785
6786         * breakpoint.c (build_bpstat_chain): New function, moved from
6787         bpstat_stop_status.
6788         (bpstat_stop_status): Add optional parameter, `stop_chain'.
6789         If no stop chain is passed, call build_bpstat_chain to build it.
6790         * breakpoint.h (build_bpstat_chain): Declare.
6791         (bpstat_stop_status): Move documentation here from breakpoint.c.
6792         * infrun.c (handle_signal_stop): Before eliding inlined frames,
6793         build the stop chain and pass it to skip_inline_frames.
6794         Pass this stop chain to bpstat_stop_status.
6795         * inline-frame.c: Include breakpoint.h.
6796         (stopped_by_user_bp_inline_frame): New function.
6797         (skip_inline_frames): Add parameter `stop_chain'.
6798         Move documention to inline-frame.h.
6799         If non-NULL, use stopped_by_user_bp_inline_frame to determine
6800         whether the frame should be elided.
6801         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
6802         Add moved documentation and update for new parameter.
6803
6804 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
6805
6806         PR cli/14975
6807         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6808         unittests/format_pieces-selftests.c.
6809         * common/format.h (format_piece) <operator==>: New.
6810         (format_pieces) <operator[]>: Remove.
6811         * common/format.c (format_pieces::format_pieces): Handle \e.
6812         * unittests/format_pieces-selftests.c: New.
6813
6814 2018-05-17  Tom Tromey  <tom@tromey.com>
6815
6816         PR symtab/23010:
6817         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
6818         (dw2_instantiate_symtab): Add skip_partial parameter.
6819         (dw2_find_last_source_symtab, dw2_map_expand_apply)
6820         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
6821         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
6822         (dw2_expand_symtabs_matching_one)
6823         (dw2_find_pc_sect_compunit_symtab)
6824         (dw2_debug_names_lookup_symbol)
6825         (dw2_debug_names_expand_symtabs_for_function): Update.
6826         (init_cutu_and_read_dies): Add skip_partial parameter.
6827         (process_psymtab_comp_unit, build_type_psymtabs_1)
6828         (process_skeletonless_type_unit, load_partial_comp_unit)
6829         (psymtab_to_symtab_1): Update.
6830         (load_full_comp_unit): Add skip_partial parameter.
6831         (process_imported_unit_die, dwarf2_read_addr_index)
6832         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
6833         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
6834         (read_signatured_type): Update.
6835
6836 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
6837
6838         * value.c (release_value): Remove unused variable.
6839         (record_latest_value): Likewise.
6840         (access_value_history): Likewise.
6841         (preserve_values): Likewise.
6842
6843 2018-05-17  Tom Tromey  <tom@tromey.com>
6844
6845         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
6846         Initialize.
6847
6848 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
6849
6850         PR gdb/22286
6851         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
6852         Also handle registers whose width is not a multiple of
6853         PTRACE_TYPE_RET.
6854         (linux_nat_trad_target::store_register): Likewise.
6855
6856 2018-05-16  Tom Tromey  <tom@tromey.com>
6857
6858         * gdbcore.h (core_bfd): Redefine.
6859         * corelow.c (core_target::close): Update.
6860         (core_target_open): Update.
6861         * progspace.h (struct program_space) <cbfd>: Now a
6862         gdb_bfd_ref_ptr.
6863
6864 2018-05-16  Tom Tromey  <tom@tromey.com>
6865
6866         PR cli/19551:
6867         * symfile-add-flags.h (enum symfile_add_flags)
6868         <SYMFILE_NOT_FILENAME>: New constant.
6869         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
6870         objfile name from BFD.
6871         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
6872         * minidebug.c (find_separate_debug_file_in_section): Put
6873         ".gnu_debugdata" into BFD's file name.
6874
6875 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
6876
6877         * regcache.c (regcache_read_ftype, regcache_write_ftype):
6878         Remove.
6879
6880 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
6881
6882         PR binutils/21446
6883         * aarch64-tdep.c (aarch64_analyze_prologue,
6884         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
6885         Indicate not interested in errors.
6886
6887 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
6888
6889         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
6890         Supply the MIPS_ZERO_REGNUM register.
6891
6892 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
6893
6894         * mips-tdep.c (mask_address_var): Make variable static.
6895
6896 2018-05-14  Tom Tromey  <tom@tromey.com>
6897
6898         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
6899
6900 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
6901
6902         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
6903         FXSAVE_ADDR for the mxcsr register.
6904
6905 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
6906
6907         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
6908
6909 2018-05-11  Pedro Alves  <palves@redhat.com>
6910
6911         * corelow.c (core_target) <core_target>: No longer inline.
6912         Initialize m_core_gdbarch, m_core_vec and build the section table
6913         here.
6914         <~core_target>: New.
6915         <core_gdbarch, get_core_register_section>: New methods.
6916         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
6917         factored out from ...
6918         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
6919         (core_ops): Delete.
6920         (sniff_core_bfd): Add gdbarch parameter.
6921         (core_close): Delete, merged into ...
6922         (core_target::close): ... here.  Delete self.
6923         (core_close_cleanup): Delete.
6924         (core_target_open): Allocate a core_target on the heap.  Use a
6925         unique_ptr instead of a cleanup.  Bits moved into the core_target
6926         ctor.  Adjust to use core_target methods instead of globals.
6927         (get_core_register_section): Rename to ...
6928         (core_target::get_core_register_section): ... this and adjust.
6929         (struct get_core_registers_cb_data): New.
6930         (get_core_registers_cb): Use it.  Use bool.
6931         (core_target::fetch_registers, core_target::files_info)
6932         (core_target::xfer_partial, core_target::read_description)
6933         (core_target::pid_to, core_target::thread_name): Adjust to
6934         reference class fields instead of globals.
6935         * target.h (struct target_ops_deleter, target_ops_up): New.
6936
6937 2018-05-11  Pedro Alves  <palves@redhat.com>
6938
6939         * corefile.c (core_file_command): Move to corelow.c.
6940         * corelow.c (the_core_target): Delete.
6941         (core_file_command): Moved from corefile.c.  Check exec_bfd
6942         instead of the_core_target.  Use target_detach instead of calling
6943         into the_core_target directly.
6944         (maybe_say_no_core_file_now): New.
6945         (core_target::detach): Use it.
6946         (_initialize_corelow): Remove references to the_core_target.
6947         * gdbcore.h (the_core_target): Delete.
6948
6949 2018-05-11  Tom Tromey  <tromey@redhat.com>
6950             Pedro Alves  <palves@redhat.com>
6951
6952         * corefile.c (core_bfd): Remove.
6953         * gdbcore.h (core_bfd): Now a macro.
6954         * progspace.h (struct program_space) <cbfd>: New field.
6955
6956 2018-05-11  Tom Tromey  <tom@tromey.com>
6957
6958         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
6959         gdb::def_vector.
6960
6961 2018-05-10  Tom Tromey  <tom@tromey.com>
6962
6963         * configure: Rebuild.
6964         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
6965
6966 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
6967
6968         PR server/23158:
6969         * regformats/regdat.sh: Adjust script, following the addition
6970         of the new expedite_regs parameter to init_target_desc.
6971
6972 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
6973     
6974         PR gdb/23127
6975         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
6976         set_gdbarch_significant_addr_bit.
6977         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
6978         set_gdbarch_significant_addr_bit.
6979         * utils.c (address_significant): Update to sign extend addr.
6980
6981 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
6982
6983         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
6984         (xtensa_linux_init_abi): Limit tdep->num_regs by
6985         tdep->num_nopriv_regs.
6986         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
6987         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
6988         not initialized.
6989
6990 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
6991
6992         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
6993
6994 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
6995
6996         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
6997         (I387_MXCSR_INIT_VAL): New constant.
6998         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
6999         buffer if it was supplied by the inferior.
7000         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
7001         (i387_xsave_get_clear_bv): New function.
7002         (i387_supply_xsave): Only read x87 control registers from the
7003         xsave buffer if the feature is enabled, and the state will have
7004         been written, otherwise, provide a suitable default.
7005         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
7006         including x87 control registers.  Update control registers if they
7007         have changed from the default value, and mark features as enabled
7008         as required.
7009         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
7010
7011 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
7012
7013         * spu-tdep.c (info_spu_event_command): Fix output formatting.
7014
7015 2018-05-07  Tom Tromey  <tom@tromey.com>
7016
7017         * configure: Rebuild.
7018         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
7019
7020 2018-05-07  Tom Tromey  <tom@tromey.com>
7021
7022         PR tdep/20362:
7023         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
7024         bit.  Use correct value for VDIV.
7025
7026 2018-05-04  Tom Tromey  <tom@tromey.com>
7027
7028         * configure: Rebuild.
7029         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
7030
7031 2018-05-04  Tom Tromey  <tom@tromey.com>
7032
7033         * linux-record.c (record_linux_system_call) <case
7034         RECORD_SYS_RECVFROM>: Add "break".
7035
7036 2018-05-04  Tom Tromey  <tom@tromey.com>
7037
7038         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
7039         Add missing "break".
7040         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
7041         Add missing "break".
7042
7043 2018-05-04  Tom Tromey  <tom@tromey.com>
7044
7045         * rs6000-tdep.c (ppc_process_record_op4)
7046         (ppc_process_record_op63): Add fall-through comment.
7047
7048 2018-05-04  Tom Tromey  <tom@tromey.com>
7049
7050         * i386-tdep.c (i386_process_record): Add fall-through comment.
7051
7052 2018-05-04  Tom Tromey  <tom@tromey.com>
7053
7054         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
7055         comment.
7056
7057 2018-05-04  Tom Tromey  <tom@tromey.com>
7058
7059         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
7060         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
7061         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
7062         comment.
7063         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
7064         comment.
7065         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
7066         comment.
7067
7068 2018-05-04  Tom Tromey  <tom@tromey.com>
7069
7070         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
7071
7072 2018-05-04  Tom Tromey  <tom@tromey.com>
7073
7074         * s390-tdep.c (s390_process_record): Fix fall-through comments.
7075         * xcoffread.c (scan_xcoff_symtab): Move comment later.
7076         * symfile.c (section_is_mapped): Fix fall-through comment.
7077         * stabsread.c (define_symbol, read_member_functions): Fix
7078         fall-through comment.
7079         * s390-linux-tdep.c (s390_process_record): Fix fall-through
7080         comment.
7081         * remote.c (remote_wait_as): Fix fall-through comment.
7082         * p-exp.y (yylex): Fix fall-through comment.
7083         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
7084         comment.
7085         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
7086         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
7087         * jv-exp.y (yylex): Fix fall-through comment.
7088         * go-exp.y (lex_one_token): Fix fall-through comment.
7089         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
7090         fall-through comment.
7091         * f-exp.y (yylex): Fix fall-through comment.
7092         * dwarf2read.c (process_die): Fix fall-through comments.
7093         * dbxread.c (process_one_symbol): Fix fall-through comment.
7094         * d-exp.y (lex_one_token): Fix fall-through comment.
7095         * cp-name-parser.y (yylex): Fix fall-through comment.
7096         * coffread.c (coff_symtab_read): Fix fall-through comment.
7097         * c-exp.y (lex_one_token): Fix fall-through comment.
7098         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
7099         comment.
7100         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
7101         comment.
7102
7103 2018-05-04  Tom Tromey  <tom@tromey.com>
7104
7105         PR python/22730:
7106         * NEWS: Mention gdb.execute change.
7107         * gdbcmd.h (execute_control_command): Don't declare.
7108         * python/python.c (execute_gdb_command): Use read_command_lines_1,
7109         execute_control_commands, execute_control_commands_to_string.
7110         * cli/cli-script.h (execute_control_commands)
7111         (execute_control_commands_to_string): Declare.
7112         (execute_control_command): Add from_tty parameter.
7113         * cli/cli-script.c (execute_control_commands)
7114         (execute_control_commands_to_string): New functions.
7115         (execute_user_command): Use execute_control_commands.
7116         (execute_control_command_1): Add "from_tty" parameter.  Update.
7117         (execute_control_command): Likewise.
7118
7119 2018-05-04  Tom Tromey  <tom@tromey.com>
7120
7121         PR python/22731:
7122         * NEWS: Mention that breakpoint commands are writable.
7123         * python/py-breakpoint.c (bppy_set_commands): New function.
7124         (breakpoint_object_getset) <"commands">: Use it.
7125
7126 2018-05-04  Tom Tromey  <tom@tromey.com>
7127
7128         * tracepoint.c (actions_command): Update.
7129         * mi/mi-cmd-break.c (mi_command_line_array)
7130         (mi_command_line_array_cnt, mi_command_line_array_ptr)
7131         (mi_read_next_line): Remove.
7132         (mi_cmd_break_commands): Update.
7133         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
7134         function_view.
7135         * cli/cli-script.c (get_command_line): Update.
7136         (process_next_line): Use function_view.  Constify.
7137         (recurse_read_control_structure, read_command_lines)
7138         (read_command_lines_1): Change argument types to function_view.
7139         (do_define_command, document_command): Update.
7140         * breakpoint.h (check_tracepoint_command): Don't declare.
7141         * breakpoint.c (check_tracepoint_command): Remove.
7142         (commands_command_1, create_tracepoint_from_upload): Update.
7143
7144 2018-05-04  Tom Tromey  <tom@tromey.com>
7145
7146         PR gdb/11750:
7147         * cli/cli-script.h (enum command_control_type) <define_control>:
7148         New constant.
7149         * cli/cli-script.c (multi_line_command_p): Handle define_control.
7150         (build_command_line, execute_control_command_1)
7151         (process_next_line): Likewise.
7152         (do_define_command): New function, extracted from define_command.
7153         (define_command): Use it.
7154
7155 2018-05-04  Tom Tromey  <tom@tromey.com>
7156
7157         * tracepoint.c (actions_command): Update.
7158         * cli/cli-script.h (read_command_lines): Update.
7159         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
7160         (MAX_TMPBUF): Remove define.
7161         (define_command): Use string_printf.
7162         (document_command): Likewise.
7163         * breakpoint.c (commands_command_1): Update.
7164
7165 2018-05-04  Tom Tromey  <tom@tromey.com>
7166
7167         * top.c (execute_command): Update.
7168         * cli/cli-script.h (print_command_lines): Now varargs.
7169         * cli/cli-script.c (print_command_lines): Now varargs.
7170         (execute_control_command_1) <case while_control, case if_control>:
7171         Update.
7172
7173 2018-05-04  Tom Tromey  <tom@tromey.com>
7174
7175         * tracepoint.c (all_tracepoint_actions): Rename from
7176         all_tracepoint_actions_and_cleanup.  Change return type.
7177         (actions_command, encode_actions_1, encode_actions)
7178         (trace_dump_actions, tdump_command): Update.
7179         * remote.c (remote_download_command_source): Update.
7180         * python/python.c (gdbpy_eval_from_control_command)
7181         (python_command, python_interactive_command): Update.
7182         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
7183         * guile/guile.c (guile_command)
7184         (gdbscm_eval_from_control_command, guile_command): Update.
7185         * compile/compile.c (compile_code_command)
7186         (compile_print_command, compile_to_object): Update.
7187         * cli/cli-script.h (struct command_lines_deleter): New.
7188         (counted_command_line): New typedef.
7189         (struct command_line): Add constructor, destructor.
7190         <body_list>: Remove.
7191         <body_list_0, body_list_1>: New members.
7192         (command_line_up): Remove typedef.
7193         (read_command_lines, read_command_lines_1, get_command_line):
7194         Update.
7195         (copy_command_lines): Don't declare.
7196         * cli/cli-script.c (build_command_line): Use "new".
7197         (get_command_line): Return counted_command_line.
7198         (print_command_lines, execute_user_command)
7199         (execute_control_command_1, while_command, if_command): Update.
7200         (realloc_body_list): Remove.
7201         (process_next_line, recurse_read_control_structure): Update.
7202         (read_command_lines, read_command_lines_1): Return counted_command_line.
7203         (free_command_lines): Use "delete".
7204         (copy_command_lines): Remove.
7205         (define_command, document_command, show_user_1): Update.
7206         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
7207         a counted_command_line.
7208         * breakpoint.h (counted_command_line): Remove typedef.
7209         (breakpoint_set_commands): Update.
7210         * breakpoint.c (check_no_tracepoint_commands)
7211         (validate_commands_for_breakpoint): Update.
7212         (breakpoint_set_commands): Change commands to be a
7213         counted_command_line.
7214         (commands_command_1, update_dprintf_command_list)
7215         (create_tracepoint_from_upload): Update.
7216
7217 2018-05-04  Tom Tromey  <tom@tromey.com>
7218
7219         * cli/cli-decode.h (cmd_list_element): New constructor.
7220         (~cmd_list_element): New destructor.
7221         (struct cmd_list_element): Add initializers.
7222         * cli/cli-decode.c (do_add_cmd): Use "new".
7223         (delete_cmd): Use "delete".
7224
7225 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
7226             Pedro Alves <palves@redhat.com>
7227
7228         PR breakpoints/19806 and support for PR external/20207.
7229         * NEWS: Mention Aarch64 watchpoint improvements.
7230         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
7231         watchpoints and PR external/20207 watchpoints.
7232         * nat/aarch64-linux-hw-point.c
7233         (kernel_supports_any_contiguous_range): New.
7234         (aarch64_watchpoint_offset): New.
7235         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
7236         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
7237         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
7238         (aarch64_align_watchpoint): New parameters aligned_offset_p and
7239         next_addr_orig_p.  Support PR external/20207 watchpoints.
7240         (aarch64_downgrade_regs): New.
7241         (aarch64_dr_state_insert_one_point): New parameters offset and
7242         addr_orig.
7243         (aarch64_dr_state_remove_one_point): Likewise.
7244         (aarch64_handle_breakpoint): Update caller.
7245         (aarch64_handle_aligned_watchpoint): Likewise.
7246         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
7247         aligned_offset.
7248         (aarch64_linux_set_debug_regs): Remove const from state.  Call
7249         aarch64_downgrade_regs.
7250         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
7251         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
7252         (DR_CONTROL_MASK): ... this.
7253         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
7254         (unsigned int aarch64_watchpoint_offset): New prototype.
7255         (aarch64_linux_set_debug_regs): Remove const from state.
7256         * utils.c (align_up, align_down): Move to ...
7257         * common/common-utils.c (align_up, align_down): ... here.
7258         * utils.h (align_up, align_down): Move to ...
7259         * common/common-utils.h (align_up, align_down): ... here.
7260
7261 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
7262
7263         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
7264         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
7265         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
7266         Re-implement to match the ABI as summarized in GCC's
7267         gcc/config/sparc/sparc.c.  All callers updated.
7268         (sparc32_store_arguments): Remove assertion.
7269
7270 2018-05-04  Tom Tromey  <tom@tromey.com>
7271
7272         * printcmd.c: Don't include tui.h.
7273         (decode_format): Use skip_spaces.
7274
7275 2018-05-04  Tom Tromey  <tom@tromey.com>
7276
7277         PR gdb/22619:
7278         * printcmd.c (last_count): New global.
7279         (x_command): Use saved count when repeating.
7280
7281 2018-05-04  Tom Tromey  <tom@tromey.com>
7282
7283         * nto-procfs.c (do_closedir_cleanup): Remove.
7284         (procfs_pidlist): Use gdb_dir_up.
7285         * procfs.c (do_closedir_cleanup): Remove.
7286         (proc_update_threads): Use gdb_dir_up.
7287         * common/filestuff.h (struct gdb_dir_deleter): New.
7288         (gdb_dir_up): New typedef.
7289
7290 2018-05-04  Tom Tromey  <tom@tromey.com>
7291
7292         * ada-lang.c (print_mention_exception): Use std::string.
7293
7294 2018-05-04  Tom Tromey  <tom@tromey.com>
7295
7296         * ada-lang.c (create_excep_cond_exprs): Update.
7297         (ada_exception_catchpoint_cond_string): Use std::string.
7298
7299 2018-05-04  Tom Tromey  <tom@tromey.com>
7300
7301         * ada-lang.c (xget_renaming_scope): Return std::string.
7302         (old_renaming_is_invisible): Update.
7303
7304 2018-05-04  Tom Tromey  <tom@tromey.com>
7305
7306         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
7307         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
7308
7309 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
7310
7311         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
7312
7313 2018-05-04  Tom Tromey  <tom@tromey.com>
7314
7315         * remote.c (remote_query_supported_append): Change type.
7316         (remote_check_symbols): Update.
7317
7318 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
7319
7320         PR gdb/11420
7321         * configure.ac: Prepend libpython.
7322         * python/python-config.py: Likewise.
7323         * configure: Regenerate.
7324
7325 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
7326
7327         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
7328
7329 2018-05-03  Pedro Alves  <palves@redhat.com>
7330
7331         * s390-linux-nat.c
7332         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
7333         override.  Write 'true' instead of '1'.
7334         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
7335         declaration.
7336
7337 2018-05-02  Pedro Alves  <palves@redhat.com>
7338
7339         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
7340         add_inf_child_target.
7341         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
7342         add_inf_child_target.
7343         * aix-thread.c (aix_thread_target_info): New.
7344         (aix_thread_target) <shortname, longname, doc>: Delete.
7345         <info>: New.
7346         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
7347         add_inf_child_target.
7348         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
7349         add_inf_child_target.
7350         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
7351         add_inf_child_target.
7352         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
7353         add_inf_child_target.
7354         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
7355         add_inf_child_target.
7356         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
7357         add_inf_child_target.
7358         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
7359         add_inf_child_target.
7360         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
7361         add_inf_child_target.
7362         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
7363         add_inf_child_target.
7364         * bfd-target.c (target_bfd_target_info): New.
7365         (target_bfd) <shortname, longname, doc>: Delete.
7366         <info>: New.
7367         * bsd-kvm.c (bsd_kvm_target_info): New.
7368         (bsd_kvm_target) <shortname, longname, doc>: Delete.
7369         <info>: New.
7370         (bsd_kvm_target::open): Rename to ...
7371         (bsd_kvm_target_open): ... this.  Adjust.
7372         * bsd-uthread.c (bsd_uthread_target_info): New.
7373         (bsd_uthread_target) <shortname, longname, doc>: Delete.
7374         <info>: New.
7375         * corefile.c (core_file_command): Adjust.
7376         * corelow.c (core_target_info): New.
7377         (core_target) <shortname, longname, doc>: Delete.
7378         <info>: New.
7379         (core_target::open): Rename to ...
7380         (core_target_open): ... this.  Adjust.
7381         * ctf.c (ctf_target_info): New.
7382         (ctf_target) <shortname, longname, doc>: Delete.
7383         <info>: New.
7384         (ctf_target::open): Rename to ...
7385         (ctf_target_open): ... this.
7386         (_initialize_ctf): Adjust.
7387         * exec.c (exec_target_info): New.
7388         (exec_target) <shortname, longname, doc>: Delete.
7389         <info>: New.
7390         (exec_target::open): Rename to ...
7391         (exec_target_open): ... this.
7392         * gdbcore.h (core_target_open): Declare.
7393         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
7394         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
7395         add_inf_child_target.
7396         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
7397         add_inf_child_target.
7398         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
7399         add_inf_child_target.
7400         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
7401         add_inf_child_target.
7402         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
7403         add_inf_child_target.
7404         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
7405         add_inf_child_target.
7406         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
7407         add_inf_child_target.
7408         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
7409         add_inf_child_target.
7410         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
7411         add_inf_child_target.
7412         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
7413         add_inf_child_target.
7414         * inf-child.c (inf_child_target_info): New.
7415         (inf_child_target::info): New.
7416         (inf_child_open_target): Remove 'target' parameter.  Use
7417         get_native_target instead.
7418         (inf_child_target::open): Delete.
7419         (add_inf_child_target): New.
7420         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
7421         Delete.
7422         <info>: New.
7423         (add_inf_child_target): Declare.
7424         (inf_child_open_target): Declare.
7425         * linux-thread-db.c (thread_db_target_info): New.
7426         (thread_db_target) <shortname, longname, doc>: Delete.
7427         <info>: New.
7428         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
7429         add_inf_child_target.
7430         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
7431         add_inf_child_target.
7432         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
7433         add_inf_child_target.
7434         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
7435         add_inf_child_target.
7436         * make-target-delegates (print_class): Adjust.
7437         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
7438         add_inf_child_target.
7439         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
7440         add_inf_child_target.
7441         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
7442         add_inf_child_target.
7443         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
7444         add_inf_child_target.
7445         * nto-procfs.c (nto_native_target_info): New.
7446         (nto_procfs_target_native) <shortname, longname, doc>:
7447         Delete.
7448         <info>: New.
7449         (nto_procfs_target_info): New.
7450         (nto_procfs_target_procfs) <shortname, longname, doc>:
7451         Delete.
7452         <info>: New.
7453         (init_procfs_targets): Adjust.
7454         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
7455         add_inf_child_target.
7456         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
7457         add_inf_child_target.
7458         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
7459         add_inf_child_target.
7460         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
7461         add_inf_child_target.
7462         * ravenscar-thread.c (ravenscar_target_info): New.
7463         (ravenscar_thread_target) <shortname, longname, doc>:
7464         Delete.
7465         <info>: New.
7466         * record-btrace.c (record_btrace_target_info):
7467         (record_btrace_target) <shortname, longname, doc>: Delete.
7468         <info>: New.
7469         (record_btrace_target::open): Rename to ...
7470         (record_btrace_target_open): ... this.  Adjust.
7471         * record-full.c (record_longname, record_doc): New.
7472         (record_full_base_target) <shortname, longname, doc>: Delete.
7473         <info>: New.
7474         (record_full_target_info): New.
7475         (record_full_target): <shortname>: Delete.
7476         <info>: New.
7477         (record_full_core_open_1, record_full_open_1): Update comments.
7478         (record_full_base_target::open): Rename to ...
7479         (record_full_open): ... this.
7480         (cmd_record_full_restore): Update.
7481         (_initialize_record_full): Update.
7482         * remote-sim.c (remote_sim_target_info): New.
7483         (gdbsim_target) <shortname, longname, doc>: Delete.
7484         <info>: New.
7485         (gdbsim_target::open): Rename to ...
7486         (gdbsim_target_open): ... this.
7487         (_initialize_remote_sim): Adjust.
7488         * remote.c (remote_doc): New.
7489         (remote_target_info): New.
7490         (remote_target) <shortname, longname, doc>: Delete.
7491         <info>: New.
7492         (extended_remote_target_info): New.
7493         (extended_remote_target) <shortname, longname, doc>: Delete.
7494         <info>: New.
7495         (remote_target::open_1): Make static.  Adjust.
7496         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
7497         * s390-linux-nat.c (_initialize_s390_nat): Use
7498         add_inf_child_target.
7499         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
7500         add_inf_child_target.
7501         * sol-thread.c (thread_db_target_info): New.
7502         (sol_thread_target) <shortname, longname, doc>: Delete.
7503         <info>: New.
7504         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
7505         add_inf_child_target.
7506         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
7507         add_inf_child_target.
7508         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
7509         add_inf_child_target.
7510         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
7511         add_inf_child_target.
7512         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
7513         add_inf_child_target.
7514         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
7515         add_inf_child_target.
7516         * spu-linux-nat.c (_initialize_spu_nat): Use
7517         add_inf_child_target.
7518         * spu-multiarch.c (spu_multiarch_target_info): New.
7519         (spu_multiarch_target) <shortname, longname, doc>: Delete.
7520         <info>: New.
7521         * target-delegates.c: Regenerate.
7522         * target.c: Include <unordered_map>.
7523         (target_ops_p): Delete.
7524         (DEF_VEC_P(target_ops_p)): Delete.
7525         (target_factories): New.
7526         (test_target_info): New.
7527         (test_target_ops::info): New.
7528         (open_target): Adjust to use target_factories.
7529         (add_target_with_completer): Rename to ...
7530         (add_target): ... this.  Change prototype.  Register target_info
7531         and open callback in target_factories.  Register target_info in
7532         command context instead of target_ops.
7533         (add_target): Delete old implementation.
7534         (add_deprecated_target_alias): Change prototype.  Adjust.
7535         (the_native_target): New.
7536         (set_native_target, get_native_target): New.
7537         (find_default_run_target): Use the_native_target.
7538         (find_attach_target, find_run_target): Simplify.
7539         (target_ops::open): Delete.
7540         (dummy_target_info): New.
7541         (dummy_target::shortname, dummy_target::longname)
7542         (dummy_target::doc): Delete.
7543         (dummy_target::info): New.
7544         (debug_target::shortname, debug_target::longname)
7545         (debug_target::doc): Delete.
7546         (debug_target::info): New.
7547         * target.h (struct target_info): New.
7548         (target_ops::~target_ops): Add comment.
7549         (target_ops::info): New.
7550         (target_ops::shortname, target_ops::longname, target_ops::doc): No
7551         longer virtual.  Implement in terms of target_info.
7552         (set_native_target, get_native_target): Declare.
7553         (target_open_ftype): New.
7554         (add_target, add_target_with_completer)
7555         (add_deprecated_target_alias): Change prototype.
7556         (test_target) <shortname, longname, doc>: Delete.
7557         <info>: New.
7558         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
7559         add_inf_child_target.
7560         * tracefile-tfile.c (tfile_target_info): New.
7561         (tfile_target) <shortname, longname, doc>: Delete.
7562         <info>: New.
7563         (tfile_target::open): Rename to ...
7564         (tfile_target_open): ... this.
7565         (_initialize_tracefile_tfile): Adjust.
7566         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
7567         add_inf_child_target.
7568         * windows-nat.c (_initialize_windows_nat): Use
7569         add_inf_child_target.
7570         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
7571         add_inf_child_target.
7572
7573 2018-05-02  Pedro Alves  <palves@redhat.com>
7574
7575         * linux-nat.h (linux_nat_target) <low_new_thread,
7576         low_delete_thread, low_new_fork, low_forget_process,
7577         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
7578         New virtual methods.
7579         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
7580         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
7581         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
7582         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
7583         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
7584         Delete.
7585         * linux-fork.c (delete_fork): Adjust to call low method.
7586         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
7587         (linux_nat_new_fork, linux_nat_forget_process_hook)
7588         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
7589         (linux_nat_status_is_event):
7590         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
7591         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
7592         to call low method.
7593         (sigtrap_is_event): Rename to ...
7594         (linux_nat_target::low_status_is_event): ... this.
7595         (linux_nat_set_status_is_event): Delete.
7596         (save_stop_reason, linux_nat_wait_1)
7597         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
7598         low methods.
7599         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
7600         (linux_nat_set_new_fork, linux_nat_set_forget_process)
7601         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
7602         (linux_nat_set_prepare_to_resume): Delete.
7603         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
7604         low virtual methods.
7605         * amd64-linux-nat.c: Likewise.
7606         * arm-linux-nat.c: Likewise.
7607         * i386-linux-nat.c: Likewise.
7608         * ia64-linux-nat.c: Likewise.
7609         * mips-linux-nat.c: Likewise.
7610         * ppc-linux-nat.c: Likewise.
7611         * s390-linux-nat.c: Likewise.
7612         * sparc64-linux-nat.c: Likewise.
7613         * x86-linux-nat.c: Likewise.
7614         * x86-linux-nat.h: Include "nat/x86-linux.h".
7615         (x86_linux_nat_target) <low_new_fork, low_forget_process,
7616         low_prepare_to_resume, low_new_thread, low_delete_thread>:
7617         Override methods.
7618
7619 2018-05-02  Pedro Alves  <palves@redhat.com>
7620
7621         * target.h (target_ops)
7622         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
7623         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
7624         stopped_by_watchpoint, have_continuable_watchpoint,
7625         stopped_data_address, watchpoint_addr_within_range,
7626         can_accel_watchpoint_condition, can_run, thread_alive,
7627         has_all_memory, has_memory, has_stack, has_registers,
7628         has_execution, can_async_p, is_async_p, supports_non_stop,
7629         always_non_stop_p, can_execute_reverse, supports_multi_process,
7630         supports_enable_disable_tracepoint,
7631         supports_disable_randomization, supports_string_tracing,
7632         supports_evaluation_of_breakpoint_conditions,
7633         can_run_breakpoint_commands, filesystem_is_local,
7634         can_download_tracepoint, get_trace_state_variable_value,
7635         set_trace_notes, get_tib_address, use_agent, can_use_agent,
7636         record_is_replaying, record_will_replay,
7637         augmented_libraries_svr4_read>: Adjust to return bool.
7638         * aarch64-linux-nat.c: All implementations adjusted.
7639         * aix-thread.c: All implementations adjusted.
7640         * arm-linux-nat.c: All implementations adjusted.
7641         * breakpoint.c: All implementations adjusted.
7642         * bsd-kvm.c: All implementations adjusted.
7643         * bsd-uthread.c: All implementations adjusted.
7644         * corelow.c: All implementations adjusted.
7645         * ctf.c: All implementations adjusted.
7646         * darwin-nat.c: All implementations adjusted.
7647         * darwin-nat.h: All implementations adjusted.
7648         * exec.c: All implementations adjusted.
7649         * fbsd-nat.c: All implementations adjusted.
7650         * fbsd-nat.h: All implementations adjusted.
7651         * gnu-nat.c: All implementations adjusted.
7652         * gnu-nat.h: All implementations adjusted.
7653         * go32-nat.c: All implementations adjusted.
7654         * ia64-linux-nat.c: All implementations adjusted.
7655         * inf-child.c: All implementations adjusted.
7656         * inf-child.h: All implementations adjusted.
7657         * inf-ptrace.c: All implementations adjusted.
7658         * inf-ptrace.h: All implementations adjusted.
7659         * linux-nat.c: All implementations adjusted.
7660         * linux-nat.h: All implementations adjusted.
7661         * mips-linux-nat.c: All implementations adjusted.
7662         * nto-procfs.c: All implementations adjusted.
7663         * ppc-linux-nat.c: All implementations adjusted.
7664         * procfs.c: All implementations adjusted.
7665         * ravenscar-thread.c: All implementations adjusted.
7666         * record-btrace.c: All implementations adjusted.
7667         * record-full.c: All implementations adjusted.
7668         * remote-sim.c: All implementations adjusted.
7669         * remote.c: All implementations adjusted.
7670         * s390-linux-nat.c: All implementations adjusted.
7671         * sol-thread.c: All implementations adjusted.
7672         * spu-multiarch.c: All implementations adjusted.
7673         * target-delegates.c: All implementations adjusted.
7674         * target.c: All implementations adjusted.
7675         * target.h: All implementations adjusted.
7676         * tracefile-tfile.c: All implementations adjusted.
7677         * tracefile.c: All implementations adjusted.
7678         * tracefile.h: All implementations adjusted.
7679         * windows-nat.c: All implementations adjusted.
7680         * x86-linux-nat.h: All implementations adjusted.
7681         * x86-nat.h: All implementations adjusted.
7682
7683 2018-05-02  Pedro Alves  <palves@redhat.com>
7684
7685         * make-target-delegates (scan_target_h): Don't trim lines here.
7686         Replace sequences of tabs and/or whitespace with a single
7687         whitespace.
7688         (top level, parsing methods): Trim each line before processing it
7689         here.
7690
7691 2018-05-02  Pedro Alves  <palves@redhat.com>
7692             John Baldwin  <jhb@freebsd.org>
7693
7694         * target.h (enum strata) <debug_stratum>: New.
7695         (struct target_ops) <all delegation methods>: Replace by C++
7696         virtual methods, and drop "to_" prefix.  All references updated
7697         throughout.
7698         <to_shortname, to_longname, to_doc, to_data,
7699         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
7700         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
7701         virtual methods.  All references updated throughout.
7702         <can_attach, supports_terminal_ours, can_create_inferior,
7703         get_thread_control_capabilities, attach_no_wait>: New
7704         virtual methods.
7705         <insert_breakpoint, remove_breakpoint>: Now
7706         TARGET_DEFAULT_NORETURN methods.
7707         <info_proc>: Now returns bool.
7708         <to_magic>: Delete.
7709         (OPS_MAGIC): Delete.
7710         (current_target): Delete.  All references replaced by references
7711         to ...
7712         (target_stack): ... this.  New.
7713         (target_shortname, target_longname): Adjust.
7714         (target_can_run): Now a function declaration.
7715         (default_child_has_all_memory, default_child_has_memory)
7716         (default_child_has_stack, default_child_has_registers)
7717         (default_child_has_execution): Remove target_ops parameter.
7718         (complete_target_initialization): Delete.
7719         (memory_breakpoint_target): New template class.
7720         (test_target_ops): Refactor as a C++ class with virtual methods.
7721         * make-target-delegates (NAME_PART): Tighten.
7722         (POINTER_PART, CP_SYMBOL): New.
7723         (SIMPLE_RETURN_PART): Reimplement.
7724         (VEC_RETURN_PART): Expect less.
7725         (RETURN_PART, VIRTUAL_PART): New.
7726         (METHOD): Adjust to C++ virtual methods.
7727         (scan_target_h): Remove reference to C99.
7728         (dname): Output "target_ops::" prefix.
7729         (write_function_header): Adjust to output a C++ class method.
7730         (write_declaration): New.
7731         (write_delegator): Adjust to output a C++ class method.
7732         (tdname): Output "dummy_target::" prefix.
7733         (write_tdefault, write_debugmethod): Adjust to output a C++ class
7734         method.
7735         (tdefault_names, debug_names): Delete.
7736         (return_types, tdefaults, styles, argtypes_array): New.
7737         (top level): All methods are delegators.
7738         (print_class): New.
7739         (top level): Print dummy_target and debug_target classes.
7740         * target-delegates.c: Regenerate.
7741         * target-debug.h (target_debug_print_enum_info_proc_what)
7742         (target_debug_print_thread_control_capabilities)
7743         (target_debug_print_thread_info_p): New.
7744         * target.c (dummy_target): Delete.
7745         (the_dummy_target, the_debug_target): New.
7746         (target_stack): Now extern.
7747         (set_targetdebug): Push/unpush debug target.
7748         (default_child_has_all_memory, default_child_has_memory)
7749         (default_child_has_stack, default_child_has_registers)
7750         (default_child_has_execution): Remove target_ops parameter.
7751         (complete_target_initialization): Delete.
7752         (add_target_with_completer): No longer call
7753         complete_target_initialization.
7754         (target_supports_terminal_ours): Use regular delegation.
7755         (update_current_target): Delete.
7756         (push_target): No longer check magic number.  Don't call
7757         update_current_target.
7758         (unpush_target): Don't call update_current_target.
7759         (target_is_pushed): No longer check magic number.
7760         (target_require_runnable): Skip for all stratums over
7761         process_stratum.
7762         (target_ops::info_proc): New.
7763         (target_info_proc): Use find_target_at and
7764         find_default_run_target.
7765         (target_supports_disable_randomization): Use regular delegation.
7766         (target_get_osdata): Use find_target_at.
7767         (target_ops::open, target_ops::close, target_ops::can_attach)
7768         (target_ops::attach, target_ops::can_create_inferior)
7769         (target_ops::create_inferior, target_ops::can_run)
7770         (target_can_run): New.
7771         (default_fileio_target): Use regular delegation.
7772         (target_ops::fileio_open, target_ops::fileio_pwrite)
7773         (target_ops::fileio_pread, target_ops::fileio_fstat)
7774         (target_ops::fileio_close, target_ops::fileio_unlink)
7775         (target_ops::fileio_readlink): New.
7776         (target_fileio_open_1, target_fileio_unlink)
7777         (target_fileio_readlink): Always call the target method.  Handle
7778         FILEIO_ENOSYS.
7779         (return_zero, return_zero_has_execution): Delete.
7780         (init_dummy_target): Delete.
7781         (dummy_target::dummy_target, dummy_target::shortname)
7782         (dummy_target::longname, dummy_target::doc)
7783         (debug_target::debug_target, debug_target::shortname)
7784         (debug_target::longname, debug_target::doc): New.
7785         (target_supports_delete_record): Use regular delegation.
7786         (setup_target_debug): Delete.
7787         (maintenance_print_target_stack): Skip debug_stratum.
7788         (initialize_targets): Instantiate the_dummy_target and
7789         the_debug_target.
7790         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
7791         use target_stack.
7792         (target_auxv_search, fprint_target_auxv): Adjust.
7793         (info_auxv_command): Adjust to use target_stack.
7794         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
7795         * exceptions.c (print_flush): Handle a NULL target_stack.
7796         * regcache.c (target_ops_no_register): Refactor as class with
7797         virtual methods.
7798
7799         * exec.c (exec_target): New class.
7800         (exec_ops): Now an exec_target.
7801         (exec_open, exec_close_1, exec_get_section_table)
7802         (exec_xfer_partial, exec_files_info, exec_has_memory)
7803         (exec_make_note_section): Refactor as exec_target methods.
7804         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
7805         Delete.
7806         (exec_target::find_memory_regions): New.
7807         (_initialize_exec): Don't call init_exec_ops.
7808         * gdbcore.h (exec_file_clear): Delete.
7809
7810         * corefile.c (core_target): Delete.
7811         (core_file_command): Adjust.
7812         * corelow.c (core_target): New class.
7813         (the_core_target): New.
7814         (core_close): Remove target_ops parameter.
7815         (core_close_cleanup): Adjust.
7816         (core_target::close): New.
7817         (core_open, core_detach, get_core_registers, core_files_info)
7818         (core_xfer_partial, core_thread_alive, core_read_description)
7819         (core_pid_to_str, core_thread_name, core_has_memory)
7820         (core_has_stack, core_has_registers, core_info_proc): Rework as
7821         core_target methods.
7822         (ignore, core_remove_breakpoint, init_core_ops): Delete.
7823         (_initialize_corelow): Initialize the_core_target.
7824         * gdbcore.h (core_target): Delete.
7825         (the_core_target): New.
7826
7827         * ctf.c: (ctf_target): New class.
7828         (ctf_ops): Now a ctf_target.
7829         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
7830         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
7831         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
7832         methods.
7833         (init_ctf_ops): Delete.
7834         (_initialize_ctf): Don't call it.
7835         * tracefile-tfile.c (tfile_target): New class.
7836         (tfile_ops): Now a tfile_target.
7837         (tfile_open, tfile_close, tfile_files_info)
7838         (tfile_get_tracepoint_status, tfile_trace_find)
7839         (tfile_fetch_registers, tfile_xfer_partial)
7840         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
7841         Refactor as tfile_target methods.
7842         (tfile_xfer_partial_features): Remove target_ops parameter.
7843         (init_tfile_ops): Delete.
7844         (_initialize_tracefile_tfile): Don't call it.
7845         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
7846         (tracefile_has_stack, tracefile_has_registers)
7847         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
7848         tracefile_target methods.
7849         (init_tracefile_ops): Delete.
7850         (tracefile_target::tracefile_target): New.
7851         * tracefile.h: Include "target.h".
7852         (tracefile_target): New class.
7853         (init_tracefile_ops): Delete.
7854
7855         * spu-multiarch.c (spu_multiarch_target): New class.
7856         (spu_ops): Now a spu_multiarch_target.
7857         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
7858         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
7859         (spu_search_memory, spu_mourn_inferior): Refactor as
7860         spu_multiarch_target methods.
7861         (init_spu_ops): Delete.
7862         (_initialize_spu_multiarch): Remove references to init_spu_ops,
7863         complete_target_initialization.
7864
7865         * ravenscar-thread.c (ravenscar_thread_target): New class.
7866         (ravenscar_ops): Now a ravenscar_thread_target.
7867         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
7868         (ravenscar_thread_alive, ravenscar_pid_to_str)
7869         (ravenscar_fetch_registers, ravenscar_store_registers)
7870         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
7871         (ravenscar_stopped_by_hw_breakpoint)
7872         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
7873         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
7874         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
7875         methods.
7876         (init_ravenscar_thread_ops): Delete.
7877         (_initialize_ravenscar): Remove references to
7878         init_ravenscar_thread_ops and complete_target_initialization.
7879
7880         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
7881         (bsd_uthread_target): New class.
7882         (bsd_uthread_ops): Now a bsd_uthread_target.
7883         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
7884         (bsd_uthread_close, bsd_uthread_mourn_inferior)
7885         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
7886         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
7887         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
7888         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
7889         (bsd_uthread_target): Delete function.
7890         (_initialize_bsd_uthread): Remove reference to
7891         complete_target_initialization.
7892
7893         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
7894         (target_bfd): ... this new class.
7895         (target_bfd_xfer_partial, target_bfd_get_section_table)
7896         (target_bfd_close): Refactor as target_bfd methods.
7897         (target_bfd::~target_bfd): New.
7898         (target_bfd_reopen): Adjust.
7899         (target_bfd::close): New.
7900
7901         * record-btrace.c (record_btrace_target): New class.
7902         (record_btrace_ops): Now a record_btrace_target.
7903         (record_btrace_open, record_btrace_stop_recording)
7904         (record_btrace_disconnect, record_btrace_close)
7905         (record_btrace_async, record_btrace_info)
7906         (record_btrace_insn_history, record_btrace_insn_history_range)
7907         (record_btrace_insn_history_from, record_btrace_call_history)
7908         (record_btrace_call_history_range)
7909         (record_btrace_call_history_from, record_btrace_record_method)
7910         (record_btrace_is_replaying, record_btrace_will_replay)
7911         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
7912         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
7913         (record_btrace_store_registers, record_btrace_prepare_to_store)
7914         (record_btrace_to_get_unwinder)
7915         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
7916         (record_btrace_commit_resume, record_btrace_wait)
7917         (record_btrace_stop, record_btrace_can_execute_reverse)
7918         (record_btrace_stopped_by_sw_breakpoint)
7919         (record_btrace_supports_stopped_by_sw_breakpoint)
7920         (record_btrace_stopped_by_hw_breakpoint)
7921         (record_btrace_supports_stopped_by_hw_breakpoint)
7922         (record_btrace_update_thread_list, record_btrace_thread_alive)
7923         (record_btrace_goto_begin, record_btrace_goto_end)
7924         (record_btrace_goto, record_btrace_stop_replaying_all)
7925         (record_btrace_execution_direction)
7926         (record_btrace_prepare_to_generate_core)
7927         (record_btrace_done_generating_core): Refactor as
7928         record_btrace_target methods.
7929         (init_record_btrace_ops): Delete.
7930         (_initialize_record_btrace): Remove reference to
7931         init_record_btrace_ops.
7932         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
7933         the execution_direction global.
7934         (record_full_base_target, record_full_target)
7935         (record_full_core_target): New classes.
7936         (record_full_ops): Now a record_full_target.
7937         (record_full_core_ops): Now a record_full_core_target.
7938         (record_full_target::detach, record_full_target::disconnect)
7939         (record_full_core_target::disconnect)
7940         (record_full_target::mourn_inferior, record_full_target::kill):
7941         New.
7942         (record_full_open, record_full_close, record_full_async): Refactor
7943         as methods of the record_full_base_target class.
7944         (record_full_resume, record_full_commit_resume): Refactor
7945         as methods of the record_full_target class.
7946         (record_full_wait, record_full_stopped_by_watchpoint)
7947         (record_full_stopped_data_address)
7948         (record_full_stopped_by_sw_breakpoint)
7949         (record_full_supports_stopped_by_sw_breakpoint)
7950         (record_full_stopped_by_hw_breakpoint)
7951         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
7952         methods of the record_full_base_target class.
7953         (record_full_store_registers, record_full_xfer_partial)
7954         (record_full_insert_breakpoint, record_full_remove_breakpoint):
7955         Refactor as methods of the record_full_target class.
7956         (record_full_can_execute_reverse, record_full_get_bookmark)
7957         (record_full_goto_bookmark, record_full_execution_direction)
7958         (record_full_record_method, record_full_info, record_full_delete)
7959         (record_full_is_replaying, record_full_will_replay)
7960         (record_full_goto_begin, record_full_goto_end, record_full_goto)
7961         (record_full_stop_replaying): Refactor as methods of the
7962         record_full_base_target class.
7963         (record_full_core_resume, record_full_core_kill)
7964         (record_full_core_fetch_registers)
7965         (record_full_core_prepare_to_store)
7966         (record_full_core_store_registers, record_full_core_xfer_partial)
7967         (record_full_core_insert_breakpoint)
7968         (record_full_core_remove_breakpoint)
7969         (record_full_core_has_execution): Refactor
7970         as methods of the record_full_core_target class.
7971         (record_full_base_target::supports_delete_record): New.
7972         (init_record_full_ops): Delete.
7973         (init_record_full_core_ops): Delete.
7974         (record_full_save): Refactor as method of the
7975         record_full_base_target class.
7976         (_initialize_record_full): Remove references to
7977         init_record_full_ops and init_record_full_core_ops.
7978
7979         * remote.c (remote_target, extended_remote_target): New classes.
7980         (remote_ops): Now a remote_target.
7981         (extended_remote_ops): Now an extended_remote_target.
7982         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
7983         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
7984         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
7985         (remote_pass_signals, remote_set_syscall_catchpoint)
7986         (remote_program_signals, )
7987         (remote_thread_always_alive): Remove target_ops parameter.
7988         (remote_thread_alive, remote_thread_name)
7989         (remote_update_thread_list, remote_threads_extra_info)
7990         (remote_static_tracepoint_marker_at)
7991         (remote_static_tracepoint_markers_by_strid)
7992         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
7993         (remote_open): Refactor as methods of remote_target.
7994         (extended_remote_open, extended_remote_detach)
7995         (extended_remote_attach, extended_remote_post_attach):
7996         (extended_remote_supports_disable_randomization)
7997         (extended_remote_create_inferior): : Refactor as method of
7998         extended_remote_target.
7999         (remote_set_permissions, remote_open_1, remote_detach)
8000         (remote_follow_fork, remote_follow_exec, remote_disconnect)
8001         (remote_resume, remote_commit_resume, remote_stop)
8002         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
8003         (remote_terminal_ours, remote_wait, remote_fetch_registers)
8004         (remote_prepare_to_store, remote_store_registers)
8005         (remote_flash_erase, remote_flash_done, remote_files_info)
8006         (remote_kill, remote_mourn, remote_insert_breakpoint)
8007         (remote_remove_breakpoint, remote_insert_watchpoint)
8008         (remote_watchpoint_addr_within_range)
8009         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
8010         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
8011         (remote_supports_stopped_by_sw_breakpoint)
8012         (remote_stopped_by_hw_breakpoint)
8013         (remote_supports_stopped_by_hw_breakpoint)
8014         (remote_stopped_by_watchpoint, remote_stopped_data_address)
8015         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
8016         (remote_verify_memory): Refactor as methods of remote_target.
8017         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
8018         parameter.
8019         (remote_xfer_partial, remote_get_memory_xfer_limit)
8020         (remote_search_memory, remote_rcmd, remote_memory_map)
8021         (remote_pid_to_str, remote_get_thread_local_address)
8022         (remote_get_tib_address, remote_read_description): Refactor as
8023         methods of remote_target.
8024         (remote_target::fileio_open, remote_target::fileio_pwrite)
8025         (remote_target::fileio_pread, remote_target::fileio_close): New.
8026         (remote_hostio_readlink, remote_hostio_fstat)
8027         (remote_filesystem_is_local, remote_can_execute_reverse)
8028         (remote_supports_non_stop, remote_supports_disable_randomization)
8029         (remote_supports_multi_process, remote_supports_cond_breakpoints)
8030         (remote_supports_enable_disable_tracepoint)
8031         (remote_supports_string_tracing)
8032         (remote_can_run_breakpoint_commands, remote_trace_init)
8033         (remote_download_tracepoint, remote_can_download_tracepoint)
8034         (remote_download_trace_state_variable, remote_enable_tracepoint)
8035         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
8036         (remote_trace_start, remote_get_trace_status)
8037         (remote_get_tracepoint_status, remote_trace_stop)
8038         (remote_trace_find, remote_get_trace_state_variable_value)
8039         (remote_save_trace_data, remote_get_raw_trace_data)
8040         (remote_set_disconnected_tracing, remote_core_of_thread)
8041         (remote_set_circular_trace_buffer, remote_traceframe_info)
8042         (remote_get_min_fast_tracepoint_insn_len)
8043         (remote_set_trace_buffer_size, remote_set_trace_notes)
8044         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
8045         (remote_disable_btrace, remote_teardown_btrace)
8046         (remote_read_btrace, remote_btrace_conf)
8047         (remote_augmented_libraries_svr4_read, remote_load)
8048         (remote_pid_to_exec_file, remote_can_do_single_step)
8049         (remote_execution_direction, remote_thread_handle_to_thread_info):
8050         Refactor as methods of remote_target.
8051         (init_remote_ops, init_extended_remote_ops): Delete.
8052         (remote_can_async_p, remote_is_async_p, remote_async)
8053         (remote_thread_events, remote_upload_tracepoints)
8054         (remote_upload_trace_state_variables): Refactor as methods of
8055         remote_target.
8056         (_initialize_remote): Remove references to init_remote_ops and
8057         init_extended_remote_ops.
8058
8059         * remote-sim.c (gdbsim_target): New class.
8060         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
8061         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
8062         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
8063         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
8064         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
8065         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
8066         Refactor as methods of gdbsim_target.
8067         (gdbsim_ops): Now a gdbsim_target.
8068         (init_gdbsim_ops): Delete.
8069         (gdbsim_cntrl_c): Adjust.
8070         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
8071
8072         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
8073         (the_amd64_linux_nat_target): New.
8074         (amd64_linux_fetch_inferior_registers)
8075         (amd64_linux_store_inferior_registers): Refactor as methods of
8076         amd64_linux_nat_target.
8077         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
8078         * i386-linux-nat.c: Don't include "linux-nat.h".
8079         (i386_linux_nat_target): New class.
8080         (the_i386_linux_nat_target): New.
8081         (i386_linux_fetch_inferior_registers)
8082         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
8083         as methods of i386_linux_nat_target.
8084         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
8085         * inf-child.c (inf_child_ops): Delete.
8086         (inf_child_fetch_inferior_registers)
8087         (inf_child_store_inferior_registers): Delete.
8088         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
8089         methods of inf_child_target.
8090         (inf_child_target::supports_terminal_ours)
8091         (inf_child_target::terminal_init)
8092         (inf_child_target::terminal_inferior)
8093         (inf_child_target::terminal_ours_for_output)
8094         (inf_child_target::terminal_ours, inf_child_target::interrupt)
8095         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
8096         New.
8097         (inf_child_open, inf_child_disconnect, inf_child_close)
8098         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
8099         (inf_child_post_startup_inferior, inf_child_can_run)
8100         (inf_child_pid_to_exec_file): Refactor as methods of
8101         inf_child_target.
8102         (inf_child_follow_fork): Delete.
8103         (inf_child_target::can_create_inferior)
8104         (inf_child_target::can_attach): New.
8105         (inf_child_target::has_all_memory, inf_child_target::has_memory)
8106         (inf_child_target::has_stack, inf_child_target::has_registers)
8107         (inf_child_target::has_execution): New.
8108         (inf_child_fileio_open, inf_child_fileio_pwrite)
8109         (inf_child_fileio_pread, inf_child_fileio_fstat)
8110         (inf_child_fileio_close, inf_child_fileio_unlink)
8111         (inf_child_fileio_readlink, inf_child_use_agent)
8112         (inf_child_can_use_agent): Refactor as methods of
8113         inf_child_target.
8114         (return_zero, inf_child_target): Delete.
8115         (inf_child_target::inf_child_target): New.
8116         * inf-child.h: Include "target.h".
8117         (inf_child_target): Delete function prototype.
8118         (inf_child_target): New class.
8119         (inf_child_open_target, inf_child_mourn_inferior)
8120         (inf_child_maybe_unpush_target): Delete.
8121         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
8122         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
8123         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
8124         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
8125         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
8126         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
8127         (inf_ptrace_wait, inf_ptrace_xfer_partial)
8128         (inf_ptrace_thread_alive, inf_ptrace_files_info)
8129         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
8130         methods of inf_ptrace_target.
8131         (inf_ptrace_target): Delete function.
8132         * inf-ptrace.h: Include "inf-child.h".
8133         (inf_ptrace_target): Delete function declaration.
8134         (inf_ptrace_target): New class.
8135         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
8136         * linux-nat.c (linux_target): New.
8137         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
8138         (linux_nat_target::~linux_nat_target): New.
8139         (linux_child_post_attach, linux_child_post_startup_inferior)
8140         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
8141         (linux_child_remove_fork_catchpoint)
8142         (linux_child_insert_vfork_catchpoint)
8143         (linux_child_remove_vfork_catchpoint)
8144         (linux_child_insert_exec_catchpoint)
8145         (linux_child_remove_exec_catchpoint)
8146         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
8147         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
8148         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
8149         (linux_nat_stopped_data_address)
8150         (linux_nat_stopped_by_sw_breakpoint)
8151         (linux_nat_supports_stopped_by_sw_breakpoint)
8152         (linux_nat_stopped_by_hw_breakpoint)
8153         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
8154         (linux_nat_kill, linux_nat_mourn_inferior)
8155         (linux_nat_xfer_partial, linux_nat_thread_alive)
8156         (linux_nat_update_thread_list, linux_nat_pid_to_str)
8157         (linux_nat_thread_name, linux_child_pid_to_exec_file)
8158         (linux_child_static_tracepoint_markers_by_strid)
8159         (linux_nat_is_async_p, linux_nat_can_async_p)
8160         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
8161         (linux_nat_supports_multi_process)
8162         (linux_nat_supports_disable_randomization, linux_nat_async)
8163         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
8164         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
8165         (linux_nat_fileio_open, linux_nat_fileio_readlink)
8166         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
8167         methods of linux_nat_target.
8168         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
8169         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
8170         parameter.
8171         (check_stopped_by_watchpoint): Adjust.
8172         (linux_xfer_partial): Delete.
8173         (linux_target_install_ops, linux_target, linux_nat_add_target):
8174         Delete.
8175         (linux_nat_target::linux_nat_target): New.
8176         * linux-nat.h: Include "inf-ptrace.h".
8177         (linux_nat_target): New.
8178         (linux_target, linux_target_install_ops, linux_nat_add_target):
8179         Delete function declarations.
8180         (linux_target): Declare global.
8181         * linux-thread-db.c (thread_db_target): New.
8182         (thread_db_target::thread_db_target): New.
8183         (thread_db_ops): Delete.
8184         (the_thread_db_target): New.
8185         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
8186         (thread_db_update_thread_list, thread_db_pid_to_str)
8187         (thread_db_extra_thread_info)
8188         (thread_db_thread_handle_to_thread_info)
8189         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
8190         (thread_db_resume): Refactor as methods of thread_db_target.
8191         (init_thread_db_ops): Delete.
8192         (_initialize_thread_db): Remove reference to init_thread_db_ops.
8193         * x86-linux-nat.c: Don't include "linux-nat.h".
8194         (super_post_startup_inferior): Delete.
8195         (x86_linux_nat_target::~x86_linux_nat_target): New.
8196         (x86_linux_child_post_startup_inferior)
8197         (x86_linux_read_description, x86_linux_enable_btrace)
8198         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
8199         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
8200         methods of x86_linux_nat_target.
8201         (x86_linux_create_target): Delete.  Bits folded ...
8202         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
8203         pointer.
8204         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
8205         (x86_linux_nat_target): New class.
8206         (x86_linux_create_target): Delete.
8207         (x86_linux_add_target): Now takes a linux_nat_target pointer.
8208         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
8209         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
8210         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
8211         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
8212         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
8213         make extern.
8214         (x86_use_watchpoints): Delete.
8215         * x86-nat.h: Include "breakpoint.h" and "target.h".
8216         (x86_use_watchpoints): Delete.
8217         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
8218         (x86_stopped_by_watchpoint, x86_stopped_data_address)
8219         (x86_insert_watchpoint, x86_remove_watchpoint)
8220         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
8221         (x86_stopped_by_hw_breakpoint): New declarations.
8222         (x86_nat_target): New template class.
8223
8224         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
8225         (the_ppc_linux_nat_target): New.
8226         (ppc_linux_fetch_inferior_registers)
8227         (ppc_linux_can_use_hw_breakpoint)
8228         (ppc_linux_region_ok_for_hw_watchpoint)
8229         (ppc_linux_ranged_break_num_registers)
8230         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
8231         (ppc_linux_insert_mask_watchpoint)
8232         (ppc_linux_remove_mask_watchpoint)
8233         (ppc_linux_can_accel_watchpoint_condition)
8234         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
8235         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
8236         (ppc_linux_watchpoint_addr_within_range)
8237         (ppc_linux_masked_watch_num_registers)
8238         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
8239         (ppc_linux_read_description): Refactor as methods of
8240         ppc_linux_nat_target.
8241         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
8242
8243         * procfs.c (procfs_xfer_partial): Delete forward declaration.
8244         (procfs_target): New class.
8245         (the_procfs_target): New.
8246         (procfs_target): Delete function.
8247         (procfs_auxv_parse, procfs_attach, procfs_detach)
8248         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
8249         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
8250         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
8251         (procfs_create_inferior, procfs_update_thread_list)
8252         (procfs_thread_alive, procfs_pid_to_str)
8253         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
8254         (procfs_stopped_data_address, procfs_insert_watchpoint)
8255         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
8256         (proc_find_memory_regions, procfs_info_proc)
8257         (procfs_make_note_section): Refactor as methods of procfs_target.
8258         (_initialize_procfs): Adjust.
8259         * sol-thread.c (sol_thread_target): New class.
8260         (sol_thread_ops): Now a sol_thread_target.
8261         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
8262         (sol_thread_fetch_registers, sol_thread_store_registers)
8263         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
8264         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
8265         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
8266         (init_sol_thread_ops): Delete.
8267         (_initialize_sol_thread): Adjust.  Remove references to
8268         init_sol_thread_ops and complete_target_initialization.
8269
8270         * windows-nat.c (windows_nat_target): New class.
8271         (windows_fetch_inferior_registers)
8272         (windows_store_inferior_registers, windows_resume, windows_wait)
8273         (windows_attach, windows_detach, windows_pid_to_exec_file)
8274         (windows_files_info, windows_create_inferior)
8275         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
8276         (windows_close, windows_pid_to_str, windows_xfer_partial)
8277         (windows_get_tib_address, windows_get_ada_task_ptid)
8278         (windows_thread_name, windows_thread_alive): Refactor as
8279         windows_nat_target methods.
8280         (do_initial_windows_stuff): Adjust.
8281         (windows_target): Delete function.
8282         (_initialize_windows_nat): Adjust.
8283
8284         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
8285         (darwin_mourn_inferior, darwin_kill_inferior)
8286         (darwin_create_inferior, darwin_attach, darwin_detach)
8287         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
8288         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
8289         (darwin_supports_multi_process): Refactor as darwin_nat_target
8290         methods.
8291         (darwin_resume_to, darwin_files_info): Delete.
8292         (_initialize_darwin_inferior): Rename to ...
8293         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
8294         * darwin-nat.h: Include "inf-child.h".
8295         (darwin_nat_target): New class.
8296         (darwin_complete_target): Delete.
8297         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
8298         (darwin_target): New.
8299         (i386_darwin_fetch_inferior_registers)
8300         (i386_darwin_store_inferior_registers): Refactor as methods of
8301         darwin_nat_target.
8302         (darwin_complete_target): Delete, with ...
8303         (_initialize_i386_darwin_nat): ... bits factored out here.
8304
8305         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
8306         (the_alpha_linux_nat_target): New.
8307         (alpha_linux_register_u_offset): Refactor as
8308         alpha_linux_nat_target method.
8309         (_initialize_alpha_linux_nat): Adjust.
8310         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
8311         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
8312         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
8313         methods of linux_nat_trad_target.
8314         (linux_trad_target): Delete.
8315         * linux-nat-trad.h (linux_trad_target): Delete function.
8316         (linux_nat_trad_target): New class.
8317         * mips-linux-nat.c (mips_linux_nat_target): New class.
8318         (super_fetch_registers, super_store_registers, super_close):
8319         Delete.
8320         (the_mips_linux_nat_target): New.
8321         (mips64_linux_regsets_fetch_registers)
8322         (mips64_linux_regsets_store_registers)
8323         (mips64_linux_fetch_registers, mips64_linux_store_registers)
8324         (mips_linux_register_u_offset, mips_linux_read_description)
8325         (mips_linux_can_use_hw_breakpoint)
8326         (mips_linux_stopped_by_watchpoint)
8327         (mips_linux_stopped_data_address)
8328         (mips_linux_region_ok_for_hw_watchpoint)
8329         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
8330         (mips_linux_close): Refactor as methods of mips_linux_nat.
8331         (_initialize_mips_linux_nat): Adjust to C++ification.
8332
8333         * aix-thread.c (aix_thread_target): New class.
8334         (aix_thread_ops): Now an aix_thread_target.
8335         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
8336         (aix_thread_fetch_registers, aix_thread_store_registers)
8337         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
8338         (aix_thread_thread_alive, aix_thread_pid_to_str)
8339         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
8340         Refactor as methods of aix_thread_target.
8341         (init_aix_thread_ops): Delete.
8342         (_initialize_aix_thread): Remove references to init_aix_thread_ops
8343         and complete_target_initialization.
8344         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
8345         (rs6000_nat_target): New class.
8346         (the_rs6000_nat_target): New.
8347         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
8348         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
8349         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
8350         (super_create_inferior): Delete.
8351         (_initialize_rs6000_nat): Adjust to C++ification.
8352
8353         * arm-linux-nat.c (arm_linux_nat_target): New class.
8354         (the_arm_linux_nat_target): New.
8355         (arm_linux_fetch_inferior_registers)
8356         (arm_linux_store_inferior_registers, arm_linux_read_description)
8357         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
8358         (arm_linux_remove_hw_breakpoint)
8359         (arm_linux_region_ok_for_hw_watchpoint)
8360         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
8361         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
8362         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
8363         arm_linux_nat_target.
8364         (_initialize_arm_linux_nat): Adjust to C++ification.
8365
8366         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
8367         (the_aarch64_linux_nat_target): New.
8368         (aarch64_linux_fetch_inferior_registers)
8369         (aarch64_linux_store_inferior_registers)
8370         (aarch64_linux_child_post_startup_inferior)
8371         (aarch64_linux_read_description)
8372         (aarch64_linux_can_use_hw_breakpoint)
8373         (aarch64_linux_insert_hw_breakpoint)
8374         (aarch64_linux_remove_hw_breakpoint)
8375         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
8376         (aarch64_linux_region_ok_for_hw_watchpoint)
8377         (aarch64_linux_stopped_data_address)
8378         (aarch64_linux_stopped_by_watchpoint)
8379         (aarch64_linux_watchpoint_addr_within_range)
8380         (aarch64_linux_can_do_single_step): Refactor as methods of
8381         aarch64_linux_nat_target.
8382         (super_post_startup_inferior): Delete.
8383         (_initialize_aarch64_linux_nat): Adjust to C++ification.
8384
8385         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
8386         (the_hppa_linux_nat_target): New.
8387         (hppa_linux_fetch_inferior_registers)
8388         (hppa_linux_store_inferior_registers): Refactor as methods of
8389         hppa_linux_nat_target.
8390         (_initialize_hppa_linux_nat): Adjust to C++ification.
8391
8392         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
8393         (the_ia64_linux_nat_target): New.
8394         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
8395         (ia64_linux_stopped_data_address)
8396         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
8397         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
8398         ia64_linux_nat_target methods.
8399         (super_xfer_partial): Delete.
8400         (_initialize_ia64_linux_nat): Adjust to C++ification.
8401
8402         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
8403         (the_m32r_linux_nat_target): New.
8404         (m32r_linux_fetch_inferior_registers)
8405         (m32r_linux_store_inferior_registers): Refactor as
8406         m32r_linux_nat_target methods.
8407         (_initialize_m32r_linux_nat): Adjust to C++ification.
8408
8409         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
8410         (the_m68k_linux_nat_target): New.
8411         (m68k_linux_fetch_inferior_registers)
8412         (m68k_linux_store_inferior_registers): Refactor as
8413         m68k_linux_nat_target methods.
8414         (_initialize_m68k_linux_nat): Adjust to C++ification.
8415
8416         * s390-linux-nat.c (s390_linux_nat_target): New class.
8417         (the_s390_linux_nat_target): New.
8418         (s390_linux_fetch_inferior_registers)
8419         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
8420         (s390_insert_watchpoint, s390_remove_watchpoint)
8421         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
8422         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
8423         (s390_auxv_parse, s390_read_description): Refactor as methods of
8424         s390_linux_nat_target.
8425         (_initialize_s390_nat): Adjust to C++ification.
8426
8427         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
8428         (the_sparc_linux_nat_target): New.
8429         (_initialize_sparc_linux_nat): Adjust to C++ification.
8430         * sparc-nat.c (sparc_fetch_inferior_registers)
8431         (sparc_store_inferior_registers): Remove target_ops parameter.
8432         * sparc-nat.h (sparc_fetch_inferior_registers)
8433         (sparc_store_inferior_registers): Remove target_ops parameter.
8434         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
8435         (the_sparc64_linux_nat_target): New.
8436         (_initialize_sparc64_linux_nat): Adjust to C++ification.
8437
8438         * spu-linux-nat.c (spu_linux_nat_target): New class.
8439         (the_spu_linux_nat_target): New.
8440         (spu_child_post_startup_inferior, spu_child_post_attach)
8441         (spu_child_wait, spu_fetch_inferior_registers)
8442         (spu_store_inferior_registers, spu_xfer_partial)
8443         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
8444         methods.
8445         (_initialize_spu_nat): Adjust to C++ification.
8446
8447         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
8448         (the_tilegx_linux_nat_target): New.
8449         (fetch_inferior_registers, store_inferior_registers):
8450         Refactor as methods.
8451         (_initialize_tile_linux_nat): Adjust to C++ification.
8452
8453         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
8454         (the_xtensa_linux_nat_target): New.
8455         (xtensa_linux_fetch_inferior_registers)
8456         (xtensa_linux_store_inferior_registers): Refactor as
8457         xtensa_linux_nat_target methods.
8458         (_initialize_xtensa_linux_nat): Adjust to C++ification.
8459
8460         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
8461         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
8462         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
8463         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
8464         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
8465         (fbsd_stopped_by_sw_breakpoint)
8466         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
8467         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
8468         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
8469         (fbsd_post_startup_inferior, fbsd_post_attach)
8470         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
8471         (fbsd_set_syscall_catchpoint)
8472         (super_xfer_partial, super_resume, super_wait)
8473         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
8474         (fbsd_handle_debug_trap): Remove target_ops parameter.
8475         (fbsd_nat_add_target): Delete.
8476         * fbsd-nat.h: Include "inf-ptrace.h".
8477         (fbsd_nat_add_target): Delete.
8478         (USE_SIGTRAP_SIGINFO): Define.
8479         (fbsd_nat_target): New class.
8480
8481         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
8482         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
8483         (amd64bsd_target): Delete.
8484         * amd64-bsd-nat.h: New file.
8485         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
8486         "x86-bsd-nat.h".
8487         (amd64_fbsd_nat_target): New class.
8488         (the_amd64_fbsd_nat_target): New.
8489         (amd64fbsd_read_description): Refactor as method of
8490         amd64_fbsd_nat_target.
8491         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
8492         (_initialize_amd64fbsd_nat): Adjust to C++ification.
8493         * amd64-nat.h (amd64bsd_target): Delete function declaration.
8494         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
8495         (i386bsd_store_inferior_registers): Remove target_ops parameter.
8496         (i386bsd_target): Delete.
8497         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
8498         (i386bsd_fetch_inferior_registers)
8499         (i386bsd_store_inferior_registers): Declare.
8500         (i386_bsd_nat_target): New class.
8501         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
8502         (the_i386_fbsd_nat_target): New.
8503         (i386fbsd_resume, i386fbsd_read_description): Refactor as
8504         i386_fbsd_nat_target methods.
8505         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
8506         (_initialize_i386fbsd_nat): Adjust to C++ification.
8507         * x86-bsd-nat.c (super_mourn_inferior): Delete.
8508         (x86bsd_mourn_inferior, x86bsd_target): Delete.
8509         (_initialize_x86_bsd_nat): Adjust to C++ification.
8510         * x86-bsd-nat.h: Include "x86-nat.h".
8511         (x86bsd_target): Delete declaration.
8512         (x86bsd_nat_target): New class.
8513
8514         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
8515         (the_aarch64_fbsd_nat_target): New.
8516         (aarch64_fbsd_fetch_inferior_registers)
8517         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
8518         aarch64_fbsd_nat_target.
8519         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
8520         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
8521         (the_alpha_bsd_nat_target): New.
8522         (alphabsd_fetch_inferior_registers)
8523         (alphabsd_store_inferior_registers): Refactor as
8524         alpha_bsd_nat_target methods.
8525         (_initialize_alphabsd_nat): Refactor as methods of
8526         alpha_bsd_nat_target.
8527         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
8528         (the_amd64_nbsd_nat_target): New.
8529         (_initialize_amd64nbsd_nat): Adjust to C++ification.
8530         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
8531         (the_amd64_obsd_nat_target): New.
8532         (_initialize_amd64obsd_nat): Adjust to C++ification.
8533         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
8534         (the_arm_fbsd_nat_target): New.
8535         (arm_fbsd_fetch_inferior_registers)
8536         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
8537         (_initialize_arm_fbsd_nat): Refactor as methods of
8538         arm_fbsd_nat_target.
8539         (_initialize_arm_fbsd_nat): Adjust to C++ification.
8540         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
8541         (the_arm_netbsd_nat_target): New.
8542         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
8543         arm_netbsd_nat_target.
8544         (_initialize_arm_netbsd_nat): Adjust to C++ification.
8545         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
8546         (the_hppa_nbsd_nat_target): New.
8547         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
8548         hppa_nbsd_nat_target methods.
8549         (_initialize_hppanbsd_nat): Adjust to C++ification.
8550         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
8551         (the_hppa_obsd_nat_target): New.
8552         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
8553         methods of hppa_obsd_nat_target.
8554         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
8555         add_target.
8556         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
8557         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
8558         add_target.
8559         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
8560         (_initialize_i386obsd_nat): Use add_target.
8561         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
8562         (the_m68k_bsd_nat_target): New.
8563         (m68kbsd_fetch_inferior_registers)
8564         (m68kbsd_store_inferior_registers): Refactor as methods of
8565         m68k_bsd_nat_target.
8566         (_initialize_m68kbsd_nat): Adjust to C++ification.
8567         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
8568         (the_mips_fbsd_nat_target): New.
8569         (mips_fbsd_fetch_inferior_registers)
8570         (mips_fbsd_store_inferior_registers): Refactor as methods of
8571         mips_fbsd_nat_target.
8572         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
8573         add_target.
8574         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
8575         (the_mips_nbsd_nat_target): New.
8576         (mipsnbsd_fetch_inferior_registers)
8577         (mipsnbsd_store_inferior_registers): Refactor as methods of
8578         mips_nbsd_nat_target.
8579         (_initialize_mipsnbsd_nat): Adjust to C++ification.
8580         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
8581         (the_mips64_obsd_nat_target): New.
8582         (mips64obsd_fetch_inferior_registers)
8583         (mips64obsd_store_inferior_registers): Refactor as methods of
8584         mips64_obsd_nat_target.
8585         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
8586         add_target.
8587         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
8588         nbsd_nat_target.
8589         * nbsd-nat.h: Include "inf-ptrace.h".
8590         (nbsd_nat_target): New class.
8591         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
8592         (obsd_wait): Refactor as methods of obsd_nat_target.
8593         (obsd_add_target): Delete.
8594         * obsd-nat.h: Include "inf-ptrace.h".
8595         (obsd_nat_target): New class.
8596         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
8597         (the_ppc_fbsd_nat_target): New.
8598         (ppcfbsd_fetch_inferior_registers)
8599         (ppcfbsd_store_inferior_registers): Refactor as methods of
8600         ppc_fbsd_nat_target.
8601         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
8602         add_target.
8603         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
8604         (the_ppc_nbsd_nat_target): New.
8605         (ppcnbsd_fetch_inferior_registers)
8606         (ppcnbsd_store_inferior_registers): Refactor as methods of
8607         ppc_nbsd_nat_target.
8608         (_initialize_ppcnbsd_nat): Adjust to C++ification.
8609         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
8610         (the_ppc_obsd_nat_target): New.
8611         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
8612         methods of ppc_obsd_nat_target.
8613         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
8614         add_target.
8615         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
8616         (the_sh_nbsd_nat_target): New.
8617         (shnbsd_fetch_inferior_registers)
8618         (shnbsd_store_inferior_registers): Refactor as methods of
8619         sh_nbsd_nat_target.
8620         (_initialize_shnbsd_nat): Adjust to C++ification.
8621         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
8622         (inf_ptrace_xfer_partial): Delete.
8623         (sparc_xfer_partial, sparc_target): Delete.
8624         * sparc-nat.h (sparc_fetch_inferior_registers)
8625         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
8626         (sparc_target): Delete function declaration.
8627         (sparc_target): New template class.
8628         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
8629         (_initialize_sparcnbsd_nat): Adjust to C++ification.
8630         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
8631         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
8632         add_target.
8633         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
8634         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
8635         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
8636         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
8637         add_target.
8638         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
8639         (the_vax_bsd_nat_target): New.
8640         (vaxbsd_fetch_inferior_registers)
8641         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
8642         methods.
8643         (_initialize_vaxbsd_nat): Adjust to C++ification.
8644
8645         * bsd-kvm.c (bsd_kvm_target): New class.
8646         (bsd_kvm_ops): Now a bsd_kvm_target.
8647         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
8648         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
8649         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
8650         bsd_kvm_target.
8651         (bsd_kvm_return_one): Delete.
8652         (bsd_kvm_add_target): Adjust to C++ification.
8653
8654         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
8655         (nto_procfs_target_procfs): New classes.
8656         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
8657         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
8658         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
8659         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
8660         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
8661         (procfs_remove_hw_breakpoint, procfs_resume)
8662         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
8663         (procfs_kill_inferior, procfs_store_registers)
8664         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
8665         as methods of nto_procfs_target.
8666         (nto_procfs_ops): Now an nto_procfs_target_procfs.
8667         (nto_native_ops): Delete.
8668         (procfs_open, procfs_native_open): Delete.
8669         (nto_native_ops): Now an nto_procfs_target_native.
8670         (init_procfs_targets): Adjust to C++ification.
8671         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
8672         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
8673         Refactor as methods of nto_procfs_target.
8674
8675         * go32-nat.c (go32_nat_target): New class.
8676         (the_go32_nat_target): New.
8677         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
8678         (go32_store_registers, go32_xfer_partial, go32_files_info)
8679         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
8680         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
8681         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
8682         (go32_pid_to_str): Refactor as methods of go32_nat_target.
8683         (go32_target): Delete.
8684         (_initialize_go32_nat): Adjust to C++ification.
8685
8686         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
8687         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
8688         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
8689         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
8690         gnu_nat_target.
8691         (gnu_target): Delete.
8692         * gnu-nat.h (gnu_target): Delete.
8693         (gnu_nat_target): New class.
8694         * i386-gnu-nat.c (gnu_base_target): New.
8695         (i386_gnu_nat_target): New class.
8696         (the_i386_gnu_nat_target): New.
8697         (_initialize_i386gnu_nat): Adjust to C++ification.
8698
8699 2018-05-02  Pedro Alves  <palves@redhat.com>
8700
8701         * bfd-target.c (target_bfd_xclose): Rename to ...
8702         (target_bfd_close): ... this.
8703         (target_bfd_reopen): Adjust.
8704         * target.c (target_close): Remove references to to_xclose.
8705         * target.h (target_ops::to_xclose): Delete.
8706         (target_ops::to_close): Update comments.
8707
8708 2018-05-02  Pedro Alves  <palves@redhat.com>
8709
8710         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
8711         "linux-nat.h".
8712         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
8713         * inf-ptrace.c (inf_ptrace_register_u_offset)
8714         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
8715         (inf_ptrace_store_register, inf_ptrace_store_registers)
8716         (inf_ptrace_trad_target): Move to ...
8717         * linux-nat-trad.c: ... this new file.
8718         * linux-nat-trad.h: New file.
8719         * linux-nat.c (linux_target_install_ops): Make extern.
8720         (linux_trad_target): Delete.
8721         * linux-nat.h (linux_trad_target): Delete declaration.
8722         (linux_target_install_ops): Declare.
8723         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
8724         "linux-nat.h".
8725
8726 2018-05-02  Pedro Alves  <palves@redhat.com>
8727
8728         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
8729         procfs_target/add_target here.
8730         * procfs.c (procfs_target): Make static.
8731         (_initialize_procfs): Call add_target here.
8732         * procfs.h (struct target_ops): Remove forward declaration.
8733         (procfs_target): Remove declaration.
8734         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
8735
8736 2018-05-02  Pedro Alves  <palves@redhat.com>
8737
8738         * procfs.c (procfs_stopped_by_watchpoint)
8739         (procfs_insert_watchpoint, procfs_remove_watchpoint)
8740         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
8741         Forward declare.
8742         (procfs_use_watchpoints): Delete, move contents...
8743         (procfs_target): ... here.
8744         * procfs.h (procfs_use_watchpoints): Delete declaration.
8745         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
8746         procfs_use_watchpoints.
8747         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
8748         procfs_use_watchpoints.
8749
8750 2018-05-02  Tom Tromey  <tom@tromey.com>
8751
8752         PR python/20084:
8753         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
8754         and var_zuinteger_unlimited.
8755         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
8756         and PARAM_ZUINTEGER_UNLIMITED.
8757         (set_parameter_value): Handle var_zuinteger and
8758         var_zuinteger_unlimited.
8759         (add_setshow_generic): Likewise.
8760         (parmpy_init): Likewise.
8761
8762 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
8763
8764         PR rust/23124
8765         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
8766         pointer is not null before dereferencing it.
8767
8768 2018-04-30  Tom Tromey  <tom@tromey.com>
8769
8770         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
8771         is_mi_like_p.
8772
8773 2018-04-30  Tom Tromey  <tom@tromey.com>
8774
8775         * breakpoint.c (mention): Remove use of is_mi_like_p.
8776         (print_mention_ranged_breakpoint): Likewise.
8777         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
8778         of is_mi_like_p.
8779
8780 2018-04-30  Tom Tromey  <tom@tromey.com>
8781
8782         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
8783
8784 2018-04-30  Tom Tromey  <tom@tromey.com>
8785
8786         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
8787         (info_spu_event_command): Remove some uses of is_mi_like_p.
8788
8789 2018-04-30  Tom Tromey  <tom@tromey.com>
8790
8791         * python/py-framefilter.c (py_print_single_arg)
8792         (enumerate_locals, py_print_args, py_print_frame): Remove some
8793         uses of is_mi_like_p.
8794
8795 2018-04-30  Tom Tromey  <tom@tromey.com>
8796
8797         * ui-out.c: Update.
8798         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
8799         * ui-out.h (ui_out::is_mi_like_p): Now const.
8800         (ui_out::do_is_mi_like_p): Now const.
8801         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
8802
8803 2018-04-30  Tom Tromey  <tom@tromey.com>
8804
8805         * varobj.c (varobj_set_visualizer): Use new_reference.
8806         * python/python.c (gdbpy_decode_line): Use new_reference.
8807         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
8808         new_reference.
8809
8810 2018-04-30  Tom Tromey  <tom@tromey.com>
8811
8812         * varobj.c (install_new_value): Use new_reference.
8813         * value.h (value_incref): Return void.  Swap intro comment with
8814         value_decref.
8815         * value.c (set_value_parent): Use new_reference.
8816         (value_incref): Return void.  Update intro comment.
8817         (release_value): Use new_reference.
8818         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
8819
8820 2018-04-30  Tom Tromey  <tom@tromey.com>
8821
8822         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
8823         * gdb_bfd.h (new_bfd_ref): Remove.
8824         (gdb_bfd_open): Update comment.
8825         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
8826         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
8827         (gdb_bfd_fdopenr): Use new_reference.
8828         * exec.c (exec_file_attach): Use new_reference.
8829
8830 2018-04-30  Tom Tromey  <tom@tromey.com>
8831
8832         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
8833         method.
8834
8835 2018-04-30  Tom Tromey  <tom@tromey.com>
8836
8837         * jit.c (jit_read_code_entry): Use type_align.
8838         * i386-tdep.c (i386_gdbarch_init): Don't call
8839         set_gdbarch_long_long_align_bit.
8840         * gdbarch.sh: Remove long_long_align_bit.
8841         * gdbarch.c, gdbarch.h: Rebuild.
8842         * arc-tdep.c (arc_type_align): New function.
8843         (arc_gdbarch_init): Use arc_type_align.  Don't call
8844         set_gdbarch_long_long_align_bit.
8845
8846 2018-04-30  Tom Tromey  <tom@tromey.com>
8847
8848         * rust-lang.c (rust_type_alignment): Remove.
8849         (rust_composite_type): Use type_align.
8850
8851 2018-04-30  Tom Tromey  <tom@tromey.com>
8852
8853         * NEWS: Mention Type.align.
8854         * python/py-type.c (typy_get_alignof): New function.
8855         (type_object_getset): Add "alignof".
8856
8857 2018-04-30  Tom Tromey  <tom@tromey.com>
8858
8859         PR exp/17095:
8860         * NEWS: Update.
8861         * std-operator.def (UNOP_ALIGNOF): New operator.
8862         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
8863         New.
8864         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
8865         * c-lang.c (c_op_print_tab): Add alignof.
8866         * c-exp.y (ALIGNOF): New token.
8867         (exp): Add "ALIGNOF" production.
8868         (ident_tokens): Add _Alignof and alignof.
8869
8870 2018-04-30  Tom Tromey  <tom@tromey.com>
8871
8872         * i386-tdep.c (i386_type_align): New function.
8873         (i386_gdbarch_init): Update.
8874         * gdbarch.sh (type_align): New method.
8875         * gdbarch.c, gdbarch.h: Rebuild.
8876         * arch-utils.h (default_type_align): Declare.
8877         * arch-utils.c (default_type_align): New function.
8878         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
8879         (struct type) <align_log2>: New field.
8880         <instance_flags>: Now a bitfield.
8881         (TYPE_RAW_ALIGN): New macro.
8882         (type_align, type_raw_align, set_type_align): Declare.
8883         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
8884         functions.
8885         * dwarf2read.c (quirk_rust_enum): Set type alignment.
8886         (get_alignment, maybe_set_alignment): New functions.
8887         (read_structure_type, read_enumeration_type, read_array_type)
8888         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
8889         (read_subrange_type, read_base_type): Set type alignment.
8890
8891 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
8892
8893         * dwarf2read.c (read_index_from_section): Use bool.
8894
8895 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
8896
8897         PR gdb/22950
8898         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
8899         with #ifdef.
8900
8901 2018-04-29  John Reiser  <jreiser@BitWagon.com>
8902
8903         PR build/22873
8904         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
8905         last step, and do it atomically.
8906
8907 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
8908
8909         * compile/compile-c-types.c (convert_int, convert_float):
8910         Update for C FE v1.
8911
8912 2018-04-27  Tom Tromey  <tom@tromey.com>
8913
8914         PR rust/22545:
8915         * rust-lang.c (rust_inclusive_range_type_p): New function.
8916         (rust_range): Handle inclusive ranges.
8917         (rust_compute_range): Likewise.
8918         * rust-exp.y (struct rust_op) <inclusive>: New field.
8919         (DOTDOTEQ): New constant.
8920         (range_expr): Add "..=" productions.
8921         (operator_tokens): Add "..=" token.
8922         (ast_range): Add "inclusive" parameter.
8923         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
8924         ranges.
8925         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
8926         bounds values.
8927         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
8928         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
8929         Update comments.
8930         * expprint.c (print_subexp_standard): Handle new bounds values.
8931         (dump_subexp_body_standard): Likewise.
8932
8933 2018-04-27  Tom Tromey  <tom@tromey.com>
8934
8935         * configure: Rebuild.
8936         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
8937         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
8938         "OVERRIDE".
8939         (class symbol_needs_eval_context): Likewise.
8940         * dwarf2read.c (mock_mapped_index::symbol_name_count)
8941         (mock_mapped_index::symbol_name_at): Use "override".  Remove
8942         "virtual".
8943         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
8944         "override".
8945         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
8946         * aarch64-tdep.c (instruction_reader::read): Use "override".
8947         (instruction_reader_test::read): Likewise.
8948         * arm-tdep.c (instruction_reader::read): Use "override".
8949         (instruction_reader_thumb::read): Likewise.
8950
8951 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
8952
8953         PR remote/9665
8954         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
8955         instead of remote_send.
8956         (remote_send): Remove.
8957
8958 2018-04-26  Pedro Alves  <palves@redhat.com>
8959
8960         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
8961         find_function_start_sal instead of find_pc_line.
8962
8963 2018-04-26  Pedro Alves  <palves@redhat.com>
8964
8965         * breakpoint.c (set_breakpoint_location_function): Handle
8966         mst_data_gnu_ifunc.
8967         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
8968         * elfread.c (elf_symtab_read): Give data symbols with
8969         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
8970         (elf_rel_plt_read): Update comment.
8971         * linespec.c (convert_linespec_to_sals): Handle
8972         mst_data_gnu_ifunc.
8973         (minsym_found): Handle mst_data_gnu_ifunc.
8974         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
8975         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
8976         * parse.c (find_minsym_type_and_address): Handle
8977         mst_data_gnu_ifunc.
8978         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
8979         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
8980         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
8981         comment.
8982         <mst_data_gnu_ifunc>: New enumerator.
8983
8984 2018-04-26  Pedro Alves  <palves@redhat.com>
8985
8986         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
8987         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
8988         'want_trampoline' parameter by a lookup_msym_prefer parameter.
8989         Handle it.
8990         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
8991         (lookup_minimal_symbol_by_pc): Adjust.
8992         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
8993         (lookup_solib_trampoline_symbol_by_pc): Adjust.
8994         * minsyms.h (lookup_msym_prefer): New enum.
8995         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8996         parameter by a lookup_msym_prefer parameter.
8997
8998 2018-04-26  Pedro Alves  <palves@redhat.com>
8999
9000         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
9001         ends in "@plt" instead of looking at the symbol's section.
9002
9003 2018-04-26  Pedro Alves  <palves@redhat.com>
9004
9005         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
9006         all references.
9007         (find_pc_partial_function_gnu_ifunc): Rename to ...
9008         (find_pc_partial_function): ... this, and remove references to
9009         'is_gnu_ifunc_p'.
9010         (find_pc_partial_function): Delete old implementation.
9011         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
9012
9013 2018-04-26  Pedro Alves  <palves@redhat.com>
9014
9015         * linespec.c (struct bound_minimal_symbol_search_key): New.
9016         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
9017         skip first line if we found a GNU ifunc minimal symbol by name.
9018         (compare_msymbols): Change parameters to work with a destructured
9019         lhs minsym.
9020         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
9021         functions.
9022
9023 2018-04-26  Pedro Alves  <palves@redhat.com>
9024
9025         * breakpoint.c (set_breakpoint_location_function): Don't resolve
9026         ifunc targets here.  Instead, if we have an ifunc minsym, use its
9027         address/name.
9028         (add_location_to_breakpoint): Store the minsym and the objfile in
9029         the breakpoint location.
9030         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
9031         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
9032         Record the minsym in the sal.
9033         * symtab.h (symtab_and_line) <msymbol>: New field.
9034
9035 2018-04-26  Pedro Alves  <palves@redhat.com>
9036
9037         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
9038         unless we actually resolved the ifunc.
9039
9040 2018-04-26  Pedro Alves  <palves@redhat.com>
9041
9042         * c-exp.y (variable production): Prefer ifunc minsyms over
9043         regular function symbols.
9044         * symtab.c (find_gnu_ifunc): New function.
9045         * minsyms.h (lookup_msym_prefer): New enum.
9046         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
9047         parameter by a lookup_msym_prefer parameter.
9048         * symtab.h (find_gnu_ifunc): New declaration.
9049
9050 2018-04-26  Pedro Alves  <palves@redhat.com>
9051
9052         * blockframe.c (find_gnu_ifunc_target_type): New function.
9053         (find_function_type): New.
9054         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
9055         return a value with a memory address.
9056         (eval_call): For calls to GNU ifunc functions, try to find the
9057         type of the target function from the type that the resolver
9058         returns.
9059         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
9060         symbols.
9061         * infcall.c (find_function_return_type): Delete.
9062         (find_function_addr): Add 'function_type' parameter.  For calls to
9063         GNU ifunc functions, try to find the type of the target function
9064         from the type that the resolver returns, and return it via
9065         FUNCTION_TYPE.
9066         (call_function_by_hand_dummy): Adjust to use the function type
9067         returned by find_function_addr.
9068         (find_function_addr): Add 'function_type' parameter and move
9069         description here.
9070         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
9071         declarations.
9072
9073 2018-04-26  Pedro Alves  <palves@redhat.com>
9074
9075         * c-exp.y (variable production): Skip finding an alias for ifunc
9076         symbols.
9077
9078 2018-04-26  Pedro Alves  <palves@redhat.com>
9079
9080         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
9081
9082 2018-04-25  Pedro Alves  <palves@redhat.com>
9083
9084         * infcmd.c (kill_command): Print the pid as string, not the whole
9085         thread's ptid.  Add comment.  s/has been killed/killed/ in output
9086         message.
9087         * remote.c (remote_detach_1): Print the pid as string, not the
9088         whole thread's ptid.
9089
9090 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
9091             Sergio Durigan Junior  <sergiodj@redhat.com>
9092             Pedro Alves  <palves@redhat.com>
9093
9094         * infcmd.c (kill_command): Print message when inferior has
9095         been killed.
9096         * inferior.c (print_inferior_events): Remove 'static'.  Set as
9097         '1'.
9098         (add_inferior): Improve message printed when
9099         'print_inferior_events' is on.
9100         (exit_inferior): Remove message printed when
9101         'print_inferior_events' is on.
9102         (detach_inferior): Improve message printed when
9103         'print_inferior_events' is on.
9104         (initialize_inferiors): Use 'add_inferior_silent' to set
9105         'current_inferior_'.
9106         * inferior.h (print_inferior_events): Declare here as
9107         'extern'.
9108         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
9109         '[Detaching...]' messages when 'print_inferior_events' is on.
9110         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
9111         as prefix/suffix for messages.  Remove periods.  Fix erroneous
9112         'Detaching after fork from child...', replace it by '... from
9113         parent...'.
9114         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
9115         prefix/suffix when printing 'Detaching...' messages.  Print
9116         them when 'print_inferior_events' is on.
9117         * remote.c (remote_detach_1): Print message when detaching
9118         from inferior and '!is_fork_parent'.
9119
9120 2018-04-24  Tom Tromey  <tom@tromey.com>
9121
9122         * cli-out.h: Reindent.
9123
9124 2018-04-24  Tom Tromey  <tom@tromey.com>
9125
9126         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
9127         (cli_ui_out::do_field_string): Use fputs_filtered.
9128         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
9129
9130 2018-04-23  Tom Tromey  <tom@tromey.com>
9131
9132         * guile/scm-frame.c (gdbscm_frame_read_var): Use
9133         gdb::unique_xmalloc_ptr.
9134
9135 2018-04-23  Tom Tromey  <tom@tromey.com>
9136
9137         * configure: Rebuild.
9138
9139 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
9140
9141         PR gdb/23095
9142         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
9143         prepare_for_testing.  Set normal_bp to r_debug_state if target
9144         is bsd.
9145
9146 2018-04-21  Pedro Alves  <palves@redhat.com>
9147             Rajendra SY  <rajendra.sy@gmail.com>
9148
9149         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
9150         * remote.c (extended_remote_attach): In all-stop mode, mark the
9151         thread as executing.
9152
9153 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
9154
9155         * thread.c (thread_apply_all_command): Fix comment.
9156         (thread_command): Fix comment.
9157
9158 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
9159
9160         * common/tdesc.h (tdesc_create_feature): Remove xml filename
9161         parameter.
9162         * features/aarch64-core.c (create_feature_aarch64_core):
9163         Regenerate.
9164         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
9165         Likewise.
9166         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
9167         Likewise.
9168         * features/i386/32bit-avx512.c
9169         (create_feature_i386_32bit_avx512): Likewise.
9170         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
9171         Likewise.
9172         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
9173         Likewise.
9174         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
9175         Likewise.
9176         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
9177         Likewise.
9178         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
9179         Likewise.
9180         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
9181         Likewise.
9182         * features/i386/64bit-avx512.c
9183         (create_feature_i386_64bit_avx512): Likewise.
9184         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
9185         Likewise.
9186         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
9187         Likewise.
9188         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
9189         Likewise.
9190         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
9191         Likewise.
9192         * features/i386/64bit-segments.c
9193         (create_feature_i386_64bit_segments): Likewise.
9194         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
9195         Likewise.
9196         * features/i386/x32-core.c
9197         (create_feature_i386_x32_core): Likewise.
9198         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
9199         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
9200         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
9201         * target-descriptions.c: In generated code, don't pass xml
9202         filename.
9203
9204 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9205
9206         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
9207         (print_xml_feature::visit_post): Likewise.
9208         (print_xml_feature::visit): Likewise.
9209         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
9210         (print_xml_feature): Add new class.
9211         * regformats/regdat.sh: Null xmltarget on feature targets.
9212         * target-descriptions.c (struct target_desc): Add xmltarget.
9213         (maintenance_check_tdesc_xml_convert): Add unittest function.
9214         (tdesc_get_features_xml): Add function to get xml.
9215         (maintenance_check_xml_descriptions): Test xml generation.
9216         * xml-tdesc.c (string_read_description_xml): Add function.
9217         * xml-tdesc.h (string_read_description_xml): Add declaration.
9218
9219 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9220
9221         * features/Makefile: Add feature marker to targets with new style
9222         target descriptions.
9223         * regformats/aarch64.dat: Regenerate.
9224         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
9225         * regformats/i386/amd64-avx-linux.dat: Likewise.
9226         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
9227         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
9228         * regformats/i386/amd64-linux.dat: Likewise.
9229         * regformats/i386/amd64-mpx-linux.dat: Likewise.
9230         * regformats/i386/amd64.dat: Likewise.
9231         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
9232         * regformats/i386/i386-avx-linux.dat: Likewise.
9233         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
9234         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
9235         * regformats/i386/i386-linux.dat: Likewise.
9236         * regformats/i386/i386-mmx-linux.dat: Likewise.
9237         * regformats/i386/i386-mpx-linux.dat: Likewise.
9238         * regformats/i386/i386.dat: Likewise.
9239         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
9240         * regformats/i386/x32-avx-linux.dat: Likewise.
9241         * regformats/i386/x32-linux.dat: Likewise.
9242         * regformats/tic6x-c62x-linux.dat: Likewise.
9243         * regformats/tic6x-c64x-linux.dat: Likewise.
9244         * regformats/tic6x-c64xp-linux.dat: Likewise.
9245         * regformats/regdat.sh: Parse feature marker.
9246
9247 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9248
9249         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
9250         (tdesc_osabi_name): Likewise.
9251         * target-descriptions.c (tdesc_architecture_name): Add new
9252         function.
9253         (tdesc_osabi_name): Likewise.
9254
9255 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9256
9257         * common/tdesc.c (tdesc_predefined_type): Move to here.
9258         (tdesc_named_type): Likewise.
9259         (tdesc_create_vector): Likewise.
9260         (tdesc_create_struct): Likewise.
9261         (tdesc_set_struct_size): Likewise.
9262         (tdesc_create_union): Likewise.
9263         (tdesc_create_flags): Likewise.
9264         (tdesc_create_enum): Likewise.
9265         (tdesc_add_field): Likewise.
9266         (tdesc_add_typed_bitfield): Likewise.
9267         (tdesc_add_bitfield): Likewise.
9268         (tdesc_add_flag): Likewise.
9269         (tdesc_add_enum_value): Likewise.
9270         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
9271         (struct tdesc_type_vector): Likewise.
9272         (struct tdesc_type_field): Likewise.
9273         (struct tdesc_type_with_fields): Likewise.
9274         (tdesc_create_enum): Add declaration.
9275         (tdesc_add_typed_bitfield): Likewise.
9276         (tdesc_add_enum_value): Likewise.
9277         * target-descriptions.c (tdesc_type_field): Move from here.
9278         (tdesc_type_builtin): Likewise.
9279         (tdesc_type_vector): Likewise.
9280         (tdesc_type_with_fields): Likewise.
9281         (tdesc_predefined_types): Likewise.
9282         (tdesc_named_type): Likewise.
9283         (tdesc_create_vector): Likewise.
9284         (tdesc_create_struct): Likewise.
9285         (tdesc_set_struct_size): Likewise.
9286         (tdesc_create_union): Likewise.
9287         (tdesc_create_flags): Likewise.
9288         (tdesc_create_enum): Likewise.
9289         (tdesc_add_field): Likewise.
9290         (tdesc_add_typed_bitfield): Likewise.
9291         (tdesc_add_bitfield): Likewise.
9292         (tdesc_add_flag): Likewise.
9293         (tdesc_add_enum_value): Likewise.
9294         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
9295         (tdesc_add_typed_bitfield): Likewise.
9296         (tdesc_add_enum_value): Likewise.
9297
9298 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9299
9300         * common/tdesc.c (tdesc_feature::accept): Move to here.
9301         (tdesc_feature::operator==): Likewise.
9302         (tdesc_create_reg): Likewise.
9303         * common/tdesc.h (tdesc_type_kind): Likewise.
9304         (struct tdesc_type): Likewise.
9305         (struct tdesc_feature): Likewise.
9306         * regformats/regdat.sh: Create a feature.
9307         * target-descriptions.c (tdesc_type_kind): Move from here.
9308         (tdesc_type): Likewise.
9309         (tdesc_type_up): Likewise.
9310         (tdesc_feature): Likewise.
9311         (tdesc_create_reg): Likewise.
9312
9313 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9314
9315         * Makefile.in: Add arch/tdesc.c
9316         * common/tdesc.c: New file.
9317         * common/tdesc.h (tdesc_element_visitor): Move to here.
9318         (tdesc_element): Likewise.
9319         (tdesc_reg): Likewise.
9320         (tdesc_reg_up): Likewise.
9321         * regformats/regdef.h (reg): Add offset to constructors.
9322         * target-descriptions.c (tdesc_element_visitor): Move from here.
9323         (tdesc_element): Likewise.
9324         (tdesc_reg): Likewise.
9325         (tdesc_reg_up): Likewise.
9326
9327 2018-04-17  Tom Tromey  <tom@tromey.com>
9328
9329         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
9330         discriminant field.
9331
9332 2018-04-17  Tom Tromey  <tom@tromey.com>
9333
9334         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
9335
9336 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9337
9338         * symtab.c (print_symbol_info): Skip printing filename and line
9339         number when `last' is NULL.
9340         (symtab_symbol_info): Use empty string instead of NULL for first
9341         invocation of print_symbol_info.
9342         (rbreak_command): Pass NULL to `last' parameter of
9343         print_symbol_info.
9344
9345 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
9346
9347         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
9348         instead of nullptr.
9349
9350 2018-04-16  Pedro Alves  <palves@redhat.com>
9351
9352         * MAINTAINERS (sh): Remove.
9353         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
9354         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
9355         (ALLDEPFILES): Remove sh64-tdep.c.
9356         * NEWS: Mentions that support for SH-5/SH64 is removed.
9357         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
9358         (sh*-*-openbsd*): Ditto.
9359         (sh64-*-elf*): Remove.
9360         (sh*): Remove.
9361         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
9362         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
9363         * sh-tdep.c: No longer include "sh64-tdep.h".
9364         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
9365         * sh64-tdep.c, sh64-tdep.h: Remove files.
9366
9367 2018-04-16  Pedro Alves  <palves@redhat.com>
9368
9369         * MAINTAINERS: Remove m88k.
9370         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
9371         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
9372         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
9373         * NEWS: Mention that support for m88k was removed.
9374         * configure.host (m88*-*-*): Remove support.
9375         * configure.nat (m88k-*-*): Remove support.
9376         * configure.tgt (m88*-*-openbsd*): Remove.
9377         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
9378
9379 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
9380
9381         * configure.tgt (x86_tobjs): New variable.
9382         (amd64_tobjs, i386_tobjs): Use it.
9383
9384 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9385
9386         * symtab.c (print_symbol_info): Precede the symbol definition by
9387         the line number when available.
9388         * NEWS: Advertise this enhancement.
9389
9390 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
9391
9392         * NEWS (New options): announce set/show record btrace cpu.
9393         * btrace.c: Include record-btrace.h.
9394         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
9395         the vendor is unknown.
9396         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
9397         Maybe overwrite the btrace configuration's cpu.
9398         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
9399         (btrace_fetch): Add cpu parameter.  Update callers.
9400         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
9401         Maybe overwrite the btrace configuration's cpu.  Skip enabling
9402         errata workarounds if the vendor is unknown.
9403         * python/py-record-btrace.c: Include record-btrace.h.
9404         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
9405         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
9406         * record-btrace.c (record_btrace_cpu_state_kind): New.
9407         (record_btrace_cpu): New.
9408         (set_record_btrace_cpu_cmdlist): New.
9409         (record_btrace_get_cpu): New.
9410         (require_btrace_thread, record_btrace_info)
9411         (record_btrace_resume_thread): Call record_btrace_get_cpu.
9412         (cmd_set_record_btrace_cpu_none): New.
9413         (cmd_set_record_btrace_cpu_auto): New.
9414         (cmd_set_record_btrace_cpu): New.
9415         (cmd_show_record_btrace_cpu): New.
9416         (_initialize_record_btrace): Initialize set/show record btrace cpu
9417         commands.
9418         * record-btrace.h (record_btrace_get_cpu): New.
9419
9420 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
9421
9422         * record.c (set_record_command): Fix typo in message.
9423
9424 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
9425
9426         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
9427
9428 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
9429
9430         * infrun.c (process_event_stop_test): Call
9431         gdbarch_in_indirect_branch_thunk.
9432         * gdbarch.sh (in_indirect_branch_thunk): New.
9433         * gdbarch.c: Regenerated.
9434         * gdbarch.h: Regenerated.
9435         * x86-tdep.h: New.
9436         * x86-tdep.c: New.
9437         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
9438         (HFILES_NO_SRCDIR): Add x86-tdep.h.
9439         (ALLDEPFILES): Add x86-tdep.c.
9440         * arch-utils.h (default_in_indirect_branch_thunk): New.
9441         * arch-utils.c (default_in_indirect_branch_thunk): New.
9442         * i386-tdep: Include x86-tdep.h.
9443         (i386_in_indirect_branch_thunk): New.
9444         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
9445         function.
9446         * amd64-tdep: Include x86-tdep.h.
9447         (amd64_in_indirect_branch_thunk): New.
9448         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
9449
9450 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
9451
9452         PR gdb/23053
9453         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
9454         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
9455         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
9456         regression.
9457
9458 2018-04-12  Tom Tromey  <tom@tromey.com>
9459
9460         * rust-lang.c (rust_print_struct_def): Remove univariant code.
9461         (rust_evaluate_subexp): Likewise.
9462
9463 2018-04-12  Pedro Alves  <palves@redhat.com>
9464
9465         * procfs.c (procfs_detach): Make forward declaration's prototype
9466         match definition's protototype.
9467         (proc_get_LDT_entry): Remove stale do_cleanups call.
9468
9469 2018-04-12  Pedro Alves  <palves@redhat.com>
9470
9471         * target.h (target_ops::to_has_exited): Delete.
9472         (target_has_exited): Delete.
9473         * target-delegates.c: Regenerate.
9474
9475 2018-04-11  Pedro Alves  <palves@redhat.com>
9476
9477         * target.c (fileio_fh_t::t): Add comment.
9478         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
9479         (target_fileio_close): Handle a NULL target.
9480         (invalidate_fileio_fh): New.
9481         (target_close): Call it.
9482         * remote.c (remote_hostio_send_command): No longer check whether
9483         remote_desc is open.
9484
9485 2018-04-11  Pedro Alves  <palves@redhat.com>
9486
9487         * target.c (fileio_fh_t): Make it a named struct instead of a
9488         typedef.
9489         (fileio_fh_t::is_closed): New method.
9490         (DEF_VEC_O (fileio_fh_t)): Remove.
9491         (fileio_fhandles): Now a std::vector.
9492         (is_closed_fileio_fh): Delete.
9493         (acquire_fileio_fd): Adjust.  Rename parameters.
9494         (release_fileio_fd): Adjust.
9495         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
9496         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
9497         (target_fileio_close): Adjust.
9498
9499 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
9500
9501         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
9502         index.
9503
9504 2018-04-10  Pedro Alves  <palves@redhat.com>
9505
9506         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
9507         (scoped_finish_thread_state): New class.
9508         * infcmd.c (run_command_1): Use it instead of finish_thread_state
9509         cleanup.
9510         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
9511         (fetch_inferior_event, normal_stop): Likewise.
9512         * thread.c (finish_thread_state_cleanup): Delete.
9513
9514 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9515             Pedro Alves  <palves@redhat.com>
9516
9517         * value.c: Include "selftest.h" and "common/array-view.h".
9518         (struct range) <operator ==>: New.
9519         (test_ranges_contain): New.
9520         (check_ranges_vector): New.
9521         (test_insert_into_bit_range_vector): New.
9522         (_initialize_values): Register selftests.
9523         * common/array-view.h (operator==, operator!=): New.
9524
9525 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9526
9527         * common/gdb_vecs.h (unordered_remove): Add overload that takes
9528         an iterator.
9529         * inline-frame.c: Include <algorithm>.
9530         (struct inline_state): Add constructor.
9531         (inline_state_s): Remove.
9532         (DEF_VEC_O(inline_state_s)): Remove.
9533         (inline_states): Change type to std::vector.
9534         (find_inline_frame_state): Adjust to std::vector.
9535         (allocate_inline_frame_state): Remove.
9536         (clear_inline_frame_state): Adjust to std::vector.
9537         (skip_inline_frames): Adjust to std::vector.
9538
9539 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9540
9541         * tracepoint.h (struct trace_state_variable): Add constructor.
9542         <name>: Change type to std::string.
9543         * tracepoint.c (tsv_s): Remove.
9544         (DEF_VEC_O(tsv_s)): Remove.
9545         (tvariables): Change to std::vector.
9546         (create_trace_state_variable): Adjust to std::vector.
9547         (find_trace_state_variable): Likewise.
9548         (find_trace_state_variable_by_number): Likewise.
9549         (delete_trace_state_variable): Likewise.
9550         (trace_variable_command): Adjust to std::string.
9551         (delete_trace_variable_command): Likewise.
9552         (tvariables_info_1): Adjust to std::vector.
9553         (save_trace_state_variables): Likewise.
9554         (start_tracing): Likewise.
9555         (merge_uploaded_trace_state_variables): Adjust to std::vector
9556         and std::string.
9557         * target.h (struct target_ops)
9558         <to_download_trace_state_variable>: Pass reference to
9559         trace_state_variable.
9560         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
9561         * target-delegates.c: Re-generate.
9562         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
9563         (mi_tsv_deleted): Likewise.
9564         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
9565         * remote.c (remote_download_trace_state_variable): Change
9566         pointer to reference and adjust.
9567         * make-target-delegates (parse_argtypes): Handle references.
9568         (write_function_header): Likewise.
9569         (munge_type): Likewise.
9570
9571 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9572
9573         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9574         string_view-selftests.c.
9575         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
9576         testsuite.
9577         * unittests/basic_string_view/cons/char/1.cc: Likewise.
9578         * unittests/basic_string_view/cons/char/2.cc: Likewise.
9579         * unittests/basic_string_view/cons/char/3.cc: Likewise.
9580         * unittests/basic_string_view/element_access/char/1.cc:
9581         Likewise.
9582         * unittests/basic_string_view/element_access/char/empty.cc:
9583         Likewise.
9584         * unittests/basic_string_view/element_access/char/front_back.cc:
9585         Likewise.
9586         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
9587         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
9588         Likewise.
9589         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
9590         Likewise.
9591         * unittests/basic_string_view/modifiers/swap/char/1.cc:
9592         Likewise.
9593         * unittests/basic_string_view/operations/compare/char/1.cc:
9594         Likewise.
9595         * unittests/basic_string_view/operations/compare/char/13650.cc:
9596         Likewise.
9597         * unittests/basic_string_view/operations/copy/char/1.cc:
9598         Likewise.
9599         * unittests/basic_string_view/operations/data/char/1.cc:
9600         Likewise.
9601         * unittests/basic_string_view/operations/find/char/1.cc:
9602         Likewise.
9603         * unittests/basic_string_view/operations/find/char/2.cc:
9604         Likewise.
9605         * unittests/basic_string_view/operations/find/char/3.cc:
9606         Likewise.
9607         * unittests/basic_string_view/operations/find/char/4.cc:
9608         Likewise.
9609         * unittests/basic_string_view/operations/rfind/char/1.cc:
9610         Likewise.
9611         * unittests/basic_string_view/operations/rfind/char/2.cc:
9612         Likewise.
9613         * unittests/basic_string_view/operations/rfind/char/3.cc:
9614         Likewise.
9615         * unittests/basic_string_view/operations/substr/char/1.cc:
9616         Likewise.
9617         * unittests/basic_string_view/operators/char/2.cc: Likewise.
9618         * unittests/string_view-selftests.c: New file.
9619
9620 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9621
9622         * unittests/basic_string_view/capacity/1.cc: New file.
9623         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
9624         * unittests/basic_string_view/cons/char/1.cc: New file.
9625         * unittests/basic_string_view/cons/char/2.cc: New file.
9626         * unittests/basic_string_view/cons/char/3.cc: New file.
9627         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
9628         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
9629         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
9630         * unittests/basic_string_view/element_access/char/1.cc: New file.
9631         * unittests/basic_string_view/element_access/char/2.cc: New file.
9632         * unittests/basic_string_view/element_access/char/empty.cc: New file.
9633         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
9634         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
9635         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
9636         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
9637         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
9638         * unittests/basic_string_view/include.cc: New file.
9639         * unittests/basic_string_view/inserters/char/1.cc: New file.
9640         * unittests/basic_string_view/inserters/char/2.cc: New file.
9641         * unittests/basic_string_view/inserters/char/3.cc: New file.
9642         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
9643         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
9644         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
9645         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
9646         * unittests/basic_string_view/literals/types.cc: New file.
9647         * unittests/basic_string_view/literals/values.cc: New file.
9648         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
9649         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
9650         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
9651         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
9652         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
9653         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
9654         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
9655         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
9656         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
9657         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
9658         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
9659         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
9660         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
9661         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
9662         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
9663         * unittests/basic_string_view/operations/data/char/1.cc: New file.
9664         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
9665         * unittests/basic_string_view/operations/find/char/1.cc: New file.
9666         * unittests/basic_string_view/operations/find/char/2.cc: New file.
9667         * unittests/basic_string_view/operations/find/char/3.cc: New file.
9668         * unittests/basic_string_view/operations/find/char/4.cc: New file.
9669         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
9670         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
9671         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
9672         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
9673         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
9674         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
9675         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
9676         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
9677         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
9678         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
9679         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
9680         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
9681         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
9682         * unittests/basic_string_view/operators/char/2.cc: New file.
9683         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
9684         * unittests/basic_string_view/range_access/char/1.cc: New file.
9685         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
9686         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
9687         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
9688         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
9689         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
9690         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
9691         * unittests/basic_string_view/requirements/typedefs.cc: New file.
9692         * unittests/basic_string_view/typedefs.cc: New file.
9693         * unittests/basic_string_view/types/1.cc: New file.
9694
9695 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9696
9697         * common/gdb_string_view.h: Remove libstdc++ implementation
9698         details, adjust to gdb reality.
9699         * common/gdb_string_view.tcc: Likewise.
9700         * cli/cli-script.c (struct string_view): Remove.
9701         (user_args) <m_args>: Change element type to gdb::string_view.
9702         (user_args::insert_args): Adjust.
9703
9704 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9705
9706         * common/gdb_string_view.h: New file.
9707         * common/gdb_string_view.tcc: New file.
9708
9709 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9710
9711         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
9712         * configure: Re-generate.
9713
9714 2018-04-09  Pedro Alves  <palves@redhat.com>
9715
9716         * gdbarch.sh: Include "observable.h" instead of "observer.h".
9717         (set_target_gdbarch): Call
9718         gdb::observers::architecture_changed.notify instead of
9719         observer_notify_architecture_changed.
9720
9721 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9722
9723         * tracepoint.c (struct current_traceframe_cleanup): Remove.
9724         (do_restore_current_traceframe_cleanup): Remove.
9725         (restore_current_traceframe_cleanup_dtor): Remove.
9726         (make_cleanup_restore_current_traceframe): Remove.
9727         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
9728         New.
9729         * tracepoint.h (struct scoped_restore_current_traceframe): New.
9730         * infrun.c (fetch_inferior_event): Use
9731         scoped_restore_current_traceframe.
9732
9733 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9734
9735         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
9736         Remove.
9737         <n_allocated_type_units>: Remove.
9738         <all_type_units>: Change to std::vector.
9739         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
9740         to std::vector change.
9741         (dwarf2_per_objfile::get_cutu): Likewise.
9742         (dwarf2_per_objfile::get_tu): Likewise.
9743         (create_signatured_type_table_from_index): Likewise.
9744         (create_signatured_type_table_from_debug_names): Likewise.
9745         (dw2_symtab_iter_next): Likewise.
9746         (dw2_print_stats): Likewise.
9747         (dw2_expand_all_symtabs): Likewise.
9748         (dw2_expand_marked_cus): Likewise.
9749         (dw2_debug_names_iterator::next): Likewise.
9750         (dwarf2_initialize_objfile): Likewise.
9751         (add_signatured_type_cu_to_table): Likewise.
9752         (create_all_type_units): Likewise.
9753         (add_type_unit): Likewise.
9754         (struct tu_abbrev_offset): Add constructor.
9755         (build_type_psymtabs_1): Adjust to std::vector change.
9756         (print_tu_stats): Likewise.
9757         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9758         (write_debug_names): Likewise.
9759
9760 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9761
9762         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
9763         Make an std::vector.
9764         <n_comp_units>: Remove.
9765         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
9766         to std::vector change.
9767         (dwarf2_per_objfile::get_cutu): Likewise.
9768         (dwarf2_per_objfile::get_cu): Likewise.
9769         (create_cus_from_index): Likewise.
9770         (create_addrmap_from_index): Likewise.
9771         (create_addrmap_from_aranges): Likewise.
9772         (dwarf2_read_index): Likewise.
9773         (dw2_find_last_source_symtab): Likewise.
9774         (dw2_map_symtabs_matching_filename): Likewise.
9775         (dw2_symtab_iter_next): Likewise.
9776         (dw2_print_stats): Likewise.
9777         (dw2_expand_all_symtabs): Likewise.
9778         (dw2_expand_symtabs_with_fullname): Likewise.
9779         (dw2_expand_marked_cus): Likewise.
9780         (dw2_map_symbol_filenames): Likewise.
9781         (create_cus_from_debug_names): Likewise.
9782         (dwarf2_read_debug_names): Likewise.
9783         (dw2_debug_names_iterator::next): Likewise.
9784         (dwarf2_initialize_objfile): Likewise.
9785         (set_partial_user): Likewise.
9786         (dwarf2_build_psymtabs_hard): Likewise.
9787         (read_comp_units_from_section): Remove arguments, adjust to
9788         std::vector change.
9789         (create_all_comp_units): Adjust to std::vector and
9790         read_comp_units_from_section changes.
9791         (dwarf2_find_containing_comp_unit): Adjust to std::vector
9792         change.
9793         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9794         (psyms_seen_size): Likewise.
9795         (write_gdbindex): Likewise.
9796         (write_debug_names): Likewise.
9797
9798 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9799
9800         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
9801         with dwarf2_per_objfile.
9802         (create_cus_from_index): Likewise.
9803         (create_signatured_type_table_from_index): Likewise.
9804         (dwarf2_read_index): Likewise.
9805         (dwarf2_initialize_objfile): Likewise.
9806         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
9807         per_cu rather than get_dwarf2_per_objfile.
9808
9809 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9810
9811         * dwarf2read.h (struct signatured_type): Forward declare.
9812         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
9813         New methods.
9814         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
9815         (dw2_get_cutu): ...this.
9816         (dwarf2_per_objfile::get_cu): Rename from...
9817         (dw2_get_cu): ...this.
9818         (dwarf2_per_objfile::get_tu): New.
9819         (create_addrmap_from_index): Adjust.
9820         (create_addrmap_from_aranges): Adjust.
9821         (dw2_find_last_source_symtab): Adjust.
9822         (dw2_map_symtabs_matching_filename): Adjust.
9823         (dw2_symtab_iter_next): Adjust.
9824         (dw2_print_stats): Adjust.
9825         (dw2_expand_all_symtabs): Adjust.
9826         (dw2_expand_symtabs_with_fullname): Adjust.
9827         (dw2_expand_marked_cus): Adjust.
9828         (dw_expand_symtabs_matching_file_matcher): Adjust.
9829         (dw2_map_symbol_filenames): Adjust.
9830         (dw2_debug_names_iterator::next): Adjust.
9831         (dwarf2_initialize_objfile): Adjust.
9832         (set_partial_user): Adjust.
9833         (dwarf2_build_psymtabs_hard): Adjust.
9834
9835 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9836
9837         * dwarf2read.c (create_signatured_type_table_from_debug_names):
9838         Remove unused variables.
9839         (dw2_map_symtabs_matching_filename): Likewise.
9840         (dwarf2_record_block_ranges): Likewise.
9841         (dwarf2_read_addr_index): Likewise.
9842         (follow_die_offset): Likewise.
9843
9844 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9845
9846         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
9847         to symbol_file_add_main.
9848
9849 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9850
9851         PR mi/22299
9852         * mi/mi-console.c (do_fputc_async_safe): New.
9853         (mi_console_file::write_async_safe): New.
9854         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
9855         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
9856         New.
9857         * ui-file.c (ui_file::putstrn): Adjust call to
9858         fputstrn_unfiltered.
9859         * utils.c (printchar): Replace do_fputs and do_fprintf
9860         parameters by do_fputc.
9861         (fputstr_filtered): Adjust call to printchar.
9862         (fputstr_unfiltered): Likewise.
9863         (fputstrn_filtered): Likewise.
9864         (fputstrn_unfiltered): Add do_fputc parameter, pass to
9865         printchar.
9866         * utils.h (do_fputc_ftype): New typedef.
9867         (fputstrn_unfiltered): Add do_fputc parameter.
9868
9869 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9870
9871         * regformats/i386/i386-avx.dat: Remove.
9872
9873 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
9874
9875         PR gdb/22979
9876         * amd64-tdep.c (amd64_none_init_abi): New function.
9877         (amd64_x32_none_init_abi): New function.
9878         (_initialize_amd64_tdep): Register handlers for x86-64 and
9879         x64_32 with GDB_OSABI_NONE.
9880         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
9881         GDB_OSABI_NONE osabi.
9882
9883 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
9884
9885         PR gdb/22980
9886         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
9887         GDB_OSABI_NONE.
9888         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
9889         * osabi.c (gdb_osabi_names): Add "unknown" entry.
9890
9891 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
9892
9893         * common/byte-vector.h (char_vector): New type.
9894         * target.h (target_read_alloc): Return
9895         gdb::optional<byte_vector>.
9896         (target_read_stralloc): Return gdb::optional<char_vector>.
9897         (target_get_osdata): Return gdb::optional<char_vector>.
9898         * target.c (target_read_alloc_1): Templatize.  Replacement
9899         manual memory management with vector.
9900         (target_read_alloc): Change return type, adjust.
9901         (target_read_stralloc): Change return type, adjust.
9902         (target_get_osdata): Change return type, adjust.
9903         * auxv.c (struct auxv_info) <length>: Remove.
9904         <data>: Change type to gdb::optional<byte_vector>.
9905         (auxv_inferior_data_cleanup): Free auxv_info with delete.
9906         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
9907         (target_auxv_search): Adjust.
9908         (fprint_target_auxv): Adjust.
9909         * avr-tdep.c (avr_io_reg_read_command): Adjust.
9910         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
9911         (linux_make_corefile_notes): Adjust.
9912         * osdata.c (get_osdata): Adjust.
9913         * remote.c (remote_get_threads_with_qxfer): Adjust.
9914         (remote_memory_map): Adjust.
9915         (remote_traceframe_info): Adjust.
9916         (btrace_read_config): Adjust.
9917         (remote_read_btrace): Adjust.
9918         (remote_pid_to_exec_file): Adjust.
9919         * solib-aix.c (solib_aix_get_library_list): Adjust.
9920         * solib-dsbt.c (decode_loadmap): Don't free buf.
9921         (dsbt_get_initial_loadmaps): Adjust.
9922         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
9923         * solib-target.c (solib_target_current_sos): Adjust.
9924         * tracepoint.c (sdata_make_value): Adjust.
9925         * xml-support.c (xinclude_start_include): Adjust.
9926         (xml_fetch_content_from_file): Adjust.
9927         * xml-support.h (xml_fetch_another): Change return type.
9928         (xml_fetch_content_from_file): Change return type.
9929         * xml-syscall.c (xml_init_syscalls_info): Adjust.
9930         * xml-tdesc.c (file_read_description_xml): Adjust.
9931         (fetch_available_features_from_target): Change return type.
9932         (target_fetch_description_xml): Adjust.
9933         (target_read_description_xml): Adjust.
9934
9935 2018-04-06  Tom Tromey  <tom@tromey.com>
9936
9937         * value.c (~value): Update.
9938         (struct value) <contents>: Now unique_xmalloc_ptr.
9939         (value_contents_bits_eq, allocate_value_contents)
9940         (value_contents_raw, value_contents_all_raw)
9941         (value_contents_for_printing, value_contents_for_printing_const)
9942         (set_value_enclosing_type): Update.
9943
9944 2018-04-06  Tom Tromey  <tom@tromey.com>
9945
9946         * value.c (range_s): Remove typedef, VEC.
9947         (struct range): Add operator<.
9948         (range_lessthan): Remove.
9949         (ranges_contain): Change type.
9950         (~value): Update.
9951         (struct value) <unavailable, optimized_out>: Now std::vector.
9952         (value_entirely_available)
9953         (value_entirely_covered_by_range_vector)
9954         (value_entirely_unavailable, value_entirely_optimized_out):
9955         Update.
9956         (insert_into_bit_range_vector): Change argument type.
9957         (find_first_range_overlap): Likewise.
9958         (struct ranges_and_idx, value_contents_bits_eq)
9959         (require_not_optimized_out, require_available): Update.
9960         (ranges_copy_adjusted): Change argument types.
9961         (value_optimized_out, value_copy, value_fetch_lazy): Update.
9962
9963 2018-04-06  Tom Tromey  <tom@tromey.com>
9964
9965         * value.c (~value): Update.
9966         (struct value) <parent>: Now a value_ref_ptr.
9967         (value_parent, set_value_parent, value_address, value_copy):
9968         Update.
9969
9970 2018-04-06  Tom Tromey  <tom@tromey.com>
9971
9972         * value.c (struct value): Add constructor, destructor, and member
9973         initializers.
9974         (allocate_value_lazy, value_decref): Update.
9975
9976 2018-04-06  Tom Tromey  <tom@tromey.com>
9977
9978         * value.c (struct value) <released, next>: Remove.
9979         (all_values): Now a std::vector.
9980         (allocate_value_lazy): Update.
9981         (value_next): Remove.
9982         (value_mark, value_free_to_mark, release_value)
9983         (value_release_to_mark): Update.
9984
9985 2018-04-06  Tom Tromey  <tom@tromey.com>
9986
9987         * value.h (fetch_subexp_value, value_release_to_mark): Update.
9988         (free_value_chain): Remove.
9989         * value.c (free_value_chain): Remove.
9990         (value_release_to_mark): Return a std::vector.
9991         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
9992         std::vector.
9993         (check_condition): Update.
9994         * eval.c (fetch_subexp_value): Change "val_chain" to a
9995         std::vector.
9996         * breakpoint.c (update_watchpoint): Update.
9997         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
9998
9999 2018-04-06  Tom Tromey  <tom@tromey.com>
10000
10001         * value.h (free_all_values): Remove.
10002         * value.c (free_all_values): Remove.
10003
10004 2018-04-06  Tom Tromey  <tom@tromey.com>
10005
10006         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
10007         (value_history_chain, value_history_count): Remove.
10008         (value_history): New global.
10009         (record_latest_value, access_value_history, show_values)
10010         (preserve_values): Update.
10011
10012 2018-04-06  Tom Tromey  <tom@tromey.com>
10013
10014         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
10015         * varobj.c (varobj_set_display_format, varobj_set_value)
10016         (install_default_visualizer, construct_visualizer)
10017         (install_new_value, ~varobj, varobj_get_value_type)
10018         (my_value_of_variable, varobj_editable_p): Update.
10019         * c-varobj.c (c_describe_child, c_value_of_variable)
10020         (cplus_number_of_children, cplus_describe_child): Update.
10021         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
10022         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
10023         (ada_value_of_variable, ada_value_is_changeable_p): Update.
10024
10025 2018-04-06  Tom Tromey  <tom@tromey.com>
10026
10027         * printcmd.c (last_examine_address): Change type to
10028         value_ref_ptr.
10029         (do_examine, x_command): Update.
10030
10031 2018-04-06  Tom Tromey  <tom@tromey.com>
10032
10033         * value.c (release_value): Update.
10034         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
10035         (struct bpstats) <val>: Now a value_ref_ptr.
10036         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
10037         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
10038         (~watchpoint, print_it_watchpoint, watch_command_1)
10039         (invalidate_bp_value_on_memory_change): Update.
10040
10041 2018-04-06  Tom Tromey  <tom@tromey.com>
10042
10043         * varobj.c (varobj_clear_saved_item)
10044         (update_dynamic_varobj_children, install_new_value, ~varobj):
10045         Update.
10046         * value.h (value_incref): Move declaration earlier.
10047         (value_decref): Rename from value_free.
10048         (struct value_ref_policy): New.
10049         (value_ref_ptr): New typedef.
10050         (struct value_deleter): Remove.
10051         (gdb_value_up): Remove typedef.
10052         (release_value): Change return type.
10053         (release_value_or_incref): Remove.
10054         * value.c (set_value_parent): Update.
10055         (value_incref): Change return type.
10056         (value_decref): Rename from value_free.
10057         (value_free_to_mark, free_all_values, free_value_chain): Update.
10058         (release_value): Return value_ref_ptr.
10059         (release_value_or_incref): Remove.
10060         (record_latest_value, set_internalvar, clear_internalvar):
10061         Update.
10062         * stack.c (info_frame_command): Don't call value_free.
10063         * python/py-value.c (valpy_dealloc, valpy_new)
10064         (value_to_value_object): Update.
10065         * printcmd.c (do_examine): Update.
10066         * opencl-lang.c (lval_func_free_closure): Update.
10067         * mi/mi-main.c (register_changed_p): Don't call value_free.
10068         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
10069         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
10070         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
10071         value_free.
10072         * guile/scm-value.c (vlscm_free_value_smob)
10073         (vlscm_scm_from_value): Update.
10074         * frame.c (frame_register_unwind, frame_unwind_register_signed)
10075         (frame_unwind_register_unsigned, get_frame_register_bytes)
10076         (put_frame_register_bytes): Don't call value_free.
10077         * findvar.c (address_from_register): Don't call value_free.
10078         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
10079         * dwarf2loc.c (entry_data_value_free_closure)
10080         (value_of_dwarf_reg_entry, free_pieced_value_closure)
10081         (dwarf2_evaluate_loc_desc_full): Update.
10082         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
10083         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
10084         (~watchpoint, watch_command_1)
10085         (invalidate_bp_value_on_memory_change): Update.
10086         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
10087
10088 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
10089
10090         PR gdb/23022
10091         * warning.m4: Add -Wno-error=deprecated-register.
10092         * configure: Re-generate.
10093
10094 2018-04-05  Tom Tromey  <tom@tromey.com>
10095
10096         * linespec.h: Remove include of "vec.h".
10097
10098 2018-04-05  Tom Tromey  <tom@tromey.com>
10099
10100         * linespec.c (typep): Remove typedef.
10101         (find_methods, find_superclass_methods): Take a std::vector.
10102         (find_method): Use std::vector.
10103
10104 2018-04-05  Tom Tromey  <tom@tromey.com>
10105
10106         * utils.c (compare_strings): Remove.
10107         * utils.h (compare_strings): Remove.
10108         * objc-lang.h (find_imps): Update.
10109         * objc-lang.c (find_methods): Take a std::vector.
10110         (uniquify_strings, find_imps): Likewise.
10111         * linespec.c (find_methods): Take a std::vector.
10112         (decode_objc): Use std::vector.
10113         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
10114         a std::vector.
10115         (find_method, find_function_symbols): Use std::vector.
10116
10117 2018-04-05  Tom Tromey  <tom@tromey.com>
10118
10119         * completer.c (completion_tracker::completion_tracker): Remove
10120         cast.
10121         (completion_tracker::discard_completions): Likewise.
10122         * breakpoint.c (ambiguous_names_p): Remove cast.
10123         * ada-lang.c (_initialize_ada_language): Remove cast.
10124         * utils.h (streq): Update.
10125         (streq_hash): Add new declaration.
10126         * utils.c (streq): Return bool.
10127         (streq_hash): New function.
10128
10129 2018-04-05  Tom Tromey  <tom@tromey.com>
10130
10131         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
10132         Remove a string copy.
10133
10134 2018-04-05  Tom Tromey  <tom@tromey.com>
10135
10136         * linespec.c (filter_results): Use std::vector.
10137         (decode_line_2, decode_line_full): Update.
10138
10139 2018-04-05  Tom Tromey  <tom@tromey.com>
10140
10141         * linespec.c (canonical_to_fullform): Return std::string.
10142         (filter_results): Update.
10143         (struct decode_line_2_item): Add constructor.
10144         <fullform, displayform>: Now std::string.
10145         (decode_line_2_compare_items): Now a std::sort comparator.
10146         (decode_line_2): Update.
10147
10148 2018-04-05  Tom Tromey  <tom@tromey.com>
10149
10150         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
10151         (unexpected_linespec_error): Update.
10152         (linespec_parse_basic, parse_linespec): Update.
10153
10154 2018-04-05  Tom Tromey  <tom@tromey.com>
10155
10156         * linespec.c (linespec_parse_basic): Reindent.
10157
10158 2018-04-05  Tom Tromey  <tom@tromey.com>
10159
10160         * minsyms.h (iterate_over_minimal_symbols): Update.
10161         * minsyms.c (iterate_over_minimal_symbols): Take a
10162         gdb::function_view.
10163         * linespec.c (struct collect_minsyms): Remove.
10164         (compare_msyms): Now a std::sort comparator.
10165         (add_minsym): Add parameters.
10166         (search_minsyms_for_name): Update.  Use std::vector.
10167
10168 2018-04-03  Tom Tromey  <tom@tromey.com>
10169
10170         * mipsread.c (read_alphacoff_dynamic_symtab): Use
10171         gdb::byte_vector.
10172
10173 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
10174
10175         * MAINTAINERS (Write After Approval): Add Weimin Pan.
10176
10177 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
10178
10179         PR gdb/16959
10180         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
10181         printing static type.
10182
10183 2018-04-01  Tom Tromey  <tom@tromey.com>
10184
10185         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
10186         (rs6000_xfer_shared_libraries): Update.
10187
10188 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
10189
10190         * common/gdb_vecs.h (char_ptr): Remove.
10191         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
10192
10193 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
10194
10195         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
10196         with std::vector.
10197         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
10198
10199 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
10200
10201         * tracepoint.h (struct uploaded_tp): Initialize fields.
10202         <actions, step_actions, cmd_strings>: Change type to
10203         std::vector<char *>.
10204         * tracepoint.c (get_uploaded_tp): Allocate with new.
10205         (free_uploaded_tps): Free with delete.
10206         (parse_tracepoint_definition): Adjust to std::vector change.
10207         * breakpoint.c (read_uploaded_action): Likewise.
10208         (create_tracepoint_from_upload): Likewise.
10209         * ctf.c (ctf_write_uploaded_tp): Likewise.
10210         (SET_ARRAY_FIELD): Likewise.
10211         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
10212
10213 2018-03-30  Tom Tromey  <tom@tromey.com>
10214
10215         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
10216         std::unique_ptr.
10217         (svr4_keep_data_in_core): Update.
10218         (svr4_read_so_list): Update.
10219
10220 2018-03-30  Tom Tromey  <tom@tromey.com>
10221
10222         * windows-nat.c (handle_output_debug_string, handle_exception):
10223         Update.
10224         * target.h (target_read_string): Update.
10225         * target.c (target_read_string): Change "string" to
10226         unique_xmalloc_ptr.
10227         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
10228         Update.
10229         * solib-frv.c (frv_current_sos): Update.
10230         * solib-dsbt.c (dsbt_current_sos): Update.
10231         * solib-darwin.c (darwin_current_sos): Update.
10232         * linux-thread-db.c (inferior_has_bug): Update.
10233         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
10234         Update.  Remove alloca.
10235         * ada-lang.c (ada_main_name): Update.
10236
10237 2018-03-30  Tom Tromey  <tom@tromey.com>
10238
10239         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
10240         (struct dwo_file_deleter): New.
10241         (dwo_file_up): New typedef.
10242         (open_and_init_dwo_file): Use dwo_file_up.
10243         (free_dwo_file_cleanup): Remove.
10244
10245 2018-03-30  Tom Tromey  <tom@tromey.com>
10246
10247         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
10248         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
10249
10250 2018-03-30  Tom Tromey  <tom@tromey.com>
10251
10252         * dwarf2read.c (class free_cached_comp_units): New class.
10253         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
10254         (free_cached_comp_units): Remove function.
10255
10256 2018-03-30  Tom Tromey  <tom@tromey.com>
10257
10258         * utils.h (make_cleanup_unpush_target): Remove.
10259         * inf-ptrace.c (struct target_unpusher): New.
10260         (target_unpush_up) New typedef.
10261         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
10262         target_unpush_up.
10263         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
10264
10265 2018-03-27  Tom Tromey  <tom@tromey.com>
10266
10267         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
10268
10269 2018-03-27  Pedro Alves  <palves@redhat.com>
10270             Tom Tromey  <tom@tromey.com>
10271
10272         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
10273         destructor.  Now a class.
10274         (gdb_readline_wrapper_cleanup): Remove function.
10275         (gdb_readline_wrapper): Remove cleanups.
10276
10277 2018-03-27  Tom Tromey  <tom@tromey.com>
10278
10279         * typeprint.h (struct type_print_options) <local_typedefs,
10280         global_typedefs>: Remove "struct" keyword.
10281         (class typedef_hash_table): New class.
10282         (recursively_update_typedef_hash, add_template_parameters)
10283         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
10284         (find_typedef_in_hash): Don't declare.
10285         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
10286         (typedef_hash_table::recursively_update): Rename from
10287         recursively_update_typedef_hash.  Now a member.
10288         (typedef_hash_table::add_template_parameters): Rename from
10289         add_template_parameters.  Now a member.
10290         (typedef_hash_table::typedef_hash_table): Now a constructor;
10291         rename from create_typedef_hash.
10292         (typedef_hash_table::~typedef_hash_table): Now a destructor;
10293         rename from free_typedef_hash.
10294         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
10295         (do_free_global_table): Remove.
10296         (typedef_hash_table::typedef_hash_table): New constructor; renamed
10297         from copy_type_recursive.
10298         (create_global_typedef_table): Remove.
10299         (typedef_hash_table::find_global_typedef): Now a member of
10300         typedef_hash_table.
10301         (typedef_hash_table::find_typedef): Rename from
10302         find_typedef_in_hash; now a member.
10303         (whatis_exp): Update.
10304         * extension.h (struct ext_lang_type_printers): Add constructor and
10305         destructor.
10306         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
10307         declare.
10308         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
10309         Now a constructor; rename from start_ext_lang_type_printers.
10310         (ext_lang_type_printers): Now a destructor; rename from
10311         free_ext_lang_type_printers.
10312         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
10313         Update.
10314         (c_type_print_base_struct_union): Update.  Remove cleanups.
10315
10316 2018-03-27  Tom Tromey  <tom@tromey.com>
10317
10318         * dwarf-index-write.c: Include <cmath>.
10319
10320 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
10321
10322         * NEWS: Add entry describing new "set|show varsize-limit" command.
10323         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
10324         command.
10325         * printcmd.c (_initialize_printcmd): Add "set var" alias of
10326         "set variable".
10327
10328 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
10329
10330         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
10331         dwarf-index-write.c
10332         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
10333         * dwarf-index-common.c: New file.
10334         * dwarf-index-common.h: New file.
10335         * dwarf-index-write.c: New file.
10336         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
10337         (struct dwarf2_section_info): Move from here.
10338         (dwarf2_section_info_def): Likewise.
10339         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
10340         (offset_type): Likewise.
10341         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
10342         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
10343         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
10344         (byte_swap): Likewise.
10345         (MAYBE_SWAP): Likewise.
10346         (dwarf2_per_cu_ptr): Likewise.
10347         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
10348         (struct tu_stats): Likewise.
10349         (struct dwarf2_per_objfile): Likewise.
10350         (struct dwarf2_per_cu_data): Likewise.
10351         (struct signatured_type): Likewise.
10352         (sig_type_ptr): Likewise.
10353         (DEF_VEC_P (sig_type_ptr)): Likewise.
10354         (INDEX4_SUFFIX): Likewise.
10355         (INDEX5_SUFFIX): Likewise.
10356         (DEBUG_STR_SUFFIX): Likewise.
10357         (dwarf2_read_section): Make non-static.
10358         (mapped_index_string_hash): Move from here.
10359         (dwarf5_djb_hash): Likewise.
10360         (file_write): Likewise.
10361         (class data_buf): Likewise.
10362         (struct symtab_index_entry): Likewise.
10363         (struct mapped_symtab): Likewise.
10364         (find_slot): Likewise.
10365         (hash_expand): Likewise.
10366         (add_index_entry): Likewise.
10367         (uniquify_cu_indices): Likewise.
10368         (class c_str_view): Likewise.
10369         (class c_str_view_hasher): Likewise.
10370         (class vector_hasher): Likewise.
10371         (write_hash_table): Likewise.
10372         (psym_index_map): Likewise.
10373         (struct addrmap_index_data): Likewise.
10374         (add_address_entry): Likewise.
10375         (add_address_entry_worker): Likewise.
10376         (write_address_map): Likewise.
10377         (symbol_kind): Likewise.
10378         (write_psymbols): Likewise.
10379         (struct signatured_type_index_data): Likewise.
10380         (write_one_signatured_type): Likewise.
10381         (recursively_count_psymbols): Likewise.
10382         (recursively_write_psymbols): Likewise.
10383         (class debug_names): Likewise.
10384         (check_dwarf64_offsets): Likewise.
10385         (psyms_seen_size): Likewise.
10386         (write_gdbindex): Likewise.
10387         (write_debug_names): Likewise.
10388         (assert_file_size): Likewise.
10389         (write_psymtabs_to_index): Likewise.
10390         (save_gdb_index_command): Likewise.
10391         (_initialize_dwarf2_read): Don't register the "save gdb-index"
10392         command.
10393         * dwarf2read.h: New file.
10394
10395 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
10396
10397         PR gdb/22670
10398         * dwarf2read.c (dwarf2_physname): Do not return the demangled
10399         symbol name if the CU's language stores symbol names in linkage
10400         format.
10401         * language.h (struct language_defn)
10402         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
10403         all instances of this struct.
10404
10405 2018-03-26  Tom Tromey  <tom@tromey.com>
10406
10407         * stack.c (backtrace_command_1): Remove verbose code.
10408
10409 2018-03-26  Tom Tromey  <tom@tromey.com>
10410
10411         * python/py-framefilter.c (py_print_type): Don't catch
10412         exceptions.  Return void.
10413         (py_print_value): Likewise.
10414         (py_print_single_arg): Likewise.
10415         (enumerate_args): Don't catch exceptions.
10416         (py_print_args): Likewise.
10417         (py_print_frame): Likewise.
10418         (gdbpy_apply_frame_filter): Catch exceptions here.
10419
10420 2018-03-26  Tom Tromey  <tom@tromey.com>
10421
10422         * stack.c (_initialize_stack): Remove trailing newlines from help
10423         text.  Add "Usage" line to "backtrace" help.
10424
10425 2018-03-26  Tom Tromey  <tom@tromey.com>
10426
10427         PR python/16486:
10428         * python/py-framefilter.c (py_print_args): Call wrap_hint.
10429
10430 2018-03-26  Tom Tromey  <tom@tromey.com>
10431
10432         * python/py-framefilter.c (py_print_single_arg): Return
10433         EXT_LANG_BT_ERROR from catch.
10434
10435 2018-03-26  Tom Tromey  <tom@tromey.com>
10436
10437         PR backtrace/15584:
10438         * stack.c (backtrace_command_1): Move some code into no-filters
10439         "if".
10440
10441 2018-03-26  Tom Tromey  <tom@tromey.com>
10442
10443         * python/py-framefilter.c (throw_quit_or_print_exception): New
10444         function.
10445         (gdbpy_apply_frame_filter): Use it.
10446
10447 2018-03-26  Tom Tromey  <tom@tromey.com>
10448
10449         PR cli/17716:
10450         * python/py-framefilter.c (py_print_type, py_print_value)
10451         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
10452         RETURN_MASK_ERROR.
10453
10454 2018-03-26  Tom Tromey  <tom@tromey.com>
10455
10456         * python/py-framefilter.c (enumerate_args): Use
10457         gdb::unique_xmalloc_ptr.
10458
10459 2018-03-26  Tom Tromey  <tom@tromey.com>
10460
10461         * python/py-framefilter.c (py_print_frame): Return
10462         EXT_LANG_BT_OK.
10463         (gdbpy_apply_frame_filter): Update comment.
10464         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
10465         Remove.
10466         <EXT_LANG_BT_NO_FILTERS>: Change value.
10467
10468 2018-03-26  Tom Tromey  <tom@tromey.com>
10469
10470         PR backtrace/15582:
10471         * stack.c (backtrace_command): Parse "hide" argument.
10472         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
10473         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
10474         constant.
10475
10476 2018-03-26  Tom Tromey  <tom@tromey.com>
10477
10478         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
10479         add "flags".
10480         (backtrace_command): Remove "fulltrace", add "flags".
10481
10482 2018-03-26  Tom Tromey  <tom@tromey.com>
10483
10484         * stack.c (backtrace_command): Rewrite command line parsing.
10485
10486 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
10487
10488         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
10489
10490 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
10491
10492         * filename-seen-cache.h: Add include guard.
10493
10494 2018-03-26  Keith Seitz  <keiths@redhat.com>
10495
10496         * symfile.c (place_section): Remove "struct" from section_addr_info
10497         in comment.
10498         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
10499         "struct" keyword from section_addr_info.
10500
10501 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
10502
10503         * regformats/regdef.h (reg): Add constructors.
10504
10505 2018-03-25  Pedro Alves  <palves@redhat.com>
10506
10507         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
10508         if then/else bodies in var_func_name extraction.
10509
10510 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
10511
10512         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
10513         lookup_minimal_symbol() to find symbol entry.
10514         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
10515
10516 2018-03-23  Keith Seitz  <keiths@redhat.com>
10517
10518         PR c++/22968
10519         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
10520         nested type definitions for C++, too.
10521
10522 2018-03-23  Tom Tromey  <tom@tromey.com>
10523
10524         * machoread.c (struct oso_el): Add a constructor.  Don't define as
10525         a typedef.
10526         (macho_register_oso): Remove.
10527         (macho_symtab_read): Take a std::vector.
10528         (oso_el_compare_name): Now a std::sort comparator.
10529         (macho_symfile_read_all_oso): Take a std::vector.
10530         (macho_symfile_read): Use std::vector.  Remove cleanups.
10531
10532 2018-03-22  Tom Tromey  <tom@tromey.com>
10533
10534         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
10535         (record_full_goto_bookmark): Use std::string.
10536
10537 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
10538
10539         PR tdep/18295
10540         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
10541         a single mask.
10542
10543 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
10544
10545         * rs6000-tdep.c (store_insn_p): New function.
10546         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
10547         and cr_reg to their unshifted values. Use store_insn_p to
10548         match LR saves using either R1 or fdata->alloca_reg. Use
10549         store_insn_p to match CR saves. Set alloca_reg_offset
10550         when alloca_reg and framep are set. Remove lr_reg shift
10551         when assigning to fdata->lr_register.
10552
10553 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10554
10555         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
10556         command line args instead of emitting a warning.
10557
10558 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
10559
10560         * tracepoint.h (struct static_tracepoint_marker): Initialize
10561         fields, define default constructor, move constructor and move
10562         assignment, disable the rest.
10563         <str_id, extra>: Make std::string.
10564         (release_static_tracepoint_marker): Remove.
10565         (free_current_marker): Remove.
10566         * tracepoint.c (free_current_marker): Remove.
10567         (parse_static_tracepoint_marker_definition): Adjust to
10568         std::string, use new hex2str overload.
10569         (release_static_tracepoint_marker): Remove.
10570         (print_one_static_tracepoint_marker): Get marker by reference
10571         and adjust to std::string.
10572         (info_static_tracepoint_markers_command): Adjust to std::vector
10573         changes
10574         * target.h (static_tracepoint_marker_p): Remove typedef.
10575         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
10576         (struct target_ops) <to_static_tracepoint_marker_at>: Return
10577         bool.
10578         <to_static_tracepoint_markers_by_strid>: Return std::vector.
10579         * target-debug.h
10580         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
10581         (target_debug_print_std_vector_static_tracepoint_marker): New.
10582         (target_debug_print_struct_static_tracepoint_marker_p): Rename
10583         to...
10584         (target_debug_print_static_tracepoint_marker_p): ... this.
10585         * target-delegates.c: Re-generate.
10586         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
10587         Make std::string.
10588         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
10589         (decode_static_tracepoint_spec): Adjust to std::vector.
10590         (tracepoint_print_one_detail): Adjust to std::string.
10591         (strace_marker_decode_location): Adjust to std::string.
10592         (update_static_tracepoint): Adjust to std::string, remove call
10593         to release_static_tracepoint_marker.
10594         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
10595         Adjust to std::vector.
10596         * remote.c (remote_static_tracepoint_marker_at): Return bool.
10597         (remote_static_tracepoint_markers_by_strid): Adjust to
10598         std::vector.
10599         * common/rsp-low.h (hex2str): New overload with explicit count
10600         of bytes.
10601         * common/rsp-low.c (hex2str): New overload with explicit count
10602         of bytes.
10603         * unittests/rsp-low-selftests.c (test_hex2str): New function.
10604         (_initialize_rsp_low_selftests): Add test_hex2str test.
10605         * unittests/tracepoint-selftests.c
10606         (test_parse_static_tracepoint_marker_definition): Adjust to
10607         std::string.
10608
10609 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
10610
10611         * tracepoint.c (parse_static_tracepoint_marker_definition):
10612         Consider case where the definition is followed by more
10613         definitions.
10614         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10615         tracepoint-selftests.c.
10616         * unittests/tracepoint-selftests.c: New.
10617
10618 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
10619
10620         * MAINTAINERS (Write After Approval): Add Pedro Franco de
10621         Carvalho.
10622
10623 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
10624
10625         * symtab.c (find_pc_sect_line): fixed indentation.
10626
10627 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
10628
10629         * symtab.c (find_pc_sect_line): now uses binary search.
10630
10631 2018-03-19  Tom Tromey  <tom@tromey.com>
10632
10633         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
10634         "IDENT" production.
10635
10636 2018-03-19  Pedro Alves  <palves@redhat.com>
10637             Tom Tromey  <tom@tromey.com>
10638
10639         * unittests/observable-selftests.c: New file.
10640         * common/observable.h: New file.
10641         * observable.h: New file.
10642         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
10643         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
10644         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
10645         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
10646         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
10647         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
10648         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
10649         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
10650         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
10651         python/py-breakpoint.c, python/py-finishbreakpoint.c,
10652         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
10653         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
10654         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
10655         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
10656         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
10657         tui/tui-interp.c, valops.c: Update all users.
10658         * tui/tui-hooks.c (tui_bp_created_observer)
10659         (tui_bp_deleted_observer, tui_bp_modified_observer)
10660         (tui_inferior_exit_observer, tui_before_prompt_observer)
10661         (tui_normal_stop_observer, tui_register_changed_observer):
10662         Remove.
10663         (tui_observers_token): New global.
10664         (attach_or_detach, tui_attach_detach_observers): New functions.
10665         (tui_install_hooks, tui_remove_hooks): Use
10666         tui_attach_detach_observers.
10667         * record-btrace.c (record_btrace_thread_observer): Remove.
10668         (record_btrace_thread_observer_token): New global.
10669         * observer.sh: Remove.
10670         * observer.c: Rename to observable.c.
10671         * observable.c (namespace gdb_observers): Define new objects.
10672         (observer_debug): Move into gdb_observers namespace.
10673         (struct observer, struct observer_list, xalloc_observer_list_node)
10674         (xfree_observer_list_node, generic_observer_attach)
10675         (generic_observer_detach, generic_observer_notify): Remove.
10676         (_initialize_observer): Update.
10677         Don't include observer.inc.
10678         * Makefile.in (generated_files): Remove observer.h, observer.inc.
10679         (clean mostlyclean): Likewise.
10680         (observer.h, observer.inc): Remove targets.
10681         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
10682         (COMMON_SFILES): Use observable.c, not observer.c.
10683         * .gitignore: Remove observer.h.
10684
10685 2018-03-18  Tom Tromey  <tom@tromey.com>
10686
10687         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
10688         gdb::def_vector.
10689         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
10690
10691 2018-03-17  Tom Tromey  <tom@tromey.com>
10692
10693         * auto-load.c (auto_load_objfile_script_1): Use std::string.
10694
10695 2018-03-17  Tom Tromey  <tom@tromey.com>
10696
10697         * target.c (class scoped_target_fd): New.
10698         (target_fileio_close_cleanup): Remove.
10699         (target_fileio_read_alloc_1): Use scoped_target_fd.
10700
10701 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
10702
10703         * silent-rules.mk: New.
10704         * Makefile.in: Include silent-rules.mk
10705         (srcdir, VPATH, top_srcdir): Move up.
10706         (COMPILE): Add ECHO_CXX.
10707         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
10708         (init.c): Add ECHO_INIT_C.
10709         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
10710         (version.c): Add ECHO_GEN.
10711         (printcmd.o): Add ECHO_CXX.
10712         (target-float.o): Add ECHO_CXX.
10713         (ada-exp.o): Add ECHO_CXX.
10714         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
10715         (insight$(EXEEXT)): Add ECHO_CXXLD.
10716         * gnulib/configure.ac: Add AM_SILENT_RULES.
10717         * gnulib/aclocal.m4: Re-generate.
10718         * gnulib/configure: Re-generate.
10719         * gnulib/import/Makefile.in: Re-generate.
10720
10721 2018-03-16  Tom Tromey  <tom@tromey.com>
10722
10723         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
10724         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
10725         * utils.c (do_free_section_addr_info)
10726         (make_cleanup_free_section_addr_info): Remove.
10727         * symfile.h (struct other_sections): Add constructor.
10728         (struct section_addr_info): Remove.
10729         (section_addr_info): New typedef.
10730         (struct sym_fns) <sym_offsets>: Change type of parameter.
10731         (build_section_addr_info_from_objfile)
10732         (relative_addr_info_to_section_offsets, addr_info_make_relative)
10733         (default_symfile_offsets, symbol_file_add)
10734         (symbol_file_add_from_bfd)
10735         (build_section_addr_info_from_section_table): Update.
10736         (alloc_section_addr_info, free_section_addr_info): Don't declare.
10737         * symfile.c (alloc_section_addr_info): Remove.
10738         (build_section_addr_info_from_section_table): Change return type.
10739         Update.
10740         (build_section_addr_info_from_bfd)
10741         (build_section_addr_info_from_objfile): Likewise.
10742         (free_section_addr_info): Remove.
10743         (relative_addr_info_to_section_offsets): Change type of "addrs".
10744         (addrs_section_compar): Now a std::sort comparator.
10745         (addrs_section_sort): Change return type.
10746         (addr_info_make_relative): Change type of "addrs".  Update.
10747         (default_symfile_offsets, syms_from_objfile_1)
10748         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
10749         (symbol_file_add_separate): Update.
10750         (symbol_file_add): Change type of "addrs".  Update.
10751         (add_symbol_file_command): Update.  Remove cleanups.
10752         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
10753         cleanups.
10754         * symfile-debug.c (debug_sym_offsets): Change type of "info".
10755         * solib.c (solib_read_symbols): Update.
10756         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
10757         * machoread.c (macho_symfile_offsets): Update.
10758         * jit.c (jit_bfd_try_read_symtab): Update.
10759
10760 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
10761
10762         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10763         unittests/utils-selftests.c.
10764         * unittests/utils-selftests.c: New file.
10765
10766 2018-03-14  Tom Tromey  <tom@tromey.com>
10767
10768         PR cli/14977:
10769         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
10770         for NULL.
10771
10772 2018-03-14  Tom Tromey  <tom@tromey.com>
10773
10774         PR cli/19918:
10775         * printcmd.c (printf_pointer): Allow "-" in format.
10776
10777 2018-03-14  Tom Tromey  <tom@tromey.com>
10778
10779         * printcmd.c (_initialize_printcmd): Add usage to printf.
10780
10781 2018-03-14  Yao Qi  <qiyao@sourceware.org>
10782
10783         * MAINTAINERS: Update my email address.
10784
10785 2018-03-13  Tom Tromey  <tom@tromey.com>
10786
10787         * machoread.c (macho_check_dsym): Change filenamep to a
10788         std::string*.
10789         (macho_symfile_read): Update.
10790         * symfile.c (load_command): Use std::string.
10791
10792 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
10793
10794         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
10795         to error message string.
10796         (riscv_register_name): Use xsnprintf instead of sprintf.
10797         (riscv_insn::fetch_instruction): Use gdb_assert instead of
10798         internal_error.
10799         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
10800         error.
10801         (riscv_push_dummy_call): Likewise.
10802
10803 2018-03-12  Tom Tromey  <tom@tromey.com>
10804
10805         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
10806         Use gdb::byte_vector.
10807         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
10808
10809 2018-03-12  Yao Qi  <yao.qi@linaro.org>
10810
10811         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
10812         parameter type to readable_regcache.
10813         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
10814         the declaration.
10815
10816 2018-03-11  Tom Tromey  <tom@tromey.com>
10817
10818         * dwarf2read.c (struct nextfield): Add initializers.
10819         (struct nextfnfield): Remove.
10820         (struct fnfieldlist): Add initializers.  Remove "length" and
10821         "head", use std::vector.
10822         (struct decl_field_list): Remove.
10823         (struct field_info): Add initializers.
10824         <fields, baseclasses>: Now std::vector.
10825         <nbaseclasses, nfnfields, typedef_field_list_count,
10826         nested_types_list_count>: Remove.
10827         (dwarf2_add_field, dwarf2_add_type_defn)
10828         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
10829         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
10830         (process_structure_scope): Update.
10831
10832 2018-03-11  Tom Tromey  <tom@tromey.com>
10833
10834         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
10835         for use by std::sort.
10836         (build_type_psymtabs_1): Use std::vector.
10837
10838 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
10839
10840         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
10841         and LIBMPFR in the printed configuration.
10842
10843 2018-03-08  Tom Tromey  <tom@tromey.com>
10844
10845         * source.c (get_filename_and_charpos): Use scoped_fd.
10846         * nto-procfs.c (procfs_open_1): Use scoped_fd.
10847         (procfs_pidlist): Likewise.
10848         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
10849         (iterate_over_mappings): Likewise.
10850
10851 2018-03-08  Tom Tromey  <tom@tromey.com>
10852
10853         * infcall.c (struct call_return_meta_info)
10854         <stack_temporaries_enabled>: Remove.
10855         (get_call_return_value, call_function_by_hand_dummy): Update.
10856         * thread.c (disable_thread_stack_temporaries): Remove.
10857         (enable_thread_stack_temporaries): Remove.
10858         (thread_stack_temporaries_enabled_p): Return bool.
10859         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
10860         (get_last_thread_stack_temporary): Update.
10861         * eval.c (evaluate_subexp): Update.
10862         * gdbthread.h (class enable_thread_stack_temporaries): Now a
10863         class, not a function.
10864         (value_ptr, value_vec): Remove typedefs.
10865         (class thread_info) <stack_temporaries_enabled>: Now bool.
10866         <stack_temporaries>: Now a std::vector.
10867         (thread_stack_temporaries_enabled_p)
10868         (value_in_thread_stack_temporaries): Return bool.
10869
10870 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
10871
10872         * remote.c (putpkt_binary): Fix omitted bytes reporting.
10873         (getpkt_or_notif_sane_1): Likewise.
10874
10875 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
10876
10877         * build-id.c (build_id_to_debug_bfd): Use std::string.
10878
10879 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
10880
10881         * build-id.c (find_separate_debug_file_by_buildid): Return
10882         std::string.
10883         * build-id.h (find_separate_debug_file_by_buildid): Return
10884         std::string.
10885         * coffread.c (coff_symfile_read): Adjust to std::string.
10886         * elfread.c (elf_symfile_read): Adjust to std::string.
10887         * symfile.c (separate_debug_file_exists): Change parameter to
10888         std::string.
10889         (find_separate_debug_file): Return std::string.
10890         (find_separate_debug_file_by_debuglink): Return std::string.
10891         * symfile.h (find_separate_debug_file_by_debuglink): Return
10892         std::string.
10893
10894 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
10895
10896         * common/xml-utils.c (xml_escape_text): Move code to...
10897         (xml_escape_text_append): ... this new function.
10898         * common/xml-utils.h (xml_escape_text_append): New declaration.
10899         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
10900         New function.
10901         (_initialize_xml_utils): register test_xml_escape_text_append as
10902         a selftest.
10903
10904 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
10905
10906         * defs.h: Remove MAX_REGISTER_SIZE.
10907         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
10908         asserts.
10909         * python/py-unwind.c (pyuw_sniffer): Likewise.
10910
10911 2018-03-07  Tom Tromey  <tom@tromey.com>
10912
10913         * linux-tdep.c (linux_info_proc): Update.
10914         * target.h (struct target_ops) <to_fileio_readlink>: Return
10915         optional<string>.
10916         (target_fileio_readlink): Return optional<string>.
10917         * remote.c (remote_hostio_readlink): Return optional<string>.
10918         * inf-child.c (inf_child_fileio_readlink): Return
10919         optional<string>.
10920         * target.c (target_fileio_readlink): Return optional<string>.
10921
10922 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
10923
10924         * regcache.c (cooked_read_test): Add riscv to the list of
10925         architectures that have a save_reggroup.
10926
10927 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10928
10929         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
10930         value is not a dynamic class object.
10931
10932 2018-03-06  Tom Tromey  <tom@tromey.com>
10933
10934         * rust-exp.y: Formatting fixes.
10935
10936 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10937
10938         * riscv-tdep.c (riscv_register_name): Remove target description
10939         support.
10940         (riscv_gdbarch_init): Remove target description check.
10941
10942 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10943
10944         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
10945         comment.
10946         * riscv-tdep.h: Likewise.
10947
10948 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10949
10950         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
10951         (riscv_pseudo_register_write): Delete.
10952         (riscv_gdbarch_init): Remove all use of pseudo registers.
10953
10954 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
10955
10956         * record-btrace.c (btrace_print_lines): Replace cleanup
10957         parameter with RAII equivalents.
10958         (btrace_insn_history): Replace cleanup with RAII equivalents.
10959         * ui-out.h (make_cleanup_ui_out_list_begin_end,
10960         make_cleanup_ui_out_tuple_begin_end): Remove.
10961         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
10962         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
10963         make_cleanup_ui_out_list_begin_end): Remove.
10964
10965 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
10966
10967         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
10968         parameter types to std::vector.  Use bool.
10969         (record_btrace_wait): Replace VEC(tp_t) with
10970         std::vector<thread_info *>.
10971         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
10972
10973 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
10974
10975         * record-btrace.c (record_btrace_disable_callback): Remove.
10976         (struct scoped_btrace_disable): New.
10977         (record_btrace_open): Use scoped_btrace_disable.
10978
10979 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10980
10981         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
10982         reading values from registers.
10983
10984 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10985
10986         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
10987         where appropriate.
10988
10989 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10990
10991         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
10992         change parameter type.  Use GDB's print functions, and use
10993         core_addr_to_string where appropriate.
10994         (riscv_push_dummy_call): Use core_addr_to_string where
10995         appropriate, update call to riscv_print_arg_location, and reindent
10996         a few lines.
10997         (riscv_return_value): Update call to riscv_print_arg_location.
10998
10999 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11000             Tim Newsome <tim@sifive.com>
11001             Albert Ou <a0u@eecs.berkeley.edu>
11002             Darius Rad <darius@bluespec.com>
11003
11004         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
11005         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
11006         (ALLDEPFILES): Add riscv-tdep.c
11007         * configure.tgt: Add riscv support.
11008         * riscv-tdep.c: New file.
11009         * riscv-tdep.h: New file.
11010         * NEWS: Mention new target.
11011         * MAINTAINERS: Add entry for riscv.
11012
11013 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11014
11015         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
11016         fields within aggregates.
11017
11018 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
11019
11020         * record-btrace.c (btrace_print_lines): Change type of flags to
11021         gdb_disassembly_flags.
11022
11023 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
11024
11025         * fbsd-nat.c: Include "inf-ptrace.h".
11026         (USE_SIGTRAP_SIGINFO): Conditionally define.
11027         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
11028         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
11029         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
11030         function.
11031         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
11032         Likewise.
11033         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
11034         Likewise.
11035         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
11036         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
11037         "supports_stopped_by_hw_breakpoint" target methods.
11038
11039 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
11040
11041         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
11042         * fbsd-nat.c (debug_fbsd_nat): New variable.
11043         (show_fbsd_nat_debug): New function.
11044         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
11045         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
11046
11047 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
11048
11049         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
11050         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
11051         prototype.
11052         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
11053         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
11054         method.
11055
11056 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
11057
11058         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
11059         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
11060
11061 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
11062
11063         * charset.c (struct charset_vector): New.
11064         (charsets): Change type to charset_vector.
11065         (find_charset_names): Adjust.
11066         (add_one): Adjust.
11067         (_initialize_charset): Adjust.
11068
11069 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
11070
11071         * progspace.h (struct program_space) <deleted_solibs>: Change
11072         type to std::vector<std::string>.
11073         * progspace.c (clear_program_space_solib_cache): Adjust.
11074         * breakpoint.c (print_solib_event): Adjust.
11075         (check_status_catch_solib): Adjust.
11076         * solib.c (update_solib_list): Adjust.
11077         * ui-out.h (class ui_out) <field_string>: New overload.
11078         * ui-out.c (ui_out::field_string): New overload.
11079
11080 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
11081
11082         * progspace.h (struct program_space): Add constructor and
11083         destructor, initialize fields.
11084         (add_program_space): Remove.
11085         * progspace.c (add_program_space): Rename to...
11086         (program_space::program_space): ... this.
11087         (release_program_space): Rename to...
11088         (program_space::~program_space): ... this.
11089         (delete_program_space): Use delete to delete program_space.
11090         (initialize_progspace): Use new to allocate program_space.
11091         * inferior.c (add_inferior_with_spaces): Likewise.
11092         (clone_inferior_command): Likewise.
11093         * infrun.c (follow_fork_inferior): Likewise.
11094         (handle_vfork_child_exec_or_exit): Likewise.
11095
11096 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
11097
11098         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
11099         (delim_string_to_char_ptr_vec): Return std::vector of
11100         gdb::unique_xmalloc_ptr.
11101         (dirnames_to_char_ptr_vec_append): Take std::vector of
11102         gdb::unique_xmalloc_ptr.
11103         (dirnames_to_char_ptr_vec): Return std::vector of
11104         gdb::unique_xmalloc_ptr.
11105         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
11106         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
11107         (delim_string_to_char_ptr_vec): Return an std::vector of
11108         gdb::unique_xmalloc_ptr, adjust the code.
11109         (dirnames_to_char_ptr_vec_append): Take an std::vector of
11110         gdb::unique_xmalloc_ptr, adjust the code.
11111         (dirnames_to_char_ptr_vec): Return an std::vector of
11112         gdb::unique_xmalloc_ptr, adjust the code.
11113         * auto-load.c (auto_load_safe_path_vec): Change type to
11114         std::vector of gdb::unique_xmalloc_ptr.
11115         (auto_load_expand_dir_vars): Return an std::vector of
11116         gdb::unique_xmalloc_ptr, adjust the code.
11117         (auto_load_safe_path_vec_update): Adjust.
11118         (filename_is_in_auto_load_safe_path_vec): Adjust.
11119         (auto_load_objfile_script_1): Adjust.
11120         * build-id.c (build_id_to_debug_bfd): Adjust.
11121         * linux-thread-db.c (thread_db_load_search): Adjust.
11122         * source.c (add_path): Adjust.
11123         (openp): Adjust.
11124         * symfile.c (find_separate_debug_file): Adjust.
11125         * utils.c (do_free_char_ptr_vec): Remove.
11126         (make_cleanup_free_char_ptr_vec): Remove.
11127
11128 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
11129
11130         PR gdb/22907
11131         * common/pathstuff.c: Conditionally include "<windows.h>".
11132
11133 2018-03-01  Georg Sauthoff  <mail@georg.so>
11134
11135         PR gdb/22888
11136         * gcore.in: Quote variables and switch interpreter to bash.
11137
11138 2018-03-01  Tom Tromey  <tom@tromey.com>
11139
11140         * dwarf2read.c (alloc_discriminant_info): Fix default_index
11141         assertion.  Add assertion for discriminant_index.
11142         (quirk_rust_enum): Use correct base type name in univariant case.
11143
11144 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
11145
11146         * record.c (get_call_history_modifiers): Return a
11147         record_print_flags.
11148         (cmd_record_call_history): Adjust.
11149         * record-btrace.c (record_btrace_call_history): Adjust.
11150         (record_btrace_call_history_range): Adjust.
11151         (record_btrace_call_history_from): Adjust.
11152         * target-debug.h (target_debug_print_record_print_flags): New.
11153         * target-delegates.c: Re-generate.
11154         * target.c (target_call_history): Change flags type.
11155         (target_call_history_from): Likewise.
11156         (target_call_history_range): Likewise.
11157         * target.h (struct target_ops) <target_call_history>: Likewise.
11158         (target_call_history_from): Likewise.
11159         (target_call_history_range): Likewise.
11160
11161 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
11162             Simon Marchi  <simon.marchi@polymtl.ca>
11163
11164         * common/common-utils.c: Include "sys/stat.h".
11165         (is_regular_file): Move here from "source.c"; change return
11166         type to "bool".
11167         * common/common-utils.h (is_regular_file): New prototype.
11168         * common/pathstuff.c (contains_dir_separator): New function.
11169         * common/pathstuff.h (contains_dir_separator): New prototype.
11170         * source.c: Don't include "sys/stat.h".
11171         (is_regular_file): Move to "common/common-utils.c".
11172
11173 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
11174
11175         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
11176         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
11177         * auto-load.c: Include "common/pathstuff.h".
11178         * common/common-def.h (current_directory): Move here.
11179         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
11180         function.
11181         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
11182         prototype.
11183         * common/pathstuff.c: New file.
11184         * common/pathstuff.h: New file.
11185         * compile/compile.c: Include "common/pathstuff.h".
11186         * defs.h (current_directory): Move to "common/common-defs.h".
11187         * dwarf2read.c: Include "common/pathstuff.h".
11188         * exec.c: Likewise.
11189         * guile/scm-safe-call.c: Likewise.
11190         * linux-thread-db.c: Likewise.
11191         * main.c: Likewise.
11192         * nto-tdep.c: Likewise.
11193         * objfiles.c: Likewise.
11194         * source.c: Likewise.
11195         * symtab.c: Likewise.
11196         * utils.c: Include "common/pathstuff.h".
11197         (gdb_realpath): Move to "common/pathstuff.c".
11198         (gdb_realpath_keepfile): Likewise.
11199         (gdb_abspath): Likewise.
11200         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
11201         (gdb_realpath_keepfile): Likewise.
11202         (gdb_abspath): Likewise.
11203
11204 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
11205
11206         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
11207         wildcard process pid for super_resume for kernels with a
11208         specific bug.
11209
11210 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
11211
11212         * compile/compile.c (get_args): Add additional comments
11213         explaining function.
11214
11215 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
11216             Tom Tromey  <tom@tromey.com>
11217
11218         * target.h (memory_write_request_s): Remove typedef.  Don't define
11219         VEC.
11220         (target_write_memory_blocks): Change argument to std::vector.
11221         (struct memory_write_request): Add constructor.
11222         * target-memory.c (compare_block_starting_address): Return bool.
11223         Change argument types.
11224         (claim_memory): Change arguments to use std::vector.
11225         (split_regular_and_flash_blocks, blocks_to_erase)
11226         (compute_garbled_blocks): Likewise.
11227         (cleanup_request_data, cleanup_write_requests_vector): Remove.
11228         (target_write_memory_blocks): Change argument to std::vector.
11229         * symfile.c (struct load_section_data): Add constructor and
11230         destructor.  Use std::vector for "requests".
11231         (struct load_progress_data): Add initializers.
11232         (load_section_callback): Update.  Use "new".
11233         (clear_memory_write_data): Remove.
11234         (generic_load): Update.
11235
11236 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
11237
11238         * arch/aarch64.h: Use common/tdesc.h.
11239
11240 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
11241
11242         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
11243         architecture with a 64-bit ABI.
11244
11245 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
11246
11247         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
11248         ahead of target description loading.
11249
11250 2018-02-26  Tom Tromey  <tom@tromey.com>
11251
11252         * stack.c (backtrace_command_1): Update.
11253         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
11254         of "flags".
11255         * python/py-framefilter.c (py_print_frame)
11256         (gdbpy_apply_frame_filter): Change type of "flags".
11257         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
11258         of "flags".
11259         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
11260         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
11261         * extension.h (enum frame_filter_flag): Rename from
11262         frame_filter_flags.
11263         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
11264         (apply_ext_lang_frame_filter): Change type of "flags".
11265         * extension.c (apply_ext_lang_frame_filter): Change type of
11266         "flags".
11267         * extension-priv.h (struct extension_language_ops)
11268         <apply_frame_filter>: Change type of "flags".
11269
11270 2018-02-26  Tom Tromey  <tom@tromey.com>
11271
11272         PR python/16497:
11273         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
11274         off-by-one in py_end computation.
11275         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
11276         PRINT_MORE_FRAMES.
11277         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
11278         constant.
11279
11280 2018-02-26  Tom Tromey  <tom@tromey.com>
11281
11282         * dwarf2read.c (struct variant_field): New.
11283         (struct nextfield) <variant>: New field.
11284         (dwarf2_add_field): Handle DW_TAG_variant_part.
11285         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
11286         discriminated union.
11287         (read_structure_type): Handle DW_TAG_variant_part.
11288         (handle_struct_member_die): New function, extracted from
11289         process_structure_scope.  Handle DW_TAG_variant.
11290         (process_structure_scope): Handle discriminated unions.  Call
11291         handle_struct_member_die.
11292
11293 2018-02-26  Tom Tromey  <tom@tromey.com>
11294
11295         * rust-lang.h (rust_last_path_segment): Declare.
11296         * rust-lang.c (rust_last_path_segment): Now public.  Change
11297         contract.
11298         (struct disr_info): Remove.
11299         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
11300         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
11301         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
11302         (rust_enum_p, rust_enum_variant): New function.
11303         (rust_underscore_fields): Remove "offset" parameter.
11304         (rust_print_enum): New function.
11305         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
11306         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
11307         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
11308         enums.
11309         (rust_internal_print_type): New function, from rust_print_type.
11310         Remove enum code.
11311         (rust_print_type): Call rust_internal_print_type.
11312         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
11313         Update enum handling.
11314         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
11315         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
11316         (rust_union_quirks): New functions.
11317         (process_full_comp_unit, process_full_type_unit): Call
11318         rust_union_quirks.
11319         (process_structure_scope): Update rust_unions if necessary.
11320
11321 2018-02-26  Tom Tromey  <tom@tromey.com>
11322
11323         * value.h (value_union_variant): Declare.
11324         * valops.c (value_union_variant): New function.
11325         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
11326         (struct discriminant_info): New.
11327         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
11328         enumerator.
11329         (struct main_type) <flag_discriminated_union>: New field.
11330
11331 2018-02-26  Tom Tromey  <tom@tromey.com>
11332
11333         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11334         unittests/unpack-selftests.c.
11335         * unittests/unpack-selftests.c: New file.
11336         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
11337
11338 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11339
11340         * dwarf2read.c (struct partial_die_info) <read>: New method.
11341         (read_partial_die): Remove the declaration.
11342         (load_partial_dies): Update.
11343         (partial_die_info::partial_die_info):
11344         (read_partial_die): Change it to partial_die_info::read.
11345
11346 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11347
11348         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
11349         (fixup_partial_die): Remove declaration.
11350         (scan_partial_symbols): Update.
11351         (partial_die_parent_scope): Likewise.
11352         (partial_die_full_name): Likewise.
11353         (fixup_partial_die): Change it to partial_die_info::fixup.
11354
11355 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11356
11357         * dwarf2read.c (read_partial_die): Update the declaration.
11358         (load_partial_dies): Caller update.
11359         (read_partial_die): Remove one argument abbrev_len.
11360
11361 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11362
11363         * dwarf2read.c (struct partial_die_info): Add ctor, delete
11364         assignment operator.
11365         (load_partial_dies): Use ctor and copy ctor.
11366         (read_partial_die): Update.
11367         (dwarf2_cu::find_partial_die): Use ctor.
11368
11369 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11370
11371         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
11372         (find_partial_die_in_comp_unit): Change it to
11373         dwarf2_cu::find_partial_die.
11374         (find_partial_die): Update.
11375
11376 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11377
11378         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
11379         is NULL.
11380
11381 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11382
11383         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
11384
11385 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
11386
11387         * arch/amd64.h: Use common/tdesc.h.
11388         * arch/i386.c: Likewise.
11389         * arch/i386.h: Likewise.
11390         * arch/tic6x.c: Likewise.
11391         * arch/tdesc.h: Move file from here...
11392         * common/tdesc.h: ...to here.
11393         * features/aarch64-core.c: Regenerate.
11394         * features/aarch64-fpu.c: Regenerate.
11395         * features/i386/32bit-avx.c: Regenerate.
11396         * features/i386/32bit-avx512.c: Regenerate.
11397         * features/i386/32bit-core.c: Regenerate.
11398         * features/i386/32bit-linux.c: Regenerate.
11399         * features/i386/32bit-mpx.c: Regenerate.
11400         * features/i386/32bit-pkeys.c: Regenerate.
11401         * features/i386/32bit-sse.c: Regenerate.
11402         * features/i386/64bit-avx.c: Regenerate.
11403         * features/i386/64bit-avx512.c: Regenerate.
11404         * features/i386/64bit-core.c: Regenerate.
11405         * features/i386/64bit-linux.c: Regenerate.
11406         * features/i386/64bit-mpx.c: Regenerate.
11407         * features/i386/64bit-pkeys.c: Regenerate.
11408         * features/i386/64bit-segments.c: Regenerate.
11409         * features/i386/64bit-sse.c: Regenerate.
11410         * features/i386/x32-core.c: Regenerate.
11411         * features/tic6x-c6xp.c: Regenerate.
11412         * features/tic6x-core.c: Regenerate.
11413         * features/tic6x-gp.c: Regenerate.
11414         * target-descriptions.c: Use common/tdesc.h.
11415         * target-descriptions.h: Likewise.
11416
11417 2018-02-24  Tom Tromey  <tom@tromey.com>
11418
11419         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
11420         (try_thread_db_load_from_dir, thread_db_load_search): Use
11421         std::string.
11422         (info_auto_load_libthread_db_compare): Return bool.  Change
11423         argument types.
11424         (info_auto_load_libthread_db): Use std::vector, std::string.
11425         Remove cleanups.
11426
11427 2018-02-24  Tom Tromey  <tom@tromey.com>
11428
11429         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
11430         std::string.
11431         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
11432         std::string*.
11433         * gdbarch.c: Rebuild.
11434         * gdbarch.h: Rebuild.
11435         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
11436         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
11437         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
11438         std::string*.
11439
11440 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
11441
11442         * gdbtypes.h (sect_offset): Change type to uint64_t.
11443         (sect_offset_str): New function.
11444         * dwarf2read.c (create_addrmap_from_aranges): Use
11445         sect_offset_str.
11446         (error_check_comp_unit_head): Likewise.
11447         (create_debug_type_hash_table): Likewise.
11448         (read_cutu_die_from_dwo): Likewise.
11449         (init_cutu_and_read_dies): Likewise.
11450         (init_cutu_and_read_dies_no_follow): Likewise.
11451         (process_psymtab_comp_unit_reader): Likewise.
11452         (partial_die_parent_scope): Likewise.
11453         (peek_die_abbrev): Likewise.
11454         (process_queue): Likewise.
11455         (dwarf2_physname): Likewise.
11456         (read_namespace_alias): Likewise.
11457         (read_import_statement): Likewise.
11458         (create_dwo_cu_reader): Likewise.
11459         (create_cus_hash_table): Likewise.
11460         (lookup_dwo_cutu): Likewise.
11461         (inherit_abstract_dies): Likewise.
11462         (read_func_scope): Likewise.
11463         (read_call_site_scope): Likewise.
11464         (dwarf2_add_member_fn): Likewise.
11465         (read_common_block): Likewise.
11466         (read_module_type): Likewise.
11467         (read_typedef): Likewise.
11468         (read_subrange_type): Likewise.
11469         (load_partial_dies): Likewise.
11470         (read_partial_die): Likewise.
11471         (find_partial_die): Likewise.
11472         (read_str_index): Likewise.
11473         (dwarf2_string_attr): Likewise.
11474         (build_error_marker_type): Likewise.
11475         (lookup_die_type): Likewise.
11476         (dump_die_shallow): Likewise.
11477         (follow_die_ref): Likewise.
11478         (dwarf2_fetch_die_loc_sect_off): Likewise.
11479         (dwarf2_fetch_constant_bytes): Likewise.
11480         (follow_die_sig): Likewise.
11481         (get_signatured_type): Likewise.
11482         (get_DW_AT_signature_type): Likewise.
11483         (dwarf2_find_containing_comp_unit): Likewise.
11484         (set_die_type): Likewise.
11485
11486 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
11487
11488         * arch/aarch64.c: Include "common-defs.h".
11489         * arch/amd64.c: Likewise.
11490         * arch/i386.c: Likewise.
11491
11492 2018-02-21  Tom Tromey  <tom@tromey.com>
11493
11494         * value.h: (extract_field_op): Update.
11495         * eval.c (extract_field_op): Return a const char *.
11496         * expression.h (parse_expression_for_completion): Update.
11497         * completer.c (complete_expression): Update.
11498         (add_struct_fields): Make fieldname const.
11499         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
11500         (mark_completion_tag, parse_exp_in_context_1): Update.
11501         (parse_expression_for_completion): Change "name" to
11502         unique_xmalloc_ptr*.
11503
11504 2018-02-21  Tom Tromey  <tom@tromey.com>
11505
11506         * infcall.c (call_function_by_hand_dummy): Use std::vector.
11507
11508 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11509
11510         * avr-tdep.c (avr_read_pc): Change parameter type to
11511         readable_regcache.
11512         * gdbarch.sh (read_pc): Likewise.
11513         * gdbarch.c: Re-generated.
11514         * gdbarch.h: Re-generated.
11515         * hppa-tdep.c (hppa_read_pc): Change parameter type to
11516         readable_regcache.
11517         * ia64-tdep.c (ia64_read_pc): Likewise.
11518         * mips-tdep.c (mips_read_pc): Likewise.
11519         * spu-tdep.c (spu_read_pc): Likewise.
11520
11521 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11522
11523         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
11524         * regcache-dump.c: New file.
11525         * regcache.c: Move register_dump to regcache-dump.c.
11526         (maintenance_print_registers): Likewise.
11527         (maintenance_print_raw_registers): Likewise.
11528         (maintenance_print_cooked_registers): Likewise.
11529         (maintenance_print_register_groups): Likewise.
11530         (maintenance_print_remote_registers): Likewise.
11531         (_initialize_regcache): Likewise.
11532         * regcache.h (register_dump): Moved from regcache.c.
11533
11534 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11535
11536         * regcache.c (regcache::regcache): Update.
11537         (regcache::invalidate): Move it to detached_regcache::invalidate.
11538         (get_thread_arch_aspace_regcache): Update.
11539         (regcache::raw_update): Update.
11540         (regcache::cooked_read): Remove some code.
11541         (regcache::cooked_read_value): Likewise.
11542         (regcache::raw_write): Remove assert on m_readonly_p.
11543         (regcache::raw_supply_integer): Move it to
11544         detached_regcache::raw_supply_integer.
11545         (regcache::raw_supply_zeroed): Likewise.
11546         * regcache.h (detached_regcache) <raw_supply_integer>: New
11547         declaration.
11548         <raw_supply_zeroed, invalidate>: Likewise.
11549         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
11550         <invalidate>: Likewise.
11551         <m_readonly_p>: Removed.
11552
11553 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11554
11555         * infcmd.c (get_return_value): Let stop_regs point to
11556         get_current_regcache.
11557         * regcache.c (regcache::regcache): Remove.
11558         (register_dump_reg_buffer): New class.
11559         (regcache_print): Adjust.
11560         * regcache.h (regcache): Remove constructors.
11561
11562 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11563
11564         * regcache.c (class register_dump): New class.
11565         (register_dump_regcache, register_dump_none): New class.
11566         (register_dump_remote, register_dump_groups): New class.
11567         (regcache_print): Update.
11568         * regcache.h (regcache_dump_what): Move it to regcache.c.
11569         (regcache) <dump>: Remove.
11570
11571 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11572
11573         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
11574          reg_buffer_rw *.
11575         (jit_unwind_reg_set_impl): Call raw_supply.
11576         (jit_frame_sniffer): Use reg_buffer_rw.
11577         * record-full.c (record_full_core_regbuf): Change its type.
11578         (record_full_core_open_1): Use reg_buffer_rw.
11579         (record_full_close): Likewise.
11580         (record_full_core_fetch_registers): Use regcache->raw_supply.
11581         (record_full_core_store_registers): Likewise.
11582         * regcache.c (regcache::get_register_status): Move it to
11583         reg_buffer.
11584         (regcache_raw_set_cached_value): Remove.
11585         (regcache::raw_set_cached_value): Remove.
11586         (regcache::raw_write): Call raw_supply.
11587         (regcache::raw_supply): Move it to reg_buffer_rw.
11588         * regcache.h (regcache_raw_set_cached_value): Remove.
11589         (reg_buffer_rw): New class.
11590
11591 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11592
11593         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
11594         readonly_detached_regcache.
11595         (dummy_frame_prev_register): Use regcache->cooked_read.
11596         * frame.c (frame_save_as_regcache): Change return type.
11597         (frame_pop): Update.
11598         * frame.h (frame_save_as_regcache): Update declaration.
11599         * inferior.h (get_infcall_suspend_state_regcache): Update
11600         declaration.
11601         * infrun.c (infcall_suspend_state) <registers>: use
11602         readonly_detached_regcache.
11603         (save_infcall_suspend_state): Don't use regcache_dup.
11604         (get_infcall_suspend_state_regcache): Change return type.
11605         * linux-fork.c (struct fork_info) <savedregs>: Change to
11606         readonly_detached_regcache.
11607         <pc>: New field.
11608         (fork_save_infrun_state): Don't use regcache_dup.
11609         (info_checkpoints_command): Adjust.
11610         * mi/mi-main.c (register_changed_p): Update declaration.
11611         (mi_cmd_data_list_changed_registers): Use
11612         readonly_detached_regcache.
11613         (register_changed_p): Change parameter type to
11614         readonly_detached_regcache.
11615         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
11616         readonly_detached_regcache.
11617         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
11618         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
11619         New.
11620         (regcache::save): Move it to reg_buffer.
11621         (regcache::restore): Change parameter type.
11622         (regcache_dup): Remove.
11623         * regcache.h (reg_buffer) <save>: New method.
11624         (readonly_detached_regcache): New class.
11625         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
11626         readonly_detached_regcache.
11627         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
11628
11629 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11630
11631         * frame.c (frame_save_as_regcache): Use regcache method save.
11632         (frame_pop): Use regcache method restore.
11633         * infrun.c (restore_infcall_suspend_state): Likewise.
11634         * linux-fork.c (fork_load_infrun_state): Likewise.
11635         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
11636         save.
11637         * regcache.c (regcache_save): Remove.
11638         (regcache::restore): More asserts.
11639         (regcache_cpy): Remove.
11640         * regcache.h (regcache_save): Remove the declaration.
11641         (regcache::restore): Move from private to public.
11642         Remove the friend declaration of regcache_cpy.
11643         (regcache_cpy): Remove declaration.
11644
11645 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11646
11647         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
11648         parameter type to 'readable_regcache *'.
11649         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
11650         * arm-tdep.c (arm_neon_quad_read): Likewise.
11651         (arm_pseudo_read): Likewise.
11652         * avr-tdep.c (avr_pseudo_register_read): Likewise.
11653         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
11654         * frv-tdep.c (frv_pseudo_register_read): Likewise.
11655         * gdbarch.c: Re-generated.
11656         * gdbarch.h: Re-generated.
11657         * gdbarch.sh (pseudo_register_read): Change parameter type to
11658         'readable_regcache *'.
11659         (pseudo_register_read_value): Likewise.
11660         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
11661         (h8300_pseudo_register_read): Likewise.
11662         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
11663         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
11664         (i386_pseudo_register_read_into_value): Likewise.
11665         (i386_pseudo_register_read_value): Likewise.
11666         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
11667         declaration.
11668         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
11669         * m32c-tdep.c (m32c_raw_read): Likewise.
11670         (m32c_read_flg): Likewise.
11671         (m32c_banked_register): Likewise.
11672         (m32c_banked_read): Likewise.
11673         (m32c_sb_read): Likewise.
11674         (m32c_part_read): Likewise.
11675         (m32c_cat_read): Likewise.
11676         (m32c_r3r2r1r0_read): Likewise.
11677         (m32c_pseudo_register_read): Likewise.
11678         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
11679         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
11680         (mep_pseudo_cr64_read): Likewise.
11681         (mep_pseudo_register_read): Likewise.
11682         * mips-tdep.c (mips_pseudo_register_read): Likewise.
11683         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
11684         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
11685         * regcache.c (regcache::raw_read): Move it to readable_regcache.
11686         (regcache::cooked_read): Likewise.
11687         (regcache::cooked_read_value): Likewise.
11688         (regcache_cooked_read_signed):
11689         (regcache::cooked_read): Likewise.
11690         * regcache.h (readable_regcache): New class.
11691         (regcache): Inherit readable_regcache.  Move some methods to
11692         readable_regcache.
11693         * rl78-tdep.c (rl78_pseudo_register_read): Change
11694         parameter type to 'readable_regcache *'.
11695         * rs6000-tdep.c (do_regcache_raw_read): Remove.
11696         (e500_pseudo_register_read): Change parameter type to
11697         'readable_regcache *'.
11698         (dfp_pseudo_register_read): Likewise.
11699         (vsx_pseudo_register_read): Likewise.
11700         (efpr_pseudo_register_read): Likewise.
11701         * s390-tdep.c (s390_pseudo_register_read): Likewise.
11702         * sh-tdep.c (sh_pseudo_register_read): Likewise.
11703         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
11704         (sh64_pseudo_register_read): Likewise.
11705         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
11706         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
11707         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
11708         (spu_pseudo_register_read): Likewise.
11709         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
11710         (xtensa_pseudo_register_read): Likewise.
11711
11712 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11713
11714         * regcache.c (regcache::regcache): Call reg_buffer ctor.
11715         (regcache::arch): Move it to reg_buffer::arch.
11716         (regcache::register_buffer): Likewise.
11717         (regcache::assert_regnum): Likewise.
11718         (regcache::num_raw_registers): Likewise.
11719         * regcache.h (reg_buffer): New class.
11720         (regcache): Inherit reg_buffer.
11721
11722 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
11723
11724         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
11725         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
11726
11727 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
11728
11729         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
11730
11731 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
11732
11733         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
11734         (SFILES): Remove common/*.c files.
11735         (COMMON_OBS): Remove some *.o files built from common/*.c files.
11736         * common/common.host: Add common reference.
11737         * configure.ac: Likewise.
11738         * configure: Regenerate.
11739
11740 2018-02-16  Yao Qi  <yao.qi@linaro.org>
11741
11742         * block.c (block_namespace_info): Inherit allocate_on_obstack.
11743         (block_initialize_namespace): Use new.
11744         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
11745         (dwarf2_free_objfile): Use delete.
11746         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
11747         (copy_type_recursive): Use new.
11748         * gdb_obstack.h (allocate_on_obstack): New.
11749
11750 2018-02-15  Yao Qi  <yao.qi@linaro.org>
11751
11752         PR gdb/22849
11753         * inferior.c (exit_inferior_1): Reset inf->control.
11754
11755 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
11756
11757         * ada-lang.c (ada_to_fixed_value_create): Delete advance
11758         declaration.
11759
11760 2018-02-14  Pedro Alves  <palves@redhat.com>
11761
11762         * frame-unwind.c (frame_unwind_try_unwinder): Always call
11763         frame_cleanup_after_sniffer on exception.
11764
11765 2018-02-14  Tom Tromey  <tom@tromey.com>
11766
11767         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
11768         const.
11769         (solib_bfd_open): Make pathname const.
11770         * solib.c (solib_bfd_open): Make pathname const.
11771         * solib-spu.c (spu_bfd_fopen): Make name const.
11772         (spu_bfd_open): Make pathname const.
11773         * solib-darwin.c (darwin_bfd_open): Make pathname const.
11774         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
11775
11776 2018-02-14  Tom Tromey  <tom@tromey.com>
11777
11778         * symfile.c (symfile_bfd_open): Update.
11779         * source.h (openp, source_full_path_of, find_and_open_source):
11780         Change argument type to unique_xmalloc_ptr.
11781         * source.c (openp): Take a unique_xmalloc_ptr.
11782         (source_full_path_of, find_and_open_source): Likewise.
11783         (open_source_file, symtab_to_fullname): Update.
11784         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
11785         unique_xmalloc_ptr.
11786         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
11787         (exec_file_find): Update.
11788         * psymtab.c (psymtab_to_fullname): Update.
11789         * nto-tdep.h (nto_find_and_open_solib): Update.
11790         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
11791         unique_xmalloc_ptr.
11792         * exec.c (exec_file_attach): Update.
11793         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
11794         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
11795
11796 2018-02-14  Tom Tromey  <tom@tromey.com>
11797
11798         * solib.c: Include source.h.
11799         * nto-tdep.c: Include source.h.
11800         * mi/mi-cmd-env.c: Include source.h.
11801         * infcmd.c: Include source.h.
11802         * exec.c: Include source.h.
11803         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
11804         (add_path, directory_switch, source_path, init_source_path): Move
11805         declarations...
11806         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
11807         (add_path, directory_switch, source_path, init_source_path):
11808         ...here.
11809
11810 2018-02-14  Tom Tromey  <tom@tromey.com>
11811
11812         * solist.h (exec_file_find, solib_find): Return
11813         unique_xmalloc_ptr.
11814         (solib_bfd_fopen): Take a const char *.
11815         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
11816         (exec_file_find, solib_find): Likewise.
11817         (solib_bfd_fopen): Do not take ownership of "pathname".
11818         (solib_bfd_open): Use unique_xmalloc_ptr.
11819         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
11820         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
11821         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
11822         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
11823
11824 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
11825
11826         * ada-lang.c (name_match_type_from_name): Remove reference to
11827         ada_name_for_lookup in function's documentation.
11828         * ada-lang.h (ada_name_for_lookup): Delete declaration.
11829
11830 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
11831
11832         * defs.h (enum openp_flags): New enum.
11833         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
11834         Move to enum openp_flags.
11835         (openp_flags): New enum flags.
11836         (openp): Change parameter type to openp_flags.
11837         * source.c (openp): Change parameter type to openp_flags.
11838         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
11839         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
11840
11841 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
11842
11843         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
11844         per-command.
11845
11846 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
11847
11848         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
11849         into...
11850         (class dwarf2_queue_guard): ...the destructor of this new class.
11851         (dw2_do_instantiate_symtab): Create instance of the new class
11852         dwarf2_queue_guard, remove cleanup.
11853
11854 2018-02-09  Tom Tromey  <tom@tromey.com>
11855
11856         * source.c (find_source_lines): Don't reference past the end of
11857         the vector.
11858
11859 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11860
11861         * remote.c (remote_btrace_maybe_reopen): Change error message.
11862         * btrace.c (btrace_enable): Likewise.
11863         (parse_xml_btrace): Likewise.
11864         (parse_xml_btrace_conf): Likewise.
11865
11866 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11867
11868         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
11869         (linux_enable_pt, linux_enable_bts): Call
11870         diagnose_perf_event_open_fail.
11871
11872 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11873
11874         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
11875         Remove parameter and change return type.  Update callers.  Move it.
11876         (linux_enable_bts, linux_enable_pt): Improve error message.
11877         (linux_enable_pt): Remove zero buffer size check.
11878         (linux_enable_btrace): Improve error messages.  Remove NULL return
11879         check.
11880
11881 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11882
11883         * btrace.c (btrace_enable): Remove target_supports_btrace call.
11884         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
11885         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
11886         (linux_supports_pt, linux_supports_btrace): Remove.
11887         (linux_enable_bts): Call cpu_supports_bts.
11888         * nat/linux-btrace.h (linux_supports_btrace): Remove.
11889         * remote.c (remote_supports_btrace): Remove.
11890         (init_remote_ops): Remove remote_supports_btrace.
11891         * target-delegates.c: Regenerated.
11892         * target.c (target_supports_btrace): Remove.
11893         * target.h (target_ops) <to_supports_btrace>: Remove
11894         (target_supports_btrace): Remove.
11895         * x86-linux-nat.c (x86_linux_create_target): Remove
11896         linux_supports_btrace.
11897
11898 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11899
11900         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
11901         btrace failed.
11902         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
11903         exception and use message in own exception.
11904
11905 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11906
11907         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
11908         (perf_event_pt_event_type): Use gdb_file_up.
11909         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
11910         scoped_fd, and scoped_mmap.
11911
11912 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11913
11914         * common/scoped_mmap.h: New.
11915         * unittests/scoped_mmap-selftest.c: New.
11916         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11917         unittests/scoped_mmap-selftest.c.
11918
11919 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11920
11921         * common/scoped_fd.h: New.
11922         * unittests/scoped_fd-selftest.c: New.
11923         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11924         unittests/scoped_fd-selftest.c.
11925
11926 2018-02-09  Tom Tromey  <tom@tromey.com>
11927
11928         * auto-load.c (auto_load_section_scripts): Use
11929         gdb::unique_xmalloc_ptr.
11930
11931 2018-02-09  Tom Tromey  <tom@tromey.com>
11932
11933         * auto-load.c (execute_script_contents): Use std::string.
11934
11935 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
11936
11937         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
11938         Python function, rather than a new command.
11939
11940 2018-02-08  Tom Tromey  <tom@tromey.com>
11941
11942         * solib.c (solib_find_1): Use std::string.
11943         (solib_bfd_fopen): Use unique_xmalloc_ptr.
11944
11945 2018-02-08  Tom Tromey  <tom@tromey.com>
11946
11947         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
11948
11949 2018-02-08  Tom Tromey  <tom@tromey.com>
11950
11951         * source.c (find_source_lines): Use gdb::def_vector.
11952
11953 2018-02-08  Tom Tromey  <tom@tromey.com>
11954
11955         * macrocmd.c (struct temporary_macro_definition): New.
11956         (macro_define_command): Use temporary_macro_definition.  Remove
11957         cleanups.
11958         (free_macro_definition_ptr): Remove.
11959
11960 2018-02-08  Tom Tromey  <tom@tromey.com>
11961
11962         * macroexp.c (maybe_expand): Use std::string.
11963
11964 2018-02-08  Tom Tromey  <tom@tromey.com>
11965
11966         * macroexp.c (struct macro_buffer): Add initializers for some
11967         members.
11968         (init_buffer, init_shared_buffer, free_buffer)
11969         (free_buffer_return_text): Remove.
11970         (macro_buffer): New constructors.
11971         (~macro_buffer): New destructor.
11972         (macro_buffer::set_shared): New method.
11973         (macro_buffer::resize_buffer, macro_buffer::appendc)
11974         (macro_buffer::appendmem): Now methods, not free functions.
11975         (set_token, append_tokens_without_splicing, stringify)
11976         (macro_stringify): Update.
11977         (gather_arguments): Change return type.  Remove argc_p argument,
11978         add args_ptr argument.  Use std::vector.
11979         (substitute_args): Remove argc argument.  Accept std::vector.
11980         (expand): Update.  Use std::vector.
11981         (scan, macro_expand, macro_expand_next): Update.
11982
11983 2018-02-08  Tom Tromey  <tom@tromey.com>
11984
11985         * symtab.c (default_collect_symbol_completion_matches_break_on):
11986         Use unique_xmalloc_ptr.
11987         * macroscope.h: (sal_macro_scope, user_macro_scope)
11988         (default_macro_scope): Return unique_xmalloc_ptr.
11989         * macroscope.c (sal_macro_scope, user_macro_scope)
11990         (default_macro_scope): Return unique_xmalloc_ptr.
11991         * macroexp.h (macro_expand, macro_expand_once): Return
11992         unique_xmalloc_ptr.
11993         * macroexp.c (macro_expand, macro_expand_once): Return
11994         unique_xmalloc_ptr.
11995         * macrocmd.c (macro_expand_command, macro_expand_once_command)
11996         (info_macro_command, info_macros_command): Use
11997         unique_xmalloc_ptr.
11998         * compile/compile-c-support.c (write_macro_definitions): Use
11999         unique_xmalloc_ptr.
12000         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
12001
12002 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
12003
12004         * value.c (value_static_field): Assign field type instead of
12005         containing type when returning an optimized out value.
12006
12007 2018-02-06  Yao Qi  <yao.qi@linaro.org>
12008
12009         * ft32-tdep.c (ft32_read_pc): Remove.
12010         (ft32_write_pc): Remove.
12011         (ft32_gdbarch_init): Update.
12012         * m32r-tdep.c (m32r_read_pc): Remove.
12013         (m32r_gdbarch_init): Update.
12014         * mep-tdep.c (mep_read_pc): Remove.
12015         (mep_gdbarch_init): Update.
12016         * microblaze-tdep.c (microblaze_write_pc): Remove.
12017         (microblaze_gdbarch_init): Update.
12018         * mn10300-tdep.c (mn10300_read_pc): Remove.
12019         (mn10300_write_pc): Remove.
12020         (mn10300_gdbarch_init): Update.
12021         * moxie-tdep.c (moxie_read_pc): Remove.
12022         (moxie_write_pc): Remove.
12023         (moxie_gdbarch_init): Update.
12024
12025 2018-02-06  Yao Qi  <yao.qi@linaro.org>
12026
12027         * expprint.c (print_subexp_standard): Handle
12028         OP_F77_UNDETERMINED_ARGLIST.
12029         (dump_subexp_body_standard): Likewise.
12030
12031 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
12032
12033         * target-descriptions.c (tdesc_element_visitor) Add empty
12034         implementations.
12035         (tdesc_type): Move make_gdb_type from here.
12036         (tdesc_type_builtin): Likewise.
12037         (tdesc_type_vector): Likewise.
12038         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
12039         (make_gdb_type_struct): Move from tdesc_type_with_fields.
12040         (make_gdb_type_union): Likewise.
12041         (make_gdb_type_flags): Likewise.
12042         (make_gdb_type_enum): Likewise.
12043         (make_gdb_type): New function.
12044         (tdesc_register_type): Use static make_gdb_type.
12045
12046 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
12047
12048         * infcmd.c (default_print_one_register_info): Align natural-format
12049         column values consistently one under another.
12050         (pad_to_column): New function.
12051
12052 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
12053
12054         * dwarf2read.c (dwarf2_physname): Move commment.
12055
12056 2018-02-01  Leszek Swirski  <leszeks@google.com>
12057
12058         * varobj.c (varobj_formatted_print_options): Allow recursive
12059         pretty printing if pretty printing is enabled.
12060
12061 2018-02-01  Leszek Swirski  <leszeks@google.com>
12062
12063         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
12064         names after a structop as a filename.
12065
12066 2018-02-01  Yao Qi  <yao.qi@linaro.org>
12067
12068         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
12069         (arm_record_coproc_data_proc): Likewise.
12070
12071 2018-02-01  Yao Qi  <yao.qi@linaro.org>
12072
12073         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
12074
12075 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
12076
12077         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
12078         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
12079
12080 2018-01-31  Pedro Alves  <palves@redhat.com>
12081
12082         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
12083         * inflow.c (child_terminal_save_inferior): Wrap reference to
12084         tcgetpgrp in HAVE_TERMIOS_H.
12085         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
12086         _WIN32.
12087         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
12088         always iterate over all inferiors.
12089         (gdbsim_cntrl_c): Adjust.
12090         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
12091
12092 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
12093
12094         * gdbtypes.c (lookup_array_range_type): Make sure the array's
12095         index type is objfile-owned if the element type is as well.
12096
12097 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
12098
12099         GDB 8.1 released.
12100
12101 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12102
12103         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
12104         "features/s390x-linux64.c".
12105         (_initialize_s390_linux_tdep): Remove initialization of tdescs
12106         s390_linux32 and s390x_linux64.
12107         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
12108         default tdesc.
12109         * s390-tdep.c: Include "features/s390-linux32.c" and
12110         "features/s390x-linux64.c".
12111         (s390_tdesc_valid): Add check for tdesc_has_registers.
12112         (s390_gdbarch_init): Make sure there is always a valid tdesc.
12113         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
12114         tdesc_s390x_linux64.
12115         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
12116         tdesc_s390x_linux64 to...
12117         * s390-tdep.h: ...here.
12118
12119 2018-01-30  Pedro Alves  <palves@redhat.com>
12120
12121         PR gdb/13211
12122         * config.in, configure: Regenerate.
12123         * configure.ac: Check for getpgid.
12124         * go32-nat.c (go32_pass_ctrlc): New.
12125         (go32_target): Install it.
12126         * inf-child.c (inf_child_target): Install
12127         child_terminal_save_inferior, child_pass_ctrlc and
12128         child_interrupt.
12129         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
12130         (inf_ptrace_target): No longer install it.
12131         * infcmd.c (interrupt_target_1): Adjust.
12132         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
12133         (child_interrupt): Declare.
12134         (inferior::terminal_state): New.
12135         * inflow.c (struct terminal_info): Update comments.
12136         (inferior_process_group): Delete.
12137         (terminal_is_ours): Delete.
12138         (gdb_tty_state): New.
12139         (child_terminal_init): Adjust.
12140         (is_gdb_terminal, sharing_input_terminal_1)
12141         (sharing_input_terminal): New functions.
12142         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
12143         Set the process's actual process group in the foreground if
12144         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
12145         mark terminal as the inferior's if not sharing GDB's terminal.
12146         Don't check attach_flag.
12147         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
12148         pass down a target_terminal_state.
12149         (child_terminal_save_inferior): New, factored out from ...
12150         (child_terminal_ours_1): ... this.  Handle
12151         target_terminal_state::is_ours_for_output.
12152         (child_interrupt, child_pass_ctrlc): New.
12153         (inflow_inferior_exit): Clear the inferior's terminal_state.
12154         (copy_terminal_info): Copy the inferior's terminal state.
12155         (_initialize_inflow): Remove reference to terminal_is_ours.
12156         * inflow.h (inferior_process_group): Delete.
12157         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
12158         * procfs.c (procfs_target): Don't install procfs_interrupt.
12159         (procfs_interrupt): Delete.
12160         * remote.c (remote_serial_quit_handler): Adjust.
12161         (remote_interrupt): Remove ptid parameter.  Adjust.
12162         * target-delegates.c: Regenerate.
12163         * target.c: Include "terminal.h".
12164         (target_terminal::terminal_state): Rename to ...
12165         (target_terminal::m_terminal_state): ... this.
12166         (target_terminal::init): Adjust.
12167         (target_terminal::inferior): Adjust to per-inferior
12168         terminal_state.
12169         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
12170         (target_terminal::ours, target_terminal::ours_for_output): Use
12171         target_terminal_is_ours_kind.
12172         (target_interrupt): Remove ptid parameter.  Adjust.
12173         (default_target_pass_ctrlc): Adjust.
12174         * target.h (target_ops::to_terminal_save_inferior): New field.
12175         (target_ops::to_interrupt): Remove ptid_t parameter.
12176         (target_interrupt): Remove ptid_t parameter.  Update comment.
12177         (target_pass_ctrlc): Update comment.
12178         * target/target.h (target_terminal_state): New scoped enum,
12179         factored out of ...
12180         (target_terminal::terminal_state): ... here.
12181         (target_terminal::inferior): Update comments.
12182         (target_terminal::restore_inferior): New.
12183         (target_terminal::is_inferior, target_terminal::is_ours)
12184         (target_terminal::is_ours_for_output): Adjust.
12185         (target_terminal::scoped_restore_terminal_state): Adjust to
12186         rename, and call restore_inferior() instead of inferior().
12187         (target_terminal::scoped_restore_terminal_state::m_state): Change
12188         type.
12189         (target_terminal::terminal_state): Rename to ...
12190         (target_terminal::m_terminal_state): ... this and change type.
12191
12192 2018-01-30  Pedro Alves  <palves@redhat.com>
12193
12194         * linux-nat.c (wait_for_signal): New function.
12195         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
12196         directly.
12197         (async_terminal_is_ours)
12198         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
12199         (linux_nat_add_target): Don't override
12200         to_terminal_inferior/to_terminal_ours.
12201
12202 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
12203
12204         * remote.c (remote_follow_fork): Don't call "detach_inferior".
12205
12206 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
12207
12208         * dwarf2read.c (free_dwo_files): Add forward-declaration.
12209         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
12210         dwarf2_per_objfile_free here.
12211         (dwarf2_per_objfile_free): Remove.
12212         (_initialize_dwarf2_read): Don't register
12213         dwarf2_per_objfile_free as a registry cleanup.
12214
12215 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
12216
12217         Avoid compilation errors in MinGW native builds
12218
12219         The error is triggered by including python-internal.h, and the
12220         error message is:
12221
12222              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
12223                       from build-gnulib/import/math.h:27,
12224                       from d:/usr/Python26/include/pyport.h:235,
12225                       from d:/usr/Python26/include/Python.h:58,
12226                       from python/python-internal.h:94,
12227                       from python/py-arch.c:24:
12228              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
12229         using ::hypot;
12230                 ^~~~~
12231
12232         This happens because Python headers define 'hypot' to expand t
12233         '_hypot' in the Windows builds.
12234         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
12235         'hypoth'.  This avoids a compilation error.
12236
12237 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
12238
12239         * MAINTAINERS (Write After Approval): Fix ordering.
12240
12241 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
12242
12243         * MAINTAINERS (Write After Approval): Add Alan Hayward.
12244
12245 2018-01-26  Alan Modra  <amodra@gmail.com>
12246
12247         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
12248         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
12249         Remove nop.  Make const.  Comment.
12250         (powerpc32_plt_stub_so_2): New.
12251         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
12252         Correct count.  Update uses.
12253         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
12254         Move common code reading PLT entry word.  Correct
12255         powerpc32_plt_stub PLT address calculation.
12256         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
12257         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
12258         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
12259         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
12260         (ppc64_standard_linkage8): Likewise.
12261         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
12262         Correct insns description.
12263         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
12264
12265 2018-01-24  Pedro Alves  <palves@redhat.com>
12266
12267         GCC PR libstdc++/83906
12268         * gdbtypes.c (operator==(const dynamic_prop &,
12269         const dynamic_prop &)): New.
12270         (operator==(const range_bounds &, const range_bounds &)): New.
12271         (check_types_equal): Use them instead of memcmp.
12272         * gdbtypes.h (operator==(const dynamic_prop &,
12273         const dynamic_prop &)): Declare.
12274         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
12275         (operator==(const range_bounds &, const range_bounds &)): Declare.
12276         (operator!=(const range_bounds &, const range_bounds &)): Declare.
12277
12278 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12279
12280         * s390-linux-tdep.c (s390_record_address_mask)
12281         (s390_record_calc_disp_common, s390_record_calc_disp)
12282         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12283         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12284         (s390_process_record): Move to s390-tdep.c.
12285         (s390_linux_init_abi_any): Adjust.
12286         * s390-tdep.c (s390_record_address_mask)
12287         (s390_record_calc_disp_common, s390_record_calc_disp)
12288         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12289         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12290         (s390_process_record): Moved from s390-linux-tdep.c
12291         (s390_gdbarch_init): Adjust.
12292
12293 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12294
12295         * s390-linux-nat.c (s390-tdep.h): New include.
12296         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
12297         (HFILES_NO_SRCDIR): Add s390-tdep.h.
12298         (ALLDEPFILES): Add s390-tdep.c.
12299         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
12300         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
12301         * s390-tdep.h: ...this.  New file.
12302         * s390-linux-tdep.c (s390-tdep.h): New include.
12303         (_initialize_s390_tdep): Rename to...
12304         (_initialize_s390_linux_tdep): ...this and adjust.
12305         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
12306         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
12307         s390-tdep.h.
12308         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
12309         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
12310         (s390_is_partial_instruction, s390_software_single_step)
12311         (is_non_branch_ril, s390_displaced_step_copy_insn)
12312         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
12313         (s390_prologue_data, s390_addr, s390_store, s390_load)
12314         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
12315         (s390_register_call_saved, s390_guess_tracepoint_registers)
12316         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
12317         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
12318         (s390_pseudo_register_name, s390_pseudo_register_type)
12319         (s390_pseudo_register_read, s390_pseudo_register_write)
12320         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
12321         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
12322         (s390_addr_bits_remove, s390_address_class_type_flags)
12323         (s390_address_class_type_flags_to_name)
12324         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
12325         (s390_function_arg_float, s390_function_arg_vector)
12326         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
12327         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
12328         (s390_frame_align, s390_register_return_value, s390_return_value)
12329         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
12330         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
12331         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
12332         (s390_trad_frame_prev_register, s390_unwind_cache)
12333         (s390_prologue_frame_unwind_cache)
12334         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
12335         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
12336         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
12337         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
12338         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
12339         (s390_frame_base_address, s390_local_base_address)
12340         (s390_frame_base, s390_gcc_target_options)
12341         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
12342         (s390_validate_reg_range, s390_tdesc_valid)
12343         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
12344         * s390-tdep.c: ...this.  New file.
12345
12346 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12347
12348         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
12349         (s390_process_record, s390_gdbarch_tdep_alloc)
12350         (s390_linux_init_abi_any): Use/set new hook.
12351
12352 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12353
12354         * s390-linux-tdep.c (osabi.h): New include.
12355         (s390_linux_init_abi_31, s390_linux_init_abi_64)
12356         (s390_linux_init_abi_any): New functions.
12357         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
12358
12359 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12360
12361         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
12362         tdesc_has_registers check
12363
12364 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12365
12366         * s390-linux-tdep.c (s390_tdesc_valid): New function.
12367         (s390_validate_reg_range): New macro.
12368         (s390_gdbarch_init): Adjust.
12369
12370 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12371
12372         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
12373         (s390_gdbarch_tdep_alloc): Adjust.
12374         (s390_gdbarch_init): Adjust.
12375
12376 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12377
12378         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
12379         <have_tdb>: Change type to bool.
12380         (s390_gdbarch_tdep_alloc): Adjust.
12381         (s390_gdbarch_init): Adjust.
12382
12383 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12384
12385         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
12386         (gdbarch_tdep) <have_upper, have_vx>: New fields.
12387         (s390_gdbarch_tdep_alloc): New function.
12388         (s390_gdbarch_init): Allocate tdep at start and use its fields
12389         instead of separate variables.
12390
12391 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12392
12393         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
12394         when looking for cached gdbarch and add comment for remaining.
12395
12396 2018-01-22  Pedro Alves  <palves@redhat.com>
12397             Sergio Durigan Junior  <sergiodj@redhat.com>
12398
12399         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
12400         case.
12401
12402 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
12403
12404         * MAINTAINERS: Update my company e-mail address.
12405
12406 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12407
12408         * regcache.c (cooked_write_test): New function.
12409         (_initialize_regcache): Register the test.
12410
12411 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12412
12413         * ia64-tdep.c (ia64_pseudo_register_read): Call
12414         regcache->cooked_read instead of regcache_cooked_read_unsigned.
12415         * m32c-tdep.c (m32c_cat_read): Likewise.
12416         (m32c_r3r2r1r0_read): Likewise.
12417         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
12418         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
12419
12420 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12421
12422         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
12423         method raw_read instead of regcache_raw_read.
12424         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
12425         * arm-tdep.c (arm_neon_quad_read): Likewise.
12426         * avr-tdep.c (avr_pseudo_register_read): Likewise.
12427         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
12428         * frv-tdep.c (frv_pseudo_register_read): Likewise.
12429         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
12430         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
12431         (i386_pseudo_register_read_into_value): Likewise.
12432         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
12433         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
12434         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
12435         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
12436         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
12437         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
12438         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
12439         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
12440         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
12441
12442 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12443
12444         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
12445         * configure.tgt: Remove target mt.
12446         * mt-tdep.c: Remove.
12447         * regcache.c (cooked_read_test): Remove the check for mt.
12448
12449 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12450
12451         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
12452         instead of gdbarch_pseudo_register_read_value.
12453
12454 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
12455
12456         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
12457         language is Ada.
12458
12459 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
12460
12461         * linespec.c (create_sals_line_offset): Remove code that preserved
12462         the symtab_and_line's line number.
12463
12464 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12465
12466         * varobj.c (varobj_create): Don't set valid_block when creating a
12467         floating varobj.
12468
12469 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12470
12471         * varobj.c (varobj_create): Remove out of date comment.
12472
12473 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12474
12475         PR mi/20395
12476         * ada-exp.y (write_var_from_sym): Pass extra parameter when
12477         updating innermost block.
12478         * parse.c (innermost_block_tracker::update): Take extra type
12479         parameter, and check types match before updating innermost block.
12480         (write_dollar_variable): Update innermost block for registers.
12481         * parser-defs.h (enum innermost_block_tracker_type): New enum.
12482         (innermost_block_tracker::innermost_block_tracker): Initialise
12483         m_types member.
12484         (innermost_block_tracker::reset): Take type parameter.
12485         (innermost_block_tracker::update): Take type parameter, and pass
12486         type through as needed.
12487         (innermost_block_tracker::m_types): New member.
12488         * varobj.c (varobj_create): Pass type when reseting innermost
12489         block.
12490
12491 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12492
12493         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
12494         * ada-lang.c (resolve_subexp): Likewise.
12495         * breakpoint.c (set_breakpoint_condition) Likewise.
12496         (watch_command_1) Likewise.
12497         * c-exp.y (variable): Likewise.
12498         * d-exp.y (PrimaryExpression): Likewise.
12499         * f-exp.y (variable): Likewise.
12500         * go-exp.y (variable): Likewise.
12501         * m2-exp.y (variable): Likewise.
12502         * objfiles.c (objfile::~objfile): Likewise.
12503         * p-exp.y (variable): Likewise.
12504         * parse.c (innermost_block): Change type.
12505         * parser-defs.h (class innermost_block_tracker): New.
12506         (innermost_block): Change to innermost_block_tracker.
12507         * printcmd.c (display_command): Switch to innermost_block API.
12508         (do_one_display): Likewise.
12509         * rust-exp.y (do_one_display): Likewise.
12510         * symfile.c (clear_symtab_users): Likewise.
12511         * varobj.c (varobj_create): Switch to innermost_block API, replace
12512         use of innermost_block with block stored on varobj object.
12513
12514 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12515
12516         * expression.h (innermost_block): Remove declaration.
12517         * varobj.c: Add 'parser-defs.h' include.
12518
12519 2018-01-19  Tom Tromey  <tom@tromey.com>
12520
12521         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
12522         symbols in the static and global blocks.
12523
12524 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
12525
12526         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
12527         gdb_ptrace.h, and move including gdb_wait.h ...
12528         * nat/linux-ptrace.h: ... to here.
12529
12530 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
12531
12532         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
12533         inf_ptrace_detach_success.
12534         (inf_ptrace_detach_success): Add inferior parameter, use it
12535         instead of inferior_ptid, pass it to detach_inferior.
12536         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
12537         parameter.
12538         * inferior.c (detach_inferior): Add overload that takes an
12539         inferior object.
12540         * inferior.h (detach_inferior): Likewise.
12541         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
12542         use inferior_ptid, adjust call to inf_ptrace_detach_success.
12543         * linux-thread-db.c (thread_db_detach): Use inf parameter.
12544
12545 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
12546
12547         * target.h (struct target_ops) <to_detach>: Add inferior
12548         parameter.
12549         (target_detach): Likewise.
12550         * target.c (dispose_inferior): Pass inferior down.
12551         (target_detach): Pass inferior down.  Assert that it is equal to
12552         the current inferior.
12553         * aix-thread.c (aix_thread_detach): Pass inferior down.
12554         * corefile.c (core_file_command): Pass current_inferior() down.
12555         * corelow.c (core_detach): Add inferior parameter.
12556         * darwin-nat.c (darwin_detach): Likewise.
12557         * gnu-nat.c (gnu_detach): Likewise.
12558         * inf-ptrace.c (inf_ptrace_detach): Likewise.
12559         * infcmd.c (detach_command): Pass current_inferior() down to
12560         target_detach.
12561         * infrun.c (follow_fork_inferior): Pass parent_inf to
12562         target_detach.
12563         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
12564         target_detach.
12565         * linux-nat.c (linux_nat_detach): Add inferior parameter.
12566         * linux-thread-db.c (thread_db_detach): Likewise.
12567         * nto-procfs.c (procfs_detach): Likewise.
12568         * procfs.c (procfs_detach): Likewise.
12569         * record.c (record_detach): Likewise.
12570         * record.h (struct inferior): Forward-declare.
12571         (record_detach): Add inferior parameter.
12572         * remote-sim.c (gdbsim_detach): Likewise.
12573         * remote.c (remote_detach_1): Likewise.
12574         (remote_detach): Likewise.
12575         (extended_remote_detach): Likewise.
12576         * sol-thread.c (sol_thread_detach): Likewise.
12577         * target-debug.h (target_debug_print_inferior_p): New macro.
12578         * target-delegates.c: Re-generate.
12579         * top.c (kill_or_detach): Pass inferior down to target_detach.
12580         * windows-nat.c (windows_detach): Add inferior parameter.
12581
12582 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
12583
12584         * target.h (struct target_ops) <to_detach>: Remove args
12585         parameter.
12586         (target_detach): Likewise.
12587         * target.c (dispose_inferior): Adjust.
12588         (target_detach): Remove args parameter, adjust.
12589         * aix-thread.c (aix_thread_detach): Adjust.
12590         * corefile.c (core_file_command): Adjust.
12591         * corelow.c (core_detach): Adjust.
12592         * darwin-nat.c (darwin_detach): Adjust.
12593         * gnu-nat.c (gnu_detach): Adjust.
12594         * inf-ptrace.c (inf_ptrace_detach): Adjust.
12595         * infcmd.c (detach_command): Adjust
12596         * infrun.c (follow_fork_inferior): Adjust.
12597         (handle_vfork_child_exec_or_exit): Adjust.
12598         * linux-fork.c (linux_fork_detach): Remove args parameter.
12599         * linux-fork.h (linux_fork_detach): Likewise.
12600         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
12601         * linux-thread-db.c (thread_db_detach): Likewise.
12602         * nto-procfs.c (procfs_detach): Likewise.
12603         * procfs.c (procfs_detach): Likewise.
12604         (do_detach): Remove signo parameter.
12605         * record.c (record_detach): Remove args parameter.
12606         * record.h (record_detach): Likewise.
12607         * remote-sim.c (gdbsim_detach): Likewise.
12608         * remote.c (remote_detach_1): Likewise.
12609         (remote_detach): Likewise.
12610         (extended_remote_detach): Likewise.
12611         * sol-thread.c (sol_thread_detach): Likewise.
12612         * target-delegates.c: Re-generate.
12613         * top.c (struct qt_args) <args>: Remove field.
12614         (kill_or_detach): Don't pass args.
12615         (quit_force): Don't set args.
12616         * windows-nat.c (windows_detach): Remove args parameter.
12617
12618 2018-01-19  Yao Qi  <yao.qi@linaro.org>
12619
12620         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
12621         (arm_linux_init_abi): Install it.
12622
12623 2018-01-19  Yao Qi  <yao.qi@linaro.org>
12624
12625         * osabi.c (gdb_osabi_names): Extend the regexp for
12626         arm-linux-gnueabihf.
12627
12628 2018-01-18  Yao Qi  <yao.qi@linaro.org>
12629
12630         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
12631         m_abbrevs.
12632         (abbrev_table::add_abbrev): Update.
12633         (abbrev_table::lookup_abbrev): Update.
12634
12635 2018-01-18  Yao Qi  <yao.qi@linaro.org>
12636
12637         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
12638
12639 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
12640
12641         * compile/compile.c (compile_to_object): Convert "triplet_rx"
12642         to "std::string".
12643
12644 2018-01-17  Tom Tromey  <tom@tromey.com>
12645
12646         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
12647
12648 2018-01-17  Tom Tromey  <tom@tromey.com>
12649
12650         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
12651         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
12652         (create_array_type_with_stride): Update.
12653         * dwarf2read.c (set_die_type): Update.
12654
12655 2018-01-17  Tom Tromey  <tom@tromey.com>
12656
12657         * dwarf2read.c (delayed_method_info): Remove typedef.
12658         (dwarf2_cu::method_info): Now a std::vector.
12659         (add_to_method_list): Update.
12660         (free_delayed_list): Remove.
12661         (compute_delayed_physnames): Update.
12662         (process_full_comp_unit, process_full_type_unit): Clear the method
12663         list.  Remove cleanups.
12664         (psymtab_include_file_name): Add name_holder parameter.  Use
12665         unique_xmalloc_ptr.
12666         (dwarf_decode_lines): Update.
12667
12668 2018-01-17  Tom Tromey  <tom@tromey.com>
12669             Simon Marchi  <simon.marchi@ericsson.com>
12670
12671         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
12672         (dwarf2_per_objfile::free_cached_comp_units)
12673         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
12674         (init_cutu_and_read_dies_no_follow): Update.
12675         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
12676         (dwarf2_cu::~dwarf2_cu): New.
12677         (free_heap_comp_unit, free_stack_comp_unit): Remove.
12678         (age_cached_comp_units, free_one_cached_comp_unit): Update.
12679
12680 2018-01-17  Tom Tromey  <tom@tromey.com>
12681             Simon Marchi  <simon.marchi@ericsson.com>
12682
12683         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
12684         (struct die_reader_specs) <abbrev_table>: New member.
12685         (struct abbrev_table): Add constructor.
12686         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
12687         <abbrev_obstack>: Now an auto_obstack.
12688         (abbrev_table_up): New typedef.
12689         (init_cu_die_reader): Add abbrev_table parameter.
12690         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
12691         Add result_dwo_abbrev_table.
12692         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
12693         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
12694         Update.
12695         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
12696         parameter.
12697         (skip_children): Update.
12698         (abbrev_table::alloc_abbrev): Rename from
12699         abbrev_table_alloc_abbrev.
12700         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
12701         (abbrev_table::lookup_abbrev): Rename from
12702         abbrev_table_lookup_abbrev.
12703         (abbrev_table_read_table): Return abbrev_table_up.
12704         (abbrev_table_free, abbrev_table_free_cleanup)
12705         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
12706         (load_partial_dies): Update.
12707
12708 2018-01-17  Tom Tromey  <tom@tromey.com>
12709
12710         * dwarf2read.c (dwarf2_compute_name): Update comment.
12711         (read_func_scope, read_variable): Update.
12712         (new_symbol): Remove.
12713         (new_symbol_full): Rename to new_symbol.
12714
12715 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
12716
12717         PR gdb/16577
12718         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
12719         a warning instead of throwing an error, set section size to 0 and return
12720         NULL.
12721         * gdb_bfd.h (gdb_bfd_map_section): Update description.
12722
12723 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
12724
12725         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
12726         std::string.
12727         (linux_ptrace_attach_fail_reason_string): Likewise.
12728         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
12729         Likewise.
12730         (linux_ptrace_attach_fail_reason_string): Likewise.
12731         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
12732
12733 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
12734
12735         * linux-nat.c (linux_nat_attach): Remove xstrdup.
12736
12737 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
12738
12739         PR gdb/21559
12740         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
12741         checking for fs_base/gs_base fields in struct user_regs_struct.
12742         * configure: Regenerate.
12743
12744 2018-01-17  Yao Qi  <yao.qi@linaro.org>
12745
12746         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
12747         function.
12748         (aarch64_linux_init_abi): Install it to gdbarch hook
12749         gcc_target_options.
12750
12751 2018-01-15  Pedro Alves  <palves@redhat.com>
12752
12753         * common/signals-state-save-restore.c
12754         (save_original_signals_state): Fix typos.
12755
12756 2017-01-12  Tom Tromey  <tom@tromey.com>
12757             Sergio Durigan Junior  <sergiodj@redhat.com>
12758
12759         * Makefile.in (install-only): Install gdb-add-index.
12760
12761 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
12762
12763         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
12764
12765 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12766
12767         * infrun.c (keep_going_pass_signal): Clear step-over info when
12768         insert_breakpoints fails.
12769
12770 2018-01-11  Pedro Alves  <palves@redhat.com>
12771
12772         PR gdb/22583
12773         * infrun.c (resume): Rename to ...
12774         (resume_1): ... this.
12775         (resume): Reimplement as wrapper around resume_1.
12776
12777 2018-01-11  Pedro Alves  <palves@redhat.com>
12778
12779         PR remote/22597
12780         * remote.c (remote_parse_stop_reply): Default to the last-set
12781         general thread instead of to 'magic_null_ptid'.
12782
12783 2018-01-10  Pedro Alves  <palves@redhat.com>
12784
12785         * language.h (language_get_symbol_name_matcher): Rename ...
12786         (get_symbol_name_matcher): ... this.
12787         * language.c (language_get_symbol_name_matcher): Ditto.
12788         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
12789         callers adjusted.
12790
12791 2018-01-10  Pedro Alves  <palves@redhat.com>
12792
12793         PR gdb/22670
12794         * dwarf2read.c
12795         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
12796         Adjust to use language_get_symbol_name_matcher instead of
12797         language_defn::la_get_symbol_name_matcher.
12798         * language.c (language_get_symbol_name_matcher): If in Ada mode
12799         and the lookup name is a verbatim match, return Ada's matcher.
12800         * language.h (language_get_symbol_name_matcher): Adjust comment.
12801         (ada_lookup_name_info::verbatim_p):: New method.
12802
12803 2018-01-10  Pedro Alves  <palves@redhat.com>
12804
12805         PR gdb/22670
12806         * ada-lang.c (ada_collect_symbol_completion_matches): If the
12807         minsym's language is language_auto or language_cplus, pass down
12808         language_ada instead.
12809         * symtab.c (compare_symbol_name): Don't frob symbol language here.
12810
12811 2018-01-10  Pedro Alves  <palves@redhat.com>
12812
12813         PR gdb/22670
12814         * minsyms.c (linkage_name_str): New function.
12815         (iterate_over_minimal_symbols): Use it.
12816
12817 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12818
12819         * NEWS: Document that 'info proc' now works on FreeBSD.
12820
12821 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12822
12823         * configure.ac: Check for kinfo_getfile in libutil.
12824         * configure: Regenerate.
12825         * config.in: Regenerate.
12826         * fbsd-nat.c: Include "fbsd-tdep.h".
12827         (fbsd_fetch_cmdline): New.
12828         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
12829         rather than calling error.
12830         (fbsd_info_proc): New.
12831         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
12832         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
12833         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
12834
12835 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12836
12837         * fbsd-nat.c (struct free_deleter): Remove.
12838         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
12839
12840 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12841
12842         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
12843         NULL for an empty pathname.
12844
12845 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12846
12847         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
12848         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
12849         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
12850         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
12851         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
12852         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
12853         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
12854         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
12855         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
12856         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
12857         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
12858         (fbsd_core_fetch_timeval, fbsd_print_sigset)
12859         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
12860         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
12861         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
12862
12863 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
12864
12865         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
12866         (gnu_xfer_auxv): New function.
12867         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
12868         TARGET_OBJECT_AUXV.
12869
12870 2018-01-08  Yao Qi  <yao.qi@linaro.org>
12871             Simon Marchi  <simon.marchi@ericsson.com>
12872
12873         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
12874         common/selftest.c.
12875         (COMMON_OBS): Remove selftest.o.
12876         * configure.ac: Append selftest-arch.c and common/selftest.c to
12877         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
12878         * configure: Re-generated.
12879         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
12880         GDB_SELF_TEST.
12881         (maintenance_info_selftests): Likewise.
12882
12883 2018-01-08  Xavier Roirand  <roirand@adacore.com>
12884
12885         * ada-valprint.c (val_print_packed_array_elements): Use
12886         proper number of elements when printing an array indexed
12887         by an enumeration type.
12888
12889 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12890
12891         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
12892         (dw2_get_file_names_reader): Adjust.
12893         (lookup_dwo_signatured_type): Adjust.
12894         (lookup_dwp_signatured_type): Adjust.
12895         (lookup_signatured_type): Adjust.
12896         (create_type_unit_group): Adjust.
12897         (get_type_unit_group): Adjust.
12898         (process_psymtab_comp_unit_reader): Adjust.
12899         (build_type_psymtabs_reader): Adjust.
12900         (scan_partial_symbols): Adjust.
12901         (add_partial_symbol): Adjust.
12902         (add_partial_subprogram): Adjust.
12903         (peek_die_abbrev): Adjust.
12904         (fixup_go_packaging): Adjust.
12905         (process_imported_unit_die): Adjust.
12906         (dwarf2_compute_name): Adjust.
12907         (dwarf2_physname): Adjust.
12908         (read_import_statement): Adjust.
12909         (handle_DW_AT_stmt_list): Adjust.
12910         (read_file_scope): Adjust.
12911         (read_func_scope): Adjust.
12912         (read_lexical_block_scope): Adjust.
12913         (read_call_site_scope): Adjust.
12914         (read_variable): Adjust.
12915         (dwarf2_rnglists_process): Adjust.
12916         (dwarf2_ranges_process): Adjust.
12917         (dwarf2_ranges_read): Adjust.
12918         (dwarf2_get_pc_bounds): Adjust.
12919         (dwarf2_record_block_ranges): Adjust.
12920         (dwarf2_add_field): Adjust.
12921         (dwarf2_add_member_fn): Adjust.
12922         (read_structure_type): Adjust.
12923         (process_structure_scope): Adjust.
12924         (read_enumeration_type): Adjust.
12925         (read_array_type): Adjust.
12926         (mark_common_block_symbol_computed): Adjust.
12927         (read_common_block): Adjust.
12928         (read_namespace_type): Adjust.
12929         (read_namespace): Adjust.
12930         (read_module_type): Adjust.
12931         (read_tag_pointer_type): Adjust.
12932         (read_tag_ptr_to_member_type): Adjust.
12933         (read_tag_string_type): Adjust.
12934         (read_subroutine_type): Adjust.
12935         (read_typedef): Adjust.
12936         (read_base_type): Adjust.
12937         (attr_to_dynamic_prop): Adjust.
12938         (read_subrange_type): Adjust.
12939         (read_unspecified_type): Adjust.
12940         (dwarf2_read_abbrevs): Adjust.
12941         (load_partial_dies): Adjust.
12942         (read_partial_die): Adjust.
12943         (find_partial_die): Adjust.
12944         (guess_partial_die_structure_name): Adjust.
12945         (fixup_partial_die): Adjust.
12946         (read_attribute_value): Adjust.
12947         (read_addr_index): Adjust.
12948         (read_addr_index_from_leb128): Adjust.
12949         (read_str_index): Adjust.
12950         (dwarf2_string_attr): Adjust.
12951         (get_debug_line_section): Adjust.
12952         (dwarf_decode_line_header): Adjust.
12953         (lnp_state_machine::check_line_address): Adjust.
12954         (dwarf_decode_lines_1): Adjust.
12955         (dwarf_decode_lines): Adjust.
12956         (dwarf2_start_symtab): Adjust.
12957         (var_decode_location): Adjust.
12958         (new_symbol_full): Adjust.
12959         (dwarf2_const_value_data): Adjust.
12960         (dwarf2_const_value_attr): Adjust.
12961         (dwarf2_const_value): Adjust.
12962         (die_type): Adjust.
12963         (die_containing_type): Adjust.
12964         (build_error_marker_type): Adjust.
12965         (lookup_die_type): Adjust.
12966         (guess_full_die_structure_name): Adjust.
12967         (anonymous_struct_prefix): Adjust.
12968         (determine_prefix): Adjust.
12969         (dwarf2_name): Adjust.
12970         (follow_die_ref_or_sig): Adjust.
12971         (follow_die_offset): Adjust.
12972         (follow_die_ref): Adjust.
12973         (follow_die_sig_1): Adjust.
12974         (follow_die_sig): Adjust.
12975         (get_signatured_type): Adjust.
12976         (get_DW_AT_signature_type): Adjust.
12977         (decode_locdesc): Adjust.
12978         (dwarf_decode_macros): Adjust.
12979         (cu_debug_loc_section): Adjust.
12980         (fill_in_loclist_baton): Adjust.
12981         (dwarf2_symbol_mark_computed): Adjust.
12982         (init_one_comp_unit): Don't assign
12983         dwarf2_cu::dwarf2_per_objfile.
12984         (set_die_type): Adjust.
12985
12986 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
12987
12988         * dwarf2read.c (struct mapped_debug_names): Add constructor.
12989         <dwarf2_per_objfile>: New field.
12990         (dwarf2_per_objfile): Remove global.
12991         (get_dwarf2_per_objfile): New function.
12992         (set_dwarf2_per_objfile): New function.
12993         (dwarf2_build_psymtabs_hard): Change objfile parameter to
12994         dwarf2_per_objfile.
12995         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12996         (read_abbrev_offset): Likewise.
12997         (read_indirect_string): Likewise.
12998         (read_indirect_line_string): Likewise.
12999         (read_indirect_string_at_offset): Likewise.
13000         (read_indirect_string_from_dwz): Likewise.
13001         (dwarf2_find_containing_comp_unit): Change objfile parameter to
13002         dwarf2_per_objfile.
13003         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
13004         (create_all_comp_units): Change objfile parameter to
13005         dwarf2_per_objfile.
13006         (create_all_type_units): Likewise.
13007         (process_queue): Add dwarf2_per_objfile parameter.
13008         (read_and_check_comp_unit_head): Likewise.
13009         (lookup_dwo_unit_in_dwp): Likewise.
13010         (get_dwp_file): Likewise.
13011         (process_cu_includes): Likewise.
13012         (struct free_dwo_file_cleanup_data): New struct.
13013         (dwarf2_has_info): Use get_dwarf2_per_objfile and
13014         set_dwarf2_per_objfile.
13015         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
13016         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
13017         context, adjust calls.
13018         (dw2_instantiate_symtab): Likewise.
13019         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
13020         (dw2_get_cu): Likewise.
13021         (create_cu_from_index_list): Change objfile parameter to
13022         dwarf2_per_objfile.
13023         (create_cus_from_index_list): Get dwarf2_per_objfile from
13024         context, adjust calls.
13025         (create_cus_from_index): Likewise.
13026         (create_signatured_type_table_from_index): Change objfile
13027         parameter to dwarf2_per_objfile.
13028         (create_signatured_type_table_from_debug_names): Change objfile
13029         parameter to dwarf2_per_objfile.
13030         (create_addrmap_from_index): Likewise.
13031         (create_addrmap_from_aranges): Likewise.
13032         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
13033         (dw2_setup): Remove.
13034         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
13035         context.
13036         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
13037         get_dwarf2_per_objfile.
13038         (dw2_forget_cached_source_info): Likewise.
13039         (dw2_map_symtabs_matching_filename): Likewise.
13040         (struct dw2_symtab_iterator) <index>: Remove.
13041         <dwarf2_per_objfile>: New field.
13042         (dw2_symtab_iter_init): Replace index parameter with
13043         dwarf2_per_objfile.
13044         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
13045         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
13046         (dw2_print_stats): Likewise.
13047         (dw2_dump): Likewise.
13048         (dw2_expand_symtabs_for_function): Likewise.
13049         (dw2_expand_all_symtabs): Likewise.
13050         (dw2_expand_symtabs_with_fullname): Likewise.
13051         (dw2_expand_marked_cus): Replace index and objfile parameters
13052         with dwarf2_per_objfile.
13053         (dw_expand_symtabs_matching_file_matcher): Add
13054         dwarf2_per_objfile parameter and adjust calls.
13055         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
13056         adjust calls.
13057         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
13058         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
13059         adjust calls.
13060         (create_cus_from_debug_names_list): Replace objfile parameter
13061         with dwarf2_per_objfile and adjust calls.
13062         (create_cus_from_debug_names): Likewise.
13063         (dwarf2_read_debug_names): Likewise.
13064         (mapped_debug_names::namei_to_name): Adjust call.
13065         (dw2_debug_names_iterator::next): Likewise.
13066         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
13067         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
13068         (dw2_debug_names_dump): Likewise.
13069         (dw2_debug_names_expand_symtabs_for_function): Likewise.
13070         (dw2_debug_names_expand_symtabs_matching): Likewise.
13071         (dwarf2_initialize_objfile): Likewise.
13072         (dwarf2_build_psymtabs): Likewise.
13073         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
13074         this_cu.
13075         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
13076         (read_and_check_comp_unit_head): Likewise.
13077         (read_abbrev_offset): Likewise.
13078         (create_debug_type_hash_table): Likewise.
13079         (create_debug_types_hash_table): Likewise.
13080         (create_all_type_units): Replace objfile parameter with
13081         dwarf2_per_objfile.
13082         (add_type_unit): Add dwarf2_per_objfile parameter.
13083         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
13084         with dwarf2_per_objfile.
13085         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
13086         (lookup_dwp_signatured_type): Likewise.
13087         (lookup_signatured_type): Likewise.
13088         (read_cutu_die_from_dwo): Likewise.
13089         (init_tu_and_read_dwo_dies): Likewise.
13090         (init_cutu_and_read_dies): Likewise.
13091         (init_cutu_and_read_dies_no_follow): Likewise.
13092         (allocate_type_unit_groups_table): Add objfile parameter.
13093         (create_type_unit_group): Use dwarf2_per_objfile from cu.
13094         (get_type_unit_group): Likewise.
13095         (process_psymtab_comp_unit): Update call.
13096         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
13097         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
13098         (print_tu_stats): Likewise.
13099         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
13100         in void* parameter.
13101         (build_type_psymtabs): Change objfile parameter to
13102         dwarf2_per_objfile.
13103         (process_skeletonless_type_unit): Use dwarf2_per_objfile
13104         passed in void* parameter.
13105         (process_skeletonless_type_units): Change objfile parameter to
13106         dwarf2_per_objfile.
13107         (set_partial_user): Likewise.
13108         (dwarf2_build_psymtabs_hard): Likewise.
13109         (read_comp_units_from_section): Likewise.
13110         (create_all_comp_units): Likewise.
13111         (scan_partial_symbols): Update calls.
13112         (add_partial_symbol): Likewise.
13113         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
13114         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
13115         (process_queue): Add dwarf2_per_objfile parameter.
13116         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
13117         (compute_compunit_symtab_includes): Likewise.
13118         (process_cu_includes): Add dwarf2_per_objfile parameter.
13119         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
13120         (process_full_type_unit): Likewise.
13121         (process_imported_unit_die): Update call.
13122         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
13123         (read_file_scope): Likewise.
13124         (allocate_dwo_file_hash_table): Add objfile parameter.
13125         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
13126         (create_cus_hash_table): Likewise.
13127         (create_dwp_hash_table): Likewise.
13128         (create_dwo_unit_in_dwp_v1): Likewise.
13129         (create_dwp_v2_section): Likewise.
13130         (create_dwo_unit_in_dwp_v2): Likewise.
13131         (lookup_dwo_unit_in_dwp): Likewise.
13132         (try_open_dwop_file): Likewise.
13133         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
13134         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
13135         cleanup to include a reference to dwarf2_per_objfile.
13136         (open_dwp_file): Add dwarf2_per_objfile parameter.
13137         (open_and_init_dwp_file): Likewise.
13138         (get_dwp_file): Likewise.
13139         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
13140         (queue_and_load_all_dwo_tus): Update call.
13141         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
13142         data.
13143         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
13144         (dwarf2_ranges_process): Likewise.
13145         (dwarf2_get_pc_bounds): Likewise.
13146         (mark_common_block_symbol_computed): Likewise.
13147         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
13148         (dwarf2_read_abbrevs): Update call.
13149         (read_partial_die): Use dwarf2_per_objfile from cu.
13150         (find_partial_die): Likewise.
13151         (fixup_partial_die): Likewise.
13152         (read_attribute_value): Likewise.
13153         (read_indirect_string_at_offset_from): Add objfile parameter.
13154         (read_indirect_string_at_offset): Add dwarf2_per_objfile
13155         parameter.
13156         (read_indirect_string_from_dwz): Add objfile parameter.
13157         (read_indirect_string): Add objfile parameter.
13158         (read_addr_index_1): Add dwarf2_per_objfile parameter.
13159         (read_addr_index): Use dwarf2_per_objfile from cu.
13160         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
13161         call dw2_setup.
13162         (read_str_index): Use dwarf2_per_objfile from cu.
13163         (get_debug_line_section): Likewise.
13164         (read_formatted_entries): Add dwarf2_per_objfile parameter.
13165         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
13166         (new_symbol_full): Use dwarf2_per_objfile from cu.
13167         (build_error_marker_type): Likewise.
13168         (lookup_die_type): Likewise.
13169         (determine_prefix): Likewise.
13170         (follow_die_offset): Likewise.
13171         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
13172         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
13173         (dwarf2_fetch_die_type_sect_off): Likewise.
13174         (dwarf2_get_die_type): Likewise.
13175         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
13176         (get_signatured_type): Likewise.
13177         (get_DW_AT_signature_type): Likewise.
13178         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
13179         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
13180         (cu_debug_loc_section): Likewise.
13181         (fill_in_loclist_baton): Likewise.
13182         (dwarf2_symbol_mark_computed): Likewise.
13183         (dwarf2_find_containing_comp_unit): Change objfile parameter to
13184         dwarf2_per_objfile.
13185         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
13186         parameter.
13187         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
13188         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
13189         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
13190         (set_die_type): Use dwarf2_free_objfile from cu.
13191         (get_die_type_at_offset): Likewise.
13192         (dwarf2_per_objfile_free): Don't assign global variable.
13193         (debug_names) <constructor>: Add dwarf2_per_objfile
13194         parameter, update m_debugstrlookup construction.
13195         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
13196         parameter.
13197         <m_dwarf2_per_objfile>: New field.
13198         <lookup>: Use m_dwarf2_per_objfile.
13199         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
13200         (psyms_seen_size): Likewise.
13201         (write_gdbindex): Replace objfile parameter with
13202         dwarf2_per_objfile.
13203         (write_debug_names): Likewise.
13204         (write_psymtabs_to_index): Likewise.
13205         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
13206         calls.
13207
13208 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
13209
13210         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
13211         <dwarf2_per_objfile>: New field.
13212         (struct dwarf2_per_cu_data) <objfile>: Remove.
13213         <dwarf2_per_objfile>: New field.
13214         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
13215         of objfile.
13216         (create_signatured_type_table_from_index): Likewise.
13217         (create_debug_type_hash_table): Likewise.
13218         (fill_in_sig_entry_from_dwo_entry): Likewise.
13219         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
13220         (create_type_unit_group): Assign dwarf2_per_objfile instead of
13221         objfile.
13222         (create_partial_symtab): Access objfile through
13223         dwarf2_per_objfile.
13224         (process_psymtab_comp_unit_reader): Likewise.
13225         (read_comp_units_from_section): Likewise.
13226         (scan_partial_symbols): Likewise.
13227         (add_partial_symbol): Likewise.
13228         (add_partial_subprogram): Likewise.
13229         (peek_die_abbrev): Likewise.
13230         (fixup_go_packaging): Likewise.
13231         (process_full_comp_unit): Likewise.
13232         (process_full_type_unit): Likewise.
13233         (process_imported_unit_die): Likewise.
13234         (dwarf2_compute_name): Likewise.
13235         (dwarf2_physname): Likewise.
13236         (read_import_statement): Likewise.
13237         (create_cus_hash_table): Assign dwarf2_physname instead of
13238         objfile.
13239         (read_func_scope): Access objfile through dwarf2_per_objfile.
13240         (read_lexical_block_scope): Likewise.
13241         (read_call_site_scope): Likewise.
13242         (read_variable): Likewise.
13243         (dwarf2_rnglists_process): Likewise.
13244         (dwarf2_ranges_process): Likewise.
13245         (dwarf2_ranges_read): Likewise.
13246         (dwarf2_record_block_ranges): Likewise.
13247         (dwarf2_add_field): Likewise.
13248         (dwarf2_add_member_fn): Likewise.
13249         (read_structure_type): Likewise.
13250         (process_structure_scope): Likewise.
13251         (read_enumeration_type): Likewise.
13252         (read_array_type): Likewise.
13253         (read_common_block): Likewise.
13254         (read_namespace_type): Likewise.
13255         (read_namespace): Likewise.
13256         (read_module_type): Likewise.
13257         (read_tag_pointer_type): Likewise.
13258         (read_tag_ptr_to_member_type): Likewise.
13259         (read_tag_string_type): Likewise.
13260         (read_subroutine_type): Likewise.
13261         (read_typedef): Likewise.
13262         (read_base_type): Likewise.
13263         (attr_to_dynamic_prop): Likewise.
13264         (read_subrange_type): Likewise.
13265         (read_unspecified_type): Likewise.
13266         (load_partial_dies): Likewise.
13267         (read_partial_die): Likewise.
13268         (find_partial_die): Likewise.
13269         (guess_partial_die_structure_name): Likewise.
13270         (fixup_partial_die): Likewise.
13271         (read_attribute_value): Likewise.
13272         (read_addr_index_from_leb128): Likewise.
13273         (dwarf2_read_addr_index): Likewise.
13274         (dwarf2_string_attr): Likewise.
13275         (lnp_state_machine::check_line_address): Likewise.
13276         (dwarf_decode_lines_1): Likewise.
13277         (dwarf_decode_lines): Likewise.
13278         (dwarf2_start_symtab): Likewise.
13279         (var_decode_location): Likewise.
13280         (new_symbol_full): Likewise.
13281         (dwarf2_const_value_data): Likewise.
13282         (dwarf2_const_value_attr): Likewise.
13283         (dwarf2_const_value): Likewise.
13284         (die_type): Likewise.
13285         (die_containing_type): Likewise.
13286         (lookup_die_type): Likewise.
13287         (guess_full_die_structure_name): Likewise.
13288         (anonymous_struct_prefix): Likewise.
13289         (dwarf2_name): Likewise.
13290         (follow_die_ref_or_sig): Likewise.
13291         (follow_die_offset): Likewise.
13292         (follow_die_ref): Likewise.
13293         (dwarf2_fetch_die_loc_sect_off): Likewise.
13294         (dwarf2_fetch_constant_bytes): Likewise.
13295         (dwarf2_fetch_die_type_sect_off): Likewise.
13296         (dwarf2_get_die_type): Likewise.
13297         (follow_die_sig): Likewise.
13298         (decode_locdesc): Likewise.
13299         (dwarf2_per_cu_objfile): Likewise.
13300         (dwarf2_per_cu_text_offset): Likewise.
13301         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
13302         objfile.
13303         (set_die_type): Access objfile through
13304         dwarf2_per_objfile.
13305
13306 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
13307
13308         * valprint.c (converted_character_d): Remove typedef.
13309         (DEF_VEC_O (converted_character_d)): Remove.
13310         (count_next_character): Use std::vector.
13311         (print_converted_chars_to_obstack): Likewise.
13312         (generic_printstr): Likewise.
13313
13314 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
13315
13316         * xml-support.h (struct gdb_xml_value): Add constructor.
13317         <value>: Change type to unique_xmalloc_ptr.
13318         (gdb_xml_value_s): Remove typedef.
13319         (DEF_VEC_O (gdb_xml_value_s)): Remove.
13320         (gdb_xml_element_start_handler): Change parameter type to
13321         std::vector.
13322         (xml_find_attribute): Likewise.
13323         * xml-support.c (xml_find_attribute): Change parameter type to
13324         std::vector and adjust.
13325         (gdb_xml_values_cleanup): Remove.
13326         (gdb_xml_parser::start_element): Adjust to std::vector.
13327         (xinclude_start_include): Change paraeter type to std::vector
13328         and adjust.
13329         * btrace.c (check_xml_btrace_version): Likewise.
13330         (parse_xml_btrace_block): Likewise.
13331         (parse_xml_btrace_pt_config_cpu): Likewise.
13332         (parse_xml_btrace_pt): Likewise.
13333         (parse_xml_btrace_conf_bts): Likewise.
13334         (parse_xml_btrace_conf_pt): Likewise.
13335         * memory-map.c (memory_map_start_memory): Likewise.
13336         (memory_map_start_property): Likewise.
13337         * osdata.c (osdata_start_osdata): Likewise.
13338         (osdata_start_item): Likewise.
13339         (osdata_start_column): Likewise.
13340         * remote.c (start_thread): Likewise.
13341         * solib-aix.c (library_list_start_library): Likewise.
13342         (library_list_start_list): Likewise.
13343         * solib-svr4.c (library_list_start_library): Likewise.
13344         (svr4_library_list_start_list): Likewise.
13345         * solib-target.c (library_list_start_segment): Likewise.
13346         (library_list_start_section): Likewise.
13347         (library_list_start_library): Likewise.
13348         (library_list_start_list): Likewise.
13349         * tracepoint.c (traceframe_info_start_memory): Likewise.
13350         (traceframe_info_start_tvar): Likewise.
13351         * xml-syscall.c (syscall_start_syscall): Likewise.
13352         * xml-tdesc.c (tdesc_start_target): Likewise.
13353         (tdesc_start_feature): Likewise.
13354         (tdesc_start_reg): Likewise.
13355         (tdesc_start_union): Likewise.
13356         (tdesc_start_struct): Likewise.
13357         (tdesc_start_flags): Likewise.
13358         (tdesc_start_enum): Likewise.
13359         (tdesc_start_field): Likewise.
13360         (tdesc_start_enum_value): Likewise.
13361         (tdesc_start_vector): Likewise.
13362
13363 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
13364
13365         * extension.h (struct xmethod_worker) <clone>: Remove.
13366         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
13367         Remove.
13368         (python_xmethod_worker::clone): Remove.
13369         * valops.c (find_overload_match): Use std::move instead of
13370         clone.
13371
13372 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
13373
13374         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
13375         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
13376         <free_xmethod_worker_data>: Remove.
13377         <get_matching_xmethod_workers>: Chance VEC to std::vector.
13378         <get_xmethod_arg_types>: Remove.
13379         <get_xmethod_result_type>: Remove.
13380         <invoke_xmethod>: Remove.
13381         * extension.c (new_xmethod_worker): Remove.
13382         (clone_xmethod_worker): Remove.
13383         (get_matching_xmethod_workers): Return void, pass std::vector by
13384         pointer.
13385         (get_xmethod_arg_types): Rename to...
13386         (xmethod_worker::get_arg_types): ... this, and adjust.
13387         (get_xmethod_result_type): Rename to...
13388         (xmethod_worker::get_result_type): ... this, and adjust.
13389         (invoke_xmethod): Remove.
13390         (free_xmethod_worker): Remove.
13391         (free_xmethod_worker_vec): Remove.
13392         * extension.h (enum ext_lang_rc): Move here from
13393         extension-priv.h.
13394         (struct xmethod_worker): Add constructor and destructor.
13395         <data>: Remove.
13396         <value>: Remove.
13397         <invoke, clone, do_get_result_type, do_get_arg_types>: New
13398         virtual pure methods.
13399         <get_arg_types, get_result_type>: New methods.
13400         (xmethod_worker_ptr): Remove typedef.
13401         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
13402         (xmethod_worker_vec): Remove typedef.
13403         (xmethod_worker_up): New typedef.
13404         (invoke_xmethod): Remove.
13405         (clone_xmethod_worker): Remove.
13406         (free_xmethod_worker): Remove.
13407         (free_xmethod_worker_vec): Remove.
13408         (get_xmethod_arg_types): Remove.
13409         (get_xmethod_result_type): Remove.
13410         * valops.c (find_method_list): Use std::vector, don't use
13411         intermediate vector.
13412         (value_find_oload_method_list): Use std::vector.
13413         (find_overload_match): Use std::vector.
13414         (find_oload_champ): Use std::vector.
13415         * value.c (value_free): Use operator delete.
13416         (value_of_xmethod): Rename to...
13417         (value_from_xmethod): ... this.  Don't assign
13418         xmethod_worker::value, take rvalue-reference.
13419         (result_type_of_xmethod): Adjust.
13420         (call_xmethod): Adjust.
13421         * value.h: Include extension.h.
13422         (struct xmethod_worker): Don't forward-declare.
13423         (value_of_xmethod): Rename to...
13424         (value_from_xmethod): ... this, take rvalue-reference.
13425         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
13426         (struct python_xmethod_worker): ... this, add constructor and
13427         destructor.
13428         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
13429         (gdbpy_free_xmethod_worker_data): Rename to...
13430         (python_xmethod_worker::~python_xmethod_worker): ... this and
13431         adjust.
13432         (gdbpy_clone_xmethod_worker_data): Rename to...
13433         (python_xmethod_worker::clone): ... this and adjust.
13434         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
13435         temporary vector.
13436         (gdbpy_get_xmethod_arg_types): Rename to...
13437         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
13438         (gdbpy_get_xmethod_result_type): Rename to...
13439         (python_xmethod_worker::do_get_result_type): ... this and
13440         adjust.
13441         (gdbpy_invoke_xmethod): Rename to...
13442         (python_xmethod_worker::invoke): ... this and adjust.
13443         (new_python_xmethod_worker): Rename to...
13444         (python_xmethod_worker::python_xmethod_worker): ... this and
13445         adjust.
13446         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
13447         Remove.
13448         (gdbpy_free_xmethod_worker_data): Remove.
13449         (gdbpy_get_matching_xmethod_workers): Use std::vector.
13450         (gdbpy_get_xmethod_arg_types): Remove.
13451         (gdbpy_get_xmethod_result_type): Remove.
13452         (gdbpy_invoke_xmethod): Remove.
13453         * python/python.c (python_extension_ops): Remove obsolete
13454         callbacks.
13455
13456 2018-01-05  Pedro Alves  <palves@redhat.com>
13457
13458         PR gdb/18653
13459         * common/signals-state-save-restore.c
13460         (save_original_signals_state): New parameter 'quiet'.  Warn if we
13461         find a custom handler preinstalled, instead of internal erroring.
13462         But only warn if !quiet.
13463         * common/signals-state-save-restore.h
13464         (save_original_signals_state): New parameter 'quiet'.
13465         * main.c (captured_main_1): Move save_original_signals_state call
13466         after option handling, and pass QUIET.
13467
13468 2018-01-05  Pedro Alves  <palves@redhat.com>
13469
13470         * spu-tdep.c (spu_catch_start): Pass
13471         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
13472
13473 2018-01-05  Pedro Alves  <palves@redhat.com>
13474
13475         PR gdb/22670
13476         * ada-lang.c (literal_symbol_name_matcher): New function.
13477         (ada_get_symbol_name_matcher): Use it for
13478         symbol_name_match_type::SEARCH_NAME.
13479         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
13480         it down instead of assuming symbol_name_match_type::FULL.
13481         * block.h (block_lookup_symbol): New parameter 'match_type'.
13482         * c-valprint.c (print_unpacked_pointer): Use
13483         lookup_symbol_search_name instead of lookup_symbol.
13484         * compile/compile-object-load.c (get_out_value_type): Pass down
13485         symbol_name_match_type::SEARCH_NAME.
13486         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
13487         symbol_name_match_type::FULL.
13488         * cp-support.c (cp_get_symbol_name_matcher): Handle
13489         symbol_name_match_type::SEARCH_NAME.
13490         * infrun.c (insert_exception_resume_breakpoint): Use
13491         lookup_symbol_search_name.
13492         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
13493         * psymtab.c (maintenance_check_psymtabs): Use
13494         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
13495         * stack.c (print_frame_args): Use lookup_symbol_search_name and
13496         SYMBOL_SEARCH_NAME.
13497         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
13498         if symbol_name_match_type::SEARCH_NAME.
13499         (lookup_symbol_in_language): Pass down
13500         symbol_name_match_type::FULL.
13501         (lookup_symbol_search_name): New.
13502         (lookup_language_this): Pass down
13503         symbol_name_match_type::SEARCH_NAME.
13504         (lookup_symbol_aux, lookup_local_symbol): New parameter
13505         'match_type'.  Pass it down.
13506         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
13507         (lookup_symbol_search_name): New declaration.
13508         (lookup_symbol_in_block): New 'match_type' parameter.
13509
13510 2018-01-05  Pedro Alves  <palves@redhat.com>
13511
13512         PR gdb/22670
13513         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
13514         ada_lookup_symbol.
13515         (ada_lookup_symbol): Reimplement in terms of
13516         ada_lookup_symbol_list, bits factored out from
13517         ada_lookup_encoded_symbol.
13518
13519 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
13520
13521         * ada-exp.y (write_object_renaming): When subscripting an array
13522         using a symbol as the index, pass the block in call to
13523         ada_lookup_encoded_symbol when looking that symbol up.
13524
13525 2018-01-05  Jerome Guitton  <guitton@adacore.com>
13526
13527         * ada-lang.c (ada_array_length): Use ada_index_type instead of
13528         TYPE_INDEX_TYPE.
13529
13530 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
13531
13532         * ada-lang.c (ada_to_fixed_value_create): Add handling of
13533         the case where VALUE_LVAL (val0) is not lval_memory.
13534
13535 2018-01-05  Xavier Roirand  <roirand@adacore.com>
13536
13537         * ada-valprint.c (print_optional_low_bound): Handle
13538         character-indexed array printing like boolean-indexed array
13539         printing.
13540
13541 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
13542
13543         * NEWS: Create a new section for the next release branch.
13544         Rename the section of the current branch, now that it has
13545         been cut.
13546
13547 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
13548
13549         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
13550         * version.in: Bump version to 8.1.50.DATE-git.
13551
13552 2018-01-03  Xavier Roirand  <roirand@adacore.com>
13553
13554         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
13555         Add field.
13556         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
13557         Add field.
13558         (default_exception_support_info) <catch_handlers_sym>: Add field.
13559         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
13560         (ada_exception_name_addr_1): Add "catch handlers" handling.
13561         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
13562         Update all callers.
13563         (create_excep_cond_exprs) <ex>: Add parameter.
13564         (re_set_exception): Update create_excep_cond_exprs call.
13565         (print_it_exception, print_one_exception, print_mention_exception)
13566         (print_recreate_exception): Add "catch handler" handling.
13567         (allocate_location_catch_handlers, re_set_catch_handlers)
13568         (check_status_catch_handlers, print_it_catch_handlers)
13569         (print_one_catch_handlers, print_mention_catch_handlers)
13570         (print_recreate_catch_handlers): New function.
13571         (catch_handlers_breakpoint_ops): New variable.
13572         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
13573         Add parameter.  Add "catch handler" handling.
13574         (ada_exception_sym_name, ada_exception_breakpoint_ops):
13575         Add "catch handler" handling.
13576         (ada_exception_catchpoint_cond_string): Add "catch handler"
13577         handling.
13578         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
13579         call.
13580         (catch_ada_handlers_command): New function.
13581         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
13582         operations structure.
13583         (_initialize_ada_language): Add "catch handlers" command entry.
13584         * NEWS: Document "catch handlers" feature.
13585
13586 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
13587
13588         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
13589         account when creating the array type of the slice.
13590         (ada_value_slice): Likewise.
13591
13592 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
13593
13594         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
13595         New enum value.
13596         (create_array_type_with_stride): Add byte_stride_prop parameter.
13597         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
13598         New parameter.  Update all callers in this file.
13599         (array_type_has_dynamic_stride): New function.
13600         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
13601         of arrays with dynamic byte strides.
13602         * dwarf2read.c (read_array_type): Add support for dynamic
13603         DW_AT_byte_stride attributes.
13604
13605 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
13606
13607         * dwarf2read.c (read_unspecified_type): Treat
13608         DW_TAG_enumeration_type DIEs from Ada units as stubs.
13609
13610 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
13611
13612         Update copyright year range in all GDB files.
13613
13614 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
13615
13616         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
13617         and gdb/testsuite/gdb.base/step-line.c.
13618
13619 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
13620
13621         * copyright.py (main): Dump the contents of
13622         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
13623         even if BY_HAND is empty.
13624
13625 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
13626
13627         * top.c (print_gdb_version): Update Copyright year in version
13628         message.
13629
13630 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
13631
13632         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
13633
13634 For older changes see ChangeLog-2017.
13635 \f
13636 Local Variables:
13637 mode: change-log
13638 left-margin: 8
13639 fill-column: 74
13640 version-control: never
13641 coding: utf-8
13642 End: