Check for gmp when checking for mpfr
[external/binutils.git] / gdb / ChangeLog
1 2018-09-17  Tom Tromey  <tom@tromey.com>
2
3         * configure: Rebuild.
4         * configure.ac: Use gmp as a library dependency when checking for
5         mpfr.
6
7 2018-09-17  Pedro Alves  <palves@redhat.com>
8
9         * python/py-inferior.c (find_inferior_object): Delete.
10
11 2018-09-17  Simon Marchi  <simon.marchi@ericsson.com>
12
13         * compile/compile-cplus-types.c
14         (compile_cplus_instance::enter_scope): Don't use new_scope after
15         std::move.
16
17 2018-09-17  Tom Tromey  <tom@tromey.com>
18
19         * common/pathstuff.c (get_standard_cache_dir): Use
20         ~/Library/Caches on macOS.
21         * common/pathstuff.h (get_standard_cache_dir): Update comment.
22
23 2018-09-17  Simon Marchi  <simon.marchi@polymtl.ca>
24
25         PR python/23669
26         * breakpoint.c (commands_cmd_element): New.
27         (_initialize_breakpoint): Assign commands_cmd_element.
28         * breakpoint.h (commands_cmd_element): New.
29         * cli/cli-script.c (while_cmd_element, if_command,
30         define_cmd_element): New.
31         (command_name_equals): Remove.
32         (process_next_line): Compare commands by pointer, not by name.
33         (_initialize_cli_script): Assign the various cmd_list_element
34         variables.
35         * compile/compile.c (compile_cmd_element): New.
36         (_initialize_compile): Assign compile_cmd_element.
37         * compile/compile.h (compile_cmd_element): New.
38         * guile/guile.c (guile_cmd_element): New.
39         (install_gdb_commands): Assign guile_cmd_element.
40         * guile/guile.h (guile_cmd_element): New.
41         * python/python.c (python_cmd_element): New.
42         (_initialize_python): Assign python_cmd_element.
43         * python/python.h (python_cmd_element): New.
44         * tracepoint.c (while_stepping_cmd_element): New.
45         (_initialize_tracepoint): Assign while_stepping_cmd_element.
46         * tracepoint.h (while_stepping_cmd_element): New.
47
48 2018-09-17  Tom Tromey  <tom@tromey.com>
49
50         * infrun.c (save_infcall_suspend_state): Return
51         infcall_suspend_state_up.
52         (save_infcall_control_state): Return infcall_control_state_up.
53         * inferior.h (save_infcall_suspend_state)
54         (save_infcall_control_state): Declare later.  Return unique
55         pointers.
56
57 2018-09-17  Tom Tromey  <tom@tromey.com>
58
59         * infrun.c (struct stop_context): Declare constructor,
60         destructor, "changed" method.
61         (stop_context::stop_context): Rename from save_stop_context.
62         (stop_context::~stop_context): Rename from
63         release_stop_context_cleanup.
64         (normal_stop): Update.
65         (stop_context::changed): Rename from stop_context_changed.  Return
66         bool.
67
68 2018-09-17  Tom Tromey  <tom@tromey.com>
69
70         * inferior.h (struct infcall_suspend_state_deleter): New.
71         (infcall_suspend_state_up): New typedef.
72         (struct infcall_control_state_deleter): New.
73         (infcall_control_state_up): New typedef.
74         (make_cleanup_restore_infcall_suspend_state)
75         (make_cleanup_restore_infcall_control_state): Don't declare.
76         * infcall.c (call_function_by_hand_dummy): Update.
77         * infrun.c (do_restore_infcall_suspend_state_cleanup)
78         (make_cleanup_restore_infcall_suspend_state): Remove.
79         (do_restore_infcall_control_state_cleanup)
80         (make_cleanup_restore_infcall_control_state): Remove.
81
82 2018-09-17  Tom Tromey  <tom@tromey.com>
83
84         * gdbthread.h (struct thread_control_state): Add initializer.
85         (class thread_info) <control>: Remove initializer.
86         * inferior.h (struct inferior_control_state): Add initializer.
87         (class inferior) <control>: Remove initializer.
88         (exit_inferior_1): Update.
89         * infrun.c (struct infcall_control_state): Add constructors.
90         (save_infcall_control_state): Use new.
91         (restore_infcall_control_state, discard_infcall_control_state):
92         Use delete.
93
94 2018-09-17  Tom Tromey  <tom@tromey.com>
95
96         * infrun.c (struct infcall_suspend_state) <registers>: Now a
97         unique_ptr.
98         <siginfo_data>: Now a unique_xmalloc_ptr.
99         (save_infcall_suspend_state, restore_infcall_suspend_state)
100         (discard_infcall_suspend_state)
101         (get_infcall_suspend_state_regcache): Update.
102
103 2018-09-17  Tom Tromey  <tom@tromey.com>
104
105         * gdbthread.h (struct thread_suspend_state): Add initializers.
106         (class thread_info) <suspend>: Remove initializer.
107         * infrun.c (struct infcall_suspend_state): Add initializers.
108         (save_infcall_suspend_state): Use new.
109         (discard_infcall_suspend_state): Use delete.
110
111 2018-09-16  Tom Tromey  <tom@tromey.com>
112
113         * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
114         Remove.
115         * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
116         rvalue reference.  Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
117         (py_varobj_iter_new): Likewise.
118         (py_varobj_get_iterator): Use gdbpy_ref.
119
120 2018-09-16  Tom Tromey  <tom@tromey.com>
121
122         * python/py-threadevent.c (py_get_event_thread): Simplify.
123         * python/py-inferior.c (infpy_thread_from_thread_handle):
124         Return immediately after calling thread_to_thread_object.  Use
125         Py_RETURN_NONE.
126         (thread_to_thread_object): Set the exception on a NULL return.
127
128 2018-09-16  Simon Marchi  <simon.marchi@polymtl.ca>
129
130         * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
131
132 2018-09-16  Tom Tromey  <tom@tromey.com>
133
134         * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
135         Remove.
136
137 2018-09-16  Tom Tromey  <tom@tromey.com>
138
139         * python/python-internal.h (thread_to_thread_object): Change
140         return type.
141         * python/py-inferior.c (thread_to_thread_object): Return a new
142         reference.
143         (infpy_thread_from_thread_handle): Update.
144         * python/py-infthread.c (gdbpy_selected_thread): Update.
145         * python/py-stopevent.c (create_stop_event_object): Update.
146         * python/py-threadevent.c (py_get_event_thread): Return a new
147         reference.
148         (py_get_event_thread): Update.
149         * python/py-event.h (py_get_event_thread): Change return type.
150         * python/py-continueevent.c (create_continue_event_object):
151         Update.
152
153 2018-09-16  Tom Tromey  <tom@tromey.com>
154
155         * python/py-progspace.c (pspy_get_objfiles): Update.
156         * python/python-internal.h (objfile_to_objfile_object): Change
157         return type.
158         * python/py-newobjfileevent.c (create_new_objfile_event_object):
159         Update.
160         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
161         Update.
162         * python/python.c (gdbpy_get_current_objfile): Update.
163         (gdbpy_objfiles): Update.
164         * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
165         Update.
166         (objfile_to_objfile_object): Return a new reference.
167         * python/py-symtab.c (stpy_get_objfile): Update.
168         * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
169         Update.
170
171 2018-09-16  Tom Tromey  <tom@tromey.com>
172
173         * python/py-inferior.c (infpy_get_progspace): Update.
174         * python/python-internal.h (pspace_to_pspace_object): Change
175         return type.
176         * python/py-newobjfileevent.c
177         (create_clear_objfiles_event_object): Update.
178         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
179         Update.
180         * python/python.c (gdbpy_get_current_progspace): Update.
181         (gdbpy_progspaces): Update.
182         * python/py-progspace.c (pspace_to_pspace_object): Return a new
183         reference.
184         * python/py-objfile.c (objfpy_get_progspace): Update.
185         * python/py-prettyprint.c (find_pretty_printer_from_progspace):
186         Update.
187
188 2018-09-16  Tom Tromey  <tom@tromey.com>
189
190         * python/lib/gdb/__init__.py (current_progspace, objfiles)
191         (solib_name, block_for_pc, find_pc_line): New functions.
192         (execute_unwinders): Update.
193         * python/py-block.c (gdbpy_block_for_pc): Remove.
194         * python/py-inferior.c (infpy_get_progspace): New function.
195         (inferior_object_getset) <progspace>: Add.
196         * python/py-progspace.c (pspy_objfiles): Rewrite.
197         (pspy_solib_name, pspy_block_for_pc)
198         (pspy_find_pc_line, pspy_is_valid): New functions.
199         (progspace_object_methods): Add entries for solib_name,
200         block_for_pc, find_pc_line, is_valid.
201         * python/python-internal.h (gdbpy_block_for_pc)
202         (build_objfiles_list): Don't declare.
203         * python/python.c: Don't include solib.h.
204         (gdbpy_solib_name, gdbpy_find_pc_line)
205         (gdbpy_get_current_progspace, build_objfiles_list)
206         (gdbpy_objfiles): Remove.
207         (GdbMethods) <current_progspace, objfiles, block_for_pc,
208         solib_name, find_pc_line>: Remove entries.
209
210 2018-09-16  Tom Tromey  <tom@tromey.com>
211
212         * top.c (new_ui_command): Use GNU style for metasyntactic
213         variables.
214         * breakpoint.c (stopat_command): Use GNU style for metasyntactic
215         variables.
216         * maint.c (maintenance_translate_address): Remove "<>" around
217         text.
218         * interps.c (interpreter_exec_cmd): Use GNU style for
219         metasyntactic variables.
220         * nto-procfs.c (nto_procfs_target_info): Use GNU style for
221         metasyntactic variables.
222         * tracepoint.c (tfind_range_command): Use GNU style for
223         metasyntactic variables.
224         (tfind_outside_command): Likewise.
225         (_initialize_tracepoint): Likewise.
226         * remote.c (extended_remote_target::create_inferior): Use GNU
227         style for metasyntactic variables.
228         * sparc64-tdep.c (adi_examine_command): Use GNU style for
229         metasyntactic variables.
230         (adi_assign_command): Likewise.
231
232 2018-09-16  Tom Tromey  <tom@tromey.com>
233
234         * disasm.c (show_disassembler_options_sfunc): Use GNU style for
235         metasyntactic variables.  Print message if no disassembler options
236         are available.
237
238 2018-09-15  Tom Tromey  <tom@tromey.com>
239
240         * infcmd.c (get_inferior_args): Return const char *.
241         * inferior.h (get_inferior_args): Return type now const.
242         * linux-tdep.c (linux_fill_prpsinfo): Update.
243         * procfs.c (procfs_target::make_corefile_notes): Update.
244
245 2018-09-07  Tom Tromey  <tom@tromey.com>
246
247         * python/python.c (execute_gdb_command): Call bpstat_do_actions
248         inside the TRY.
249
250 2018-09-14  Sandra Loosemore  <sandra@codesourcery.com>
251
252         * nios2-tdep.c (nios2_type_align): New.
253         (nios2_gdb_arch_init): Install type_align hook.
254
255 2018-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
256
257         * eval.c (fake_method::fake_method): Call xzalloc directly for a
258         type that is neither object file owned, nor gdbarch owned.
259         * gdbtypes.c (get_type_gdbarch): Add an assert that returned
260         gdbarch is non-NULL.
261         (alloc_type_instance): Allocate non-objfile owned types on the
262         gdbarch obstack.
263         (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
264         using TYPE_ALLOC to ensure memory is allocated on the correct
265         obstack.
266         * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
267         obstack, or the gdbarch obstack.
268         (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
269
270 2018-09-14  Tom Tromey  <tom@tromey.com>
271
272         * infcall.c (call_function_by_hand_dummy): Remove unnecessary
273         block.
274
275 2018-09-14  Tom Tromey  <tom@tromey.com>
276
277         * nat/fork-inferior.c (get_startup_shell): Remove "static".
278
279 2018-09-13  Tom Tromey  <tom@tromey.com>
280
281         * python/py-inferior.c (infpy_thread_from_thread_handle): Now
282         static.
283
284 2018-09-13  Tom Tromey  <tom@tromey.com>
285
286         * exec.c (try_open_exec_file): Use std::string.
287
288 2018-09-13  Tom Tromey  <tom@tromey.com>
289
290         * utils.h (gdb_bfd_errmsg): Return std::string.
291         * exec.c (exec_file_attach): Update.
292         * compile/compile-object-load.c (compile_object_load): Update.
293         * utils.c (gdb_bfd_errmsg): Return std::string.
294
295 2018-09-13  Tom Tromey  <tom@tromey.com>
296
297         * procfs.c (struct procinfo_deleter): New.
298         (procinfo_up): New typedef.
299         (do_destroy_procinfo_cleanup): Remove.
300         (procfs_target::info_proc): Use procinfo_up.  Remove cleanups.
301
302 2018-09-13  Tom Tromey  <tom@tromey.com>
303
304         * source.c (add_path): Use gdb::unique_xmalloc_ptr.
305
306 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
307 2018-09-13  Tom Tromey  <tom@tromey.com>
308
309         * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
310         (pspy_get_objfiles): New function.
311         (progspace_object_methods): New.
312         (pspace_object_type): Add tp_methods callback.
313         * python/python-internal.h (build_objfiles_list): New
314         declaration.
315         * python/python.c (build_objfiles_list): New function.
316         (gdbpy_objfiles): Implement using build_objfiles_list.
317         * NEWS: Mention the Progspace.objfiles method.
318
319 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
320
321         * python/py-inferior.c (infpy_get_progspace): New function.
322         (inferior_object_getset): Add progspace property.
323         * NEWS: Mention the new property.
324
325 2018-09-13  Tom Tromey  <tom@tromey.com>
326
327         PR rust/23650:
328         * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
329
330 2018-09-13  Tom Tromey  <tom@tromey.com>
331
332         PR rust/23626:
333         * rust-lang.c (rust_enum_variant): Now static.
334         (rust_empty_enum_p): New function.
335         (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
336         Handle empty enum.
337
338 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
339
340         * python/py-inferior.c (infpy_repr): New.
341         (inferior_object_type): Register infpy_repr.
342         * python/py-objfile.c (objfpy_repr): New.
343         (objfile_object_type): Register objfpy_repr.
344
345 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
346
347         * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
348
349 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
350
351         * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
352         typo.
353
354 2018-09-12  Sergio Durigan Junior  <sergiodj@redhat.com>
355
356         * common/common-utils.c: Don't include '<sys/stat.h>'.
357         (is_regular_file): Move to...
358         * common/filestuff.c (is_regular_file): ... here.
359         * common/common-utils.h (is_regular_file): Move to...
360         * common/filestuff.h (is_regular_file): ... here.
361
362 2018-09-12  Simon Marchi  <simon.marchi@ericsson.com>
363
364         * skip.c (debug_skip): New variable.
365         (skiplist_entry::do_skip_file_p): Add debug output.
366         (skiplist_entry::do_skip_gfile_p): Likewise.
367         (skiplist_entry::skip_function_p): Likewise.
368         (_initialize_step_skip): Create debug command.
369         * NEWS: Mention set/show debug skip.
370
371 2018-09-11  Xavier Roirand  <roirand@adacore.com>
372
373         * darwin-nat.c (should_disable_startup_with_shell):
374         New function.
375         (darwin_nat_target::create_inferior): Add call.
376
377 2018-09-11  Xavier Roirand  <roirand@adacore.com>
378
379         * darwin-nat.h (struct darwin_thread_info) <gdb_port,
380         inf_port, msg_state>: Initialize.
381         (struct darwin_thread_info) <signaled, single_step>: Change
382         type and initialize.
383         (struct darwin_thread_info) <event>: Initialize.
384
385 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
386
387         PR gdb/23555
388         PR gdb/23558
389         * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
390         guesses.
391
392 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
393
394         Revert:
395         2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
396
397         PR gdb/23555
398         PR gdb/23558
399         * gnulib/aclocal.m4: Regenerate.
400         * gnulib/config.in: Regenerate.
401         * gnulib/configure: Regenerate.
402         * gnulib/import/Makefile.am: Update.
403         * gnulib/import/Makefile.in: Update.
404         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
405         * gnulib/import/_Noreturn.h: ... this.
406         * gnulib/import/alloca.in.h: Update.
407         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
408         * gnulib/import/arg-nonnull.h: ... this.
409         * gnulib/import/assure.h: Update.
410         * gnulib/import/at-func.c: Update.
411         * gnulib/import/basename-lgpl.c: Update.
412         * gnulib/import/extra/snippet/c++defs.h: Rename to...
413         * gnulib/import/c++defs.h: ... this.
414         * gnulib/import/canonicalize-lgpl.c: Update.
415         * gnulib/import/cdefs.h: Update.
416         * gnulib/import/chdir-long.c: Update.
417         * gnulib/import/chdir-long.h: Update.
418         * gnulib/import/cloexec.c: Update.
419         * gnulib/import/cloexec.h: Update.
420         * gnulib/import/close.c: Update.
421         * gnulib/import/closedir.c: Update.
422         * gnulib/import/config.charset: Update.
423         * gnulib/import/dirent-private.h: Update.
424         * gnulib/import/dirent.in.h: Update.
425         * gnulib/import/dirfd.c: Update.
426         * gnulib/import/dirname-lgpl.c: Update.
427         * gnulib/import/dirname.h: Update.
428         * gnulib/import/dosname.h: Update.
429         * gnulib/import/dup-safer-flag.c: Update.
430         * gnulib/import/dup-safer.c: Update.
431         * gnulib/import/dup.c: Update.
432         * gnulib/import/dup2.c: Update.
433         * gnulib/import/errno.in.h: Update.
434         * gnulib/import/error.c: Update.
435         * gnulib/import/error.h: Update.
436         * gnulib/import/exitfail.c: Update.
437         * gnulib/import/exitfail.h: Update.
438         * gnulib/import/extra/update-copyright: Update.
439         * gnulib/import/fchdir.c: Update.
440         * gnulib/import/fcntl.c: Update.
441         * gnulib/import/fcntl.in.h: Update.
442         * gnulib/import/fd-hook.c: Update.
443         * gnulib/import/fd-hook.h: Update.
444         * gnulib/import/fd-safer-flag.c: Update.
445         * gnulib/import/fd-safer.c: Update.
446         * gnulib/import/fdopendir.c: Update.
447         * gnulib/import/filename.h: Update.
448         * gnulib/import/filenamecat-lgpl.c: Update.
449         * gnulib/import/filenamecat.h: Update.
450         * gnulib/import/flexmember.h: Update.
451         * gnulib/import/float+.h: Update.
452         * gnulib/import/float.c: Update.
453         * gnulib/import/float.in.h: Update.
454         * gnulib/import/fnmatch.c: Update.
455         * gnulib/import/fnmatch.in.h: Update.
456         * gnulib/import/fnmatch_loop.c: Update.
457         * gnulib/import/fpucw.h: Update.
458         * gnulib/import/frexp.c: Update.
459         * gnulib/import/frexpl.c: Update.
460         * gnulib/import/fstat.c: Update.
461         * gnulib/import/fstatat.c: Update.
462         * gnulib/import/getcwd-lgpl.c: Update.
463         * gnulib/import/getcwd.c: Update.
464         * gnulib/import/getdtablesize.c: Update.
465         * gnulib/import/getlogin_r.c: Update.
466         * gnulib/import/getprogname.c: Update.
467         * gnulib/import/getprogname.h: Update.
468         * gnulib/import/gettext.h: Update.
469         * gnulib/import/gettimeofday.c: Update.
470         * gnulib/import/glob-libc.h: Update.
471         * gnulib/import/glob.c: Update.
472         * gnulib/import/glob.in.h: Update.
473         * gnulib/import/glob_internal.h: Update.
474         * gnulib/import/glob_pattern_p.c: Update.
475         * gnulib/import/globfree.c: Update.
476         * gnulib/import/hard-locale.c: Update.
477         * gnulib/import/hard-locale.h: Update.
478         * gnulib/import/intprops.h: Update.
479         * gnulib/import/inttypes.in.h: Update.
480         * gnulib/import/isnan.c: Update.
481         * gnulib/import/isnand-nolibm.h: Update.
482         * gnulib/import/isnand.c: Update.
483         * gnulib/import/isnanl-nolibm.h: Update.
484         * gnulib/import/isnanl.c: Update.
485         * gnulib/import/itold.c: Update.
486         * gnulib/import/libc-config.h: Update.
487         * gnulib/import/limits.in.h: Update.
488         * gnulib/import/localcharset.c: Update.
489         * gnulib/import/localcharset.h: Update.
490         * gnulib/import/localtime-buffer.c: Update.
491         * gnulib/import/localtime-buffer.h: Update.
492         * gnulib/import/lstat.c: Update.
493         * gnulib/import/m4/00gnulib.m4: Update.
494         * gnulib/import/m4/__inline.m4: Update.
495         * gnulib/import/m4/absolute-header.m4: Update.
496         * gnulib/import/m4/alloca.m4: Update.
497         * gnulib/import/m4/builtin-expect.m4: Update.
498         * gnulib/import/m4/canonicalize.m4: Update.
499         * gnulib/import/m4/chdir-long.m4: Update.
500         * gnulib/import/m4/close.m4: Update.
501         * gnulib/import/m4/closedir.m4: Update.
502         * gnulib/import/m4/configmake.m4: Update.
503         * gnulib/import/m4/d-ino.m4: Update.
504         * gnulib/import/m4/d-type.m4: Update.
505         * gnulib/import/m4/dirent_h.m4: Update.
506         * gnulib/import/m4/dirfd.m4: Update.
507         * gnulib/import/m4/dirname.m4: Update.
508         * gnulib/import/m4/double-slash-root.m4: Update.
509         * gnulib/import/m4/dup.m4: Update.
510         * gnulib/import/m4/dup2.m4: Update.
511         * gnulib/import/m4/eealloc.m4: Update.
512         * gnulib/import/m4/environ.m4: Update.
513         * gnulib/import/m4/errno_h.m4: Update.
514         * gnulib/import/m4/error.m4: Update.
515         * gnulib/import/m4/exponentd.m4: Update.
516         * gnulib/import/m4/exponentl.m4: Update.
517         * gnulib/import/m4/extensions.m4: Update.
518         * gnulib/import/m4/extern-inline.m4: Update.
519         * gnulib/import/m4/fchdir.m4: Update.
520         * gnulib/import/m4/fcntl-o.m4: Update.
521         * gnulib/import/m4/fcntl.m4: Update.
522         * gnulib/import/m4/fcntl_h.m4: Update.
523         * gnulib/import/m4/fdopendir.m4: Update.
524         * gnulib/import/m4/filenamecat.m4: Update.
525         * gnulib/import/m4/flexmember.m4: Update.
526         * gnulib/import/m4/float_h.m4: Update.
527         * gnulib/import/m4/fnmatch.m4: Update.
528         * gnulib/import/m4/fnmatch_h.m4: Update.
529         * gnulib/import/m4/fpieee.m4: Update.
530         * gnulib/import/m4/frexp.m4: Update.
531         * gnulib/import/m4/frexpl.m4: Update.
532         * gnulib/import/m4/fstat.m4: Update.
533         * gnulib/import/m4/fstatat.m4: Update.
534         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
535         * gnulib/import/m4/getcwd-path-max.m4: Update.
536         * gnulib/import/m4/getcwd.m4: Update.
537         * gnulib/import/m4/getdtablesize.m4: Update.
538         * gnulib/import/m4/getlogin.m4: Update.
539         * gnulib/import/m4/getlogin_r.m4: Update.
540         * gnulib/import/m4/getpagesize.m4: Update.
541         * gnulib/import/m4/getprogname.m4: Update.
542         * gnulib/import/m4/gettimeofday.m4: Update.
543         * gnulib/import/m4/glibc21.m4: Update.
544         * gnulib/import/m4/glob.m4: Update.
545         * gnulib/import/m4/glob_h.m4: Update.
546         * gnulib/import/m4/gnulib-cache.m4: Update.
547         * gnulib/import/m4/gnulib-common.m4: Update.
548         * gnulib/import/m4/gnulib-comp.m4: Update.
549         * gnulib/import/m4/gnulib-tool.m4: Update.
550         * gnulib/import/m4/hard-locale.m4: Update.
551         * gnulib/import/m4/include_next.m4: Update.
552         * gnulib/import/m4/inttypes-pri.m4: Update.
553         * gnulib/import/m4/inttypes.m4: Update.
554         * gnulib/import/m4/isnand.m4: Update.
555         * gnulib/import/m4/isnanl.m4: Update.
556         * gnulib/import/m4/largefile.m4: Update.
557         * gnulib/import/m4/limits-h.m4: Update.
558         * gnulib/import/m4/localcharset.m4: Update.
559         * gnulib/import/m4/locale-fr.m4: Update.
560         * gnulib/import/m4/locale-ja.m4: Update.
561         * gnulib/import/m4/locale-zh.m4: Update.
562         * gnulib/import/m4/localtime-buffer.m4: Update.
563         * gnulib/import/m4/longlong.m4: Update.
564         * gnulib/import/m4/lstat.m4: Update.
565         * gnulib/import/m4/malloc.m4: Update.
566         * gnulib/import/m4/malloca.m4: Update.
567         * gnulib/import/m4/math_h.m4: Update.
568         * gnulib/import/m4/mbrtowc.m4: Update.
569         * gnulib/import/m4/mbsinit.m4: Update.
570         * gnulib/import/m4/mbsrtowcs.m4: Update.
571         * gnulib/import/m4/mbstate_t.m4: Update.
572         * gnulib/import/m4/memchr.m4: Update.
573         * gnulib/import/m4/memmem.m4: Update.
574         * gnulib/import/m4/mempcpy.m4: Update.
575         * gnulib/import/m4/memrchr.m4: Update.
576         * gnulib/import/m4/mkdir.m4: Update.
577         * gnulib/import/m4/mkstemp.m4: Update.
578         * gnulib/import/m4/mmap-anon.m4: Update.
579         * gnulib/import/m4/mode_t.m4: Update.
580         * gnulib/import/m4/msvc-inval.m4: Update.
581         * gnulib/import/m4/msvc-nothrow.m4: Update.
582         * gnulib/import/m4/multiarch.m4: Update.
583         * gnulib/import/m4/nocrash.m4: Update.
584         * gnulib/import/m4/off_t.m4: Update.
585         * gnulib/import/m4/onceonly.m4: Update.
586         * gnulib/import/m4/open-cloexec.m4: Update.
587         * gnulib/import/m4/open.m4: Update.
588         * gnulib/import/m4/openat.m4: Update.
589         * gnulib/import/m4/opendir.m4: Update.
590         * gnulib/import/m4/pathmax.m4: Update.
591         * gnulib/import/m4/rawmemchr.m4: Update.
592         * gnulib/import/m4/readdir.m4: Update.
593         * gnulib/import/m4/readlink.m4: Update.
594         * gnulib/import/m4/realloc.m4: Update.
595         * gnulib/import/m4/rename.m4: Update.
596         * gnulib/import/m4/rewinddir.m4: Update.
597         * gnulib/import/m4/rmdir.m4: Update.
598         * gnulib/import/m4/save-cwd.m4: Update.
599         * gnulib/import/m4/secure_getenv.m4: Update.
600         * gnulib/import/m4/setenv.m4: Update.
601         * gnulib/import/m4/signal_h.m4: Update.
602         * gnulib/import/m4/ssize_t.m4: Update.
603         * gnulib/import/m4/stat-time.m4: Update.
604         * gnulib/import/m4/stat.m4: Update.
605         * gnulib/import/m4/std-gnu11.m4: Update.
606         * gnulib/import/m4/stdbool.m4: Update.
607         * gnulib/import/m4/stddef_h.m4: Update.
608         * gnulib/import/m4/stdint.m4: Update.
609         * gnulib/import/m4/stdio_h.m4: Update.
610         * gnulib/import/m4/stdlib_h.m4: Update.
611         * gnulib/import/m4/strchrnul.m4: Update.
612         * gnulib/import/m4/strdup.m4: Update.
613         * gnulib/import/m4/strerror.m4: Update.
614         * gnulib/import/m4/string_h.m4: Update.
615         * gnulib/import/m4/strstr.m4: Update.
616         * gnulib/import/m4/strtok_r.m4: Update.
617         * gnulib/import/m4/sys_socket_h.m4: Update.
618         * gnulib/import/m4/sys_stat_h.m4: Update.
619         * gnulib/import/m4/sys_time_h.m4: Update.
620         * gnulib/import/m4/sys_types_h.m4: Update.
621         * gnulib/import/m4/tempname.m4: Update.
622         * gnulib/import/m4/time_h.m4: Update.
623         * gnulib/import/m4/unistd-safer.m4: Update.
624         * gnulib/import/m4/unistd_h.m4: Update.
625         * gnulib/import/m4/warn-on-use.m4: Update.
626         * gnulib/import/m4/wchar_h.m4: Update.
627         * gnulib/import/m4/wchar_t.m4: Update.
628         * gnulib/import/m4/wctype_h.m4: Update.
629         * gnulib/import/m4/wint_t.m4: Update.
630         * gnulib/import/malloc.c: Update.
631         * gnulib/import/malloc/scratch_buffer.h: Update.
632         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
633         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
634         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
635         * gnulib/import/malloca.c: Update.
636         * gnulib/import/malloca.h: Update.
637         * gnulib/import/malloca.valgrind: Update.
638         * gnulib/import/math.in.h: Update.
639         * gnulib/import/mbrtowc.c: Update.
640         * gnulib/import/mbsinit.c: Update.
641         * gnulib/import/mbsrtowcs-impl.h: Update.
642         * gnulib/import/mbsrtowcs-state.c: Update.
643         * gnulib/import/mbsrtowcs.c: Update.
644         * gnulib/import/memchr.c: Update.
645         * gnulib/import/memmem.c: Update.
646         * gnulib/import/mempcpy.c: Update.
647         * gnulib/import/memrchr.c: Update.
648         * gnulib/import/mkdir.c: Update.
649         * gnulib/import/mkstemp.c: Update.
650         * gnulib/import/msvc-inval.c: Update.
651         * gnulib/import/msvc-inval.h: Update.
652         * gnulib/import/msvc-nothrow.c: Update.
653         * gnulib/import/msvc-nothrow.h: Update.
654         * gnulib/import/open.c: Update.
655         * gnulib/import/openat-die.c: Update.
656         * gnulib/import/openat-priv.h: Update.
657         * gnulib/import/openat-proc.c: Update.
658         * gnulib/import/openat.c: Update.
659         * gnulib/import/openat.h: Update.
660         * gnulib/import/opendir.c: Update.
661         * gnulib/import/pathmax.h: Update.
662         * gnulib/import/pipe-safer.c: Update.
663         * gnulib/import/rawmemchr.c: Update.
664         * gnulib/import/readdir.c: Update.
665         * gnulib/import/readlink.c: Update.
666         * gnulib/import/realloc.c: Update.
667         * gnulib/import/ref-add.sin: Update.
668         * gnulib/import/ref-del.sin: Update.
669         * gnulib/import/rename.c: Update.
670         * gnulib/import/rewinddir.c: Update.
671         * gnulib/import/rmdir.c: Update.
672         * gnulib/import/same-inode.h: Update.
673         * gnulib/import/save-cwd.c: Update.
674         * gnulib/import/save-cwd.h: Update.
675         * gnulib/import/scratch_buffer.h: Update.
676         * gnulib/import/secure_getenv.c: Update.
677         * gnulib/import/setenv.c: Update.
678         * gnulib/import/signal.in.h: Update.
679         * gnulib/import/stat-time.c: Update.
680         * gnulib/import/stat-time.h: Update.
681         * gnulib/import/stat-w32.c: Update.
682         * gnulib/import/stat-w32.h: Update.
683         * gnulib/import/stat.c: Update.
684         * gnulib/import/stdbool.in.h: Update.
685         * gnulib/import/stddef.in.h: Update.
686         * gnulib/import/stdint.in.h: Update.
687         * gnulib/import/stdio.in.h: Update.
688         * gnulib/import/stdlib.in.h: Update.
689         * gnulib/import/str-two-way.h: Update.
690         * gnulib/import/strchrnul.c: Update.
691         * gnulib/import/strdup.c: Update.
692         * gnulib/import/streq.h: Update.
693         * gnulib/import/strerror-override.c: Update.
694         * gnulib/import/strerror-override.h: Update.
695         * gnulib/import/strerror.c: Update.
696         * gnulib/import/string.in.h: Update.
697         * gnulib/import/stripslash.c: Update.
698         * gnulib/import/strnlen1.c: Update.
699         * gnulib/import/strnlen1.h: Update.
700         * gnulib/import/strstr.c: Update.
701         * gnulib/import/strtok_r.c: Update.
702         * gnulib/import/sys_stat.in.h: Update.
703         * gnulib/import/sys_time.in.h: Update.
704         * gnulib/import/sys_types.in.h: Update.
705         * gnulib/import/tempname.c: Update.
706         * gnulib/import/tempname.h: Update.
707         * gnulib/import/time.in.h: Update.
708         * gnulib/import/unistd--.h: Update.
709         * gnulib/import/unistd-safer.h: Update.
710         * gnulib/import/unistd.in.h: Update.
711         * gnulib/import/unsetenv.c: Update.
712         * gnulib/import/verify.h: Update.
713         * gnulib/import/extra/snippet/warn-on-use.h: Update.
714         * gnulib/import/wchar.in.h: Update.
715         * gnulib/import/wctype.in.h: Update.
716         * gnulib/import/xalloc-oversized.h: Update.
717         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
718         "53e2c179f26a890fa6685af4b6c1397ee370433b".
719
720 2018-09-10  Simon Marchi  <simon.marchi@ericsson.com>
721
722         * record-btrace.c (get_thread_current_frame): Remove
723         old_inferior_ptid.
724
725 2018-09-10  Jerome Guitton  <guitton@adacore.com>
726
727         * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
728         with check_tag to 1 if and only if the type is tagged and the
729         component being searched cannot been found in the current
730         view. Otherwise, always call ada_to_fixed_type with
731         check_tag to 0.
732
733 2018-09-10  Xavier Roirand  <roirand@adacore.com>
734
735         * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
736         declaration.
737         * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
738         * ada-varobj.c (ada_varobj_get_number_of_children,
739         ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
740
741 2018-09-10  Xavier Roirand  <roirand@adacore.com>
742
743         * ada-valprint.c (ada_value_print): Use type instead of
744         enclosing type.
745
746 2018-09-10  Xavier Roirand  <roirand@adacore.com>
747
748         * ada-lang.c (ada_value_subscript): Handle case when parameter is
749         an array of access to unconstrained array.
750
751 2018-09-10  Xavier Roirand  <roirand@adacore.com>
752
753         * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
754         (ada_check_typedef): Use it.
755
756 2018-09-10  Xavier Roirand  <roirand@adacore.com>
757
758         * ada-varobj.c (ada_varobj_describe_struct_child)
759         (ada_varobj_describe_child): Handle union case like struct one.
760
761 2018-09-10  Tom Tromey  <tom@tromey.com>
762
763         PR python/18380:
764         * python/python.c (_initialize_python): Make example in "python"
765         help work in Python 3.
766
767 2018-09-10  Eli Zaretskii  <eliz@gnu.org>
768
769         * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
770         INSTALL_PROGRAM to install gdb-add-index.sh.  Don't append
771         $(EXEEXT) to the script, as it is not a program.
772
773 2018-09-09  Simon Marchi  <simon.marchi@ericsson.com>
774
775         * python/py-prettyprint.c (pretty_print_one_value): Return
776         gdbpy_ref<>.
777         (print_string_repr): Adjust.
778         (apply_varobj_pretty_printer): Return gdbpy_ref<>.
779         * python/python-internal.h (apply_varobj_pretty_printer): Return
780         gdbpy_ref<>.
781         * varobj.c (varobj_value_get_print_value): Adjust.
782
783 2018-09-08  Tom Tromey  <tom@tromey.com>
784
785         PR python/16047:
786         * python/py-prettyprint.c (pretty_print_one_value): Check for
787         to_string method.
788
789 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
790
791         * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
792         replace_operator_with_call.
793
794 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
795
796         * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
797
798 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
799
800         * ada-typeprint.c (print_range): Print the bounds using TYPE
801         rather than its TYPE_TARGET_TYPE.
802
803 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
804
805         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
806         call to ada_to_fixed_value_create.
807
808 2018-09-08  Jerome Guitton  <guitton@adacore.com>
809
810         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
811
812 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
813
814         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
815         by calls to error.
816
817 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
818
819         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
820         Move update of loop variable "fi".
821
822 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
823
824         * ada-lang.c (value_assign_to_component): In the case of
825         big-endian targets, extract the bits of the given VAL
826         using an src_offset of zero if container is not a scalar.
827
828 2018-09-06  Simon Ser  <contact@emersion.fr>
829
830         PR gdb/23105
831         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
832         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
833         * fbsd-tdep.c (fbsd_make_note_desc): New.
834         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
835         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
836         * target.h (enum target_object) Add FreeBSD-specific
837         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
838
839 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
840
841         * compile/compile-c.h (generate_c_for_variable_locations):
842         Change reference to pointer.
843         * compile/compile-c-support.c (compile_program) <compute>:
844         Likewise.
845         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
846         (generate_c_for_for_one_variable): Likewise
847         (generate_c_for_variable_locations): Likewise
848         * compile/compile-c-types.c (compile_c_instance::convert_type):
849         Likewise
850         * compile/compile-cplus-symbols.c (convert_one_symbol):
851         std::move the scope passed to enter_scope.
852         * compile/compile-cplus-types.c
853         (compile_cplus_instance::enter_scope): Make parameter
854         rvalue-reference.
855         (compile_cplus_instance::new_scope): Change reference to
856         pointer.
857         (compile_cplus_instance::convert_type): Likewise
858         (compile_cplus_convert_typedef): std::move the scope passed to
859         enter_scope.
860         (compile_cplus_convert_struct_or_union): Likewise.
861         (compile_cplus_convert_enum): Likewise.
862         (compile_cplus_convert_namespace): Likewise.
863         * compile/compile-cplus.h (compile_cplus_instance)
864         <enter_scope>: Make parameter rvalue-reference.
865         * compile/compile-internal.h (compile_instance)
866         <get_cached_type>: Likewise
867         * compile/compile-loc2c.c (push): Likewise
868         (pushf): Likewise
869         (unary): Likewise
870         (binary): Likewise
871         (print_label): Likewise
872         (pushf_register_address): Likewise
873         (pushf_register): Likewise
874         (do_compile_dwarf_expr_to_c): Likewise
875         (compile_dwarf_expr_to_c): Likewise
876         (compile_dwarf_bounds_to_c): Likewise
877         * compile/compile.c (compile_instance::get_cached_type):
878         Likewise
879         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
880         (compile_dwarf_bounds_to_c): Likewise
881         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
882         (dwarf2_compile_property_to_c): Likewise
883         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
884         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
885         Likewise
886
887 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
888
889         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
890         * tui/tui-data.c (init_content_element): Don't initialize it.
891
892 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
893
894         * tui/tui-data.h (struct tui_win_info)
895         <detail::opaque>: Remove.
896         * tui/tui-data.c (init_win_info): Remove assignment.
897
898 2018-09-05  Tom Tromey  <tom@tromey.com>
899
900         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
901         -Wformat-nonliteral.
902         * target-float.c (host_float_ops<T>::to_string)
903         (host_float_ops<T>::from_string): Use
904         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
905         * configure: Rebuild.
906
907 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
908
909         * printcmd.c (printf_c_string): Use
910         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
911         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
912
913 2018-09-05  Tom Tromey  <tom@tromey.com>
914
915         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
916
917 2018-09-05  Tom de Vries  <tdevries@suse.de>
918
919         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
920         with resolve_abstract_p == true.
921         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
922         defaulting to false. Propagate resolve_abstract_p to
923         dwarf2_fetch_die_loc_sect_off.
924         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
925         parameter, defaulting to false.
926         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
927         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
928         parameter.
929         * dwarf2read.h (struct die_info): Forward-declare.
930         (die_info_ptr): New typedef.
931         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
932
933 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
934
935         GDB 8.2 released.
936
937 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
938             Pedro Alves  <palves@redhat.com>
939
940         * gnulib/Makefile.in (aclocal_m4_deps): Move to
941         "aclocal-m4-deps.mk".  Include file here.
942         $(srcdir)/aclocal.m4: Add "configure.ac".
943         * gnulib/aclocal-m4-deps.mk: New file.
944         * gnulib/update-gnulib.sh: Automatically update
945         "aclocal-m4-deps.mk".
946
947 2018-09-04  Tom Tromey  <tom@tromey.com>
948
949         * configure: Rebuild.
950         * configure.ac: Remove multi-ice code.
951
952 2018-09-04  Tom Tromey  <tom@tromey.com>
953
954         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
955         (ada-exp.o): Update.
956
957 2018-09-04  Tom Tromey  <tom@tromey.com>
958
959         * Makefile.in (printcmd.o, target-float.o): Remove.
960         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
961
962 2018-09-04  Tom Tromey  <tom@tromey.com>
963
964         * gnulib/Makefile.in: Remove obsolete comment.
965         * Makefile.in: Remove obsolete comment.
966
967 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
968
969         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
970         line with '+'.
971
972 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
973
974         * riscv-tdep.c: Add 'prologue-value.h' include.
975         (struct riscv_unwind_cache): New struct.
976         (riscv_debug_unwinder): New global.
977         (riscv_scan_prologue): Update arguments, capture register details
978         from prologue scan.
979         (riscv_skip_prologue): Reformat arguments line, move end of
980         prologue calculation into riscv_scan_prologue.
981         (riscv_frame_cache): Update return type, create
982         riscv_unwind_cache, scan the prologue, and fill in remaining cache
983         details.
984         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
985         (riscv_frame_prev_register): Use the trad_frame within the
986         riscv_unwind_cache.
987         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
988         flag.
989
990 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
991
992         * trad-frame.h (trad_frame_set_realreg): Declare.
993         (trad_frame_set_addr): Declare.
994         * trad-frame.c (trad_frame_set_realreg): Define new function.
995         (trad_frame_set_addr): Define new function.
996         (trad_frame_set_reg_realreg): Use new function.
997         (trad_frame_set_reg_addr): Use new function.
998
999 2018-09-01  Keith Seitz  <keiths@redhat.com>
1000
1001         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
1002         pulongest instead of "%lld".
1003         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
1004         ATTRIBUTE_UNUSED.
1005
1006 2018-08-31  Tom Tromey  <tom@tromey.com>
1007
1008         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
1009         variant part type.
1010
1011 2018-08-31  Pedro Alves  <palves@redhat.com>
1012
1013         * gdbarch.h: Regenerate.
1014
1015 2018-08-31  Pedro Alves  <palves@redhat.com>
1016
1017         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
1018         * target.h (Hardware watchpoint interfaces): Describe
1019         continuable/steppable/non-steppable watchpoints.
1020         * gdbarch.h, gdbarch.c: Regenerate.
1021
1022 2018-08-31  Pedro Alves  <palves@redhat.com>
1023
1024         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
1025         Delete.
1026         * s390-linux-nat.c
1027         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
1028         * target.h (target_ops::have_continuable_watchpoint): Delete.
1029         (target_have_continuable_watchpoint): Delete.
1030         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
1031         * target-delegates.c: Regenerate.
1032
1033 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
1034
1035         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
1036         the files present in "gnulib/import/m4/".
1037
1038 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
1039
1040         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
1041         c.sw, c.swsp, and c.sdsp.
1042
1043 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
1044
1045         * riscv-tdep.c (struct riscv_inferior_data): Delete.
1046         (riscv_read_misa_reg): Don't cache value read into inferior data.
1047         (riscv_new_inferior_data): Delete.
1048         (riscv_inferior_data_cleanup): Delete.
1049         (riscv_inferior_data): Delete.
1050         (riscv_invalidate_inferior_data): Delete.
1051         (_initialize_riscv_tdep): Remove initialisation of inferior data.
1052
1053 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
1054
1055         * compile/compile-cplus-types.c
1056         (compile_cplus_instance::leave_scope): Take the address of scope
1057         object.
1058         (compile_cplus_instance::convert_qualified_base): Compare quals
1059         to 0.
1060
1061 2018-08-30  Keith Seitz  <keiths@redhat.com>
1062
1063         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
1064         Use "%s" and host_address_to_string instead of "%p" in printf.
1065
1066 2018-08-29  Keith Seitz  <keiths@redhat.com>
1067
1068         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
1069         and compile-cplus-types.c.
1070         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
1071         * c-lang.c (cplus_language_defn): Set C++ compile functions.
1072         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
1073         Declare.
1074         * compile/compile-c-support.c: Include compile-cplus.h.
1075         (load_libcompile): Templatize.
1076         (get_compile_context): "New" function.
1077         (c_get_compile_context): Use get_compile_context.
1078         (cplus_get_compile_context): New function.
1079         (cplus_push_user_expression, cplus_pop_user_expression)
1080         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
1081         (cplus_compute_program): Define new structs/functions.
1082         * compile/compile-cplus-symmbols.c: New file.
1083         * compile/compile-cplus-types.c: New file.
1084         * compile/compile-cplus.h: New file.
1085         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
1086         Declare.
1087         * compile/compile-object-load.c (get_out_value_type): Use
1088         strncmp_iw when comparing symbol names.
1089         (compile_object_load): Add mst_bss and mst_data.
1090         * compile/compile.c (_initialize_compile): Remove
1091         -Wno-implicit-function-declaration from `compile_args'.
1092         * compile/gcc-cp-plugin.h: New file.
1093         * NEWS: Mention C++ compile support and new debug options.
1094
1095 2018-08-29  Keith Seitz  <keiths@redhat.com>
1096
1097         * linespec.c (collect_info::add_symbol): Make virtual.
1098         (struct symbol_searcher_collect_info): New struct.
1099         (symbol_searcher::find_all_symbols): New method.
1100         * symtab.h (class symbol_searcher): New class.
1101
1102 2018-08-29  Keith Seitz  <keiths@redhat.com>
1103
1104         * linespec.c (struct linespec) <function_symbols, label_symbols>:
1105         Change to vector of block_symbol.  Update all users.
1106         (struct collect_info) <symbols>: Likewise.
1107         (collect_info::add_symbol): Take block_symbol as argument.
1108         Update all callers.
1109         (decode_compound_collector) <m_symbols>: Change type to vector
1110         of block_symbol.  Update all users.
1111         (decode_compound_collector::operator ()): Change parameter type
1112         to block_symbol.
1113         (find_method, find_function_symbols, find_linespec_symbols)
1114         (find_label_symbols_in_block, find_label_symbols): Change symbol
1115         vectors to block_symbol vectors.
1116         * symtab.h (symbol_found_callback_ftype): Change parameter type to
1117         block_symbol.
1118
1119 2018-08-29  Keith Seitz  <keiths@redhat.com>
1120
1121         * linespec.c (symbolp): Remove typedef and VEC definitions.
1122         (bound_minimal_symbol_d): Likewise.
1123
1124 2018-08-29  Keith Seitz  <keiths@redhat.com>
1125
1126         * linespec.c (decode_compound_collector::decode_compound_collector):
1127         Remove initialization for `m_symtabs'.
1128         (decode_compound_collector::release_symbols): Change return type
1129         to std::vector.  Update all callers.
1130         (class decode_compound_collector) <m_symbols>: Change type to
1131         std::vector.
1132         (lookup_prefix_sym): Change return type to std::vector.  Update all
1133         callers.
1134         (compare_symbols): Remove.
1135         (std_compare_symbols): Rename to `compare_symbols'.
1136         (find_method): Change `sym_classes' parameter to std::vector.
1137         Update all callers.  Use std::sort to sort sym_classes.
1138         (find_linespec_symbols): Remove cleanup.
1139
1140 2018-08-29  Keith Seitz  <keiths@redhat.com>
1141
1142         * linespec.c (struct linespec) <minimal_symbols>: Change type to
1143         std::vector.  Update all users.
1144         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
1145         (struct collect_info) <minimal_symbols>: Likewise.
1146         (compare_msymbols): Return bool.  Change parameters to const
1147         bound_minimal_symbol references.
1148         (find_method, find_function_symbols, find_linespec_symbols): Change
1149         `minsyms' parameter to std::vector.  Update all callers.
1150
1151 2018-08-29  Keith Seitz  <keiths@redhat.com>
1152
1153         * linespec.c (struct linespec) <label_symbols>: Change type to
1154         std::vector.  Update all users.
1155         (find_label_symbols_in_block): Change `result' parameter to
1156         std::vector.  Update all callers.
1157         (find_label_symbols): Return std::vector.  Update all callers.
1158
1159 2018-08-29  Keith Seitz  <keiths@redhat.com>
1160
1161         * linespec.c (struct linespec) <function_symbols>: Change type to
1162         std::vector.  Update all users.
1163         (struct collect_info) <function_symbols>: Likewise.
1164         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
1165         (std_compare_symbols): New function.
1166         (find_method, find_function_symbols, find_linespec_symbols)
1167         (find_label_symbols_in_block): Change `symbols' parameter to
1168         std::vector.  Update all callers.
1169         (find_label_symbols): Likewise for `function_symbols' and
1170         `label_funcs_ret'.
1171
1172 2018-08-29  Keith Seitz  <keiths@redhat.com>
1173
1174         * linespec.c (symtab_vector_up): Define.
1175         (struct linespec) <file_symtabs>: Change type to std::vector *.
1176         Update all uses.
1177         (struct collect_info) <file_symtabs>: Likewise.
1178         (collect_symtabs_from_filename): Return symtab_vector_up.
1179         Update all callers.
1180         (decode_objc): Remove cleanup.
1181         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
1182         (symtab_collector::release_symtabs): Return symtab_vector_up.
1183         Update all callers.
1184         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
1185         Update all users.
1186         (collect_symtabs_from_filename, symtabs_from_filename): Return
1187         symtab_vector_up.  Update all callers.
1188
1189 2018-08-29  Tom Tromey  <tom@tromey.com>
1190
1191         * csky-tdep.c (csky_analyze_prologue): Use
1192         core_addr_to_string_nz.
1193
1194 2018-08-29  Tom Tromey  <tom@tromey.com>
1195
1196         * windows-nat.c (struct xlate_exception) <them>: Change type to
1197         DWORD.
1198         (xlate): Fix formatting.  Remove last entry.
1199         (struct xlate_exception, xlate): Comment out.
1200         (windows_nat_target::resume): Use ranged for.
1201
1202 2018-08-29  Jim Wilson  <jimw@sifive.com>
1203
1204         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
1205         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
1206         of NT_PRFPREG.
1207         (riscv_linux_nat_target::store_registers): Likewise.
1208
1209 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
1210
1211         PR gdb/23555
1212         PR gdb/23558
1213         * gnulib/aclocal.m4: Regenerate.
1214         * gnulib/config.in: Regenerate.
1215         * gnulib/configure: Regenerate.
1216         * gnulib/import/Makefile.am: Update.
1217         * gnulib/import/Makefile.in: Update.
1218         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
1219         * gnulib/import/_Noreturn.h: ... this.
1220         * gnulib/import/alloca.in.h: Update.
1221         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
1222         * gnulib/import/arg-nonnull.h: ... this.
1223         * gnulib/import/assure.h: Update.
1224         * gnulib/import/at-func.c: Update.
1225         * gnulib/import/basename-lgpl.c: Update.
1226         * gnulib/import/extra/snippet/c++defs.h: Rename to...
1227         * gnulib/import/c++defs.h: ... this.
1228         * gnulib/import/canonicalize-lgpl.c: Update.
1229         * gnulib/import/cdefs.h: Update.
1230         * gnulib/import/chdir-long.c: Update.
1231         * gnulib/import/chdir-long.h: Update.
1232         * gnulib/import/cloexec.c: Update.
1233         * gnulib/import/cloexec.h: Update.
1234         * gnulib/import/close.c: Update.
1235         * gnulib/import/closedir.c: Update.
1236         * gnulib/import/config.charset: Update.
1237         * gnulib/import/dirent-private.h: Update.
1238         * gnulib/import/dirent.in.h: Update.
1239         * gnulib/import/dirfd.c: Update.
1240         * gnulib/import/dirname-lgpl.c: Update.
1241         * gnulib/import/dirname.h: Update.
1242         * gnulib/import/dosname.h: Update.
1243         * gnulib/import/dup-safer-flag.c: Update.
1244         * gnulib/import/dup-safer.c: Update.
1245         * gnulib/import/dup.c: Update.
1246         * gnulib/import/dup2.c: Update.
1247         * gnulib/import/errno.in.h: Update.
1248         * gnulib/import/error.c: Update.
1249         * gnulib/import/error.h: Update.
1250         * gnulib/import/exitfail.c: Update.
1251         * gnulib/import/exitfail.h: Update.
1252         * gnulib/import/extra/update-copyright: Update.
1253         * gnulib/import/fchdir.c: Update.
1254         * gnulib/import/fcntl.c: Update.
1255         * gnulib/import/fcntl.in.h: Update.
1256         * gnulib/import/fd-hook.c: Update.
1257         * gnulib/import/fd-hook.h: Update.
1258         * gnulib/import/fd-safer-flag.c: Update.
1259         * gnulib/import/fd-safer.c: Update.
1260         * gnulib/import/fdopendir.c: Update.
1261         * gnulib/import/filename.h: Update.
1262         * gnulib/import/filenamecat-lgpl.c: Update.
1263         * gnulib/import/filenamecat.h: Update.
1264         * gnulib/import/flexmember.h: Update.
1265         * gnulib/import/float+.h: Update.
1266         * gnulib/import/float.c: Update.
1267         * gnulib/import/float.in.h: Update.
1268         * gnulib/import/fnmatch.c: Update.
1269         * gnulib/import/fnmatch.in.h: Update.
1270         * gnulib/import/fnmatch_loop.c: Update.
1271         * gnulib/import/fpucw.h: Update.
1272         * gnulib/import/frexp.c: Update.
1273         * gnulib/import/frexpl.c: Update.
1274         * gnulib/import/fstat.c: Update.
1275         * gnulib/import/fstatat.c: Update.
1276         * gnulib/import/getcwd-lgpl.c: Update.
1277         * gnulib/import/getcwd.c: Update.
1278         * gnulib/import/getdtablesize.c: Update.
1279         * gnulib/import/getlogin_r.c: Update.
1280         * gnulib/import/getprogname.c: Update.
1281         * gnulib/import/getprogname.h: Update.
1282         * gnulib/import/gettext.h: Update.
1283         * gnulib/import/gettimeofday.c: Update.
1284         * gnulib/import/glob-libc.h: Update.
1285         * gnulib/import/glob.c: Update.
1286         * gnulib/import/glob.in.h: Update.
1287         * gnulib/import/glob_internal.h: Update.
1288         * gnulib/import/glob_pattern_p.c: Update.
1289         * gnulib/import/globfree.c: Update.
1290         * gnulib/import/hard-locale.c: Update.
1291         * gnulib/import/hard-locale.h: Update.
1292         * gnulib/import/intprops.h: Update.
1293         * gnulib/import/inttypes.in.h: Update.
1294         * gnulib/import/isnan.c: Update.
1295         * gnulib/import/isnand-nolibm.h: Update.
1296         * gnulib/import/isnand.c: Update.
1297         * gnulib/import/isnanl-nolibm.h: Update.
1298         * gnulib/import/isnanl.c: Update.
1299         * gnulib/import/itold.c: Update.
1300         * gnulib/import/libc-config.h: Update.
1301         * gnulib/import/limits.in.h: Update.
1302         * gnulib/import/localcharset.c: Update.
1303         * gnulib/import/localcharset.h: Update.
1304         * gnulib/import/localtime-buffer.c: Update.
1305         * gnulib/import/localtime-buffer.h: Update.
1306         * gnulib/import/lstat.c: Update.
1307         * gnulib/import/m4/00gnulib.m4: Update.
1308         * gnulib/import/m4/__inline.m4: Update.
1309         * gnulib/import/m4/absolute-header.m4: Update.
1310         * gnulib/import/m4/alloca.m4: Update.
1311         * gnulib/import/m4/builtin-expect.m4: Update.
1312         * gnulib/import/m4/canonicalize.m4: Update.
1313         * gnulib/import/m4/chdir-long.m4: Update.
1314         * gnulib/import/m4/close.m4: Update.
1315         * gnulib/import/m4/closedir.m4: Update.
1316         * gnulib/import/m4/configmake.m4: Update.
1317         * gnulib/import/m4/d-ino.m4: Update.
1318         * gnulib/import/m4/d-type.m4: Update.
1319         * gnulib/import/m4/dirent_h.m4: Update.
1320         * gnulib/import/m4/dirfd.m4: Update.
1321         * gnulib/import/m4/dirname.m4: Update.
1322         * gnulib/import/m4/double-slash-root.m4: Update.
1323         * gnulib/import/m4/dup.m4: Update.
1324         * gnulib/import/m4/dup2.m4: Update.
1325         * gnulib/import/m4/eealloc.m4: Update.
1326         * gnulib/import/m4/environ.m4: Update.
1327         * gnulib/import/m4/errno_h.m4: Update.
1328         * gnulib/import/m4/error.m4: Update.
1329         * gnulib/import/m4/exponentd.m4: Update.
1330         * gnulib/import/m4/exponentl.m4: Update.
1331         * gnulib/import/m4/extensions.m4: Update.
1332         * gnulib/import/m4/extern-inline.m4: Update.
1333         * gnulib/import/m4/fchdir.m4: Update.
1334         * gnulib/import/m4/fcntl-o.m4: Update.
1335         * gnulib/import/m4/fcntl.m4: Update.
1336         * gnulib/import/m4/fcntl_h.m4: Update.
1337         * gnulib/import/m4/fdopendir.m4: Update.
1338         * gnulib/import/m4/filenamecat.m4: Update.
1339         * gnulib/import/m4/flexmember.m4: Update.
1340         * gnulib/import/m4/float_h.m4: Update.
1341         * gnulib/import/m4/fnmatch.m4: Update.
1342         * gnulib/import/m4/fnmatch_h.m4: Update.
1343         * gnulib/import/m4/fpieee.m4: Update.
1344         * gnulib/import/m4/frexp.m4: Update.
1345         * gnulib/import/m4/frexpl.m4: Update.
1346         * gnulib/import/m4/fstat.m4: Update.
1347         * gnulib/import/m4/fstatat.m4: Update.
1348         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
1349         * gnulib/import/m4/getcwd-path-max.m4: Update.
1350         * gnulib/import/m4/getcwd.m4: Update.
1351         * gnulib/import/m4/getdtablesize.m4: Update.
1352         * gnulib/import/m4/getlogin.m4: Update.
1353         * gnulib/import/m4/getlogin_r.m4: Update.
1354         * gnulib/import/m4/getpagesize.m4: Update.
1355         * gnulib/import/m4/getprogname.m4: Update.
1356         * gnulib/import/m4/gettimeofday.m4: Update.
1357         * gnulib/import/m4/glibc21.m4: Update.
1358         * gnulib/import/m4/glob.m4: Update.
1359         * gnulib/import/m4/glob_h.m4: Update.
1360         * gnulib/import/m4/gnulib-cache.m4: Update.
1361         * gnulib/import/m4/gnulib-common.m4: Update.
1362         * gnulib/import/m4/gnulib-comp.m4: Update.
1363         * gnulib/import/m4/gnulib-tool.m4: Update.
1364         * gnulib/import/m4/hard-locale.m4: Update.
1365         * gnulib/import/m4/include_next.m4: Update.
1366         * gnulib/import/m4/inttypes-pri.m4: Update.
1367         * gnulib/import/m4/inttypes.m4: Update.
1368         * gnulib/import/m4/isnand.m4: Update.
1369         * gnulib/import/m4/isnanl.m4: Update.
1370         * gnulib/import/m4/largefile.m4: Update.
1371         * gnulib/import/m4/limits-h.m4: Update.
1372         * gnulib/import/m4/localcharset.m4: Update.
1373         * gnulib/import/m4/locale-fr.m4: Update.
1374         * gnulib/import/m4/locale-ja.m4: Update.
1375         * gnulib/import/m4/locale-zh.m4: Update.
1376         * gnulib/import/m4/localtime-buffer.m4: Update.
1377         * gnulib/import/m4/longlong.m4: Update.
1378         * gnulib/import/m4/lstat.m4: Update.
1379         * gnulib/import/m4/malloc.m4: Update.
1380         * gnulib/import/m4/malloca.m4: Update.
1381         * gnulib/import/m4/math_h.m4: Update.
1382         * gnulib/import/m4/mbrtowc.m4: Update.
1383         * gnulib/import/m4/mbsinit.m4: Update.
1384         * gnulib/import/m4/mbsrtowcs.m4: Update.
1385         * gnulib/import/m4/mbstate_t.m4: Update.
1386         * gnulib/import/m4/memchr.m4: Update.
1387         * gnulib/import/m4/memmem.m4: Update.
1388         * gnulib/import/m4/mempcpy.m4: Update.
1389         * gnulib/import/m4/memrchr.m4: Update.
1390         * gnulib/import/m4/mkdir.m4: Update.
1391         * gnulib/import/m4/mkstemp.m4: Update.
1392         * gnulib/import/m4/mmap-anon.m4: Update.
1393         * gnulib/import/m4/mode_t.m4: Update.
1394         * gnulib/import/m4/msvc-inval.m4: Update.
1395         * gnulib/import/m4/msvc-nothrow.m4: Update.
1396         * gnulib/import/m4/multiarch.m4: Update.
1397         * gnulib/import/m4/nocrash.m4: Update.
1398         * gnulib/import/m4/off_t.m4: Update.
1399         * gnulib/import/m4/onceonly.m4: Update.
1400         * gnulib/import/m4/open-cloexec.m4: Update.
1401         * gnulib/import/m4/open.m4: Update.
1402         * gnulib/import/m4/openat.m4: Update.
1403         * gnulib/import/m4/opendir.m4: Update.
1404         * gnulib/import/m4/pathmax.m4: Update.
1405         * gnulib/import/m4/rawmemchr.m4: Update.
1406         * gnulib/import/m4/readdir.m4: Update.
1407         * gnulib/import/m4/readlink.m4: Update.
1408         * gnulib/import/m4/realloc.m4: Update.
1409         * gnulib/import/m4/rename.m4: Update.
1410         * gnulib/import/m4/rewinddir.m4: Update.
1411         * gnulib/import/m4/rmdir.m4: Update.
1412         * gnulib/import/m4/save-cwd.m4: Update.
1413         * gnulib/import/m4/secure_getenv.m4: Update.
1414         * gnulib/import/m4/setenv.m4: Update.
1415         * gnulib/import/m4/signal_h.m4: Update.
1416         * gnulib/import/m4/ssize_t.m4: Update.
1417         * gnulib/import/m4/stat-time.m4: Update.
1418         * gnulib/import/m4/stat.m4: Update.
1419         * gnulib/import/m4/std-gnu11.m4: Update.
1420         * gnulib/import/m4/stdbool.m4: Update.
1421         * gnulib/import/m4/stddef_h.m4: Update.
1422         * gnulib/import/m4/stdint.m4: Update.
1423         * gnulib/import/m4/stdio_h.m4: Update.
1424         * gnulib/import/m4/stdlib_h.m4: Update.
1425         * gnulib/import/m4/strchrnul.m4: Update.
1426         * gnulib/import/m4/strdup.m4: Update.
1427         * gnulib/import/m4/strerror.m4: Update.
1428         * gnulib/import/m4/string_h.m4: Update.
1429         * gnulib/import/m4/strstr.m4: Update.
1430         * gnulib/import/m4/strtok_r.m4: Update.
1431         * gnulib/import/m4/sys_socket_h.m4: Update.
1432         * gnulib/import/m4/sys_stat_h.m4: Update.
1433         * gnulib/import/m4/sys_time_h.m4: Update.
1434         * gnulib/import/m4/sys_types_h.m4: Update.
1435         * gnulib/import/m4/tempname.m4: Update.
1436         * gnulib/import/m4/time_h.m4: Update.
1437         * gnulib/import/m4/unistd-safer.m4: Update.
1438         * gnulib/import/m4/unistd_h.m4: Update.
1439         * gnulib/import/m4/warn-on-use.m4: Update.
1440         * gnulib/import/m4/wchar_h.m4: Update.
1441         * gnulib/import/m4/wchar_t.m4: Update.
1442         * gnulib/import/m4/wctype_h.m4: Update.
1443         * gnulib/import/m4/wint_t.m4: Update.
1444         * gnulib/import/malloc.c: Update.
1445         * gnulib/import/malloc/scratch_buffer.h: Update.
1446         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
1447         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
1448         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
1449         * gnulib/import/malloca.c: Update.
1450         * gnulib/import/malloca.h: Update.
1451         * gnulib/import/malloca.valgrind: Update.
1452         * gnulib/import/math.in.h: Update.
1453         * gnulib/import/mbrtowc.c: Update.
1454         * gnulib/import/mbsinit.c: Update.
1455         * gnulib/import/mbsrtowcs-impl.h: Update.
1456         * gnulib/import/mbsrtowcs-state.c: Update.
1457         * gnulib/import/mbsrtowcs.c: Update.
1458         * gnulib/import/memchr.c: Update.
1459         * gnulib/import/memmem.c: Update.
1460         * gnulib/import/mempcpy.c: Update.
1461         * gnulib/import/memrchr.c: Update.
1462         * gnulib/import/mkdir.c: Update.
1463         * gnulib/import/mkstemp.c: Update.
1464         * gnulib/import/msvc-inval.c: Update.
1465         * gnulib/import/msvc-inval.h: Update.
1466         * gnulib/import/msvc-nothrow.c: Update.
1467         * gnulib/import/msvc-nothrow.h: Update.
1468         * gnulib/import/open.c: Update.
1469         * gnulib/import/openat-die.c: Update.
1470         * gnulib/import/openat-priv.h: Update.
1471         * gnulib/import/openat-proc.c: Update.
1472         * gnulib/import/openat.c: Update.
1473         * gnulib/import/openat.h: Update.
1474         * gnulib/import/opendir.c: Update.
1475         * gnulib/import/pathmax.h: Update.
1476         * gnulib/import/pipe-safer.c: Update.
1477         * gnulib/import/rawmemchr.c: Update.
1478         * gnulib/import/readdir.c: Update.
1479         * gnulib/import/readlink.c: Update.
1480         * gnulib/import/realloc.c: Update.
1481         * gnulib/import/ref-add.sin: Update.
1482         * gnulib/import/ref-del.sin: Update.
1483         * gnulib/import/rename.c: Update.
1484         * gnulib/import/rewinddir.c: Update.
1485         * gnulib/import/rmdir.c: Update.
1486         * gnulib/import/same-inode.h: Update.
1487         * gnulib/import/save-cwd.c: Update.
1488         * gnulib/import/save-cwd.h: Update.
1489         * gnulib/import/scratch_buffer.h: Update.
1490         * gnulib/import/secure_getenv.c: Update.
1491         * gnulib/import/setenv.c: Update.
1492         * gnulib/import/signal.in.h: Update.
1493         * gnulib/import/stat-time.c: Update.
1494         * gnulib/import/stat-time.h: Update.
1495         * gnulib/import/stat-w32.c: Update.
1496         * gnulib/import/stat-w32.h: Update.
1497         * gnulib/import/stat.c: Update.
1498         * gnulib/import/stdbool.in.h: Update.
1499         * gnulib/import/stddef.in.h: Update.
1500         * gnulib/import/stdint.in.h: Update.
1501         * gnulib/import/stdio.in.h: Update.
1502         * gnulib/import/stdlib.in.h: Update.
1503         * gnulib/import/str-two-way.h: Update.
1504         * gnulib/import/strchrnul.c: Update.
1505         * gnulib/import/strdup.c: Update.
1506         * gnulib/import/streq.h: Update.
1507         * gnulib/import/strerror-override.c: Update.
1508         * gnulib/import/strerror-override.h: Update.
1509         * gnulib/import/strerror.c: Update.
1510         * gnulib/import/string.in.h: Update.
1511         * gnulib/import/stripslash.c: Update.
1512         * gnulib/import/strnlen1.c: Update.
1513         * gnulib/import/strnlen1.h: Update.
1514         * gnulib/import/strstr.c: Update.
1515         * gnulib/import/strtok_r.c: Update.
1516         * gnulib/import/sys_stat.in.h: Update.
1517         * gnulib/import/sys_time.in.h: Update.
1518         * gnulib/import/sys_types.in.h: Update.
1519         * gnulib/import/tempname.c: Update.
1520         * gnulib/import/tempname.h: Update.
1521         * gnulib/import/time.in.h: Update.
1522         * gnulib/import/unistd--.h: Update.
1523         * gnulib/import/unistd-safer.h: Update.
1524         * gnulib/import/unistd.in.h: Update.
1525         * gnulib/import/unsetenv.c: Update.
1526         * gnulib/import/verify.h: Update.
1527         * gnulib/import/extra/snippet/warn-on-use.h: Update.
1528         * gnulib/import/wchar.in.h: Update.
1529         * gnulib/import/wctype.in.h: Update.
1530         * gnulib/import/xalloc-oversized.h: Update.
1531         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
1532         "53e2c179f26a890fa6685af4b6c1397ee370433b".
1533
1534 2018-08-16  Gary Benson <gbenson@redhat.com>
1535
1536         PR gdb/13000:
1537         * gdb/main.c (captured_main_1): Exit with nonzero status
1538         in batch mode if the last command to be executed failed.
1539         * NEWS: Mention the above.
1540
1541 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
1542
1543         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
1544         end of warning message.
1545
1546 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
1547
1548         PR gdb/22943:
1549         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
1550         (aarch64_extract_return_value): Use
1551         aapcs_is_vfp_call_or_return_candidate.
1552         (aarch64_return_in_memory): Likewise.
1553         (aarch64_store_return_value): Likewise.
1554
1555 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
1556
1557         * aarch64-tdep.c
1558         (aapcs_is_vfp_call_or_return_candidate): Make static
1559         (pass_in_v_or_stack): Remove function.
1560         (pass_in_v_vfp_candidate): New function.
1561         (aarch64_push_dummy_call): Check for float register candidates.
1562
1563 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
1564
1565         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
1566         (aapcs_is_vfp_call_or_return_candidate_1): New function.
1567         (aapcs_is_vfp_call_or_return_candidate): Likewise.
1568
1569 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
1570
1571         PR build/23399
1572         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
1573         (struct ipa_sym_addresses): Rename to...
1574         (struct ipa_sym_addresses_common): ... this.
1575         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
1576
1577 2018-08-28  Tom Tromey  <tom@tromey.com>
1578
1579         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1580         (token_fifo): Now a std::vector.
1581         (yylex, c_parse): Update.
1582         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1583         (token_fifo): Now a std::vector.
1584         (yylex, d_parse): Update.
1585         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1586         (token_fifo): Now a std::vector.
1587         (yylex, go_parse): Update.
1588
1589 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
1590
1591         * parser-defs.h (struct type_stack) <elements>: Change type to
1592         std::vector<union type_stack_elt>.
1593         <depth, size>: Remove.
1594         * parse.c (parse_exp_in_context_1): Adjust.
1595         (type_stack_reserve): Remove.
1596         (check_type_stack_depth): Remove.
1597         (insert_into_type_stack): Adjust to std::vector.
1598         (insert_type): Likewise.
1599         (push_type): Likewise.
1600         (push_type_int): Likewise.
1601         (insert_type_address_space): Likewise.
1602         (pop_type): Likewise.
1603         (pop_type_int): Likewise.
1604         (pop_typelist): Likewise.
1605         (pop_type_stack): Likewise.
1606         (append_type_stack): Likewise.
1607         (push_type_stack): Likewise.
1608         (get_type_stack): Likewise.
1609         (type_stack_cleanup): Likewise.
1610         (push_typelist): Likewise.
1611         (follow_types): Likewise.
1612         (_initialize_parse): Likewise.
1613
1614 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
1615
1616         * NEWS: Mention csky target.
1617
1618 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
1619             Hafiz Abid Qadeer  <abidh@codesourcery.com>
1620             Don Breazeal  <donb@codesourcery.com>
1621
1622         * csky-linux-tdep.c: New file.
1623         * csky-tdep.c: Likewise.
1624         * csky-tdep.h: Likewise.
1625         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
1626         csky-tdep.o.
1627         (HFILES_NO_SRCDIR): Add csky-tdep.h.
1628         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
1629         * configure.tgt: Add csky support.
1630
1631 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
1632
1633         * python/py-framefilter.c (py_print_frame): Print frame architecture
1634         when printing on an MI output.
1635
1636 2018-08-27  Tom Tromey  <tom@tromey.com>
1637
1638         PR build/23087:
1639         * configure: Rebuild.
1640         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
1641
1642 2018-08-27  Tom Tromey  <tom@tromey.com>
1643
1644         * aarch64-linux-tdep.c
1645         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
1646         casts to int.
1647
1648 2018-08-27  Tom Tromey  <tom@tromey.com>
1649
1650         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
1651         unsigned.
1652         (ppc64_standard_linkage1, ppc64_standard_linkage2)
1653         (ppc64_standard_linkage3, ppc64_standard_linkage4)
1654         (ppc64_standard_linkage5, ppc64_standard_linkage6)
1655         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
1656         unsigned.
1657
1658 2018-08-27  Tom Tromey  <tom@tromey.com>
1659
1660         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
1661         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
1662
1663 2018-08-27  Tom Tromey  <tom@tromey.com>
1664
1665         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
1666         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
1667         ULONGEST_MAX.
1668         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
1669         ULONGEST_MAX.
1670         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
1671         ULONGEST_MAX.
1672         * sparc-linux-tdep.c (sparc32_linux_sigframe)
1673         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
1674         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
1675         ULONGEST_MAX.
1676         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
1677         (ppc64_linux_sigaction_tramp_frame)
1678         (ppc32_linux_sighandler_tramp_frame)
1679         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
1680         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
1681         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
1682         * mn10300-linux-tdep.c (am33_linux_sigframe)
1683         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
1684         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
1685         * mips-linux-tdep.c (mips_linux_o32_sigframe)
1686         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
1687         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
1688         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
1689         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
1690         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
1691         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
1692         * microblaze-linux-tdep.c
1693         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
1694         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
1695         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
1696         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
1697         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
1698         * common/common-types.h (ULONGEST_MAX): New define.
1699         (CORE_ADDR_MAX): Fix formatting.
1700         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
1701         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
1702         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
1703         (arm_linux_rt_sigreturn_tramp_frame)
1704         (arm_eabi_linux_sigreturn_tramp_frame)
1705         (arm_eabi_linux_rt_sigreturn_tramp_frame)
1706         (thumb2_eabi_linux_sigreturn_tramp_frame)
1707         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
1708         (arm_linux_restart_syscall_tramp_frame)
1709         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
1710         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
1711         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
1712         ULONGEST_MAX.
1713         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
1714
1715 2018-08-27  Tom Tromey  <tom@tromey.com>
1716
1717         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
1718         CORE_ADDR_MAX.
1719         * mips-tdep.c (mips_deal_with_atomic_sequence)
1720         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
1721         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
1722         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
1723         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
1724         CORE_ADDR_MAX.
1725         * aarch64-tdep.c (aarch64_software_single_step): Use
1726         CORE_ADDR_MAX.
1727
1728 2018-08-27  Tom Tromey  <tom@tromey.com>
1729
1730         * linespec.c (complete_linespec_component): Add cast to "char".
1731         * completer.c (completion_tracker::build_completion_result): Add
1732         cast to "char".
1733
1734 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
1735
1736         * solist.h (struct solist, struct target_so_ops): Fix
1737         indentation.
1738
1739 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
1740
1741         * ada-tasks.c (ada_task_info_s): Remove typedef.
1742         (DEF_VEC_O(ada_task_info_s)): Remove.
1743         (struct ada_tasks_inferior_data): Initialize fields.
1744         <task_list>: Make an std::vector.
1745         (get_ada_tasks_inferior_data): Allocate with new.
1746         (ada_get_task_number): Adjust.
1747         (get_task_number_from_id): Likewise.
1748         (valid_task_id): Likewise.
1749         (ada_get_task_info_from_ptid): Likewise.
1750         (iterate_over_live_ada_tasks): Likewise.
1751         (add_ada_task): Likewise.
1752         (read_known_tasks): Likewise.
1753         (ada_build_task_list): Likewise.
1754         (print_ada_task_info): Likewise.
1755         (info_task): Likewise.
1756         (task_command_1): Likewise.
1757
1758 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
1759
1760         * ada-lang.c (add_angle_brackets): Return std::string.
1761
1762 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
1763
1764         * python/py-threadevent.c (py_get_event_thread): Initialize
1765         pythread.
1766
1767 2018-08-24  Pedro Alves  <palves@redhat.com>
1768
1769         * python/py-bpevent.c (create_breakpoint_event_object): Use
1770         copy-initialization.
1771         * python/py-continueevent.c (emit_continue_event): Use
1772         copy-initialization.
1773         * python/py-exitedevent.c (create_exited_event_object): Return a
1774         gdbpy_ref<>.
1775         (emit_exited_event): Use copy-initialization.
1776         * python/py-inferior.c (python_new_inferior)
1777         (python_inferior_deleted, add_thread_object): Use
1778         copy-initialization.
1779         * python/py-infevents.c (create_inferior_call_event_object)
1780         (create_register_changed_event_object)
1781         (create_memory_changed_event_object): Return a gdbpy_ref<>.
1782         (emit_inferior_call_event, emit_memory_changed_event)
1783         (emit_register_changed_event): Use copy-initialization.
1784         * python/py-newobjfileevent.c (create_new_objfile_event_object):
1785         Return a gdbpy_ref<>.
1786         (emit_new_objfile_event): Use copy-initialization.
1787         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
1788         (emit_clear_objfiles_event): Use copy-initialization.
1789         * python/py-signalevent.c (create_signal_event_object): Use
1790         copy-initialization.
1791         * python/py-threadevent.c (create_thread_event_object): Use
1792         copy-initialization.
1793
1794 2018-08-24  Pedro Alves  <palves@redhat.com>
1795             Simon Marchi  <simon.marchi@ericsson.com>
1796
1797         PR gdb/23379
1798         * python/py-continueevent.c: Include "gdbthread.h".
1799         (create_continue_event_object): Add intro comment.  Add 'ptid'
1800         parameter.  Use it to find thread to pass to
1801         create_thread_event_object.
1802         (emit_continue_event): Pass PTID down to
1803         create_continue_event_object.
1804         * python/py-event.h (py_get_event_thread): Declare.
1805         (create_thread_event_object): Remove default from 'thread'
1806         parameter.
1807         * python/py-stopevent.c (create_stop_event_object): Use
1808         py_get_event_thread.
1809         * python/py-threadevent.c (get_event_thread): Rename to ...
1810         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
1811         and use it to find the thread.
1812         (create_thread_event_object): Assert that THREAD isn't null.
1813         Don't find the event thread here.
1814
1815 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
1816
1817         * block.h (blockrange, blockranges): New struct declarations.
1818         (struct block): Add new field named `ranges'.
1819         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
1820         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
1821         macros for accessing ranges in struct block.
1822         (make_blockranges): New declaration.
1823         block.c (make_blockranges): New function.
1824         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
1825         for block.
1826         * symtab.h (find_pc_partial_function): Add new parameter `block'.
1827         * blockframe.c (cache_pc_function_block): New static global.
1828         (clear_pc_function_cache): Clear cache_pc_function_block.
1829         (find_pc_partial_function): Move comment to symtab.h.  Add
1830         support for non-contiguous blocks.
1831         * cli/cli-cmds.c (block.h): Include.
1832         (print_disassembly): Handle printing of non-contiguous blocks.
1833         (disassemble_current_function): Likewise.
1834         (disassemble_command): Likewise.
1835
1836         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
1837         BLOCK_START.
1838         * blockframe.c (get_pc_function_start): Likewise.
1839         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
1840         (gcc_symbol_address): Likewise.
1841         * compile/compile-object-run.c (compile_object_run): Likewise.
1842         * compile/compile.c (get_expr_block_and_pc): Likewise.
1843         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
1844         (func_addr_to_tail_call_list): Likewise.
1845         * findvar.c (default_read_var_value): Likewise.
1846         * inline-frame.c (inline_frame_this_id): Likewise.
1847         (skip-inline_frames): Likewise.
1848         * infcmd.c (until_next_command): Likewise.
1849         * linespec.c (convert_linespec_to_sals): Likewise.
1850         * parse.c (parse_exp_in_context_1): Likewise.
1851         * printcmd.c (build_address_symbolic): likewise.
1852         (info_address_command): Likewise.
1853         symtab.c (find_function_start_sal): Likewise.
1854         (skip_prologue_sal): Likewise.
1855         (find_function_alias_target): Likewise.
1856         (find_gnu_ifunc): Likewise.
1857         * stack.c (find_frame_funname): Likewise.
1858         * symtab.c (fixup_symbol_section): Likewise.
1859         (find_function_start_sal): Likewise.
1860         (skip_prologue_sal): Likewsie.
1861         (find_function_alias_target): Likewise.
1862         (find_gnu_ifunc): Likewise.
1863         * tracepoint.c (info_scope_command): Likewise.
1864         * value.c (value_fn_field): Likewise.
1865
1866         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
1867         in place of find_pc_partial_function.
1868         * blockframe.c (find_function_entry_range_from_pc): New function.
1869         * symtab.h (find_function_entry_range_from_pc): Declare and document.
1870         * objfiles.c (objfile_relocate1): Relocate start and end addresses
1871         for each range in a block.
1872
1873
1874 2018-08-23  Xavier Roirand  <roirand@adacore.com>
1875
1876         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
1877         incrementation.
1878
1879 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
1880
1881         * solib-svr4.c (read_program_headers_from_bfd): Return
1882         gdb::optional<gdb::byte_vector>.
1883         (svr4_exec_displacement): Adjust.
1884
1885 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
1886
1887         * solib-svr4.c (read_program_header): Return
1888         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
1889         (find_program_interpreter): Return
1890         gdb::optional<gdb::byte_vector>.
1891         (scan_dyntag_auxv): Adjust.
1892         (enable_break): Adjust.
1893         (svr4_exec_displacement): Adjust.
1894
1895 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
1896
1897         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
1898         * inf-child.c (inf_child_target::terminal_save_inferior): New.
1899
1900 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
1901
1902         * guile/scm-string.c (gdbscm_scm_from_printf): Use
1903         string_vprintf.
1904         * guile/scm-utils.c (gdbscm_printf): Likewise.
1905         * serial.c (serial_printf): Likewise.
1906         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
1907
1908 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
1909
1910         * stack.c (print_frame): Print frame architecture when printing on
1911         an MI output.
1912         * NEWS: Mention new "arch" attribute in frame output.
1913
1914 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
1915
1916         * arch/aarch64.h (aarch64_regnum): Update comment.
1917
1918 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
1919
1920         * NEWS: Add SVE to 8.2 section.
1921
1922 2018-08-21  Pedro Alves  <palves@redhat.com>
1923
1924         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
1925         out from gdbscm_parse_function_args.
1926         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
1927         gdbscm_parse_function_args_1.
1928
1929 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
1930
1931         PR gdb/17816
1932         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
1933         operator.
1934
1935 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
1936
1937         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
1938
1939 2018-08-19  Michael Spang  <spang@google.com>
1940
1941         PR gdb/11786
1942         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
1943         for PT_TLS segments.
1944
1945 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
1946
1947         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
1948         dwarf_variable_value.
1949         * dwarf2-frame.c (class dwarf_expr_executor):
1950         Add override for dwarf_variable_value.
1951         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
1952         (class symbol_needs_eval_context): Likewise.
1953         (indirect_synthetic_pointer): Add forward declaration.
1954         (sect_variable_value): New function.
1955         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
1956         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
1957         for DW_OP_GNU_variable_value.
1958
1959 2018-08-16  Tom Tromey  <tom@tromey.com>
1960
1961         * top.c (read_command_file): Update.
1962         (command_line_input): Remove "repeat" argument.
1963         * ada-lang.c (get_selections): Update.
1964         * linespec.c (decode_line_2): Update.
1965         * defs.h (command_line_input): Remove argument.
1966         * cli/cli-script.c (read_next_line): Update.
1967         * python/py-gdb-readline.c: Update.
1968
1969 2018-08-17  Tom Tromey  <tom@tromey.com>
1970
1971         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
1972         command_line_input.
1973
1974 2018-08-15  Tom Tromey  <tom@tromey.com>
1975
1976         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
1977
1978 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
1979
1980         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
1981         If used, use find_pc_partial_function to find address range
1982         to disassemble.
1983         * mi/mi-main.c (mi_cmd_list_features): Report
1984         "data-disassemble-a-option" feature.
1985         * NEWS: Mention new -data-disassemble option -a.
1986
1987 2018-08-13  Tom Tromey  <tom@tromey.com>
1988
1989         * common/common-defs.h (_FORTIFY_SOURCE): Define.
1990
1991 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
1992
1993         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
1994         (aarch64_linux_collect_sve_regset): Likewise.
1995         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
1996         * regcache.h (regcache_map_entry_size): New function.
1997
1998 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
1999
2000         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
2001         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
2002         (SVE_HEADER_VL_LENGTH): Likewise.
2003         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
2004         (SVE_HEADER_FLAGS_LENGTH): Likewise.
2005         (SVE_HEADER_RESERVED_LENGTH): Likewise.
2006         (SVE_HEADER_SIZE_OFFSET): Likewise.
2007         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
2008         (SVE_HEADER_VL_OFFSET): Likewise.
2009         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
2010         (SVE_HEADER_FLAGS_OFFSET): Likewise.
2011         (SVE_HEADER_RESERVED_OFFSET): Likewise.
2012         (SVE_HEADER_SIZE): Likewise.
2013         (aarch64_linux_core_read_vq): Add function.
2014         (aarch64_linux_core_read_description): Check for SVE section.
2015
2016 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
2017
2018         * aarch64-fbsd-tdep.c
2019         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
2020         collect_size.
2021         * aarch64-linux-tdep.c
2022         (aarch64_linux_iterate_over_regset_sections): Likewise.
2023         * alpha-linux-tdep.c
2024         (alpha_linux_iterate_over_regset_sections):
2025         * alpha-nbsd-tdep.c
2026         (alphanbsd_iterate_over_regset_sections): Likewise.
2027         * amd64-fbsd-tdep.c
2028         (amd64fbsd_iterate_over_regset_sections): Likewise.
2029         * amd64-linux-tdep.c
2030         (amd64_linux_iterate_over_regset_sections): Likewise.
2031         * arm-bsd-tdep.c
2032         (armbsd_iterate_over_regset_sections): Likewise.
2033         * arm-fbsd-tdep.c
2034         (arm_fbsd_iterate_over_regset_sections): Likewise.
2035         * arm-linux-tdep.c
2036         (arm_linux_iterate_over_regset_sections): Likewise.
2037         * corelow.c (get_core_registers_cb): Likewise.
2038         (core_target::fetch_registers): Likewise.
2039         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
2040         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
2041         * gdbarch.h (void): Regenerate.
2042         * gdbarch.sh: Add supply_size and collect_size.
2043         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
2044         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
2045         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
2046         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
2047         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
2048         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
2049         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
2050         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
2051         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
2052         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
2053         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
2054         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
2055         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
2056         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
2057         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
2058         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
2059         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
2060         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
2061         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
2062         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
2063         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
2064         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
2065         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
2066         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
2067         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
2068         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
2069         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
2070         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
2071         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
2072         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
2073
2074 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
2075
2076         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
2077         with string_printf.
2078
2079 2018-08-10  Keith Seitz  <keiths@redhat.com>
2080
2081         * compile/compile-c-support.c (add_code_header, add_code_footer):
2082         Move into policy class.
2083         (c_push_user_expression, pop_user_expression_nop)
2084         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
2085         (compile_program): New host class.
2086         (c_compile_program): New typedef.
2087         (c_compute_porgram): Use c_compile_program.
2088
2089 2018-08-10  Keith Seitz  <keiths@redhat.com>
2090
2091         * compile/compile-internal.h (compile_instance::~compile_instance):
2092         Remove calls to htab_delete.
2093         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
2094         * compile.c (compile_instance::compile_instance): Initialize
2095         htab unique pointers.
2096         (compile_instance::get_cached_type, compile_instance::insert_type)
2097         (compile_instance::error_symbol_once): Update for unique_ptr.
2098
2099 2018-08-10  Keith Seitz  <keiths@redhat.com>
2100
2101         * compile/compile-c-symbols.c (struct symbol_error)
2102         (hash_symbol_error, eq_symbol_error, del_symbol_error)
2103         (compile_instance::insert_symbol_error)
2104         (compile_instance::error_symbol_once): Move to ...
2105         * compile/compile.c: ... here.
2106
2107 2018-08-10  Keith Seitz  <keiths@redhat.com>
2108
2109         * compile/compile-c-support.c (c_get_compile_context): Use `new'
2110         instead of `new_compile_instance'.
2111         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
2112         Update description.
2113         If the symbol error map is not initialized, create it.
2114         (generate_c_for_for_one_symbol): Do not check/initialize
2115         the symbol error map.
2116         * compile/compile-c-types.c (compile_c_instance): Make a class.
2117         Update all callers.
2118         (compile_instance::compile_instance): Initialize the type cache.
2119         (get_cached_type): New function.
2120         (insert_type): Update description.
2121         (compile_c_instance::m_default_cflags): Define.
2122         (convert_type): Update description.  Use get_cached_type.
2123         (delete_instance): Moved to destructor.
2124         (new_compile_instance): Moved to constructor.
2125         * compile/compile-c.h (compile_c_instance): Make class inheriting
2126         from compile_instance.
2127         <base>: Remove field.
2128         <type_map, symbol_err_map>: Move to base class.
2129         <c_plugin>: Rename to `m_plugin' and remove pointer type.
2130         * compile/compile-internal.h (compile_instance): Make class.
2131         <type_map_t, symbol_err_map_t>: Define.
2132         <fe>: Rename to `m_gcc_fe'.
2133         <scope, block, gcc_target_options>: Add `m_' prefix.
2134         <m_type_map, m_symbol_err_map>: New fields, moved from
2135         compile_c_instance.
2136         <destroy>: Remove.
2137         (convert_type, new_compile_instance): Remove.
2138         * compile/compile.c (cleanup_compile_instance): Remove.
2139         (compile_to_object): Use unique_ptr to eliminate cleanups.
2140         (compile_instance::set_print_callback, compile_instance::version)
2141         (compile_instance::set_verbose)
2142         (compile_instance::set_driver_filename)
2143         (compile_instance::set_triplet_regexp)
2144         (compile_instance::set_arguments)
2145         (compile_instance::set_source_file)
2146         (compile_instance::compile): Define.
2147
2148 2018-08-10  Keith Seitz  <keiths@redhat.com>
2149
2150         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
2151         * compile/compile-c-types.c: Define GCC_METHODN macros and include
2152         gcc-c-fe.def to define C plugin.
2153         (delete_instance): Delete `c_plugin'.
2154         (new_compile_instance): Initialize `c_plugin'.
2155         * compile/compile-c.h: Include gcc_c_plugin.h.
2156         (struct compile_c_instance) <c_plugin>: New member.
2157         * gcc-c-plugin.h: New file.
2158         Update all callers with API change.
2159
2160 2018-08-10  Keith Seitz  <keiths@redhat.com>
2161
2162         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
2163         (HFILES_NO_SRCDIR): ... to here.
2164         Add compile-internal.h and compile-c.h.
2165         * compile/compile-c-support.c: Include compile-c.h.
2166         * compile/compile-c-symbols.c: Include compile-c.h.
2167         (generate_c_for_variable_locations): Update comment.
2168         * compile/compile-c-types.c: Include compile-c.h.
2169         * compile/compile-c.h: New file -- moved C language declarations
2170         from other files here.
2171         * compile/compile-internal.h: Do not include hashtab.h or
2172         common/enum-flags.h.
2173         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
2174         (gcc_convert_symbol, gcc_symbol_address)
2175         (generate_c_for_variable_locations, c_get_mode_for_size)
2176         (c_get_range_decl_name): Definitions moved to compile-c.h.
2177         * compile/compile-loc2c.c: Include compile-c.h.
2178
2179 2018-08-10  Keith Seitz  <keiths@redhat.com>
2180
2181         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
2182         (c_symbol_substitution_name): ... this.
2183         Update all callers.
2184
2185 2018-08-10  Keith Seitz  <keiths@redhat.com>
2186
2187         * compile/compile-c-support.c (c_compute_program): Use
2188         unique_xmalloc_ptr to eliminate cleanup.
2189         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
2190         Return a unique_xmalloc_ptr and eliminate cleanup.
2191         * compile/compile-internal.h (generate_c_for_variable_locations):
2192         Return unique_xmalloc_ptr and update description.
2193
2194 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
2195
2196         * corelow.c (core_target::get_core_register_section): Rename
2197         min_size to section_min_size.
2198
2199 2018-08-09  Jim Wilson  <jimw@sifive.com>
2200
2201         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
2202         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
2203         * NEWS: Mention new GNU/Linux RISC-V target.
2204         * configure.host: Add riscv*-*-linux*.
2205         * configure.nat: Add riscv*.
2206         * configure.tgt: Add riscv*-*-linux*.
2207         * riscv-linux-nat.c: New file.
2208         * riscv-linux-tdep.c: New file.
2209
2210 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
2211
2212         * infrun.c (resume): Make static, add forward declaration.
2213         (proceed): Update header comment.
2214         * infrun.h (resume): Delete declaration.
2215
2216 2018-08-09  Tom Tromey  <tom@tromey.com>
2217
2218         * riscv-tdep.h: Minor formatting fixes.
2219
2220 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
2221
2222         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
2223         * dwarf-index-cache.c (create_dir_and_check): Likewise.
2224         (test_mkdir_recursive): Likewise.
2225         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
2226
2227 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
2228
2229         * valarith.c (value_subscripted_rvalue): If an array is not in
2230         memory, and we don't know the upper bound, then we can't know that
2231         the requested element exists or not.
2232
2233 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
2234
2235         * target.c (str_comma_list_concat_elem): Fix typo in comment.
2236         (target_options_to_string): Add comment.
2237
2238 2018-08-08  Tom Tromey  <tom@tromey.com>
2239
2240         * unittests/scoped_mmap-selftests.c: Check result of "write".
2241
2242 2018-08-08  Jim Wilson  <jimw@sifive.com>
2243
2244         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
2245         (decode_register_index_short): New.
2246         (decode_j_type_insn, decode_cj_type_insn): New.
2247         (decode_b_type_insn, decode_cb_type_insn): New.
2248         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
2249         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
2250         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
2251         is_c_sw_insn instead of is_sw_insn.
2252         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
2253         (riscv_software_single_step): New.
2254         * riscv-tdep.h (riscv_software_single_step): Declare.
2255
2256         * riscv-tdep.c (riscv_isa_xlen): Drop static.
2257         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
2258
2259 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
2260
2261         PR gdb/18050:
2262         * target.c (dispose_inferior): Don't dispose of inferiors that are
2263         already killed.
2264
2265 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
2266
2267         * remote.c (remote_target::download_tracepoint): Change char* to
2268         const char*.
2269
2270 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
2271
2272         * target.h (target_options_to_string): Return an std::string.
2273         * target.c (str_comma_list_concat_elem): Return void, use
2274         std::string.
2275         (do_option): Likewise.
2276         (target_options_to_string): Return an std::string.
2277         * linux-nat.c (linux_nat_target::wait): Adjust.
2278         * target-debug.h (target_debug_print_options): Adjust.
2279
2280 2018-08-07  Tom Tromey  <tom@tromey.com>
2281
2282         * Makefile.in (CPPFLAGS): New variable.
2283         (INTERNAL_CPPFLAGS): Use it.
2284
2285 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2286
2287         * NEWS: Mention the index cache.
2288
2289 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2290
2291         * common/pathstuff.h (get_standard_cache_dir): New.
2292         * common/pathstuff.c (get_standard_cache_dir): New.
2293         * build-id.h (build_id_to_string): New.
2294         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
2295         DEBUG_STR_SUFFIX): Move to here.
2296         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
2297         DEBUG_STR_SUFFIX): Move from there.
2298         (write_psymtabs_to_index): Make non-static, add basename
2299         parameter.  Write to temporary files, rename when done.
2300         (save_gdb_index_command): Adjust call to
2301         write_psymtabs_to_index.
2302         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
2303         field.
2304         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
2305         (get_gdb_index_contents_from_cache): New.
2306         (get_gdb_index_contents_from_cache_dwz): New.
2307         (dwarf2_initialize_objfile): Read index from cache.
2308         (dwarf2_build_psymtabs): Save to index.
2309         * dwarf-index-cache.h: New file.
2310         * dwarf-index-cache.c: New file.
2311         * dwarf-index-write.h: New file.
2312
2313 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2314
2315         * gnulib/aclocal.m4: Re-generate.
2316         * gnulib/config.in: Re-generate.
2317         * gnulib/configure: Re-generate.
2318         * gnulib/import/Makefile.am: Re-generate.
2319         * gnulib/import/Makefile.in: Re-generate.
2320         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
2321         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2322         * gnulib/import/m4/mkdir.m4: New file.
2323         * gnulib/import/mkdir.c: New file.
2324         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
2325         module.
2326
2327 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2328
2329         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
2330         * common/scoped_mmap.c: New file.
2331         * common/scoped_mmap.h (destroy): New method.
2332         (~scoped_mmap, reset): Use destroy.
2333         (scoped_mmap): New move constructor.
2334         (mmap_file): New declaration.
2335         * unittests/scoped_mmap-selftests.c (test_normal,
2336         test_invalid_filename, run_tests): New functions.
2337         (_initialize_scoped_mmap_selftests): Register selftest.
2338
2339 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2340
2341         * dwarf2read.c (read_gdb_index_from_section): Rename to...
2342         (read_gdb_index_from_buffer): ... this.  Remove section
2343         parameter, add buffer parameter.
2344         (get_gdb_index_contents_ftype,
2345         get_gdb_index_contents_dwz_ftype): New typedefs.
2346         (dwarf2_read_gdb_index): Add callback parameters to get the
2347         index contents.
2348         (get_gdb_index_contents_from_section): New.
2349         (dwarf2_initialize_objfile): Update call to
2350         dwarf2_read_gdb_index.
2351
2352 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2353
2354         * common/filestuff.h (gdb_fopen_cloexec): New overload.
2355         (gdb_open_cloexec): Likewise.
2356         * nat/linux-osdata.c (command_from_pid): Use string_printf.
2357         (commandline_from_pid): Likewise.
2358         (linux_xfer_osdata_threads): Likewise.
2359         (linux_xfer_osdata_fds): Likewise.
2360         * ada-lang.c (is_package_name): Likewise.
2361         * auxv.c (procfs_xfer_auxv): Likewise.
2362         * breakpoint.c (print_one_breakpoint_location): Use
2363         uiout::field_fmt.
2364         (print_one_catch_solib): Use string_printf.
2365         * coff-pe-read.c (add_pe_exported_sym): Likewise.
2366         (add_pe_forwarded_sym): Likewise.
2367         * dwarf2read.c (create_type_unit_group): Likewise.
2368         (build_error_marker_type): Likewise.
2369         * infcall.c (get_function_name): Likewise.
2370         * valprint.c (print_converted_chars_to_obstack): Likewise.
2371         * xtensa-tdep.c (xtensa_register_type): Likewise.
2372
2373 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
2374
2375         * remote.c (remote_target::download_tracepoint): Fix format
2376         string errors.
2377
2378 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2379
2380         * tracefile.c: Include common/byte-vector.h.
2381         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
2382         with trace_regblock_size if needed.  Update uses of buf.
2383
2384 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2385
2386         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
2387         std::vector<unsigned char>.
2388         * tracepoint.c (collection_list::collection_list): Remove
2389         m_regs_mask initializer from initializer list.  Resize
2390         m_regs_mask using the largest remote register number.
2391         (collection_list::add_remote_register): Remove size check on
2392         m_regs_mask.  Use at to access element.
2393         (collection_list::stringify): Change type of temp_buf to
2394         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
2395         stringify the register mask.  Use pack_hex_byte for the register
2396         mask.
2397
2398 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2399
2400         * tracepoint.h (class collection_list) <add_register>: Remove.
2401         <add_remote_register, add_ax_registers, add_local_register>:
2402         Declare.
2403         <add_memrange>: Add scope parameter.
2404         * tracepoint.c (encode_actions_1): Likewise.
2405         (collection_list::add_register): Rename to ...
2406         (collection_list::add_remote_register): ... this.  Update
2407         comment.
2408         (collection_list::add_ax_registers, add_local_register): New
2409         methods.
2410         (collection_list::add_memrange): Add scope parameter.  Call
2411         add_local_register instead of add_register.
2412         (finalize_tracepoint_aexpr): New function.
2413         (collection_list::collect_symbol): Update calls to add_memrange.
2414         Call add_local_register instead of add_register.  Call
2415         add_ax_registers.  Call finalize_tracepoint_aexpr.
2416         (encode_actions_1): Get remote regnos for $reg action.  Call
2417         add_remote_register, add_ax_registers, and add_local_register.
2418         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
2419         (validate_actionline): Call finalize_tracepoint_aexpr.
2420
2421 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2422
2423         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
2424         Replace array buf with gdb::char_vector buf, of size
2425         get_remote_packet_size ().  Replace references to buf and
2426         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
2427         and xsnprintf with snprintf.  Raise errors if the buffer is too
2428         small.
2429
2430 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2431
2432         * remote.c (remote_target::download_tracepoint): Fix the has_more
2433         predicate in the QTDP action list iteration.
2434
2435 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2436
2437         * remote.c (remote_target::download_tracepoint): Fix indentation
2438         in for block.
2439
2440 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2441
2442         * proc-api.c (_initialize_proc_api): Remove c, unused.
2443         * procfs.c (procfs_init_inferior): Remove signals, unused.
2444         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
2445         unused.
2446
2447 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
2448             Andrew Burgess  <andrew.burgess@embecosm.com>
2449
2450         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
2451         'W_STOPCODE (0)' as this could be ambiguous.
2452
2453 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
2454
2455         * ser-tcp.c (net_open): Fix thinko when deciding whether to
2456         disable TCP's Nagle algorithm (use "ai_protocol" instead of
2457         "ai_socktype").
2458
2459 2018-08-02  Tom Tromey  <tom@tromey.com>
2460
2461         PR symtab/16842.
2462         * dwarf2read.c (read_func_scope): Set symtab on template parameter
2463         symbols.
2464         (process_structure_scope): Likewise.
2465
2466 2018-08-02  Xavier Roirand  <roirand@adacore.com>
2467
2468         PR gdb/22629:
2469         * darwin-nat.c (darwin_kill_inferior): Fix handling of
2470         kill inferior.
2471
2472 2018-08-02  Tom Tromey  <tom@tromey.com>
2473
2474         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
2475         (darwin_suspend_inferior, darwin_resume_inferior)
2476         (darwin_decode_notify_message, darwin_resume_inferior_threads)
2477         (darwin_check_new_threads): Check result of get_darwin_inferior.
2478
2479 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
2480
2481         GDB 8.1.1 released.
2482
2483 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
2484
2485         * varobj.c (varobj_get_path_expr_parent): Report an error if
2486         parent is a dynamic varobj.
2487
2488 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
2489
2490         * gnulib/aclocal.m4: Re-generate.
2491         * gnulib/config.in: Re-generate.
2492         * gnulib/configure: Re-generate.
2493         * gnulib/import/Makefile.in: Re-generate.
2494         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2495         * gnulib/import/m4/onceonly.m4: Re-generate.
2496
2497 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
2498
2499         * target-descriptions.c (struct xml_test_tdesc): New.
2500         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
2501         (record_xml_tdesc): Update.
2502         (maintenance_check_xml_descriptions): Update.
2503         * target-descriptions.h (record_xml_tdesc): Update comment.
2504
2505 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
2506
2507         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
2508         checking array bounds are defined.
2509
2510 2018-07-30  Tom Tromey  <tom@tromey.com>
2511
2512         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
2513         irreflexivity violation.
2514
2515 2018-07-30  Tom Tromey  <tom@tromey.com>
2516
2517         * cli/cli-decode.c (lookup_cmd): Remove lint code.
2518         * value.c (unpack_long): Remove lint code.
2519         * valops.c (value_ind): Remove lint code.
2520         * valarith.c (value_x_binop, value_x_unop, value_equal)
2521         (value_pos): Remove lint code.
2522
2523 2018-07-28  Tom de Vries  <tdevries@suse.de>
2524
2525         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
2526         with undefined upper bound as <optimized out>.
2527
2528 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
2529
2530         * gcore.in: Rename variable "name" to "prefix".  Expand
2531         "usage" text.
2532
2533 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
2534
2535         * windows-nat.c (windows_nat_target::create_inferior): Update to
2536         call close() in global namespace.
2537
2538 2018-07-26  Tom Tromey  <tom@tromey.com>
2539
2540         * dwarf-index-write.c (add_address_entry): Don't add objfile
2541         offsets.
2542         * dbxread.c (find_stab_function): Rename from
2543         find_stab_function_addr.  Return a bound_minimal_symbol.
2544         (read_dbx_symtab): Use raw_text_low, raw_text_high.
2545         Don't add objfile offsets.
2546         (end_psymtab): Use raw_text_low, raw_text_high,
2547         MSYMBOL_VALUE_RAW_ADDRESS.
2548         (read_ofile_symtab): Update.
2549         (process_one_symbol): Update.
2550         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
2551         offsets.
2552         (dw2_relocate): Remove.
2553         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
2554         searching addrmap.
2555         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
2556         Update.
2557         (process_psymtab_comp_unit_reader, add_partial_symbol)
2558         (add_partial_subprogram, dwarf2_ranges_read): Update.
2559         (load_partial_dies): Update.
2560         (add_address_entry): Don't add objfile offsets.
2561         (dwarf2_build_include_psymtabs): Update.
2562         (create_addrmap_from_aranges): Don't add objfile offsets.
2563         (dw2_find_pc_sect_compunit_symtab): Update.
2564         * mdebugread.c (parse_symbol): Don't add objfile offsets.
2565         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
2566         Update.
2567         (parse_partial_symbols): Don't add objfile offsets.  Use
2568         raw_text_low, raw_text_high.  Update.
2569         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
2570         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
2571         or call 'relocate' quick function.  Clear psymbol_map.
2572         * psympriv.h (struct partial_symbol) <address>: Add section
2573         offset.
2574         <set_unrelocated_address>: Rename from set_address.
2575         <raw_text_low, raw_text_high>: New methods.
2576         <text_low, text_high>: Add objfile parameter.
2577         (add_psymbol_to_bcache): Add 'section' parameter.  Call
2578         set_unrelocated_address.
2579         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2580         (find_pc_psymbol): Update.
2581         (fixup_psymbol_section, relocate_psymtabs): Remove.
2582         (dump_psymtab, psym_functions): Update.
2583         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
2584         parameter.
2585         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
2586         (start_psymtab_common): Update.
2587         * symfile-debug.c (debug_qf_relocate): Remove.
2588         (debug_sym_quick_functions): Update.
2589         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
2590         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
2591         Update.
2592
2593 2018-07-26  Tom Tromey  <tromey@redhat.com>
2594
2595         * dbxread.c (end_psymtab): Use text_high_valid and
2596         text_low_valid.
2597         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
2598         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
2599         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
2600         Update comment.
2601         <text_low_valid, text_high_valid>: New fields.
2602         <set_text_low, set_text_high>: Update.
2603         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
2604
2605 2018-07-26  Tom Tromey  <tom@tromey.com>
2606
2607         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
2608         Update.
2609         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
2610         textlow and texthigh fields.
2611         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
2612         Update.
2613         * mdebugread.c (parse_lines, parse_partial_symbols)
2614         (psymtab_to_symtab_1): Update.
2615         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
2616         Rename fields.  Update comment.  Now private.
2617         <text_low, text_high, set_text_low, set_text_high>: New methods.
2618         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2619         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
2620         (start_psymtab_common, maintenance_info_psymtabs)
2621         (maintenance_check_psymtabs): Update.
2622         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
2623         texthigh fields.
2624         (scan_xcoff_symtab): Update.
2625
2626 2018-07-26  Tom Tromey  <tromey@redhat.com>
2627
2628         * psympriv.h (struct partial_symbol) <unrelocated_address,
2629         address, set_address>: New methods.
2630         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
2631         (fixup_psymbol_section, relocate_psymtabs): Update.
2632         (print_partial_symbols): Add 'objfile' parameter.  Update.
2633         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
2634         Update.
2635
2636 2018-07-26  Tom Tromey  <tom@tromey.com>
2637
2638         * dwarf-index-write.c (write_psymbols, debug_names::insert)
2639         (debug_names::write_psymbols): Update.
2640         * psympriv.h (struct partial_symbol): Derive from
2641         general_symbol_info.
2642         <obj_section>: New method.
2643         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
2644         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2645         (find_pc_sect_psymbol, fixup_psymbol_section)
2646         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
2647         (print_partial_symbols, recursively_search_psymtabs)
2648         (compare_psymbols, psymbol_hash, psymbol_compare)
2649         (add_psymbol_to_bcache, maintenance_check_psymtabs)
2650         (psymbol_name_matches, psym_fill_psymbol_map): Update.
2651
2652 2018-07-26  Tom Tromey  <tromey@redhat.com>
2653
2654         * dbxread.c (end_psymtab): Remove dead code.
2655
2656 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
2657
2658         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
2659         DWARF unwinders are disabled.
2660         * dwarf2-frame.c: Add dwarf2read.h include.
2661         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
2662         disabled.
2663         (dwarf2_frame_unwinders_enabled_p): Define.
2664         (show_dwarf_unwinders_enabled_p): New function.
2665         (_initialize_dwarf2_frame): Register switch to control DWARF
2666         unwinder use.
2667         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
2668         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
2669         (show_dwarf_cmdlist): Remove static keyword.
2670         * dwarf2read.h (set_dwarf_cmdlist): Declare.
2671         (show_dwarf_cmdlist): Declare.
2672         * NEWS: Document new feature.
2673
2674 2018-07-26  Tom de Vries  <tdevries@suse.de>
2675
2676         PR breakpoints/23366
2677         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
2678
2679 2018-07-26  Tom de Vries  <tdevries@suse.de>
2680
2681         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
2682         DW_AT_count can't be translated to a dynamic prop.
2683
2684 2018-07-25  Tom de Vries  <tdevries@suse.de>
2685
2686         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
2687         try/catch.
2688
2689 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
2690
2691         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
2692
2693 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
2694
2695         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
2696
2697 2018-07-24  Keith Seitz  <keiths@redhat.comt
2698
2699         PR symtab/23010
2700         * dwarf2read.c (dw2_add_symbol_to_list): New function.
2701         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
2702         instead of add_symbol_to_list.
2703         (read_file_scope): Call prepare_one_comp_unit before reading
2704         any other DIEs.
2705
2706 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
2707
2708         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
2709
2710 2018-07-24  Tom Tromey  <tom@tromey.com>
2711
2712         * utils.c (malloc, realloc, free): Don't declare.
2713         * configure, config.in: Rebuild.
2714         * configure.ac: Don't check for declarations of free, malloc, or
2715         realloc.
2716
2717 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
2718
2719         * aarch64-linux-nat.c
2720         (aarch64_linux_nat_target::stopped_data_address): Remove unused
2721         variable.
2722         * arm-linux-nat.c (fetch_regs): Likewise.
2723         (store_regs): Likewise.
2724         (fetch_vfp_regs): Likewise.
2725         (store_vfp_regs): Likewise.
2726         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
2727         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
2728         (arm_linux_nat_target::insert_watchpoint): Likewise.
2729         (arm_linux_nat_target::remove_watchpoint): Likewise.
2730         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
2731         Likewise.
2732         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
2733         Likewise.
2734         * ppc-linux-nat.c (fetch_register): Likewise.
2735         (fetch_all_gp_regs): Likewise.
2736         (fetch_ppc_registers): Likewise.
2737         (store_all_gp_regs): Likewise.
2738         (store_ppc_registers): Likewise.
2739         (hwdebug_insert_point): Likewise.
2740         (can_use_watchpoint_cond_accel): Likewise.
2741         * remote-sim.c (gdb_os_write_stdout): Likewise.
2742
2743 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
2744             Tom Tromey  <tom@tromey.com>
2745
2746         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
2747         test for it.
2748         * configure: Rebuild.
2749
2750 2018-07-22  Tom Tromey  <tom@tromey.com>
2751
2752         * regformats/regdat.sh: Define xmltarget_${name} inside
2753         #ifndef IN_PROCESS_AGENT.
2754
2755 2018-07-22  Tom Tromey  <tom@tromey.com>
2756
2757         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
2758
2759 2018-07-22  Tom Tromey  <tom@tromey.com>
2760
2761         * symfile.c (reread_symbols): Notify iter, not objfile.
2762
2763 2018-07-22  Tom Tromey  <tom@tromey.com>
2764
2765         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
2766         Use arch_ops.
2767         (ravenscar_thread_target::prepare_to_store): Likewise.
2768
2769 2018-07-22  Tom Tromey  <tom@tromey.com>
2770
2771         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
2772         unused variable.  Call value_fetch_lazy when needed.
2773         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
2774         Remove unused variable.  Call value_fetch_lazy when needed.
2775
2776 2018-07-22  Tom Tromey  <tom@tromey.com>
2777
2778         * m32c-tdep.c (mark_dma): Return void.
2779         (make_regs): Remove unused declarations.
2780
2781 2018-07-22  Tom Tromey  <tom@tromey.com>
2782
2783         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
2784         cmdscm_get_valid_command_smob_arg_unsafe for effect.
2785         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
2786         bkscm_get_valid_block_smob_arg_unsafe for effect.
2787
2788 2018-07-22  Tom Tromey  <tom@tromey.com>
2789
2790         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
2791         value_type.
2792
2793 2018-07-22  Tom Tromey  <tom@tromey.com>
2794
2795         * windows-nat.c (saved_context): Conditionally define.
2796         * remote.c (remote_target::remote_btrace_maybe_reopen):
2797         Conditionally declare "warned".
2798         * inflow.c (sigquit_ours): Conditionally define.
2799         (new_tty): Move "tty" declaration inside #if.
2800         * guile/guile.c (guile_datadir): Conditionally define.
2801         * charset.c (set_be_le_names): Move some declarations inside #if.
2802         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
2803         #if.
2804         (parse_xml_btrace_conf): Likewise.
2805
2806 2018-07-22  Tom Tromey  <tom@tromey.com>
2807
2808         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
2809
2810 2018-07-22  Tom Tromey  <tom@tromey.com>
2811
2812         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
2813         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
2814         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
2815         * buildsym-legacy.c (get_macro_table): Remove unused variable.
2816         * stack.c (frame_apply_level_command): Remove unused variable.
2817         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
2818         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
2819         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
2820         unused variable.
2821         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
2822         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
2823         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
2824         variable.
2825         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
2826         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
2827         variable.
2828         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
2829         Remove unused variable.
2830         * cli/cli-script.c (recurse_read_control_structure): Remove unused
2831         variable.
2832         * common/tdesc.c (print_xml_feature::visit): Remove unused
2833         variable.
2834         * compile/compile-object-load.c (store_regs): Remove unused
2835         variables.
2836         * complaints.c (clear_complaints): Remove unused variable.
2837         * corelow.c (core_target_open): Remove unused variable.
2838         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
2839         variable.
2840         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
2841         variable.
2842         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
2843         variable.
2844         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
2845         variable.
2846         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
2847         variable.
2848         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
2849         variable.
2850         * ia64-tdep.c (examine_prologue): Remove unused variable.
2851         * infcall.c (run_inferior_call): Remove unused variable.
2852         * inferior.c (exit_inferior): Remove unused variable.
2853         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
2854         * linespec.c (decode_line_2): Remove unused variable.
2855         * linux-nat.c (super_close): Remove.
2856         * linux-tdep.c (linux_info_proc): Remove unused variable.
2857         * mi/mi-main.c (mi_execute_command): Remove unused variable.
2858         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
2859         Remove unused variable.
2860         * parse.c (find_minsym_type_and_address): Remove unused variable.
2861         * printcmd.c (info_symbol_command, printf_floating): Remove unused
2862         variable.
2863         * python/py-breakpoint.c (bppy_set_commands): Remove unused
2864         variable.
2865         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
2866         variables.
2867         * record-btrace.c (record_btrace_target::store_registers): Remove
2868         unused variable.
2869         (cmd_show_record_btrace_cpu): Remove unused variable.
2870         * riscv-tdep.c (riscv_register_reggroup_p)
2871         (riscv_push_dummy_call, riscv_return_value): Remove unused
2872         variable.
2873         * rust-exp.y (literal): Remove unused variable.
2874         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
2875         unused variable.
2876         <STRUCTOP_ANONYMOUS>: Likewise.
2877         * s390-linux-tdep.c (s390_linux_init_abi_31)
2878         (s390_linux_init_abi_64): Remove unused variable.
2879         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
2880         (file_select_thread, net_windows_open, _initialize_ser_windows):
2881         Remove unused variables.
2882         * symtab.c (find_pc_sect_line): Remove unused variable.
2883         * target-memory.c (compute_garbled_blocks): Remove unused
2884         variable.
2885         (target_write_memory_blocks): Remove unused variable.
2886         * target.c (target_stack::unpush): Remove unused variables.
2887         * tracepoint.c (start_tracing, all_tracepoint_actions)
2888         (merge_uploaded_trace_state_variables)
2889         (print_one_static_tracepoint_marker): Remove unused variable.
2890         * unittests/basic_string_view/element_access/char/1.cc (test01):
2891         Remove unused variable.
2892         * windows-nat.c (windows_continue, windows_add_all_dlls)
2893         (do_initial_windows_stuff, windows_nat_target::create_inferior):
2894         Remove unused variables.
2895
2896 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
2897
2898         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
2899         attr_profile in HAVE_ELF.
2900         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
2901         HAVE_ELF.
2902
2903 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
2904
2905         * frame.c (frame_register_unwind): Change parameter name.
2906         (frame_unwind_register): Likewise.
2907         (frame_unwind_register_value): Likewise.
2908         (frame_unwind_register_signed): Likewise.
2909         (frame_unwind_register_unsigned): Likewise.
2910         * frame.h (frame_register_unwind): Likewise.
2911         (frame_unwind_register): Likewise.
2912         (frame_unwind_register_value): Likewise.
2913         (frame_unwind_register_signed): Likewise.
2914         (frame_unwind_register_unsigned): Likewise.
2915         (frame_unwind_arch): Likewise.
2916
2917 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
2918
2919         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
2920         ISA maintenance.
2921
2922 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
2923
2924         * mips-linux-nat.c (mips_linux_nat_target::read_description):
2925         Call `get_ptrace_pid' rather than extracting the ptrace PID by
2926         hand.
2927
2928 2018-07-20  Keith Seitz  <keiths@redhat.com>
2929
2930         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
2931         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
2932         m_compunit_symtab, m_language>: Add "m_" prefix.
2933         Update all uses.
2934         * buildsym.c: Update all uses.
2935
2936 2018-07-20  Tom Tromey  <tom@tromey.com>
2937
2938         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
2939         * buildsym.h (record_line_ftype): Remove typedef.
2940
2941 2018-07-20  Tom Tromey  <tom@tromey.com>
2942
2943         * buildsym-legacy.h (augment_type_symtab): Don't declare.
2944         (end_expandable_symtab): Likewise.
2945         (end_symtab_get_static_block): Likewise.
2946         (end_symtab_from_static_block): Likewise.
2947         * buildsym-legacy.c (augment_type_symtab): Remove.
2948         (end_expandable_symtab): Remove.
2949         (end_symtab_get_static_block): Remove.
2950         (end_symtab_from_static_block): Remove.
2951
2952 2018-07-20  Tom Tromey  <tom@tromey.com>
2953
2954         * dwarf2read.c: Include buildsym.h.
2955         (struct dwarf2_cu) <builder>: New method.
2956         (fixup_go_packaging): Update.
2957         (process_full_comp_unit, process_full_type_unit): Update.  Don't
2958         use scoped_free_pendings.
2959         (using_directives): Add "cu" parameter, remove "language".
2960         (read_import_statement, setup_type_unit_groups, )
2961         (read_func_scope, read_lexical_block_scope)
2962         (dwarf2_record_block_ranges, read_namespace): Update.
2963         (lnp_state_machine::lnp_state_machine): Add cu parameter.
2964         (lnp_state_machine::handle_end_sequence): Update.
2965         (class lnp_state_machine) <m_cu>: New member.
2966         <m_record_line_callback>: Remove.
2967         <m_currently_recording_lines>: New member.
2968         (lnp_state_machine::handle_set_file): Update.
2969         (noop_record_line): Remove.
2970         (dwarf_record_line_p): Add cu parameter.
2971         (dwarf_record_line_1, dwarf_finish_line): Likewise.
2972         (lnp_state_machine::record_line)
2973         (lnp_state_machine::lnp_state_machine)
2974         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
2975         (dwarf_decode_lines): Update.
2976         (dwarf2_start_subfile): Add cu parameter.
2977         (dwarf2_start_symtab, new_symbol): Update.
2978         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
2979         Remove dwarf2_per_objfile parameter.
2980         (dwarf_decode_macros): Update.
2981
2982 2018-07-20  Tom Tromey  <tom@tromey.com>
2983
2984         * stabsread.c (define_symbol): Update.
2985         * buildsym-legacy.h (get_buildsym_compunit): Declare.
2986         * dwarf2read.c (new_symbol): Update.
2987         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
2988         * cp-namespace.c: Include buildsym.h.
2989         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
2990         * buildsym-legacy.c (get_buildsym_compunit): New function.
2991
2992 2018-07-20  Tom Tromey  <tom@tromey.com>
2993
2994         * xcoffread.c: Include buildsym-legacy.h.
2995         * windows-nat.c: Include buildsym-legacy.h.
2996         * stabsread.c: Include buildsym-legacy.h.
2997         * mdebugread.c: Include buildsym-legacy.h.
2998         * buildsym-legacy.h: New file.
2999         * buildsym-legacy.c: New file, from buildsym.c.
3000         * go32-nat.c: Include buildsym-legacy.h.
3001         * dwarf2read.c: Include buildsym-legacy.h.
3002         * dbxread.c: Include buildsym-legacy.h.
3003         * cp-namespace.c: Include buildsym-legacy.h.
3004         * coffread.c: Include buildsym-legacy.h.
3005         * buildsym.h: Move some contents to buildsym-legacy.h.
3006         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
3007         buildsym-legacy.c.
3008         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
3009
3010 2018-07-20  Tom Tromey  <tom@tromey.com>
3011
3012         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
3013         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
3014         (buildsym_compunit::buildsym_compunit)
3015         (buildsym_compunit::~buildsym_compunit)
3016         (buildsym_compunit::get_macro_table): Define.
3017
3018 2018-07-20  Tom Tromey  <tom@tromey.com>
3019
3020         * buildsym.c (reset_symtab_globals): Remove.
3021         (buildsym_compunit::end_symtab_from_static_block): Update.
3022         (buildsym_compunit::augment_type_symtab): Update.
3023         (end_symtab_from_static_block): Call free_buildsym_compunit.
3024         (augment_type_symtab, end_symtab, end_expandable_symtab):
3025         Likewise.
3026
3027 2018-07-20  Tom Tromey  <tom@tromey.com>
3028
3029         * arch-utils.c: Do not include buildsym.h.
3030         * mipsread.c: Do not include buildsym.h.
3031         * machoread.c: Do not include buildsym.h.
3032         * elfread.c: Do not include buildsym.h.
3033
3034 2018-07-20  Tom Tromey  <tom@tromey.com>
3035
3036         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
3037         initialization.
3038         (buildsym_compunit): Add new constructor.
3039         (struct buildsym_compunit) <get_last_source_file, finish_block,
3040         record_block_range, start_subfile, patch_subfile_names,
3041         push_subfile, pop_subfile, record_line, get_compunit_symtab,
3042         set_last_source_start_addr, get_last_source_start_addr,
3043         get_local_using_directives, set_local_using_directives,
3044         get_global_using_directives, outermost_context_p,
3045         get_current_context_stack, get_context_stack_depth,
3046         get_current_subfile, get_local_symbols, get_file_symbols,
3047         get_global_symbols, record_debugformat, record_producer,
3048         push_context, pop_context, end_symtab_get_static_block,
3049         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
3050         New public methods.
3051         <record_pending_block, finish_block_internal, make_blockvector,
3052         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
3053         private methods.
3054         Update all users.
3055
3056 2018-05-22  Tom Tromey  <tom@tromey.com>
3057
3058         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
3059         parameter.
3060         (finish_block_internal): Update.
3061
3062 2018-07-20  Tom Tromey  <tom@tromey.com>
3063
3064         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
3065         parameter.
3066         (finish_block_internal): Update.
3067
3068 2018-07-20  Tom Tromey  <tom@tromey.com>
3069
3070         * buildsym.h (EXTERN): Don't define or undef.
3071         * buildsym.c (EXTERN): Don't define.
3072
3073 2018-07-20  Tom Tromey  <tom@tromey.com>
3074
3075         * buildsym.c: Remove TODO comment.
3076
3077 2018-07-20  Tom Tromey  <tom@tromey.com>
3078
3079         * coffread.c (coff_symtab_read): Update.
3080         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
3081         (xcoff_new_init): Update.
3082         * mipsread.c (mipscoff_new_init): Update.
3083         * mdebugread.c (mdebug_build_psymtabs): Update.
3084         * elfread.c (elf_new_init): Update.
3085         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
3086         Update.
3087         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
3088         (coffstab_build_psymtabs, elfstab_build_psymtabs)
3089         (stabsect_build_psymtabs): Update.
3090         * buildsym.h (buildsym_init): Don't declare.
3091         * buildsym.c: Update comment.
3092         (prepare_for_building): Remove.
3093         (start_symtab, restart_symtab): Update.
3094         (reset_symtab_globals): Update comment.
3095         (buildsym_init): Remove.
3096
3097 2018-07-20  Tom Tromey  <tom@tromey.com>
3098
3099         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
3100         * stabsread.c (patch_block_stabs, define_symbol, read_type)
3101         (read_enum_type, common_block_start, common_block_end)
3102         (cleanup_undefined_types_1, finish_global_stabs): Update.
3103         * mdebugread.c (psymtab_to_symtab_1): Update.
3104         * dwarf2read.c (fixup_go_packaging, read_func_scope)
3105         (read_lexical_block_scope, new_symbol): Update.
3106         * dbxread.c (process_one_symbol): Update.
3107         * coffread.c (coff_symtab_read, process_coff_symbol)
3108         (coff_read_enum_type): Update.
3109         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
3110         declare.
3111         (get_local_symbols, get_file_symbols, get_global_symbols): New
3112         functions.
3113         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
3114         m_global_symbols.
3115         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
3116         (~scoped_free_pendings): Update.
3117         (finish_block, prepare_for_building, reset_symtab_globals)
3118         (end_symtab_get_static_block, end_symtab_with_blockvector)
3119         (augment_type_symtab, push_context): Update.
3120         (get_local_symbols, get_file_symbols, get_global_symbols): New
3121         functions.
3122         (buildsym_init): Update.
3123
3124 2018-07-20  Tom Tromey  <tom@tromey.com>
3125
3126         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
3127         (process_full_type_unit): Likewise.
3128         (dwarf2_start_symtab): Set list_in_scope.
3129
3130 2018-07-20  Tom Tromey  <tom@tromey.com>
3131
3132         * dwarf2read.c (process_psymtab_comp_unit_reader)
3133         (build_type_psymtabs_reader): Do not set list_in_scope.
3134
3135 2018-07-20  Tom Tromey  <tom@tromey.com>
3136
3137         * buildsym.c (free_pendings): Remove.
3138         (add_symbol_to_list, scoped_free_pendings)
3139         (finish_block_internal, buildsym_init): Update.
3140
3141 2018-07-20  Tom Tromey  <tom@tromey.com>
3142
3143         * xcoffread.c (read_xcoff_symtab): Update.
3144         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
3145         Update.
3146         * dbxread.c (process_one_symbol): Update.
3147         * coffread.c (coff_symtab_read): Update.
3148         * buildsym.h (finish_block): Update.
3149         * buildsym.c (finish_block): Remove "listhead" argument.
3150         (end_symtab_get_static_block): Update.
3151
3152 2018-07-20  Tom Tromey  <tom@tromey.com>
3153
3154         * buildsym.h (class scoped_free_pendings): Remove constructor.
3155         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
3156         method.
3157         <m_pending_block_obstack, m_pending_blocks>: New members.
3158         (pending_block_obstack, pending_blocks): Remove.
3159         (scoped_free_pendings::scoped_free_pendings): Default.
3160         (~scoped_free_pendings): Update.
3161         (free_pending_blocks): Remove.
3162         (finish_block_internal, record_pending_block, make_blockvector)
3163         (end_symtab_get_static_block, augment_type_symtab, push_context)
3164         (buildsym_init): Update.
3165
3166 2018-07-20  Tom Tromey  <tom@tromey.com>
3167
3168         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
3169         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
3170         members.
3171         (pending_addrmap, pending_addrmap_obstack)
3172         (pending_addrmap_interesting): Remove.
3173         (scoped_free_pendings, record_block_range, make_blockvector)
3174         (prepare_for_building, reset_symtab_globals, buildsym_init):
3175         Update.
3176
3177 2018-07-20  Tom Tromey  <tom@tromey.com>
3178
3179         * xcoffread.c (process_linenos): Update.
3180         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
3181         * mdebugread.c (psymtab_to_symtab_1): Update.
3182         * dwarf2read.c (setup_type_unit_groups)
3183         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
3184         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
3185         * dbxread.c (process_one_symbol): Update.
3186         * coffread.c (coff_symtab_read, enter_linenos)
3187         (process_coff_symbol): Update.
3188         * buildsym.h (current_subfile): Don't declare.
3189         (get_current_subfile): Declare.
3190         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
3191         member.
3192         (start_subfile, free_buildsym_compunit, push_subfile)
3193         (prepare_for_building, start_symtab): Update.
3194         (get_current_subfile): New function.
3195
3196 2018-07-20  Tom Tromey  <tom@tromey.com>
3197
3198         * coffread.c (coff_symtab_read): Update.
3199         * xcoffread.c (read_xcoff_symtab): Update.
3200         * dwarf2read.c (new_symbol): Update.
3201         (read_func_scope, read_lexical_block_scope): Update.
3202         * dbxread.c (process_one_symbol): Update.
3203         * buildsym.h (context_stack, context_stack_depth): Don't declare.
3204         (outermost_context_p): Remove macro.
3205         (outermost_context_p, get_current_context_stack)
3206         (get_context_stack_depth): Declare.
3207         (pop_context): Return struct context_stack.
3208         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
3209         member.
3210         (context_stack_size): Remove.
3211         (INITIAL_CONTEXT_STACK_SIZE): Remove.
3212         (prepare_for_building, end_symtab_get_static_block)
3213         (augment_type_symtab, push_context): Update.
3214         (pop_context): Return struct context_stack.
3215         (outermost_context_p, get_current_context_stack)
3216         (get_context_stack_depth): New functions.
3217         (buildsym_init): Update.
3218
3219 2018-07-20  Tom Tromey  <tom@tromey.com>
3220
3221         * rust-exp.y: Now a pure parser.  Update all rules.
3222         (%union): Move earlier.
3223         (current_parser, work_obstack): Remove globals.
3224         (rust_parser, ~rust_parser): Update.
3225         (class rust_parser) <copy_name, concat3, crate_name, super_name,
3226         lex_character, lex_number, lex_string, lex_identifier,
3227         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
3228         convert_name, convert_params_to_expression,
3229         convert_ast_to_expression, ast_basic_type, ast_operation,
3230         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
3231         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
3232         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
3233         ast_array_type, ast_slice_type, ast_reference_type,
3234         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
3235         (rust_parse): Update.
3236         (rustyyerror, rustyylex): Add parser parameter.
3237         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
3238         (rust_lex_stringish_test, rust_lex_test_sequence)
3239         (rust_lex_test_trailing_dot, rust_lex_test_completion)
3240         (rust_lex_test_push_back, rust_lex_tests): Update.
3241
3242 2018-07-19  Pedro Alves  <palves@redhat.com>
3243
3244         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
3245         gdb::unique_xmalloc_ptr.
3246         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
3247         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
3248         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
3249         copy-initialization.
3250         * guile/scm-pretty-print.c (ppscm_print_children): Use
3251         gdb::unique_xmalloc_ptr instead of cleanups.
3252         (gdbscm_apply_val_pretty_printer): Remove cleanups.
3253         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
3254         gdb::unique_xmalloc_ptr.
3255         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
3256         Adjust to use gdb::unique_xmalloc_ptr.
3257         * guile/scm-utils.c (extract_arg): Adjust.
3258         * guile/scm-value.c (gdbscm_value_field): Adjust to use
3259         gdb::unique_xmalloc_ptr instead of a cleanup.
3260
3261 2018-07-19  Tom Tromey  <tom@tromey.com>
3262
3263         * utils.c (do_value_free_to_mark)
3264         (make_cleanup_value_free_to_mark): Remove.
3265         * utils.h (make_cleanup_value_free_to_mark): Remove.
3266
3267 2018-07-19  Pedro Alves  <palves@redhat.com>
3268
3269         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
3270         forwarding reference.
3271
3272 2018-07-18  Pedro Alves  <palves@redhat.com>
3273
3274         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
3275         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
3276         cleanup.
3277
3278 2018-07-18  Pedro Alves  <palves@redhat.com>
3279
3280         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
3281         exceptions.
3282         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
3283         (gdbscm_wrap): New.
3284         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
3285         directly instead of a cleanup.
3286         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
3287         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
3288         (vlscm_binop_gdbthrow): New, factored out from ...
3289         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
3290         (vlscm_rich_compare): Use gdbscm_wrap.
3291         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
3292         instead of a cleanup.
3293         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
3294         cleanup.
3295         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
3296         Use xfree directly instead of a cleanup.
3297         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
3298         Adjust to use gdbscm_wrap and scoped_value_mark.
3299         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
3300         (gdbscm_value_address, gdbscm_value_dereference)
3301         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
3302         scoped_value_mark.
3303         (gdbscm_value_dynamic_type): Use scoped_value_mark.
3304         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
3305         scoped_value_mark.
3306         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
3307         gdbscm_wrap and scoped_value_mark.
3308         (gdbscm_value_to_string): Use xfree directly instead of a
3309         cleanup.  Move 'buffer' unique_ptr to TRY scope.
3310         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
3311         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
3312         scoped_value_mark.
3313         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
3314         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
3315         scoped_value_mark.
3316         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
3317         gdbscm_wrap.
3318
3319 2018-07-18  Tom de Vries  <tdevries@suse.de>
3320
3321         * findvar.c (default_read_var_value): Also resolve dynamic type for
3322         LOC_OPTIMIZED_OUT vars.
3323
3324 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
3325
3326         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
3327         decoding.
3328
3329 2018-07-17  Tom Tromey  <tom@tromey.com>
3330
3331         * guile/scm-param.c (pascm_set_func, pascm_show_func)
3332         (compute_enum_list, pascm_set_param_value_x)
3333         (gdbscm_parameter_value): Update.
3334         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
3335         (gdbscm_scm_to_host_string): Update.
3336         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
3337         Update.
3338         * guile/scm-cmd.c (cmdscm_add_completion): Update.
3339         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
3340         * guile/scm-string.c (gdbscm_scm_to_string): Return
3341         unique_xmalloc_ptr.
3342         (gdbscm_scm_to_host_string): Likewise.
3343
3344 2018-07-17  Tom Tromey  <tom@tromey.com>
3345
3346         * guile/guile.c (gdbscm_eval_from_control_command): Update.
3347         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
3348         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
3349         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
3350         unique_xmalloc_ptr.
3351
3352 2018-07-17  Tom Tromey  <tom@tromey.com>
3353
3354         * guile/scm-param.c (pascm_signal_setshow_error): Update.
3355         * guile/guile-internal.h (gdbscm_exception_message_to_string):
3356         Update.
3357         * guile/scm-cmd.c (cmdscm_function): Update.
3358         * guile/scm-pretty-print.c
3359         (ppscm_print_exception_unless_memory_error): Update.
3360         * guile/scm-exception.c (gdbscm_exception_message_to_string):
3361         Return unique_xmalloc_ptr.
3362
3363 2018-07-17  Tom Tromey  <tom@tromey.com>
3364
3365         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
3366         Use string_printf.
3367
3368 2018-07-17  Jim Wilson  <jimw@sifive.com>
3369
3370         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
3371         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
3372         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
3373         unecessary braces after EF_RISCV_RVC test.  Delete call to
3374         set_gdbarch_decr_pc_after_break.
3375
3376         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
3377         RISCV_LAST_FP_REGNUM + 1.
3378         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
3379
3380 2018-07-17  Tom Tromey  <tom@tromey.com>
3381
3382         * configure.ac: Remove --disable-gdbcli.
3383         * configure: Rebuild.
3384         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
3385         (SUBDIR_CLI_CFLAGS): Remove.
3386         (SFILES): Use SUBDIR_CLI_SRCS.
3387         (COMMON_OBS): Use SUBDIR_CLI_OBS.
3388
3389 2018-07-17  Tom Tromey  <tom@tromey.com>
3390
3391         PR gdb/18624:
3392         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
3393
3394 2018-07-16  Jim Wilson  <jimw@sifive.com>
3395
3396         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
3397
3398 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
3399
3400         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
3401         variable.
3402         (libunwind_frame_sniffer): Likewise.
3403         (libunwind_frame_prev_register): Likewise.
3404         (libunwind_sigtramp_frame_sniffer): Likewise.
3405         * ia64-tdep.c (ia64_access_reg): Likewise.
3406         (ia64_access_rse_reg): Likewise.
3407         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
3408         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
3409
3410 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
3411
3412         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
3413
3414 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
3415
3416         * remote-sim.c (gdbsim_target::close,
3417         gdbsim_target::mourn_inferior): Remove unused variables.
3418
3419 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
3420
3421         * ia64-tdep.c (ktab_buf): New global.
3422         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
3423         (get_kernel_table): Adjust.
3424
3425 2018-07-16  Tom Tromey  <tom@tromey.com>
3426
3427         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
3428         * dwarf2read.c (using_directives, new_symbol): Use
3429         outermost_context_p.
3430         * dbxread.c (process_one_symbol): Use outermost_context_p.
3431         * coffread.c (coff_symtab_read): Use outermost_context_p.
3432
3433 2018-07-16  Tom Tromey  <tom@tromey.com>
3434
3435         * dwarf2read.c (using_directives, read_func_scope)
3436         (read_lexical_block_scope): Update.
3437         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
3438         * buildsym.h (local_using_directives, global_using_directives):
3439         Don't declare.
3440         (get_local_using_directives, set_local_using_directives)
3441         (get_global_using_directives): Declare.
3442         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
3443         m_global_using_directives>: New members.
3444         (finish_block_internal, prepare_for_building)
3445         (reset_symtab_globals, end_symtab_get_static_block)
3446         (push_context): Update.
3447         (get_local_using_directives, set_local_using_directives)
3448         (get_global_using_directives): New functions.
3449         (buildsym_init): Update.
3450
3451 2018-07-16  Tom Tromey  <tom@tromey.com>
3452
3453         * xcoffread.c (xcoff_initial_scan): Don't call
3454         free_pending_blocks.
3455         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
3456         * buildsym.h (class scoped_free_pendings): Add constructor.
3457         (free_pending_blocks): Don't declare.
3458         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
3459         (free_pending_blocks): Now static.
3460
3461 2018-07-16  Tom Tromey  <tom@tromey.com>
3462
3463         * buildsym.h (push_subfile, pop_subfile): Update declarations.
3464         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
3465         member.
3466         (struct subfile_stack): Remove.
3467         (subfile_stack): Remove.
3468         (push_subfile, pop_subfile, buildsym_init): Update.
3469
3470 2018-07-16  Tom Tromey  <tom@tromey.com>
3471
3472         * buildsym.c (push_subfile): Use gdb_assert.
3473         (pop_subfile): Use gdb_assert.
3474
3475 2018-07-16  Tom Tromey  <tom@tromey.com>
3476
3477         * buildsym.h (merge_symbol_lists): Remove.
3478         * buildsym.c (merge_symbol_lists): Remove.
3479
3480 2018-07-16  Tom Tromey  <tom@tromey.com>
3481
3482         * stabsread.c (scan_file_globals): Update comment.
3483         * stabsread.h (scan_file_globals): Move from buildsym.h.
3484         * buildsym.h (scan_file_globals): Move to stabsread.h.
3485
3486 2018-07-16  Tom Tromey  <tom@tromey.com>
3487
3488         * xcoffread.c (xcoff_new_init): Update.
3489         * mipsread.c (mipscoff_new_init): Update.
3490         * mdebugread.c (mdebug_build_psymtabs): Update.
3491         * elfread.c (elf_new_init): Update.
3492         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
3493         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
3494         * buildsym.h (buildsym_new_init): Don't declare.
3495         * buildsym.c (buildsym_new_init): Remove.
3496
3497 2018-07-16  Tom Tromey  <tom@tromey.com>
3498
3499         * stabsread.h (within_function): Move from buildsym.h.
3500         * stabsread.c (start_stabs): Clear within_function.
3501         * coffread.c (coff_start_symtab): Clear within_function.
3502         * buildsym.h (within_function): Move to stabsread.h.
3503         * buildsym.c (prepare_for_building): Update.
3504
3505 2018-07-16  Tom Tromey  <tom@tromey.com>
3506
3507         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
3508         * dwarf2read.c (dwarf2_start_symtab): Don't set
3509         processing_gcc_compilation.
3510         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
3511
3512 2018-07-16  Tom Tromey  <tom@tromey.com>
3513
3514         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
3515         (next_symbol_text_func): Move from buildsym.h.
3516         * stabsread.c (hashname): Move from buildsym.c.
3517         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
3518         (next_symbol_text_func, hashname): Move to stabsread.h.
3519         * buildsym.c: Don't include bcache.h
3520         (hashname): Move to stasbread.c.
3521
3522 2018-07-16  Tom Tromey  <tom@tromey.com>
3523
3524         * buildsym.h (context_stack_size): Don't declare.
3525         * buildsym.c (context_stack_size): New global.
3526
3527 2018-07-16  Tom Tromey  <tom@tromey.com>
3528
3529         * dbxread.c (processing_acc_compilation): New global.
3530         * buildsym.h (processing_acc_compilation): Don't declare.
3531
3532 2018-07-16  Tom Tromey  <tom@tromey.com>
3533
3534         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
3535         * dbxread.c (read_ofile_symtab): Update.
3536         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
3537         * buildsym.h (last_source_start_addr): Remove.
3538         (set_last_source_start_addr, get_last_source_start_addr):
3539         Declare.
3540         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
3541         parameter.
3542         (struct buildsym_compunit) <m_last_source_start_addr>: New
3543         member.
3544         (prepare_for_building): Remove start_addr parameter.
3545         (start_symtab, restart_symtab, end_symtab_get_static_block)
3546         (end_symtab_with_blockvector): Update.
3547         (set_last_source_start_addr, get_last_source_start_addr): New
3548         functions.
3549
3550 2018-07-16  Tom Tromey  <tom@tromey.com>
3551
3552         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
3553         member.
3554         (have_line_numbers): Remove.
3555         (record_line, prepare_for_building, end_symtab_get_static_block)
3556         (augment_type_symtab): Update.
3557
3558 2018-07-16  Tom Tromey  <tom@tromey.com>
3559
3560         * buildsym.c (~buildsym_compunit): Free the macro table.
3561         (struct buildsym_compunit) <get_macro_table, release_macros>: New
3562         methods.
3563         <m_pending_macros>: New member.
3564         (pending_macros): Remove.
3565         (~scoped_free_pendings, get_macro_table, prepare_for_building)
3566         (reset_symtab_globals, end_symtab_get_static_block)
3567         (end_symtab_with_blockvector, augment_type_symtab)
3568         (buildsym_init): Update.
3569
3570 2018-07-16  Tom Tromey  <tom@tromey.com>
3571
3572         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
3573         parameter.
3574         (buildsym_compunit::set_last_source_file): New method.
3575         <m_last_source_file>: New member.
3576         (prepare_for_building): Remove "name" parameter.
3577         (start_symtab, restart_symtab, reset_symtab_globals): Update.
3578         (last_source_file): Remove.
3579         (set_last_source_file, get_last_source_file): Update.
3580
3581 2018-07-16  Tom Tromey  <tom@tromey.com>
3582
3583         * buildsym.c (prepare_for_building): Add assert.
3584
3585 2018-07-16  Tom Tromey  <tom@tromey.com>
3586
3587         * buildsym.c (~buildsym_compunit): Update.
3588         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
3589         (start_subfile, patch_subfile_names)
3590         (end_symtab_with_blockvector): Update.
3591
3592 2018-07-16  Tom Tromey  <tom@tromey.com>
3593
3594         * buildsym.c (struct buildsym_compunit): Add constructor,
3595         destructor, initializers.
3596         (start_buildsym_compunit): Remove.
3597         (free_buildsym_compunit): Use "delete".
3598         (start_symtab, restart_symtab): Use "new".
3599
3600 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
3601
3602         * symfile.c (set_objfile_default_section_offset): Remove struct
3603         keyword.
3604
3605 2018-07-14  Stafford Horne  <shorne@gmail.com>
3606
3607         * (Responsible Maintainers): Add myself as or1k maintainer.
3608
3609 2018-07-13  Tom Tromey  <tom@tromey.com>
3610
3611         * symfile.c (set_objfile_default_section_offset): Use extra braces
3612         around initializer.
3613
3614 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3615
3616         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
3617         non-branching basr.
3618
3619 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3620
3621         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3622         unittests/cli-utils-selftests.c
3623         * unittests/cli-utils-selftests.c: New file.
3624
3625 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3626
3627         * NEWS: Mention new commands. Mention change to 'thread apply'.
3628
3629 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3630
3631         * thread.c (thr_try_catch_cmd): New function.
3632         (thread_apply_all_command): Handle qcs flags.
3633         (thread_apply_command): Handle qcs flags.
3634         (taas_command): New function.
3635         (tfaas_command): New function.
3636         (_initialize_thread): Update to setup the new commands 'taas
3637         and 'tfaas'. Change doc string for 'thread apply'.
3638
3639 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3640
3641         * stack.c: (trailing_outermost_frame): New function, mostly
3642         extracted from backtrace_command_1.
3643         (leading_innermost_frame): New function.
3644         (backtrace_command_1): Update to call trailing_outermost_frame.
3645         (frame_apply_command_count): New function.
3646         (frame_apply_level_command): New function.
3647         (frame_apply_all_command): New function.
3648         (frame_apply_command): New function.
3649         (faas_command): New function.
3650         (frame_cmd_list): New variable.
3651         (_initialize_stack): Update to setup the new commands 'frame apply'
3652         and 'faas'.
3653
3654 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3655
3656         * cli-utils.c (number_or_range_parser::get_number): Only handle
3657         numbers or convenience var as numbers.
3658         (parse_flags): New function.
3659         (parse_flags_qcs): New function.
3660         (number_or_range_parser::finished): Ensure parsing end is detected
3661         before end of string.
3662         * cli-utils.h (parse_flags): New function.
3663         (parse_flags_qcs): New function.
3664         (number_or_range_parser): Remove m_finished bool.
3665         (number_or_range_parser::skip_range): Set m_in_range to false.
3666
3667 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
3668
3669         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
3670         on Windows.
3671
3672 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
3673             Jan Kratochvil  <jan.kratochvil@redhat.com>
3674             Paul Fertser  <fercerpav@gmail.com>
3675             Tsutomu Seki  <sekiriki@gmail.com>
3676             Pedro Alves  <palves@redhat.com>
3677
3678         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3679         'unittests/parse-connection-spec-selftests.c'.
3680         (COMMON_SFILES): Add 'common/netstuff.c'.
3681         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
3682         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
3683         * common/netstuff.c: New file.
3684         * common/netstuff.h: New file.
3685         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
3686         (wait_for_connect): Update comment.  New parameter
3687         'gdb::optional<int> sock' instead of 'struct serial *scb'.
3688         Use 'sock' directly instead of 'scb->fd'.
3689         (try_connect): New function, with code from 'net_open'.
3690         (net_open): Rewrite main loop to deal with multiple
3691         sockets/addresses.  Handle IPv6-style hostnames; implement
3692         support for IPv6 connections.
3693         * unittests/parse-connection-spec-selftests.c: New file.
3694
3695 2018-07-11  Pedro Alves  <palves@redhat.com>
3696
3697         PR gdb/23377
3698         * remote.c (remote_target::remote_detach_pid): Call
3699         set_current_process.
3700
3701 2018-07-11  Pedro Alves  <palves@redhat.com>
3702
3703         * h8300-tdep.c (h8300_gdbarch_init): Remove
3704         set_gdbarch_ecoff_reg_to_regnum calls.
3705
3706 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
3707
3708         PR c++/23373
3709         * c-typeprint.c (c_type_print_base_struct_union): Don't print
3710         offsets/sizes for static members of a class/struct.
3711
3712 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
3713
3714         * target-descriptions.c (tdesc_register_bitsize): Rename.
3715         * target-descriptions.h (tdesc_register_bitsize): Likewise.
3716         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
3717         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
3718
3719 2018-07-10  Tom Tromey  <tom@tromey.com>
3720
3721         * breakpoint.c (moribund_locations): Now static and a
3722         std::vector.
3723         (breakpoint_init_inferior, moribund_breakpoint_here_p)
3724         (build_bpstat_chain, update_global_location_list)
3725         (breakpoint_retire_moribund): Update.
3726         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
3727         VEC.
3728
3729 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
3730
3731         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
3732         (riscv_register_reggroup_p): Use new function, remove unneeded
3733         parenthesis.
3734         (riscv_push_dummy_call): Extend assert to compare against xlen or
3735         flen based on register type.
3736
3737 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
3738
3739         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
3740
3741 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
3742
3743         * remote.c (show_hardware_watchpoint_limit): New function.
3744         (show_hardware_watchpoint_length_limit): New function.
3745         (show_hardware_breakpoint_limit): New function.
3746         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
3747         where appropriate, update help text.
3748
3749 2018-07-09  Tom Tromey  <tom@tromey.com>
3750
3751         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
3752         (CLIBS): Don't mention NAT_CLIBS.
3753
3754 2018-07-09  Tom Tromey  <tom@tromey.com>
3755
3756         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
3757         (LIBGDB_OBS, clean mostlyclean): Update.
3758         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
3759
3760 2018-07-09  Tom Tromey  <tom@tromey.com>
3761
3762         * Makefile.in (%.c: %.y): Use ECHO_YACC.
3763         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
3764         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
3765
3766 2018-07-09  Tom Tromey  <tom@tromey.com>
3767
3768         * Makefile.in (ALLDEPFILES): Remove exec.c.
3769         (COMMON_OBS): Remove exec.o.
3770         (COMMON_SFILES): Add exec.c.
3771
3772 2018-07-09  Tom Tromey  <tom@tromey.com>
3773
3774         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
3775
3776 2018-07-09  Tom Tromey  <tom@tromey.com>
3777
3778         * Makefile.in (clean mostlyclean): Remove stamp-version.
3779         (version.c): Depend on stamp-version.
3780         (stamp-version): New rule, from version.c rule.
3781
3782 2018-07-09  Tom Tromey  <tom@tromey.com>
3783
3784         * Makefile.in (init.c): Depend on stamp-init.
3785         (stamp-init): New rule, from init.c rule.
3786         (clean mostlyclean): Remove stamp-init.
3787
3788 2018-07-09  Tom Tromey  <tom@tromey.com>
3789
3790         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
3791         SUBDIR_GCC_COMPILE_SRCS.
3792
3793 2018-07-09  Tom Tromey  <tom@tromey.com>
3794
3795         * Makefile.in (init.c): Remove some unused sed rules.
3796
3797 2018-07-09  Tom Tromey  <tom@tromey.com>
3798
3799         * Makefile.in (TSOBS): Remove.
3800         (INIT_FILES): Update.
3801         (LIBGDB_OBS): Update.
3802         (COMMON_SFILES): Add inflow.c.
3803         (SFILES): Remove inflow.c.
3804
3805 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
3806
3807         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
3808
3809 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
3810
3811         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
3812         get_saveloc_name, is_signal_frame_name, step_name,
3813         init_remote_name, create_addr_space_name,
3814         destroy_addr_space_name, search_unwind_table_name,
3815         find_dyn_list_name): Constify.
3816
3817 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
3818
3819         * darwin-nat.c (darwin_pthread_kill): New function.
3820         (darwin_resume_thread): Use darwin_pthread_kill.
3821
3822 2018-07-05  Tom de Vries  <tdevries@suse.de>
3823
3824         * macroexp.c (macro_buffer) <operator=>: New member function.
3825
3826 2018-07-04  Tom Tromey  <tom@tromey.com>
3827
3828         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
3829
3830 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
3831
3832         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
3833         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
3834         * maint.c: Likewise.
3835         * top.c: Likewise.
3836
3837 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
3838
3839         * NEWS: Create a new section for the next release branch.
3840         Rename the section of the current branch, now that it has
3841         been cut.
3842
3843 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
3844
3845         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
3846         * version.in: Bump version to 8.2.50.DATE-git.
3847
3848 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
3849             Pedro Alves  <palves@redhat.com>
3850
3851         * linux-nat.c (linux_init_ptrace): Rename to ...
3852         (linux_init_ptrace_procfs): ... this.  Call
3853         linux_proc_init_warnings.
3854         (linux_nat_target::post_attach)
3855         (linux_nat_target::post_startup_inferior): Adjust.
3856         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
3857         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
3858
3859 2018-07-04  Tom de Vries  <tdevries@suse.de>
3860
3861         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
3862         check ...
3863         (read_comp_unit_head): ... here.
3864
3865 2018-07-03  Tom Tromey  <tom@tromey.com>
3866
3867         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
3868         (stop_tracing, tstatus_command)
3869         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
3870         (print_one_static_tracepoint_marker): Update.
3871         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
3872         std::vector.
3873         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
3874         VEC.
3875         (all_tracepoints, static_tracepoints_here): Return std::vector.
3876
3877 2018-07-03  Tom Tromey  <tom@tromey.com>
3878
3879         * common/ptid.c (ptid_equal): Remove.
3880         * common/ptid.h (ptid_equal): Don't declare.
3881         * ada-tasks.c: Update.
3882         * breakpoint.c: Update.
3883         * common/agent.c: Update.
3884         * corelow.c: Update.
3885         * darwin-nat-info.c: Update.
3886         * darwin-nat.c: Update.
3887         * dcache.c: Update.
3888         * dtrace-probe.c: Update.
3889         * dummy-frame.c: Update.
3890         * fbsd-nat.c: Update.
3891         * frame.c: Update.
3892         * gdbthread.h: Update.
3893         * gnu-nat.c: Update.
3894         * go32-nat.c: Update.
3895         * inf-loop.c: Update.
3896         * inf-ptrace.c: Update.
3897         * infcall.c: Update.
3898         * infcmd.c: Update.
3899         * inflow.c: Update.
3900         * infrun.c: Update.
3901         * linux-fork.c: Update.
3902         * linux-nat.c: Update.
3903         * linux-thread-db.c: Update.
3904         * mi/mi-cmd-var.c: Update.
3905         * mi/mi-interp.c: Update.
3906         * mi/mi-main.c: Update.
3907         * nto-procfs.c: Update.
3908         * ppc-linux-tdep.c: Update.
3909         * procfs.c: Update.
3910         * python/py-inferior.c: Update.
3911         * python/py-record-btrace.c: Update.
3912         * python/py-record.c: Update.
3913         * ravenscar-thread.c: Update.
3914         * regcache.c: Update.
3915         * remote-sim.c: Update.
3916         * remote.c: Update.
3917         * sol-thread.c: Update.
3918         * solib.c: Update.
3919         * target.c: Update.
3920         * tui/tui-stack.c: Update.
3921         * varobj.c: Update.
3922         * windows-nat.c: Update.
3923         * windows-tdep.c: Update.
3924
3925 2018-07-03  Tom Tromey  <tom@tromey.com>
3926
3927         * common/ptid.c (ptid_match): Remove.
3928         * common/ptid.h (ptid_match): Don't declare.
3929         * fbsd-nat.c: Update.
3930         * infcmd.c: Update.
3931         * infrun.c: Update.
3932         * linux-nat.c: Update.
3933         * record-btrace.c: Update.
3934         * regcache.c: Update.
3935         * remote.c: Update.
3936
3937 2018-07-03  Tom Tromey  <tom@tromey.com>
3938
3939         * common/ptid.c (ptid_tid_p): Remove.
3940         * common/ptid.h (ptid_tid_p): Don't declare.
3941         * sol-thread.c: Update.
3942
3943 2018-07-03  Tom Tromey  <tom@tromey.com>
3944
3945         * common/ptid.c (ptid_lwp_p): Remove.
3946         * common/ptid.h (ptid_lwp_p): Don't declare.
3947         * fbsd-nat.c: Update.
3948         * linux-nat.c: Update.
3949         * nat/linux-procfs.c: Update.
3950         * nat/x86-linux-dregs.c: Update.
3951         * sol-thread.c: Update.
3952
3953 2018-07-03  Tom Tromey  <tom@tromey.com>
3954
3955         * common/ptid.c (ptid_is_pid): Remove.
3956         * common/ptid.h (ptid_is_pid): Don't declare.
3957         * infrun.c: Update.
3958         * linux-nat.c: Update.
3959         * mi/mi-interp.c: Update.
3960         * remote.c: Update.
3961         * thread.c: Update.
3962
3963 2018-07-03  Tom Tromey  <tom@tromey.com>
3964
3965         * common/ptid.c (ptid_get_tid): Remove.
3966         * common/ptid.h (ptid_get_tid): Don't declare.
3967         * ada-tasks.c: Update.
3968         * aix-thread.c: Update.
3969         * bsd-uthread.c: Update.
3970         * darwin-nat.c: Update.
3971         * fbsd-nat.c: Update.
3972         * i386-darwin-nat.c: Update.
3973         * infrun.c: Update.
3974         * linux-tdep.c: Update.
3975         * nto-procfs.c: Update.
3976         * ppc-ravenscar-thread.c: Update.
3977         * python/py-infthread.c: Update.
3978         * ravenscar-thread.c: Update.
3979         * sol-thread.c: Update.
3980         * sparc-ravenscar-thread.c: Update.
3981         * windows-nat.c: Update.
3982
3983 2018-07-03  Tom Tromey  <tom@tromey.com>
3984
3985         * common/ptid.c (ptid_get_lwp): Remove.
3986         * common/ptid.h (ptid_get_lwp): Don't declare.
3987         * aarch64-linux-nat.c: Update.
3988         * ada-tasks.c: Update.
3989         * aix-thread.c: Update.
3990         * amd64-linux-nat.c: Update.
3991         * arm-linux-nat.c: Update.
3992         * corelow.c: Update.
3993         * fbsd-nat.c: Update.
3994         * fbsd-tdep.c: Update.
3995         * gnu-nat.c: Update.
3996         * i386-cygwin-tdep.c: Update.
3997         * i386-gnu-nat.c: Update.
3998         * i386-linux-nat.c: Update.
3999         * ia64-linux-nat.c: Update.
4000         * inf-ptrace.c: Update.
4001         * infrun.c: Update.
4002         * linux-fork.c: Update.
4003         * linux-nat.c: Update.
4004         * linux-tdep.c: Update.
4005         * linux-thread-db.c: Update.
4006         * mips-linux-nat.c: Update.
4007         * nat/aarch64-linux-hw-point.c: Update.
4008         * nat/aarch64-linux.c: Update.
4009         * nat/linux-btrace.c: Update.
4010         * nat/linux-osdata.c: Update.
4011         * nat/linux-procfs.c: Update.
4012         * nat/x86-linux-dregs.c: Update.
4013         * obsd-nat.c: Update.
4014         * ppc-fbsd-nat.c: Update.
4015         * ppc-linux-nat.c: Update.
4016         * procfs.c: Update.
4017         * python/py-infthread.c: Update.
4018         * ravenscar-thread.c: Update.
4019         * remote.c: Update.
4020         * s390-linux-nat.c: Update.
4021         * sol-thread.c: Update.
4022         * sol2-tdep.c: Update.
4023         * spu-linux-nat.c: Update.
4024         * x86-linux-nat.c: Update.
4025         * xtensa-linux-nat.c: Update.
4026
4027 2018-07-03  Tom Tromey  <tom@tromey.com>
4028
4029         * common/ptid.c (ptid_get_pid): Remove.
4030         * common/ptid.h (ptid_get_pid): Don't declare.
4031         * aarch64-linux-nat.c: Update.
4032         * ada-lang.c: Update.
4033         * aix-thread.c: Update.
4034         * alpha-bsd-nat.c: Update.
4035         * amd64-fbsd-nat.c: Update.
4036         * amd64-linux-nat.c: Update.
4037         * arm-linux-nat.c: Update.
4038         * arm-nbsd-nat.c: Update.
4039         * auxv.c: Update.
4040         * break-catch-syscall.c: Update.
4041         * breakpoint.c: Update.
4042         * bsd-uthread.c: Update.
4043         * corelow.c: Update.
4044         * ctf.c: Update.
4045         * darwin-nat.c: Update.
4046         * fbsd-nat.c: Update.
4047         * fbsd-tdep.c: Update.
4048         * gcore.c: Update.
4049         * gnu-nat.c: Update.
4050         * hppa-nbsd-nat.c: Update.
4051         * hppa-obsd-nat.c: Update.
4052         * i386-fbsd-nat.c: Update.
4053         * ia64-linux-nat.c: Update.
4054         * inf-ptrace.c: Update.
4055         * infcmd.c: Update.
4056         * inferior.c: Update.
4057         * inferior.h: Update.
4058         * inflow.c: Update.
4059         * infrun.c: Update.
4060         * linux-fork.c: Update.
4061         * linux-nat.c: Update.
4062         * linux-tdep.c: Update.
4063         * linux-thread-db.c: Update.
4064         * m68k-bsd-nat.c: Update.
4065         * mi/mi-interp.c: Update.
4066         * mi/mi-main.c: Update.
4067         * mips-linux-nat.c: Update.
4068         * mips-nbsd-nat.c: Update.
4069         * mips64-obsd-nat.c: Update.
4070         * nat/aarch64-linux-hw-point.c: Update.
4071         * nat/aarch64-linux.c: Update.
4072         * nat/linux-btrace.c: Update.
4073         * nat/linux-osdata.c: Update.
4074         * nat/linux-procfs.c: Update.
4075         * nat/x86-linux-dregs.c: Update.
4076         * nto-procfs.c: Update.
4077         * obsd-nat.c: Update.
4078         * ppc-linux-nat.c: Update.
4079         * ppc-nbsd-nat.c: Update.
4080         * ppc-obsd-nat.c: Update.
4081         * proc-service.c: Update.
4082         * procfs.c: Update.
4083         * python/py-inferior.c: Update.
4084         * python/py-infthread.c: Update.
4085         * ravenscar-thread.c: Update.
4086         * record.c: Update.
4087         * remote-sim.c: Update.
4088         * remote.c: Update.
4089         * rs6000-nat.c: Update.
4090         * s390-linux-nat.c: Update.
4091         * sh-nbsd-nat.c: Update.
4092         * sol-thread.c: Update.
4093         * sparc-nat.c: Update.
4094         * sparc64-tdep.c: Update.
4095         * spu-linux-nat.c: Update.
4096         * spu-tdep.c: Update.
4097         * target-debug.h: Update.
4098         * target.c: Update.
4099         * thread.c: Update.
4100         * tid-parse.c: Update.
4101         * tracefile-tfile.c: Update.
4102         * vax-bsd-nat.c: Update.
4103         * windows-nat.c: Update.
4104         * x86-linux-nat.c: Update.
4105         * x86-nat.c: Update.
4106
4107 2018-07-03  Tom Tromey  <tom@tromey.com>
4108
4109         * common/ptid.c (pid_to_ptid): Remove.
4110         * common/ptid.h (pid_to_ptid): Don't declare.
4111         * aix-thread.c: Update.
4112         * arm-linux-nat.c: Update.
4113         * common/ptid.c: Update.
4114         * common/ptid.h: Update.
4115         * corelow.c: Update.
4116         * ctf.c: Update.
4117         * darwin-nat.c: Update.
4118         * fbsd-nat.c: Update.
4119         * fork-child.c: Update.
4120         * gnu-nat.c: Update.
4121         * go32-nat.c: Update.
4122         * inf-ptrace.c: Update.
4123         * infcmd.c: Update.
4124         * inferior.c: Update.
4125         * infrun.c: Update.
4126         * linux-fork.c: Update.
4127         * linux-nat.c: Update.
4128         * nat/aarch64-linux-hw-point.c: Update.
4129         * nat/fork-inferior.c: Update.
4130         * nat/x86-linux-dregs.c: Update.
4131         * nto-procfs.c: Update.
4132         * obsd-nat.c: Update.
4133         * procfs.c: Update.
4134         * progspace.c: Update.
4135         * remote.c: Update.
4136         * rs6000-nat.c: Update.
4137         * s390-linux-nat.c: Update.
4138         * sol-thread.c: Update.
4139         * spu-linux-nat.c: Update.
4140         * target.c: Update.
4141         * top.c: Update.
4142         * tracefile-tfile.c: Update.
4143         * windows-nat.c: Update.
4144
4145 2018-07-03  Tom Tromey  <tom@tromey.com>
4146
4147         * common/ptid.h (ptid_build): Don't declare.
4148         * common/ptid.c (ptid_build): Remove.
4149         * aix-thread.c: Update.
4150         * bsd-kvm.c: Update.
4151         * bsd-uthread.c: Update.
4152         * common/agent.c: Update.
4153         * common/ptid.c: Update.
4154         * common/ptid.h: Update.
4155         * corelow.c: Update.
4156         * darwin-nat.c: Update.
4157         * fbsd-nat.c: Update.
4158         * gnu-nat.c: Update.
4159         * linux-fork.c: Update.
4160         * linux-nat.c: Update.
4161         * linux-thread-db.c: Update.
4162         * nat/linux-osdata.c: Update.
4163         * nat/linux-procfs.c: Update.
4164         * nto-procfs.c: Update.
4165         * obsd-nat.c: Update.
4166         * proc-service.c: Update.
4167         * procfs.c: Update.
4168         * ravenscar-thread.c: Update.
4169         * remote-sim.c: Update.
4170         * remote.c: Update.
4171         * sol-thread.c: Update.
4172         * target.c: Update.
4173         * windows-nat.c: Update.
4174
4175 2018-07-03  Tom Tromey  <tom@tromey.com>
4176
4177         * infrun.c (follow_exec): Use exit_inferior_silent.
4178         * inferior.c (exit_inferior_num_silent): Remove.
4179         * inferior.h (exit_inferior_num_silent): Don't declare.
4180
4181 2018-07-03  Tom Tromey  <tom@tromey.com>
4182
4183         PR cli/23340:
4184         * darwin-nat.c (darwin_attach_pid): Reset inferior and
4185         inferior_ptid on error.
4186
4187 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
4188             Simon Marchi  <simon.marchi@polymtl.ca>
4189
4190         PR tdep/8282
4191         * disasm.h (gdb_disassembler): Add
4192         `m_disassembler_options_holder'. member
4193         * disasm.c (get_all_disassembler_options): New function.
4194         (gdb_disassembler::gdb_disassembler): Use it.
4195         (gdb_buffered_insn_length_init_dis): Likewise.
4196         (gdb_buffered_insn_length): Adjust accordingly.
4197         (set_disassembler_options): Handle options with arguments.
4198         (show_disassembler_options_sfunc): Likewise.  Add a leading new
4199         line if showing options with descriptions.
4200         (disassembler_options_completer): Adapt to using the
4201         `disasm_options_and_args_t' structure.
4202         * mips-tdep.c (mips_disassembler_options): New variable.
4203         (mips_disassembler_options_o32): Likewise.
4204         (mips_disassembler_options_n32): Likewise.
4205         (mips_disassembler_options_n64): Likewise.
4206         (gdb_print_insn_mips): Don't set `disassembler_options'.
4207         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
4208         functions.
4209         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
4210         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
4211         `gdbarch_disassembler_options_implicit' and
4212         `gdbarch_valid_disassembler_options'.
4213         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
4214         `disasm_options_and_args_t' structure.
4215         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
4216         method.
4217         (valid_disassembler_options): Switch from `disasm_options_t' to
4218         the `disasm_options_and_args_t' structure.
4219         * NEWS: Document `set disassembler-options' support for the MIPS
4220         target.
4221         * gdbarch.h: Regenerate.
4222         * gdbarch.c: Regenerate.
4223
4224 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
4225
4226         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
4227
4228 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
4229
4230         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
4231         parameter in call to amd64_target_description.
4232         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
4233         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
4234         (amd64fbsd_init_abi): Likewise.
4235         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
4236         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
4237         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
4238         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
4239
4240 2018-06-29  Pedro Alves  <palves@redhat.com>
4241
4242         * gdb/amd64-tdep.h (amd64_create_target_description): Add
4243         "segments" parameter.
4244         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
4245         (_initialize_amd64_tdep): Update call to
4246         amd64_create_target_description.
4247         (amd64_target_description): Add "segments" parameter.  Adjust
4248         the implementation to use it.
4249         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
4250         call to amd64_create_target_description.
4251         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
4252         * gdb/arch/amd64.h (amd64_create_target_description): Add
4253         "segments" register.
4254         * gdb/arch/amd64.c (amd64_create_target_description): Add
4255         "segments" parameter.  Call create_feature_i386_64bit_segments
4256         only if SEGMENTS is true.
4257         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
4258         call to amd64_create_target_description.
4259
4260 2018-06-29  Pedro Alves  <palves@redhat.com>
4261
4262         * thread.c (thread_target_id_str): New, factored out from ...
4263         (print_thread_info_1): ... here.  Use it to compute the max
4264         "Target Id" column width.
4265
4266 2018-06-29  Pedro Alves  <palves@redhat.com>
4267
4268         * remote.c (remote_target::extra_thread_info): Delete
4269         'display_buf' and 'n' locals.  from the cache, regardless of
4270         packet mechanims is in use.  Use cache for qThreadExtra and qP
4271         methods too.
4272
4273 2018-06-29  Pedro Alves  <palves@redhat.com>
4274
4275         * blockframe.c (find_pc_sect_containing_function): New function.
4276         * breakpoint.c (print_breakpoint_location): Don't call
4277         find_pc_sect_function.
4278         * linespec.c (create_sals_line_offset): Record the location's
4279         symbol in the sal.
4280         * linespec.c (convert_address_location_to_sals): Fill in sal's
4281         symbol with find_pc_sect_containing_function.
4282         * symtab.c (find_function_start_sal): Rename to ...
4283         (find_function_start_sal_1): ... this.
4284         (find_function_start_sal): Reimplement as wrapper around
4285         find_function_start_sal_1, and use
4286         find_pc_sect_containing_function to fill in the sal's symbol.
4287         (find_function_start_sal(symbol*, bool)): Adjust.
4288         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
4289         comments.
4290         (find_pc_sect_containing_function): Declare.
4291
4292 2018-06-29  Pedro Alves  <palves@redhat.com>
4293
4294         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
4295         true if the the location has no symbol.
4296
4297 2018-06-28  Tom Tromey  <tom@tromey.com>
4298
4299         * NEWS: Mention --enable-codesign.
4300         * silent-rules.mk (ECHO_SIGN): New variable.
4301         * configure.ac: Add --enable-codesign.
4302         * configure: Rebuild.
4303         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
4304         (gdb$(EXEEXT)): Optionally invoke codesign.
4305
4306 2018-06-28  Pedro Alves  <palves@redhat.com>
4307
4308         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
4309         comments.
4310         (switch_to_thread_no_regs): Adjust comment.
4311         * infcmd.c (stop_pc): Delete.
4312         (post_create_inferior, info_program_command): Replace references
4313         to stop_pc with references to thread_info->suspend.stop_pc.
4314         * inferior.h (stop_pc): Delete declaration.
4315         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
4316         (handle_inferior_event_1, handle_signal_stop)
4317         (process_event_stop_test, keep_going_stepped_thread)
4318         (handle_step_into_function, handle_step_into_function_backward)
4319         (print_stop_location): Replace references to stop_pc with
4320         references to thread_info->suspend.stop_pc.
4321         (struct infcall_suspend_state) <stop_pc>: Delete field.
4322         (save_infcall_suspend_state, restore_infcall_suspend_state):
4323         Remove references to inf_stat->stop_pc.
4324         * linux-fork.c (fork_load_infrun_state): Likewise.
4325         * record-btrace.c (record_btrace_set_replay): Likewise.
4326         * record-full.c (record_full_goto_entry): Likewise.
4327         * remote.c (print_one_stopped_thread): Likewise.
4328         * target.c (target_resume): Extend comment.
4329         * thread.c (set_executing_thread): New.
4330         (set_executing): Use it.
4331         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
4332         Remove references to stop_pc.
4333
4334 2018-06-28  Pedro Alves  <palves@redhat.com>
4335
4336         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
4337         Moving fetching stop_pc until after ecs->event_thread is refreshed.
4338
4339 2018-06-28  Tom Tromey  <tom@tromey.com>
4340
4341         * coffread.c (coff_symfile_finish): Update.
4342         * xcoffread.c (xcoff_symfile_finish): Update.
4343         * elfread.c (elf_symfile_finish): Update.
4344         * symfile.h (dwarf2_free_objfile): Don't declare.
4345         * dwarf2read.c (_initialize_dwarf2_read): Use
4346         register_objfile_data_with_cleanup.
4347         (dwarf2_free_objfile): Now static.  Change signature.
4348
4349 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4350
4351         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
4352         option "-o" to add-symbol-file-load to add an offset to each
4353         section's load address.
4354         * symfile.c (set_objfile_default_section_offset): New function.
4355
4356 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4357
4358         * symfile.c (add_symbol_file_command): Make sure that sections
4359         with the same name are sorted in the same order.
4360
4361 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4362
4363         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
4364         require the second argument.  If omitted, load sections at the
4365         addresses specified in the file.
4366
4367 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4368
4369         * symfile.c (symbol_file_command, symbol_file_add_main_1)
4370         (_initialize_symfile): Add option "-o" to symbol-file to add an
4371         offset to each section of the symbol file.
4372
4373 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4374
4375         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
4376
4377 2018-06-27  Tom Tromey  <tom@tromey.com>
4378
4379         * stack.c (_initialize_stack): Update "func" help text.
4380
4381 2018-06-27  Tom Tromey  <tom@tromey.com>
4382
4383         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
4384         std::vector.
4385         (unwind_infopy_str, pyuw_create_unwind_info)
4386         (unwind_infopy_add_saved_register, pyuw_sniffer)
4387         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
4388         Update.
4389         (struct saved_reg): Add constructor.
4390         <value>: Now a gdbpy_ref<>.
4391
4392 2018-06-27  Tom Tromey  <tom@tromey.com>
4393
4394         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
4395
4396 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4397
4398         * gdb-gdb.py.in: Format using autopep8.
4399
4400 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4401
4402         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
4403         (type_lookup_function): Recognize CORE_ADDR values.
4404
4405 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4406
4407         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
4408         print tag_name.
4409
4410 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4411
4412         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
4413         <__lt__>: Add.
4414
4415 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4416
4417         * gdb-gdb.py: Move to...
4418         * gdb-gdb.py.in: ... here.
4419         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
4420         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
4421         dependencies.
4422         (distclean): Remove gdb-gdb.py when cleaning.
4423         (gdb-gdb.py, gdb-gdb.gdb): New rules.
4424         * configure: Re-generate.
4425
4426 2018-06-27  Pedro Alves  <palves@redhat.com>
4427
4428         * proc-service.c (get_ps_regcache): New.
4429         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4430         (ps_lsetfpregs): Use it.
4431
4432 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
4433
4434         PR gdb/21695
4435         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
4436         (dwarf_decode_lines_1): Adjust.
4437
4438 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4439
4440         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
4441         override.
4442         <info_proc>: Likewise.
4443
4444 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
4445
4446         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
4447         to windows_fetch_one_register, and only handle the case of
4448         fetching one register.  Move the code that reloads the context
4449         and iterates over all registers if R is negative to...
4450         (windows_nat_target::fetch_registers): ... here.
4451         (do_windows_store_inferior_registers): Rename to
4452         windows_store_one_register, and only handle the case of storing
4453         one register.  Move the code that handles the case where r is
4454         negative to...
4455         (windows_nat_target::store_registers) ... here.
4456
4457 2018-06-26  Tom Tromey  <tom@tromey.com>
4458
4459         PR rust/22574:
4460         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
4461         * rust-lang.c (rust_print_struct_def): Add podata parameter.
4462         Update.
4463         (rust_internal_print_type): Add podata parameter.
4464         (rust_print_type): Update.
4465
4466 2018-06-26  Tom Tromey  <tom@tromey.com>
4467
4468         * typeprint.h (struct print_offset_data) <update, finish,
4469         maybe_print_hole>: New methods.
4470         <indentation>: New constant.
4471         * typeprint.c (print_offset_data::indentation): Define.
4472         (print_offset_data::maybe_print_hole, print_offset_data::update)
4473         (print_offset_data::finish): Move from c-typeprint.c and rename.
4474         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
4475         (print_spaces_filtered_with_print_options): Update.
4476         (c_print_type_union_field_offset, maybe_print_hole)
4477         (c_print_type_struct_field_offset): Move to typeprint.c and
4478         rename.
4479         (c_type_print_base_struct_union): Update.
4480
4481 2018-06-25  Pedro Alves  <palves@redhat.com>
4482
4483         * gdbthread.h (thread_info_ref, delete_thread)
4484         (delete_thread_silent, first_thread_of_inferior)
4485         (any_thread_of_inferior, switch_to_thread)
4486         (enable_thread_stack_temporaries)
4487         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4488         (get_last_thread_stack_temporary)
4489         (value_in_thread_stack_temporaries, can_access_registers_thread):
4490         Spell out "struct thread_info" instead of just "thread_info".
4491         * inferior.h (notice_new_inferior): Likewise.
4492
4493 2018-06-25  Pedro Alves  <palves@redhat.com>
4494
4495         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
4496         pass thread_info pointer to delete_thread.
4497         (windows_nat_target::detach): Pass inferior pointer to
4498         detach_inferior.
4499         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
4500         delete_thread.
4501         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
4502         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
4503         and pass a thread_info pointer to delete_thread.
4504         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
4505         pass thread_info pointer to delete_thread.
4506         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
4507         delete_thread_silent call.
4508         * procfs.c (procfs_target::detach): Pass inferior pointer to
4509         detach_inferior.
4510         (procfs_target::wait): Pass thread_info pointer to delete_thread.
4511         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
4512         delete_thread_silent call.
4513         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
4514         pass thread_info pointer to delete_thread.
4515         (windows_nat_target::detach): Pass inferior pointer to
4516         delete_inferior.
4517
4518 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
4519
4520         * regcache.c (readable_regcache::read_part): Fix asserts.
4521         (reg_buffer::raw_collect_part): New function.
4522         (regcache::write_part): Fix asserts.
4523         (reg_buffer::raw_supply_part): New function.
4524         (regcache::transfer_regset_register): New helper function.
4525         (regcache::transfer_regset): Call new functions.
4526         (regcache_supply_regset): Use gdb_byte*.
4527         (regcache::supply_regset): Likewise.
4528         (regcache_collect_regset): Likewise.
4529         (regcache::collect_regset): Likewise.
4530         * regcache.h (reg_buffer::raw_collect_part): New declaration.
4531         (reg_buffer::raw_supply_part): Likewise.
4532         (regcache::transfer_regset_register): Likewise.
4533         (regcache::transfer_regset): Use gdb_byte*.
4534
4535 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
4536
4537         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
4538
4539 2018-06-21  Pedro Alves  <palves@redhat.com>
4540
4541         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
4542         instead of a ptid_t.  All callers adjusted.
4543         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
4544         adjusted.
4545         (print_ada_task_info, display_current_task_id, task_command_1):
4546         Adjust.
4547         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
4548         inferior_thread.
4549         (breakpoint_kind): Adjust.
4550         (remove_breakpoints_pid): Rename to ...
4551         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
4552         pointer.  All callers adjusted.
4553         (bpstat_clear_actions): Use inferior_thread.
4554         (get_bpstat_thread): New.
4555         (bpstat_do_actions): Use it.
4556         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
4557         to take a thread_info pointer.  All callers adjusted.
4558         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
4559         (breakpoint_re_set_thread): Use inferior_thread.
4560         * breakpoint.h (struct inferior): Forward declare.
4561         (bpstat_stop_status): Update.
4562         (remove_breakpoints_pid): Delete.
4563         (remove_breakpoints_inf): New.
4564         * bsd-uthread.c (bsd_uthread_target::wait)
4565         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
4566         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
4567         (maint_btrace_packet_history_cmd)
4568         (maint_btrace_clear_packet_history_cmd): Adjust.
4569         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
4570         inferior_thread.
4571         * cli/cli-interp.c: Include "inferior.h".
4572         * common/refcounted-object.h (struct
4573         refcounted_object_ref_policy): New.
4574         * compile/compile-object-load.c: Include gdbthread.h.
4575         (store_regs): Use inferior_thread.
4576         * corelow.c (core_target::close): Use current_inferior.
4577         (core_target_open): Adjust to use first_thread_of_inferior and use
4578         the current inferior.
4579         * ctf.c (ctf_target::close): Adjust to use current_inferior.
4580         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
4581         <thread>: ... this new field.  All references adjusted.
4582         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
4583         Take a thread_info pointer instead of a ptid_t.
4584         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
4585         (dummy_frame_discard, register_dummy_frame_dtor): Take a
4586         thread_info pointer instead of a ptid_t.
4587         * elfread.c: Include "inferior.h".
4588         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
4589         Use inferior_thread.
4590         * eval.c (evaluate_subexp): Likewise.
4591         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
4592         inferior_thread.
4593         * gdb_proc_service.h (struct thread_info): Forward declare.
4594         (struct ps_prochandle) <ptid>: Delete, replaced by ...
4595         <thread>: ... this new field.  All references adjusted.
4596         * gdbarch.h, gdbarch.c: Regenerate.
4597         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
4598         'thread' parameter.  All implementations and callers adjusted.
4599         * gdbthread.h (thread_info) <set_running>: New method.
4600         (delete_thread, delete_thread_silent): Take a thread_info pointer
4601         instead of a ptid.
4602         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
4603         (first_thread_of_process): Delete, replaced by ...
4604         (first_thread_of_inferior): ... this new function.  All callers
4605         adjusted.
4606         (any_live_thread_of_process): Delete, replaced by ...
4607         (any_live_thread_of_inferior): ... this new function.  All callers
4608         adjusted.
4609         (switch_to_thread, switch_to_no_thread): Declare.
4610         (is_executing): Delete.
4611         (enable_thread_stack_temporaries): Update comment.
4612         <enable_thread_stack_temporaries>: Take a thread_info pointer
4613         instead of a ptid_t.  Incref the thread.
4614         <~enable_thread_stack_temporaries>: Decref the thread.
4615         <m_ptid>: Delete
4616         <m_thr>: New.
4617         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4618         (get_last_thread_stack_temporary)
4619         (value_in_thread_stack_temporaries, can_access_registers_thread):
4620         Take a thread_info pointer instead of a ptid_t.  All callers
4621         adjusted.
4622         * infcall.c (get_call_return_value): Use inferior_thread.
4623         (run_inferior_call): Work with thread pointers instead of ptid_t.
4624         (call_function_by_hand_dummy): Work with thread pointers instead
4625         of ptid_t.  Use thread_info_ref.
4626         * infcmd.c (proceed_thread_callback): Access thread's state
4627         directly.
4628         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
4629         access thread's state directly.
4630         (continue_command): Use inferior_thread.
4631         (info_program_command): Use find_thread_ptid and access thread
4632         state directly.
4633         (proceed_after_attach_callback): Use thread state directly.
4634         (notice_new_inferior): Take a thread_info pointer instead of a
4635         ptid_t.  All callers adjusted.
4636         (exit_inferior): Take an inferior pointer instead of a pid.  All
4637         callers adjusted.
4638         (exit_inferior_silent): New.
4639         (detach_inferior): Delete.
4640         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
4641         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
4642         (detach_inferior_command, kill_inferior_command): Use
4643         find_inferior_id instead of valid_gdb_inferior_id and
4644         gdb_inferior_id_to_pid.
4645         (inferior_command): Use inferior and thread pointers.
4646         * inferior.h (struct thread_info): Forward declare.
4647         (notice_new_inferior): Take a thread_info pointer instead of a
4648         ptid_t.  All callers adjusted.
4649         (detach_inferior): Delete declaration.
4650         (exit_inferior, exit_inferior_silent): Take an inferior pointer
4651         instead of a pid.  All callers adjusted.
4652         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
4653         (valid_gdb_inferior_id): Delete.
4654         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
4655         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
4656         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
4657         ...
4658         <inf>: ... this new field.
4659         <step_ptid>: Delete, replaced by ...
4660         <step_thread>: ... this new field.
4661         (get_displaced_stepping_state): Take an inferior pointer instead
4662         of a pid.  All callers adjusted.
4663         (displaced_step_in_progress_any_inferior): Adjust.
4664         (displaced_step_in_progress_thread): Take a thread pointer instead
4665         of a ptid_t.  All callers adjusted.
4666         (displaced_step_in_progress, add_displaced_stepping_state): Take
4667         an inferior pointer instead of a pid.  All callers adjusted.
4668         (get_displaced_step_closure_by_addr): Adjust.
4669         (remove_displaced_stepping_state): Take an inferior pointer
4670         instead of a pid.  All callers adjusted.
4671         (displaced_step_prepare_throw, displaced_step_prepare)
4672         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
4673         All callers adjusted.
4674         (start_step_over): Adjust.
4675         (infrun_thread_ptid_changed): Remove bit updating ptids in the
4676         displaced step queue.
4677         (do_target_resume): Adjust.
4678         (fetch_inferior_event): Use inferior_thread.
4679         (context_switch, get_inferior_stop_soon): Take an
4680         execution_control_state pointer instead of a ptid_t.  All callers
4681         adjusted.
4682         (switch_to_thread_cleanup): Delete.
4683         (stop_all_threads): Use scoped_restore_current_thread.
4684         * inline-frame.c: Include "gdbthread.h".
4685         (inline_state) <inline_state>: Take a thread pointer instead of a
4686         ptid_t.  All callers adjusted.
4687         <ptid>: Delete, replaced by ...
4688         <thread>: ... this new field.
4689         (find_inline_frame_state): Take a thread pointer instead of a
4690         ptid_t.  All callers adjusted.
4691         (skip_inline_frames, step_into_inline_frame)
4692         (inline_skipped_frames, inline_skipped_symbol): Take a thread
4693         pointer instead of a ptid_t.  All callers adjusted.
4694         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
4695         (inline_skipped_frames, inline_skipped_symbol): Likewise.
4696         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
4697         pointers directly.
4698         * linux-nat.c (get_detach_signal): Likewise.
4699         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
4700         (thread_db_notice_clone): Adjust.
4701         (thread_db_find_new_threads_silently)
4702         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
4703         a thread pointer instead of a ptid_t.  All callers adjusted.
4704         * mi/mi-cmd-var.c: Include "inferior.h".
4705         (mi_cmd_var_update_iter): Update to use thread pointers.
4706         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
4707         inferior directly.
4708         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
4709         out to ...
4710         (mi_output_running): ... this new function.
4711         (mi_on_resume_1): Adjust to use it.
4712         (mi_user_selected_context_changed): Adjust to use inferior_thread.
4713         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
4714         directly.
4715         (interrupt_thread_callback): : Adjust to use thread and inferior
4716         pointers.
4717         * proc-service.c: Include "gdbthread.h".
4718         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
4719         * progspace-and-thread.c: Include "inferior.h".
4720         * progspace.c: Include "inferior.h".
4721         * python/py-exitedevent.c (create_exited_event_object): Adjust to
4722         hold a reference to an inferior_object.
4723         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
4724         inferior_thread.
4725         * python/py-inferior.c (struct inferior_object): Give the type a
4726         tag name instead of a typedef.
4727         (python_on_normal_stop): No need to check if the current thread is
4728         listed.
4729         (inferior_to_inferior_object): Change return type to
4730         inferior_object.  All callers adjusted.
4731         (find_thread_object): Delete, bits factored out to ...
4732         (thread_to_thread_object): ... this new function.
4733         * python/py-infthread.c (create_thread_object): Use
4734         inferior_to_inferior_object.
4735         (thpy_is_stopped): Use thread pointer directly.
4736         (gdbpy_selected_thread): Use inferior_thread.
4737         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
4738         field, replaced with ...
4739         <thread>: ... this new field.  All users adjusted.
4740         (btpy_insn_or_gap_new): Drop const.
4741         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
4742         callers adjusted.
4743         * python/py-record.c: Include "gdbthread.h".
4744         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
4745         a ptid_t.  All callers adjusted.
4746         (gdbpy_current_recording): Use inferior_thread.
4747         * python/py-record.h (recpy_record_object) <ptid>: Delete
4748         field, replaced with ...
4749         <thread>: ... this new field.  All users adjusted.
4750         (recpy_element_object) <ptid>: Delete
4751         field, replaced with ...
4752         <thread>: ... this new field.  All users adjusted.
4753         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
4754         a ptid_t.  All callers adjusted.
4755         * python/py-threadevent.c: Include "gdbthread.h".
4756         (get_event_thread): Use thread_to_thread_object.
4757         * python/python-internal.h (struct inferior_object): Forward
4758         declare.
4759         (find_thread_object, find_inferior_object): Delete declarations.
4760         (thread_to_thread_object, inferior_to_inferior_object): New
4761         declarations.
4762         * record-btrace.c: Include "inferior.h".
4763         (require_btrace_thread): Use inferior_thread.
4764         (record_btrace_frame_sniffer)
4765         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
4766         (get_thread_current_frame): Use scoped_restore_current_thread and
4767         switch_to_thread.
4768         (get_thread_current_frame): Use thread pointer directly.
4769         (record_btrace_replay_at_breakpoint): Use thread's inferior
4770         pointer directly.
4771         * record-full.c: Include "inferior.h".
4772         * regcache.c: Include "gdbthread.h".
4773         (get_thread_arch_regcache): Use the inferior's address space
4774         directly.
4775         (get_thread_regcache, registers_changed_thread): New.
4776         * regcache.h (get_thread_regcache(thread_info *thread)): New
4777         overload.
4778         (registers_changed_thread): New.
4779         (remote_target) <remote_detach_1>: Swap order of parameters.
4780         (remote_add_thread): <remote_add_thread>: Return the new thread.
4781         (get_remote_thread_info(ptid_t)): New overload.
4782         (remote_target::remote_notice_new_inferior): Use thread pointers
4783         directly.
4784         (remote_target::process_initial_stop_replies): Use
4785         thread_info::set_running.
4786         (remote_target::remote_detach_1, remote_target::detach)
4787         (extended_remote_target::detach): Adjust.
4788         * stack.c (frame_show_address): Use inferior_thread.
4789         * target-debug.h (target_debug_print_thread_info_pp): New.
4790         * target-delegates.c: Regenerate.
4791         * target.c (default_thread_address_space): Delete.
4792         (memory_xfer_partial_1): Use current_inferior.
4793         (target_detach): Use current_inferior.
4794         (target_thread_address_space): Delete.
4795         (generic_mourn_inferior): Use current_inferior.
4796         * target.h (struct target_ops) <thread_address_space>: Delete.
4797         (target_thread_address_space): Delete.
4798         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
4799         pointers directly.
4800         (delete_thread_1, delete_thread, delete_thread_silent): Take a
4801         thread pointer instead of a ptid_t.  Adjust all callers.
4802         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
4803         (first_thread_of_process): Delete, replaced by ...
4804         (first_thread_of_inferior): ... this new function.  All callers
4805         adjusted.
4806         (any_thread_of_process): Rename to ...
4807         (any_thread_of_inferior): ... this, and take an inferior pointer.
4808         (any_live_thread_of_process): Rename to ...
4809         (any_live_thread_of_inferior): ... this, and take an inferior
4810         pointer.
4811         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4812         (value_in_thread_stack_temporaries)
4813         (get_last_thread_stack_temporary): Take a thread pointer instead
4814         of a ptid_t.  Adjust all callers.
4815         (thread_info::set_running): New.
4816         (validate_registers_access): Use inferior_thread.
4817         (can_access_registers_ptid): Rename to ...
4818         (can_access_registers_thread): ... this, and take a thread
4819         pointer.
4820         (print_thread_info_1): Adjust to compare thread pointers instead
4821         of ptids.
4822         (switch_to_no_thread, switch_to_thread): Make extern.
4823         (scoped_restore_current_thread::~scoped_restore_current_thread):
4824         Use m_thread pointer directly.
4825         (scoped_restore_current_thread::scoped_restore_current_thread):
4826         Use inferior_thread.
4827         (thread_command): Use thread pointer directly.
4828         (thread_num_make_value_helper): Use inferior_thread.
4829         * top.c (execute_command): Use inferior_thread.
4830         * tui/tui-interp.c: Include "inferior.h".
4831         * varobj.c (varobj_create): Use inferior_thread.
4832         (value_of_root_1): Use find_thread_global_id instead of
4833         global_thread_id_to_ptid.
4834
4835 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
4836
4837         * regcache.c (readable_regcache::read_part): Avoid memcpy when
4838         possible.
4839         (regcache::write_part): Likewise.
4840         (readable_regcache::cooked_read_part): Update comment.
4841         (readable_regcache::cooked_write_part): Likewise.
4842         * regcache.h: (readable_regcache::read_part): Likewise.
4843         (regcache::write_part): Likewise.
4844
4845 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
4846             Dirk Schubert  <dirk.schubert@arm.com>
4847
4848         * aarch64-linux-nat.c (post_attach): New.
4849         (aarch64_linux_nat_target::post_attach): Override post_attach to
4850         record the number of hardware debug registers.
4851
4852 2018-06-20  Tom Tromey  <tom@tromey.com>
4853
4854         * python/py-param.c (add_setshow_generic): Make parameters const.
4855         (parmpy_init): Update.
4856
4857 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
4858
4859         * regcache.h (regcache_cooked_read_ftype): Rename to...
4860         (register_read_ftype): ...this, change type to function_view.
4861         (class reg_buffer) <save>: Remove src parameter.
4862         (readonly_detached_regcache) <readonly_detached_regcache>: Make
4863         parameter non-const in first overload.  Remove src parameter in
4864         second overload.
4865         * regcache.c (do_cooked_read): Remove.
4866         (readonly_detached_regcache::readonly_detached_regcache): Make
4867         parameter non-const, adjust call to other constructor.
4868         (reg_buffer::save): Remove src parameter.
4869         * frame.c (do_frame_register_read): Remove.
4870         (frame_save_as_regcache): Use lambda function.
4871         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
4872         parameter to ppu2spu_data *.
4873         (ppu2spu_sniffer): Use lambda function.
4874
4875 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
4876
4877         * record-full.c (record_full_target::insert_breakpoint): Remove
4878         "struct" keyword, add const.
4879
4880 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
4881
4882         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
4883         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
4884         * configure.ac: Remove AC_PREREQ, add missing quoting.
4885         * gnulib/configure.ac: Modernize usage of
4886         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
4887         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
4888         (AUTOMAKE_VERSION): Bump to 1.15.1.
4889         * configure: Re-generate.
4890         * config.in: Re-generate.
4891         * aclocal.m4: Re-generate.
4892         * gnulib/aclocal.m4: Re-generate.
4893         * gnulib/config.in: Re-generate.
4894         * gnulib/configure: Re-generate.
4895         * gnulib/import/Makefile.in: Re-generate.
4896
4897 2018-06-19  Pedro Alves  <palves@redhat.com>
4898
4899         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
4900         (lookup_minimal_symbol_by_pc_section): ... here with
4901         gdb_assert_not_reached added.
4902
4903 2018-06-19  Pedro Alves  <palves@redhat.com>
4904
4905         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
4906         parameter with a block parameter.  Compare location's block symbol
4907         with the frame's block instead of addresses.
4908         (skip_inline_frames): Pass the current block instead of the
4909         frame's address.  Break out as soon as we determine the frame
4910         should not be skipped.
4911
4912 2018-06-18  Tom Tromey  <tom@tromey.com>
4913
4914         * solib-aix.c (solib_aix_get_section_offsets): Return
4915         unique_xmalloc_ptr.
4916         (solib_aix_solib_create_inferior_hook): Update.
4917
4918 2018-06-18  Tom Tromey  <tom@tromey.com>
4919
4920         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
4921
4922 2018-06-18  Tom Tromey  <tom@tromey.com>
4923
4924         * solib-frv.c (frv_relocate_main_executable): Use
4925         unique_xmalloc_ptr.
4926         * solib-dsbt.c (dsbt_relocate_main_executable): Use
4927         unique_xmalloc_ptr.
4928
4929 2018-06-18  Tom Tromey  <tom@tromey.com>
4930
4931         * objfiles.h (inhibit_section_map_updates): Update.
4932         (resume_section_map_updates, resume_section_map_updates_cleanup):
4933         Remove.
4934         * solib-svr4.c (svr4_handle_solib_event): Update.
4935         * objfiles.c (inhibit_section_map_updates): Return
4936         scoped_restore_tmpl<int>.
4937         (resume_section_map_updates, resume_section_map_updates_cleanup):
4938         Remove.
4939
4940 2018-06-18  Tom Tromey  <tom@tromey.com>
4941
4942         * valprint.h (read_string): Update.
4943         * valprint.c (read_string): Change type of "buffer".
4944         (val_print_string): Update.
4945         * python/py-value.c (valpy_string): Update.
4946         * language.h (struct language_defn) <la_get_string>: Change
4947         type of "buffer".
4948         (default_get_string, c_get_string): Update.
4949         * language.c (default_get_string): Change type of "buffer".
4950         * guile/scm-value.c (gdbscm_value_to_string): Update.
4951         * c-lang.c (c_get_string): Change type of "buffer".
4952
4953 2018-06-18  Tom Tromey  <tom@tromey.com>
4954
4955         * ser-mingw.c (struct pipe_state_destroyer): New.
4956         (pipe_state_up): New typedef.
4957         (cleanup_pipe_state): Remove.
4958         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
4959
4960 2018-06-18  Tom Tromey  <tom@tromey.com>
4961
4962         * rust-lang.h (rust_yyerror): Don't declare.
4963         * rust-lang.c (rust_language_defn): Update.
4964         * rust-exp.y (yyerror): Now static.
4965         * parse.c (parse_exp_in_context_1): Update.
4966         * p-lang.h (p_yyerror): Don't declare.
4967         * p-lang.c (p_language_defn): Update.
4968         * p-exp.y (yyerror): Now static.
4969         * opencl-lang.c (opencl_language_defn): Update.
4970         * objc-lang.c (objc_language_defn): Update.
4971         * m2-lang.h (m2_yyerror): Don't declare.
4972         * m2-lang.c (m2_language_defn): Update.
4973         * m2-exp.y (yyerror): Now static.
4974         * language.h (struct language_defn) <la_error>: Remove.
4975         * language.c (unk_lang_error): Remove.
4976         (unknown_language_defn, auto_language_defn): Remove.
4977         * go-lang.h (go_yyerror): Don't declare.
4978         * go-lang.c (go_language_defn): Update.
4979         * go-exp.y (yyerror): Now static.
4980         * f-lang.h (f_yyerror): Don't declare.
4981         * f-lang.c (f_language_defn): Update.
4982         * f-exp.y (yyerror): Now static.
4983         * d-lang.h (d_yyerror): Don't declare.
4984         * d-lang.c (d_language_defn): Update.
4985         * d-exp.y (yyerror): Now static.
4986         * c-lang.h (c_yyerror): Don't declare.
4987         * c-lang.c (c_language_defn, cplus_language_defn)
4988         (asm_language_defn, minimal_language_defn): Update.
4989         * c-exp.y (yyerror): Now static.
4990         * ada-lang.h (ada_yyerror): Don't declare.
4991         * ada-lang.c (ada_language_defn): Update.
4992         * ada-exp.y (yyerror): Now static.
4993
4994 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
4995
4996         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
4997         (store_sveregs_to_thread): Likewise.
4998         (aarch64_linux_fetch_inferior_registers): Check for SVE.
4999         (aarch64_linux_store_inferior_registers): Likewise.
5000         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
5001         function.
5002         (aarch64_sve_regs_copy_to_regcache): Likewise.
5003         (aarch64_sve_regs_copy_from_regcache): Likewise.
5004         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
5005         declaration.
5006         (aarch64_sve_regs_copy_to_regcache): Likewise.
5007         (aarch64_sve_regs_copy_from_regcache): Likewise.
5008         (sve_context): Structure from Linux headers.
5009         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
5010         (SVE_SIG_ZREG_SIZE): Likewise.
5011         (SVE_SIG_PREG_SIZE): Likewise.
5012         (SVE_SIG_FFR_SIZE): Likewise.
5013         (SVE_SIG_REGS_OFFSET): Likewise.
5014         (SVE_SIG_ZREGS_OFFSET): Likewise.
5015         (SVE_SIG_ZREG_OFFSET): Likewise.
5016         (SVE_SIG_ZREGS_SIZE): Likewise.
5017         (SVE_SIG_PREGS_OFFSET): Likewise.
5018         (SVE_SIG_PREG_OFFSET): Likewise.
5019         (SVE_SIG_PREGS_SIZE): Likewise.
5020         (SVE_SIG_FFR_OFFSET): Likewise.
5021         (SVE_SIG_REGS_SIZE): Likewise.
5022         (SVE_SIG_CONTEXT_SIZE): Likewise.
5023         (SVE_PT_REGS_MASK): Likewise.
5024         (SVE_PT_REGS_FPSIMD): Likewise.
5025         (SVE_PT_REGS_SVE): Likewise.
5026         (SVE_PT_VL_INHERIT): Likewise.
5027         (SVE_PT_VL_ONEXEC): Likewise.
5028         (SVE_PT_REGS_OFFSET): Likewise.
5029         (SVE_PT_FPSIMD_OFFSET): Likewise.
5030         (SVE_PT_FPSIMD_SIZE): Likewise.
5031         (SVE_PT_SVE_ZREG_SIZE): Likewise.
5032         (SVE_PT_SVE_PREG_SIZE): Likewise.
5033         (SVE_PT_SVE_FFR_SIZE): Likewise.
5034         (SVE_PT_SVE_FPSR_SIZE): Likewise.
5035         (SVE_PT_SVE_FPCR_SIZE): Likewise.
5036         (__SVE_SIG_TO_PT): Likewise.
5037         (SVE_PT_SVE_OFFSET): Likewise.
5038         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
5039         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
5040         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
5041         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
5042         (SVE_PT_SVE_PREG_OFFSET): Likewise.
5043         (SVE_PT_SVE_PREGS_SIZE): Likewise.
5044         (SVE_PT_SVE_FFR_OFFSET): Likewise.
5045         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
5046         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
5047         (SVE_PT_SVE_SIZE): Likewise.
5048         (SVE_PT_SIZE): Likewise.
5049         (HAS_SVE_STATE): New define.
5050
5051 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
5052
5053         * nat/aarch64-sve-linux-sigcontext.h: New file.
5054         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
5055         new files.
5056         (SVE_VQ_MIN): Likewise.
5057         (SVE_VQ_MAX): Likewise.
5058         (SVE_VL_MIN): Likewise.
5059         (SVE_VL_MAX): Likewise.
5060         (SVE_NUM_ZREGS): Likewise.
5061         (SVE_NUM_PREGS): Likewise.
5062         (sve_vl_valid): Likewise.
5063         (struct user_sve_header): Likewise.
5064
5065 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
5066             Richard Bunt <Richard.Bunt@arm.com>
5067
5068         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
5069         was requested by GDB.
5070
5071 2018-06-15  Tom de Vries  <tdevries@suse.de>
5072
5073         * MAINTAINERS (Write After Approval): Add Tom de Vries.
5074
5075 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
5076
5077         * gnulib/update-gnulib.sh: Print expected versions of
5078         autoconf/aclocal.
5079
5080 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
5081
5082         * arch-utils.c (default_type_align): Use type_length_units.
5083         * gdbtypes.c (type_align): Use type_length_units.
5084
5085 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5086
5087         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
5088         of 'define' command.
5089
5090 2018-06-14  Tom de Vries  <tdevries@suse.de>
5091
5092         PR cli/22573
5093         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
5094         get_no_prettyformat_print_options.
5095
5096 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
5097
5098         * sparc-nat.h: Include target.h.
5099         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
5100         <fetch_registers>: Remove this argument in function call.
5101         <store_registers>: Remove this argument in function call, remove
5102         extra semicolon.
5103         <low_forget_process>: Call sparc64_forget_process instead of
5104         sparc_forget_process.
5105
5106 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5107
5108         * procfs.c (_initialize_procfs): Use add_inf_child_target.
5109         (procfs_target::make_corefile_notes): Adjust to new
5110         target_read_alloc return type.
5111
5112 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
5113             Stephen Roberts  <stephen.roberts@arm.com>
5114
5115         PR gdb/22882
5116         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
5117         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
5118         Move should_notify_stop local into more inner scope.
5119
5120 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
5121             Stephen Roberts  <stephen.roberts@arm.com>
5122
5123         PR gdb/22882
5124         * infrun.c (resume_1): Add call to mark_async_event_handler.
5125
5126 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
5127
5128         * infrun.c (do_target_wait): Change old version of $pc printed.
5129
5130 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
5131
5132         * dwarf2read.c (read_index_from_section): Rename to...
5133         (read_gdb_index_from_section): ... this, update all callers.
5134         (dwarf2_read_index): Rename to...
5135         (dwarf2_read_gdb_index): ... this, update all callers.
5136
5137 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
5138
5139         * gdb/hppa-linux-nat.c
5140         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
5141         hppa_linux_nat_target::fetch_registers.
5142
5143 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
5144
5145         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
5146         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
5147         (AARCH64_DWARF_SVE_FFR): Likewise.
5148         (AARCH64_DWARF_SVE_P0): Likewise.
5149         (AARCH64_DWARF_SVE_Z0): Likewise.
5150
5151 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
5152
5153         * common/common-regcache.h (raw_compare): New function.
5154         * regcache.c (regcache::raw_compare): Likewise.
5155         * regcache.h (regcache::raw_compare): New declaration.
5156
5157 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
5158
5159         * common/common-regcache.h (reg_buffer_common): New structure.
5160         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
5161         (reg_buffer::raw_supply): Likewise.
5162         (reg_buffer::raw_supply_integer): Likewise.
5163         (reg_buffer::raw_supply_zeroed): Likewise.
5164         (reg_buffer::raw_collect): Likewise.
5165         (reg_buffer::raw_collect_integer): Likewise.
5166         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
5167         (reg_buffer::raw_supply): Likewise.
5168         (reg_buffer::raw_supply_integer): Likewise.
5169         (reg_buffer::raw_supply_zeroed): Likewise.
5170         (reg_buffer::raw_collect): Likewise.
5171         (reg_buffer::raw_collect_integer): Likewise.
5172
5173 2018-06-10  Tom Tromey  <tom@tromey.com>
5174
5175         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
5176         (class remote_state) <stop_reply_queue>: Now std::vector.
5177         (remote_state::~remote_state)
5178         (remote_target::stop_reply_queue_length): Update.
5179         (struct queue_iter_param, remove_child_of_pending_fork)
5180         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
5181         (check_pending_event_prevents_wildcard_vcont_callback)
5182         (remove_stop_reply_for_inferior)
5183         (remove_stop_reply_of_remote_state)
5184         (remote_notif_remove_once_on_match)
5185         (stop_reply_match_ptid_and_ws)
5186         (remote_kill_child_of_pending_fork): Remove.
5187         (remote_target::remove_new_fork_children)
5188         (remote_target::check_pending_events_prevent_wildcard_vcont)
5189         (remote_target::discard_pending_stop_replies)
5190         (remote_target::discard_pending_stop_replies_in_queue)
5191         (remote_target::remote_notif_remove_queued_reply)
5192         (remote_target::queued_stop_reply)
5193         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
5194         (remote_target::wait, remote_target::kill_new_fork_children)
5195         (remote_target::async): Update.
5196
5197 2018-06-10  Tom Tromey  <tom@tromey.com>
5198
5199         * record-full.c (record_full_arch_list_cleanups): Remove.
5200         (record_full_message): Use try/catch.
5201         (record_full_wait_cleanups): Remove.
5202         (record_full_wait_1): Use try/catch.
5203         (record_full_restore): Likewise.
5204
5205 2018-06-10  Tom Tromey  <tom@tromey.com>
5206
5207         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
5208         declare VEC.  Add constructor.
5209         <in_target_beneath>: Now bool.
5210         (record_full_breakpoints): Now a std::vector, static.
5211         (record_full_sync_record_breakpoints)
5212         (record_full_init_record_breakpoints)
5213         (record_full_target::insert_breakpoint)
5214         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
5215
5216 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
5217
5218         * dwarf2read.c (process_cu_includes): Remove struct keyword.
5219         * serial.c (serial_interface_lookup): Remove struct keyword.
5220
5221 2018-06-10  Tom Tromey  <tom@tromey.com>
5222
5223         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
5224         method.
5225         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
5226         a method.
5227         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
5228         method.
5229         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
5230         "beneath" as a method.
5231         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
5232         Use "beneath" as a method.
5233
5234 2018-06-10  Tom Tromey  <tom@tromey.com>
5235
5236         * tracefile.c (struct trace_file_writer_deleter): New.
5237         <operator()>: Rename from trace_file_writer_xfree.
5238         (trace_file_writer_up): New typedef.
5239         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
5240
5241 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
5242
5243         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
5244         <m_registers, m_register_status>: Change type to
5245         std::unique_ptr.
5246         * regcache.c (reg_buffer::reg_buffer): Use new instead of
5247         XCNEWVEC.
5248
5249 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
5250
5251         * common/common-regcache.h (enum register_status): Add
5252         underlying type "signed char".
5253         * regcache.h (reg_buffer) <m_register_status>: Change type to
5254         register_status *.
5255         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
5256         register_status instead of signed char.
5257         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
5258         (reg_buffer::get_register_status): Remove cast.
5259         (readable_regcache::raw_read): Remove cast.
5260         (readable_regcache::cooked_read): Remove cast.
5261
5262 2018-06-09  Tom Tromey  <tom@tromey.com>
5263
5264         * source.c (reverse_search_command, forward_search_command): Use
5265         scoped_fd.
5266
5267 2018-06-09  Tom Tromey  <tom@tromey.com>
5268
5269         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
5270         (serial_ops_list): Now static, std::vector.
5271         (serial_interface_lookup, serial_add_interface): Update.
5272
5273 2018-06-09  Tom Tromey  <tom@tromey.com>
5274
5275         * dwarf2read.c (process_cu_includes): Update.
5276         (process_full_comp_unit): Update.
5277         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
5278         std::vector.
5279
5280 2018-06-08  Paul Koning  <paul_koning@dell.com>
5281
5282         PR gdb/23252
5283
5284         * python/python.c (do_start_initialization):
5285         Avoid call to internal Python API.
5286         (init__gdb_module): New function.
5287
5288 2018-06-08  Gary Benson <gbenson@redhat.com>
5289
5290         * linux-thread-db.c (valprint.h): New include.
5291         (struct check_thread_db_info): New structure.
5292         (check_thread_db_on_load, tdb_testinfo): New static globals.
5293         (check_thread_db, check_thread_db_callback): New functions.
5294         (try_thread_db_load_1): Run integrity checks if requested.
5295         (maintenance_check_libthread_db): New function.
5296         (_initialize_thread_db): Register "maint check libthread-db"
5297         and "maint set/show check-libthread-db".
5298         * NEWS: Mention the above new commands.
5299
5300 2018-06-08  Tom Tromey  <tom@tromey.com>
5301
5302         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
5303         now a method.
5304
5305 2018-06-08  Tom Tromey  <tom@tromey.com>
5306
5307         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
5308
5309 2018-06-08  Tom Tromey  <tom@tromey.com>
5310
5311         * common/btrace-common.h (struct btrace_data): Add constructor,
5312         destructor, move assignment operator.
5313         <empty, clear, fini>: New methods.
5314         <format>: Initialize.
5315         (btrace_data_init, btrace_data_fini, btrace_data_clear)
5316         (btrace_data_empty): Don't declare.
5317         * common/btrace-common.c (btrace_data_init): Remove.
5318         (btrace_data::fini): Rename from btrace_data_fini.
5319         (btrace_data::empty): Rename from btrace_data_empty.
5320         (btrace_data::clear): Rename from btrace_data_clear.  Return
5321         bool.
5322         * btrace.h (make_cleanup_btrace_data): Don't declare.
5323         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
5324         (parse_xml_btrace): Update.
5325         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
5326         (maint_btrace_clear_packet_history_cmd): Update.
5327
5328 2018-06-07  Pedro Alves  <palves@redhat.com>
5329
5330         * target.h (target_ops) <beneath>: Now a method.  All references
5331         updated.
5332         (class target_stack): New.
5333         * target.c (g_target_stack): New.
5334         (g_current_top_target): Delete.
5335         (current_top_target): Get the top target out of g_target_stack.
5336         (target_stack::push, target_stack::unpush): New.
5337         (push_target, unpush_target): Reimplement.
5338         (target_is_pushed): Reimplement in terms of g_target_stack.
5339         (target_ops::beneath, target_stack::find_beneath): New.
5340
5341 2018-06-07  Pedro Alves  <palves@redhat.com>
5342
5343         * target.h (find_target_beneath): Delete declaration.
5344         * target.c (find_target_beneath): Delete definition.
5345         * aix-thread.c: All callers of find_target_beneath adjusted to
5346         call target_ops::beneath instead.
5347         * bsd-uthread.c: Likewise.
5348         * linux-thread-db.c: Likewise.
5349         * ravenscar-thread.c: Likewise.
5350         * sol-thread.c: Likewise.
5351         * spu-multiarch.c: Likewise.
5352
5353 2018-06-07  Pedro Alves  <palves@redhat.com>
5354
5355         * target.h (target_ops) <beneath>: Now a method.  All references
5356         updated.
5357         (target_ops) <m_beneath>: New.
5358         * target.c (target_ops::beneath): New.
5359         * corelow.c: Adjust all references to target_ops::beneath.
5360         * linux-thread-db.c: Likewise.
5361         * make-target-delegates: Likewise.
5362         * record-btrace.c: Likewise.
5363         * record-full.c: Likewise.
5364         * remote.c: Likewise.
5365         * target.c: Likewise.
5366         * target-delegates.c: Regenerate.
5367
5368 2018-06-07  Pedro Alves  <palves@redhat.com>
5369
5370         * target.h (target_stack): Delete.
5371         (current_top_target): Declare function.
5372         * target.c (target_stack): Delete.
5373         (g_current_top_target): New.
5374         (current_top_target): New function.
5375         * auxv.c: Use current_top_target instead of target_stack
5376         throughout.
5377         * avr-tdep.c: Likewise.
5378         * breakpoint.c: Likewise.
5379         * corefile.c: Likewise.
5380         * elfread.c: Likewise.
5381         * eval.c: Likewise.
5382         * exceptions.c: Likewise.
5383         * frame.c: Likewise.
5384         * gdbarch-selftests.c: Likewise.
5385         * gnu-v3-abi.c: Likewise.
5386         * ia64-tdep.c: Likewise.
5387         * ia64-vms-tdep.c: Likewise.
5388         * infcall.c: Likewise.
5389         * infcmd.c: Likewise.
5390         * infrun.c: Likewise.
5391         * linespec.c: Likewise.
5392         * linux-tdep.c: Likewise.
5393         * minsyms.c: Likewise.
5394         * ppc-linux-nat.c: Likewise.
5395         * ppc-linux-tdep.c: Likewise.
5396         * procfs.c: Likewise.
5397         * regcache.c: Likewise.
5398         * remote.c: Likewise.
5399         * rs6000-tdep.c: Likewise.
5400         * s390-linux-nat.c: Likewise.
5401         * s390-tdep.c: Likewise.
5402         * solib-aix.c: Likewise.
5403         * solib-darwin.c: Likewise.
5404         * solib-dsbt.c: Likewise.
5405         * solib-spu.c: Likewise.
5406         * solib-svr4.c: Likewise.
5407         * solib-target.c: Likewise.
5408         * sparc-tdep.c: Likewise.
5409         * sparc64-tdep.c: Likewise.
5410         * spu-tdep.c: Likewise.
5411         * symfile.c: Likewise.
5412         * symtab.c: Likewise.
5413         * target-descriptions.c: Likewise.
5414         * target-memory.c: Likewise.
5415         * target.c: Likewise.
5416         * target.h: Likewise.
5417         * tracefile-tfile.c: Likewise.
5418         * tracepoint.c: Likewise.
5419         * valops.c: Likewise.
5420         * valprint.c: Likewise.
5421         * value.c: Likewise.
5422         * windows-tdep.c: Likewise.
5423         * mi/mi-main.c: Likewise.
5424
5425 2018-06-07  Tom Tromey  <tom@tromey.com>
5426
5427         * valprint.h (build_address_symbolic): Declare.
5428         * printcmd.c (print_address_symbolic): Update.
5429         (build_address_symbolic): Change "name" and "filename" to
5430         std::string.
5431         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
5432         Update.
5433         * defs.h (build_address_symbolic): Remove declaration.
5434
5435 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
5436
5437         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
5438         (aarch64_vnv_type): Add function.
5439         (aarch64_pseudo_register_name): Add V regs for SVE.
5440         (aarch64_pseudo_register_type): Likewise.
5441         (aarch64_pseudo_register_reggroup_p): Likewise.
5442         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
5443         (aarch64_pseudo_read_value): Add V regs for SVE.
5444         (aarch64_pseudo_write_2): Use V0 offset for SVE
5445         (aarch64_pseudo_write): Add V regs for SVE.
5446         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
5447
5448 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
5449
5450         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
5451         (sve_vl_from_vq): Likewise.
5452
5453 2018-06-05  Tom Tromey  <tom@tromey.com>
5454
5455         * cli/cli-cmds.c (show_version): Update.
5456         * top.c (print_gdb_version): Add "interactive" parameter.
5457         Update.
5458         * main.c (captured_main_1): Update.
5459         * top.h (print_gdb_version): Add "interactive" parameter and a
5460         comment.
5461
5462 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
5463
5464         * common/enum-flags.h: Add trailing semicolon to example in
5465         comment.
5466
5467 2018-06-05  Tom Tromey  <tom@tromey.com>
5468
5469         PR cli/12326:
5470         * NEWS: Add entry about pager.
5471         * utils.c (pagination_disabled_for_command): New global.
5472         (prompt_for_continue): Allow "c" response to prompt.
5473         (reinitialize_more_filter): Clear
5474         pagination_disabled_for_command.
5475         (fputs_maybe_filtered): Check pagination_disabled_for_command.
5476
5477 2018-06-04  Tom Tromey  <tom@tromey.com>
5478
5479         * ada-lang.h (ada_lookup_symbol_list): Update.
5480         * ada-lang.c (resolve_subexp): Update.
5481         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
5482         parameter.
5483         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
5484         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
5485         results parameter to std::vector.
5486         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
5487         Update.
5488         * ada-exp.y (block_lookup): Update.
5489         (select_possible_type_sym): Change type of syms.  Remove nsyms
5490         parameter.
5491         (write_var_or_type, write_name_assoc): Update.
5492
5493 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
5494
5495         * windows-nat.c (windows_nat_target::xfer_partial): Return
5496         TARGET_XFER_E_IO if we need to delegate to the target beneath
5497         but BENEATH is NULL.
5498
5499 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
5500
5501         * Makefile.in (config.status): Add configure.nat as a
5502         dependency.
5503
5504 2018-06-04  Tom Tromey  <tom@tromey.com>
5505
5506         * cp-name-parser.y (cpname_state): Add method declarations.
5507         (HANDLE_QUAL): Update.
5508         (cpname_state::d_grab, cpname_state::fill_comp)
5509         (cpname_state::make_operator, cpname_state::make_dtor)
5510         (cpname_state::make_builtin_type, cpname_state::make_name)
5511         (cpname_state::d_qualify, cpname_state::d_int_type)
5512         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
5513         (%union): Move earlier.
5514
5515 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5516
5517         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
5518
5519 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5520
5521         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
5522         (aarch64_pseudo_write_1): Likewise.
5523         (aarch64_pseudo_read_value): Use helper.
5524         (aarch64_pseudo_write): Likewise.
5525
5526 2018-06-04  Pedro Alves  <palves@redhat.com>
5527
5528         * darwin-nat.c (darwin_ops): Delete.
5529         (darwin_attach_pid): Use get_native_target.
5530
5531 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5532
5533         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
5534         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
5535
5536 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5537
5538         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
5539         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
5540         (aarch64_gdbarch_init): Check for SVE.
5541         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
5542
5543 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5544
5545         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
5546         * aarch64-tdep.h (aarch64_read_description): Likewise.
5547         * arch/aarch64.c (aarch64_create_target_description): Likewise.
5548         * arch/aarch64.h (aarch64_create_target_description): Likewise.
5549         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
5550         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
5551         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
5552
5553 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
5554
5555         * value.c (value_fetch_lazy_bitfield): New.
5556         (value_fetch_lazy_memory): New.
5557         (value_fetch_lazy_register): New.
5558         (value_fetch_lazy): Factor out to smaller functions.
5559
5560 2018-06-01  Tom Tromey  <tom@tromey.com>
5561
5562         * cp-name-parser.y (backslashable, represented): Now const.
5563
5564 2018-06-01  Tom Tromey  <tom@tromey.com>
5565
5566         * cp-name-parser.y: Include parser-defs.h.
5567         (parser_fprintf): Remove declaration.
5568
5569 2018-06-01  Tom Tromey  <tom@tromey.com>
5570
5571         * cp-name-parser.y: Use %pure-parser, %lex-param, and
5572         %parse-param.
5573         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
5574         (global_result): Remove globals.
5575         (struct cpname_state): New.
5576         (yyparse): Don't declare.
5577         (yylex, yyerror): Move declarations after %union.
5578         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
5579         (make_name): Add state parameter.
5580         Update all callers.
5581         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
5582         parameter.
5583         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
5584         Update.
5585         (yylex): Add lvalp, state parameters.
5586         (yyerror): Add state parameter.
5587         (cp_demangled_name_to_comp): Update.
5588
5589 2018-06-01  Tom Tromey  <tom@tromey.com>
5590
5591         * cp-name-parser.y (parser_fprintf): Declare.
5592         (GDB_YY_REMAP_PREFIX): Define.
5593         Include yy-remap.h.  Don't redefine yy* identifiers.
5594
5595 2018-06-01  Tom Tromey  <tom@tromey.com>
5596
5597         * python/py-type.c (typy_legacy_template_argument): Update.
5598         * cp-support.h (cp_demangled_name_to_comp): Update.
5599         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
5600         parameter to be a "std::string *".
5601         (main): Update.
5602
5603 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
5604
5605         * ada-lex.l: Include "diagnostics.h" instead of
5606         "common/diagnostics.h".
5607         * unittests/environ-selftests.c: Likewise.
5608         * common/diagnostics.h: Moved to ../include.
5609
5610 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
5611
5612         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
5613         to language_mode_manual while calling breakpoint_re_set_one.
5614
5615 2018-06-01  Tom Tromey  <tom@tromey.com>
5616
5617         * valops.c (value_cast_structs, destructor_name_p): Update.
5618         * symtab.c (gdb_mangle_name): Update.
5619         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
5620         Update.
5621         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
5622         (pascal_object_print_value_fields, pascal_object_print_value):
5623         Update.
5624         * p-typeprint.c (pascal_type_print_derivation_info): Update.
5625         * linespec.c (find_methods): Update.
5626         * gdbtypes.h (type_name_no_tag): Remove.
5627         (type_name_or_error): Rename from type_name_no_tag_or_error.
5628         * gdbtypes.c (type_name_no_tag): Remove.
5629         (type_name_or_error): Rename from type_name_no_tag_or_error.
5630         (lookup_struct_elt_type, check_typedef): Update.
5631         * expprint.c (print_subexp_standard): Update.
5632         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
5633         * d-namespace.c (d_lookup_nested_symbol): Update.
5634         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
5635         (cp_print_class_member): Update.
5636         * cp-namespace.c (cp_lookup_nested_symbol): Update.
5637         * completer.c (add_struct_fields): Update.
5638         * c-typeprint.c (cp_type_print_derivation_info)
5639         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
5640         Update.
5641         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
5642         (ada_prefer_type, ada_is_exception_sym): Update.
5643
5644 2018-06-01  Tom Tromey  <tom@tromey.com>
5645
5646         * valops.c (enum_constant_from_type, value_namespace_elt)
5647         (value_maybe_namespace_elt): Update.
5648         * valarith.c (find_size_for_pointer_math): Update.
5649         * target-descriptions.c (make_gdb_type): Update.
5650         * symmisc.c (print_symbol): Update.
5651         * stabsread.c (define_symbol, read_type)
5652         (complain_about_struct_wipeout, add_undefined_type)
5653         (cleanup_undefined_types_1): Update.
5654         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
5655         (rust_range_type_p, val_print_struct, rust_print_struct_def)
5656         (rust_internal_print_type, rust_composite_type)
5657         (rust_evaluate_funcall, rust_evaluate_subexp)
5658         (rust_inclusive_range_type_p): Update.
5659         * python/py-type.c (typy_get_tag): Update.
5660         * p-typeprint.c (pascal_type_print_base): Update.
5661         * mdebugread.c (parse_symbol, parse_type): Update.
5662         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
5663         Update.
5664         * guile/scm-type.c (gdbscm_type_tag): Update.
5665         * go-lang.c (sixg_string_p): Update.
5666         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
5667         Update.
5668         * gdbtypes.h (struct main_type) <tag_name>: Remove.
5669         (TYPE_TAG_NAME): Remove.
5670         * gdbtypes.c (type_name_no_tag): Simplify.
5671         (check_typedef, check_types_equal, recursive_dump_type)
5672         (copy_type_recursive, arch_composite_type): Update.
5673         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
5674         in summary mode when needed.
5675         * eval.c (evaluate_funcall): Update.
5676         * dwarf2read.c (fixup_go_packaging, read_structure_type)
5677         (process_structure_scope, read_enumeration_type)
5678         (read_namespace_type, read_module_type, determine_prefix): Update.
5679         * cp-support.c (inspect_type): Update.
5680         * coffread.c (process_coff_symbol, decode_base_type): Update.
5681         * c-varobj.c (c_is_path_expr_parent): Update.
5682         * c-typeprint.c (c_type_print_base_struct_union): Update.
5683         (c_type_print_base_1): Update.  Print struct/class/union/enum in
5684         summary when using C language.
5685         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
5686         (gen_maybe_namespace_elt): Update.
5687         * ada-lang.c (ada_type_name): Simplify.
5688         (empty_record, ada_template_to_fixed_record_type_1)
5689         (template_to_static_fixed_type)
5690         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
5691
5692 2018-06-01  Tom Tromey  <tom@tromey.com>
5693
5694         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
5695         c_print_type.
5696         * c-typeprint.c (c_print_type_1): Add "language" parameter.
5697         (c_print_type): Update.
5698         (c_print_type): New overload.
5699         (c_type_print_varspec_prefix, c_type_print_args)
5700         (c_type_print_varspec_suffix, c_print_type_no_offsets)
5701         (c_type_print_base_struct_union, c_type_print_base_1)
5702         (cp_type_print_method_args): Add "language" parameter.
5703         (c_type_print_base): Update.
5704         * c-lang.h (c_print_type): Add new overload.
5705
5706 2018-06-01  Tom Tromey  <tom@tromey.com>
5707
5708         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
5709         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
5710
5711 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
5712
5713         * aarch64-tdep.c (aarch64_sve_register_names): New const
5714         var.
5715         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
5716         (AARCH64_SVE_Z_REGS_NUM): New define.
5717         (AARCH64_SVE_P_REGS_NUM): Likewise.
5718         (AARCH64_SVE_NUM_REGS): Likewise.
5719
5720 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
5721
5722         * nat/linux-ptrace.h [__alpha__]
5723         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
5724         definitions.
5725
5726 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
5727
5728         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
5729         the endianness selected.
5730         * NEWS: Document `set endian auto' mode operation update.
5731
5732 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
5733
5734         * Makefile.in: Add new header.
5735         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
5736         (sve_vl_from_vg): Likewise.
5737         (sve_vq_from_vl): Likewise.
5738         (sve_vl_from_vq): Likewise.
5739         (sve_vq_from_vg): Likewise.
5740         (sve_vg_from_vq): Likewise.
5741         * configure.nat: Add new c file.
5742         * nat/aarch64-sve-linux-ptrace.c: New file.
5743         * nat/aarch64-sve-linux-ptrace.h: New file.
5744
5745 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
5746
5747         * aarch64-linux-nat.c (aarch64_linux_read_description):
5748         Add parmeter zero.
5749         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
5750         Likewise.
5751         * aarch64-tdep.c (tdesc_aarch64_list): Add.
5752         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
5753         (aarch64_gdbarch_init): Add parmeter zero.
5754         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
5755         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
5756         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
5757         parmeter.
5758         * doc/gdb.texinfo: Describe SVE feature
5759         * features/aarch64-sve.c: New file.
5760
5761 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
5762
5763         PR gdb/23210
5764         * gdbarch.sh (significant_addr_bit): Default to zero when
5765         not set by target architecture.
5766         * gdbarch.c: Re-generated.
5767         * utils.c (address_significant): Update.
5768
5769 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
5770
5771         * stack.c (func_command): Remove trailing newline in call to error.
5772
5773 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5774
5775         * regcache.h (regcache_raw_collect): Remove, update callers to
5776         use regcache::raw_collect.
5777         * regcache.c (regcache_raw_collect): Remove.
5778
5779 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5780
5781         * regcache.h (regcache_raw_supply): Remove, update callers to
5782         use detached_regcache::raw_supply.
5783         * regcache.c (regcache_raw_supply): Remove.
5784
5785 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5786
5787         * regcache.h (regcache_cooked_write_part): Remove, update
5788         callers to use regcache::cooked_write_part.
5789         * regcache.c (regcache_cooked_write_part): Remove.
5790
5791 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5792
5793         * regcache.h (regcache_cooked_read_part): Remove, update callers
5794         to use readable_regcache::cooked_read_part.
5795         * regcache.c (regcache_cooked_read_part): Remove.
5796
5797 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5798
5799         * regcache.h (regcache_cooked_read_value): Remove, update
5800         callers to use readable_regcache::cooked_read_value.
5801         * regcache.c (regcache_cooked_read_value): Remove.
5802
5803 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5804
5805         * regcache.h (regcache_cooked_write): Remove, update callers to
5806         use regcache::cooked_write.
5807         * regcache.c (regcache_cooked_write): Remove.
5808
5809 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5810
5811         * regcache.h (regcache_invalidate): Remove, update callers to
5812         use detached_regcache::invalidate instead.
5813         * regcache.c (regcache_invalidate): Remove.
5814
5815 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5816
5817         * regcache.h (regcache_raw_write_part): Remove, update callers
5818         to use regcache::raw_write_part instead.
5819         * regcache.c (regcache_raw_write_part): Remove.
5820
5821 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5822
5823         * regcache.h (regcache_raw_read_part): Remove, update callers to
5824         use readable_regcache::raw_read_part instead.
5825         * regcache.c (regcache_raw_read_part): Remove.
5826
5827 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5828
5829         * regcache.h (regcache_cooked_read): Remove, update callers to
5830         use readable_regcache::cooked_read instead.
5831         * regcache.c (regcache_cooked_read): Remove.
5832
5833 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5834
5835         * regcache.h (regcache_raw_write): Remove, update callers to use
5836         regcache::raw_write instead.
5837         * regcache.c (regcache_raw_write): Remove.
5838
5839 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5840
5841         * regcache.h (regcache_raw_read): Remove, update callers to use
5842         readable_regcache::raw_read instead.
5843         * regcache.c (regcache_raw_read): Remove.
5844
5845 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5846
5847         * regcache.h (regcache_raw_update): Remove, update callers to
5848         use readable_regcache::raw_update instead.
5849         * regcache.c (regcache_raw_update): Remove.
5850
5851 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5852
5853         * regcache.h (regcache_register_status): Remove, update callers
5854         to use reg_buffer::get_register_status directly instead.
5855         * regcache.c (regcache_register_status): Remove.
5856
5857 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5858
5859         * regcache.h (regcache_get_ptid): Remove, update all callers to
5860         call regcache::ptid instead.
5861         * regcache.c (regcache_get_ptid): Remove.
5862
5863 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5864
5865         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
5866
5867 2018-05-30  Pedro Alves  <palves@redhat.com>
5868
5869         * common/common-exceptions.h (exception_rethrow): Use
5870         ATTRIBUTE_NORETURN.
5871
5872 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
5873
5874         * breakpoint.c (print_solib_event, check_status_catch_solib):
5875         Remove struct keyword in range-based for loops.
5876         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
5877         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
5878         Likewise.
5879         * linespec.c (find_superclass_methods, search_minsyms_for_name):
5880         Likewise.
5881         * symfile.c (addr_info_make_relative): Likewise.
5882         * thread.c (value_in_thread_stack_temporaries): Likewise.
5883
5884 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
5885
5886         PR gdb/16841
5887         * valops.c (value_struct_elt_for_reference): Call check_typedef on
5888         aggregate type to get its real type before accessing it.
5889
5890 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
5891
5892         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
5893         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
5894         * coff-pe-read.c (add_pe_forwarded_sym): Replace
5895         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
5896         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
5897         * jit.c (jit_breakpoint_re_set_internal): Likewise.
5898         * printcmd.c (info_address_command): Likewise.
5899
5900 2018-05-29  Tom Tromey  <tom@tromey.com>
5901
5902         * windows-nat.c (handle_exception): Update fall-through comment.
5903
5904 2018-05-29  Tom Tromey  <tom@tromey.com>
5905
5906         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
5907         (struct program_space) <added_solibs>: Now a std::vector.
5908         * breakpoint.c (print_solib_event): Update.
5909         (check_status_catch_solib): Update.
5910         * progspace.c (clear_program_space_solib_cache): Update.
5911         * solib.c (update_solib_list): Update.
5912
5913 2018-05-29  Tom Tromey  <tom@tromey.com>
5914
5915         * python/py-type.c (typy_richcompare): Update.
5916         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
5917         * gdbtypes.h (types_deeply_equal): Return bool.
5918         (types_equal): Likewise.
5919         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
5920         declare VEC.
5921         (check_types_equal): Change worklist to std::vector.  Return
5922         bool.
5923         (struct type_equality_entry): Add constructor.
5924         (compare_maybe_null_strings): Return bool.
5925         (check_types_worklist): Return bool.  Change worklist to
5926         std::vector.
5927         (types_deeply_equal): Use std::vector.
5928         (types_equal): Return bool.
5929         (compare_maybe_null_strings): Simplify.
5930
5931 2018-05-29  Tom Tromey  <tom@tromey.com>
5932
5933         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
5934
5935 2018-05-29  Tom Tromey  <tom@tromey.com>
5936
5937         * objc-lang.h: Don't include cp-support.h.
5938         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
5939         declare VEC.
5940
5941 2018-05-27  Tom Tromey  <tom@tromey.com>
5942
5943         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
5944
5945 2018-05-25  Tom Tromey  <tom@tromey.com>
5946
5947         * value.c (value::location): Initialize.
5948
5949 2018-05-25  Tom Tromey  <tom@tromey.com>
5950
5951         * dbxread.c (init_bincl_list): Remove.
5952         (bincl_list): Now a std::vector.
5953         (bincls_allocated, next_bincl): Remove.
5954         (free_bincl_list, do_free_bincl_list_cleanup)
5955         (make_cleanup_free_bincl_list): Remove.
5956         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
5957         unique_xmalloc_ptr.
5958         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
5959         (struct header_file_location): Add constructor.
5960         (add_bincl_to_list): Remove.
5961
5962 2018-05-25  Tom Tromey  <tom@tromey.com>
5963
5964         * tui/tui.c (tui_enable): Update.
5965         * mi/mi-interp.c (mi_interp::init): Update.
5966         * interps.h (class interp) <name>: New method.
5967         <m_name>: Rename from name.
5968         (~scoped_restore_interp): Update.
5969         * interps.c (interp::interp): Update.
5970         (interp_add, interp_set, interp_lookup_existing)
5971         (current_interp_named_p): Update.
5972
5973 2018-05-25  Tom Tromey  <tom@tromey.com>
5974
5975         * interps.c (interp_name): Remove.
5976         * mi/mi-interp.c (mi_interp::init): Update.
5977         * interps.h (interp_name): Remove.
5978         (~scoped_restore_interp): Update.
5979         * tui/tui.c (tui_enable): Update.
5980
5981 2018-05-25  Tom Tromey  <tom@tromey.com>
5982
5983         * utils.c (fputs_maybe_filtered): Update.
5984         * linespec.c (decode_line_full): Update.
5985         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
5986         (mi_print_breakpoint_for_event, mi_solib_loaded)
5987         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
5988         (mi_user_selected_context_changed): Update.
5989         * mi/mi-main.c (mi_execute_command): Update.
5990         * cli/cli-script.c (execute_control_command): Update.
5991         * python/python.c (execute_gdb_command): Update.
5992         * solib.c (info_sharedlibrary_command): Update.
5993         * interps.c (interp_ui_out): Remove.
5994         * interps.h (interp_ui_out): Remove.
5995
5996 2018-05-25  Tom Tromey  <tom@tromey.com>
5997
5998         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
5999         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
6000         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
6001
6002 2018-05-25  Tom Tromey  <tom@tromey.com>
6003
6004         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
6005         * interps.c (interp_exec): Use scoped_restore.
6006
6007 2018-05-25  Tom Tromey  <tom@tromey.com>
6008
6009         * remote.c (remote_target::remote_file_get): Use
6010         gdb::byte_vector.
6011         (remote_target::remote_file_put): Likewise.
6012
6013 2018-05-25  Tom Tromey  <tom@tromey.com>
6014
6015         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
6016         a std::string.
6017         (get_pe_section_index, add_pe_exported_sym): Update.
6018         (read_pe_exported_syms): Use gdb::def_vector.
6019
6020 2018-05-25  Tom Tromey  <tom@tromey.com>
6021
6022         * frame.c (remove_prev_frame): Remove.
6023         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
6024
6025 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
6026
6027         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
6028         Remove prototypes.
6029         * mips-linux-nat.c (supply_fpregset): Always call
6030         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
6031         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
6032         `mips_fill_fpregset'.
6033         * mips-linux-tdep.c (mips_supply_fpregset)
6034         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
6035         (mips_fill_fpregset_wrapper): Remove functions.
6036         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
6037         (mips_linux_fpregset): Remove variable.
6038         (mips_linux_iterate_over_regset_sections): Use
6039         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
6040         (mips_linux_o32_sigframe_init): Remove comment.
6041
6042 2018-05-25  Pedro Alves  <palves@redhat.com>
6043
6044         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
6045         (struct readahead_cache, struct packet_reg, struct
6046         remote_arch_state, class remote_state): Move higher up in the
6047         file.
6048         (remote_target::m_remote_state): Now an object instead of a pointer.
6049         (remote_target::get_remote_state): Adjust.
6050
6051 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
6052
6053         * stack.c (select_and_print_frame): Delete.
6054         (struct function_bounds): Move struct within function.
6055         (func_command): Most content moved into new function
6056         find_frame_for_function, use new function, print result, add
6057         function comment.
6058         (find_frame_for_function): New function, now returns a result.
6059
6060 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6061
6062         * stack.c (iterate_over_block_arg_vars): Fix comment.
6063         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
6064
6065 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
6066
6067         PR gdb/23203
6068         * frame.c
6069         (scoped_restore_selected_frame::scoped_restore_selected_frame):
6070         Define.
6071         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
6072         Define.
6073         * frame.h (class scoped_restore_selected_frame): New class.
6074         * stack.c (print_frame_local_vars): Remove catching and rethrowing
6075         of any exception, use scoped_restore_selected_frame to restore the
6076         frame instead.
6077
6078 2018-05-24  Pedro Alves  <palves@redhat.com>
6079
6080         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
6081         override.
6082
6083 2018-05-23  Tom Tromey  <tom@tromey.com>
6084
6085         * complaints.c (struct complaints): Remove.
6086         (symfile_complaint_book): Remove.
6087         (series): New global.
6088         (complaint_internal): Update.
6089         (clear_complaints): Update.
6090
6091 2018-05-23  Tom Tromey  <tom@tromey.com>
6092
6093         * complaints.c (counters): New global.
6094         (struct complain): Remove.
6095         (struct complaints) <root>: Remove.
6096         (complaint_sentinel): Remove.
6097         (symfile_complaint_book): Update.
6098         (find_complaint) Remove.
6099         (complaint_internal, clear_complaints): Update.
6100
6101 2018-05-23  Tom Tromey  <tom@tromey.com>
6102
6103         * complaints.c (struct complain) <file, line>: Remove.
6104         (find_complaint): Remove file, line parameters.
6105         (complaint_internal): Update.
6106
6107 2018-05-23  Tom Tromey  <tom@tromey.com>
6108
6109         * complaints.c (vcomplaint): Remove.
6110         (complaint_internal) Merge in contents of vcomplaint.
6111
6112 2018-05-23  Tom Tromey  <tom@tromey.com>
6113
6114         * complaints.c (struct complaints) <explanation>: Remove.
6115         (symfile_explanations): Remove.
6116         (symfile_complaint_book): Update.
6117         (vcomplaint): Update.
6118         (struct explanation): Remove.
6119
6120 2018-05-23  Tom Tromey  <tom@tromey.com>
6121
6122         * complaints.c (symfile_complaints): Remove.
6123         (complaint_internal): Remove "complaints" parameter.
6124         (clear_complaints, vcomplaint): Remove "c" parameter.
6125         (get_complaints): Remove.
6126         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
6127         (dwarf2_debug_line_missing_file_complaint)
6128         (dwarf2_debug_line_missing_end_sequence_complaint)
6129         (dwarf2_complex_location_expr_complaint)
6130         (dwarf2_const_value_length_mismatch_complaint)
6131         (dwarf2_section_buffer_overflow_complaint)
6132         (dwarf2_macro_malformed_definition_complaint)
6133         (dwarf2_invalid_attrib_class_complaint)
6134         (create_addrmap_from_index, dw2_symtab_iter_next)
6135         (dw2_expand_marked_cus)
6136         (dw2_debug_names_iterator::find_vec_in_debug_names)
6137         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
6138         (create_debug_type_hash_table, init_cutu_and_read_dies)
6139         (partial_die_parent_scope, add_partial_enumeration)
6140         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
6141         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
6142         (read_import_statement, read_file_scope, create_dwo_cu_reader)
6143         (create_cus_hash_table, create_dwp_hash_table)
6144         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
6145         (dwarf2_rnglists_process, dwarf2_ranges_process)
6146         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
6147         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
6148         (handle_struct_member_die, process_structure_scope)
6149         (read_array_type, read_common_block, read_module_type)
6150         (read_tag_pointer_type, read_typedef, read_base_type)
6151         (read_subrange_type, load_partial_dies, partial_die_info::read)
6152         (partial_die_info::read, partial_die_info::read)
6153         (partial_die_info::read, read_checked_initial_length_and_offset)
6154         (dwarf2_string_attr, read_formatted_entries)
6155         (dwarf_decode_line_header)
6156         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
6157         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
6158         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
6159         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6160         (get_signatured_type, get_DW_AT_signature_type)
6161         (decode_locdesc, file_file_name, consume_improper_spaces)
6162         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
6163         (dwarf_decode_macro_bytes, dwarf_decode_macros)
6164         (dwarf2_symbol_mark_computed, set_die_type)
6165         (read_attribute_value): Update.
6166         * stap-probe.c (handle_stap_probe, get_stap_base_address):
6167         Update.
6168         * dbxread.c (unknown_symtype_complaint)
6169         (lbrac_mismatch_complaint, repeated_header_complaint)
6170         (set_namestring, function_outside_compilation_unit_complaint)
6171         (read_dbx_symtab, process_one_symbol): Update.
6172         * gdbtypes.c (stub_noname_complaint): Update.
6173         * windows-nat.c (handle_unload_dll): Update.
6174         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
6175         (decode_base_type): Update.
6176         * xcoffread.c (bf_notfound_complaint, ef_complaint)
6177         (eb_complaint, record_include_begin, record_include_end)
6178         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
6179         (process_xcoff_symbol, read_symbol)
6180         (function_outside_compilation_unit_complaint)
6181         (scan_xcoff_symtab): Update.
6182         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
6183         * buildsym.c (finish_block_internal, make_blockvector)
6184         (end_symtab_get_static_block, augment_type_symtab): Update.
6185         * dtrace-probe.c (dtrace_process_dof)
6186         (dtrace_static_probe_ops::get_probes): Update.
6187         * complaints.h (struct complaint): Don't declare.
6188         (symfile_complaints): Remove.
6189         (complaint_internal): Remove "complaints" parameter.
6190         (complaint): Likewise.
6191         (clear_complaints): Likewise.
6192         * symfile.c (syms_from_objfile_1, finish_new_objfile)
6193         (reread_symbols): Update.
6194         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
6195         (dwarf2_frame_cache, decode_frame_entry): Update.
6196         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
6197         * objc-lang.c (lookup_objc_class, lookup_child_selector)
6198         (info_selectors_command): Update.
6199         * macrotab.c (macro_include, check_for_redefinition)
6200         (macro_undef): Update.
6201         * objfiles.c (filter_overlapping_sections): Update.
6202         * stabsread.c (invalid_cpp_abbrev_complaint)
6203         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
6204         (define_symbol, error_type, read_type, rs6000_builtin_type)
6205         (stabs_method_name_from_physname, read_member_functions)
6206         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
6207         (attach_fields_to_type, complain_about_struct_wipeout)
6208         (read_range_type, read_args, common_block_start)
6209         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
6210         Update.
6211         * mdebugread.c (index_complaint, unknown_ext_complaint)
6212         (basic_type_complaint, bad_tag_guess_complaint)
6213         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
6214         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
6215         (parse_procedure, parse_lines)
6216         (function_outside_compilation_unit_complaint)
6217         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
6218         (bad_tag_guess_complaint, reg_value_complaint): Update.
6219         * cp-support.c (demangled_name_complaint): Update.
6220         * macroscope.c (sal_macro_scope): Update.
6221         * dwarf-index-write.c (class debug_names): Update.
6222
6223 2018-05-23  Tom Tromey  <tom@tromey.com>
6224
6225         * complaints.c (clear_complaints): Remove "noisy" parameter.
6226         * complaints.h (clear_complaints): Update.
6227         * symfile.c (syms_from_objfile_1, finish_new_objfile)
6228         (reread_symbols): Update.
6229
6230 2018-05-23  Tom Tromey  <tom@tromey.com>
6231
6232         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
6233         SUBSEQUENT_MESSAGE.
6234         (vcomplaint, clear_complaints): Update.
6235         (symfile_explanations): Remove some messages.
6236
6237 2018-05-23  Tom Tromey  <tom@tromey.com>
6238
6239         * complaints.c (internal_complaint): Remove.
6240         * complaints.h (internal_complaint): Remove.
6241
6242 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
6243
6244         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
6245
6246 2018-05-22  Pedro Alves  <palves@redhat.com>
6247
6248         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
6249         (remote_fileio_badfd, remote_fileio_return_errno)
6250         (remote_fileio_return_success, remote_fileio_func_open)
6251         (remote_fileio_func_open, remote_fileio_func_close)
6252         (remote_fileio_func_read, remote_fileio_func_write)
6253         (remote_fileio_func_lseek, remote_fileio_func_rename)
6254         (remote_fileio_func_unlink, remote_fileio_func_stat)
6255         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
6256         (remote_fileio_func_isatty, remote_fileio_func_system): Add
6257         remote_target parameter.
6258         (remote_fio_func_map) <func>: Add remote_target parameter.
6259         (do_remote_fileio_request, remote_fileio_request):
6260         * remote-fileio.h (remote_fileio_request):
6261         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
6262         remote_target parameter.
6263         (remote_notif_process, handle_notification): Adjust to pass down
6264         the remote.
6265         (remote_notif_state_allocate): Add remote_target parameter.  Save
6266         it.
6267         * remote-notif.h (struct remote_target): Forward declare.
6268         (struct notif_client) <parse, ack, can_get_pending_events>: Add
6269         remote_target parameter.
6270         (struct remote_notif_state) <remote>: New field.
6271         (remote_notif_ack, remote_notif_parse): Add remote_target
6272         parameter.
6273         (remote_notif_state_allocate, remote_notif_state_allocate): Add
6274         remote_target parameter.
6275         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
6276         (threads_listing_context, rmt_thread_action, protocol_feature)
6277         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
6278         (packet_result, struct threads_listing_context, remote_state):
6279         Move definitions and declarations higher up.
6280         (remote_target) <~remote_target>: Declare.
6281         (remote_download_command_source, remote_file_put, remote_file_get)
6282         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
6283         (remote_hostio_pread_vFile, remote_hostio_send_command)
6284         (remote_hostio_set_filesystem, remote_hostio_open)
6285         (remote_hostio_close, remote_hostio_unlink, remote_state)
6286         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
6287         (get_memory_write_packet_size, get_memory_read_packet_size)
6288         (append_pending_thread_resumptions, remote_detach_1)
6289         (append_resumption, remote_resume_with_vcont)
6290         (add_current_inferior_and_thread, wait_ns, wait_as)
6291         (process_stop_reply, remote_notice_new_inferior)
6292         (process_initial_stop_replies, remote_add_thread)
6293         (btrace_sync_conf, remote_btrace_maybe_reopen)
6294         (remove_new_fork_children, kill_new_fork_children)
6295         (discard_pending_stop_replies, stop_reply_queue_length)
6296         (check_pending_events_prevent_wildcard_vcont)
6297         (discard_pending_stop_replies_in_queue, stop_reply)
6298         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
6299         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
6300         (remote_interrupt_as, remote_interrupt_ns)
6301         (remote_get_noisy_reply, remote_query_attached)
6302         (remote_add_inferior, remote_current_thread, get_current_thread)
6303         (set_thread, set_general_thread, set_continue_thread)
6304         (set_general_process, write_ptid)
6305         (remote_unpack_thread_info_response, remote_get_threadinfo)
6306         (parse_threadlist_response, remote_get_threadlist)
6307         (remote_threadlist_iterator, remote_get_threads_with_ql)
6308         (remote_get_threads_with_qxfer)
6309         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
6310         (get_offsets, remote_check_symbols, remote_supported_packet)
6311         (remote_query_supported, remote_packet_size)
6312         (remote_serial_quit_handler, remote_detach_pid)
6313         (remote_vcont_probe, remote_resume_with_hc)
6314         (send_interrupt_sequence, interrupt_query)
6315         (remote_notif_get_pending_events, fetch_register_using_p)
6316         (send_g_packet, process_g_packet, fetch_registers_using_g)
6317         (store_register_using_P, store_registers_using_G)
6318         (set_remote_traceframe, check_binary_download)
6319         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
6320         (remote_xfer_live_readonly_partial, remote_read_bytes)
6321         (remote_send_printf, remote_flash_write, readchar)
6322         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
6323         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
6324         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
6325         (extended_remote_disable_randomization, extended_remote_run)
6326         (send_environment_packet, extended_remote_environment_support)
6327         (extended_remote_set_inferior_cwd, remote_write_qxfer)
6328         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
6329         (packet_command): Now methods of ...
6330         (remote_target): ... this class.
6331         (m_remote_state) <remote_target>: New field.
6332         (struct remote_state) <stop_reply_queue,
6333         remote_async_inferior_event_token, wait_forever_enabled_p>: New
6334         fields.
6335         (remote_state::remote_state): Allocate stop_reply_queue.
6336         (remote_state): Delete global.
6337         (get_remote_state_raw): Delete.
6338         (remote_target::get_remote_state): Allocate m_remote_state on
6339         demand.
6340         (get_current_remote_target): New.
6341         (remote_ops, extended_remote_ops): Delete.
6342         (wait_forever_enabled_p, remote_async_inferior_event_token):
6343         Delete, moved to struct remote_state.
6344         (remote_target::close): Delete self.  Destruction bits split to
6345         ...
6346         (remote_target::~remote_target): ... this.
6347         (show_memory_packet_size): Adjust to use
6348         get_current_remote_target.
6349         (struct protocol_feature) <func>: Add remote_target parameter.
6350         All callers adjusted.
6351         (curr_quit_handler_target): New.
6352         (remote_serial_quit_handler): Reimplement.
6353         (remote_target::open_1): Adjust to use get_current_remote_target.
6354         Heap-allocate remote_target/extended_remote_target instances.
6355         (vcont_builder::vcont_builder): Add remote_target parameter, and
6356         save it in m_remote.  All callers adjusted.
6357         (vcont_builder::m_remote): New field.
6358         (vcont_builder::restart, vcont_builder::flush)
6359         (vcont_builder::push_action): Use it.
6360         (remote_target::commit_resume): Use it.
6361         (struct queue_iter_param) <remote>: New field.
6362         (remote_target::remove_new_fork_children): Fill in 'remote' field.
6363         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
6364         (check_pending_event_prevents_wildcard_vcont_callback)
6365         (remote_target::check_pending_events_prevent_wildcard_vcont)
6366         (remote_target::discard_pending_stop_replies)
6367         (remote_target::discard_pending_stop_replies_in_queue)
6368         (remote_target::remote_notif_remove_queued_reply): Fill in
6369         'remote' field.
6370         (remote_notif_get_pending_events): New.
6371         (remote_target::readchar, remote_target::remote_serial_write):
6372         Save/restore curr_quit_handler_target.
6373         (putpkt): New.
6374         (kill_new_fork_children): Fill in 'remote' field.
6375         (packet_command): Use get_current_remote_target, defer to
6376         remote_target method of same name.
6377         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
6378         parameter, and save it in m_remote.  All callers adjusted.
6379         (scoped_remote_fd::release): Use m_remote.
6380         (scoped_remote_fd::m_remote): New field.
6381         (remote_file_put, remote_file_get, remote_file_delete): Use
6382         get_current_remote_target, defer to remote_target method of same
6383         name.
6384         (remote_btrace_reset): Add remote_state paremeter.  Update all
6385         callers.
6386         (remote_async_inferior_event_handler). Pass down 'data'.
6387         (remote_new_objfile): Use get_current_remote_target.
6388         (remote_target::vcont_r_supported): New.
6389         (set_range_stepping): Use get_current_remote_target and
6390         remote_target::vcont_r_supported.
6391         (_initialize_remote): Don't allocate 'remote_state' and
6392         'stop_reply_queue' globals.
6393         * remote.h (struct remote_target): Forward declare.
6394         (getpkt, putpkt, remote_notif_get_pending_events): Add
6395         'remote_target' parameter.
6396
6397 2018-05-22  Pedro Alves  <palves@redhat.com>
6398
6399         * remote.c (vcont_builder): Now a class.  Make all data members
6400         private.
6401         (vcont_builder) <vcont_builder, restart, flush, push_action>:
6402         Declare methods.
6403         (vcont_builder_restart): Rename to ...
6404         (vcont_builder::restart): ... this.
6405         (vcont_builder_flush): Rename to ...
6406         (vcont_builder::flush): ... this.
6407         (vcont_builder_push_action): Rename to ...
6408         (vcont_builder::push_action): ... this.
6409         (remote_target::commit_resume): Adjust.
6410
6411 2018-05-22  Pedro Alves  <palves@redhat.com>
6412
6413         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
6414         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
6415         (get_fixed_memory_packet_size): New.
6416         (get_memory_packet_size): Use it.
6417         (set_memory_packet_size): Don't override the config size with
6418         DEFAULT_MAX_MEMORY_PACKET_SIZE.
6419         (show_memory_packet_size): Use get_fixed_memory_packet_size.
6420         Don't refer to get_memory_packet_size if not connected to a remote
6421         target.  Show "(default)" if configured size is 0.
6422
6423 2018-05-22  Pedro Alves  <palves@redhat.com>
6424
6425         * remote.c (remote_target::mourn_inferior): Move
6426         discard_pending_stop_replies call here from ...
6427         (_initialize_remote): ... here.
6428
6429 2018-05-22  Pedro Alves  <palves@redhat.com>
6430
6431         * remote.c (compare_section_command): Remove set_general_process
6432         call.
6433
6434 2018-05-22  Pedro Alves  <palves@redhat.com>
6435
6436         * remote.c (struct packet_reg, struct remote_arch_state):
6437         Move higher up in the file.
6438         (remote_state) <m_arch_states>: Store remote_arch_state values
6439         instead of remote_arch_state pointers.
6440         (remote_state::get_remote_arch_state): Adjust.
6441
6442 2018-05-22  Pedro Alves  <palves@redhat.com>
6443
6444         * remote.c: Include <unordered_map>.
6445         (remote_state): Now a class.
6446         (remote_state) <get_remote_arch_state>: Declare method.
6447         <get_remote_arch_state>: New field.
6448         (remote_arch_state) <remote_arch_state>: Declare ctor.
6449         <regs>: Now a unique_ptr.
6450         (remote_gdbarch_data_handle): Delete.
6451         (get_remote_arch_state): Delete.
6452         (remote_state::get_remote_arch_state): New.
6453         (get_remote_state): Adjust to call remote_state's
6454         get_remote_arch_state method.
6455         (init_remote_state): Delete, bits factored out to ...
6456         (remote_arch_state::remote_arch_state): ... this new method.
6457         (get_remote_packet_size, get_memory_packet_size)
6458         (process_g_packet, remote_target::fetch_registers)
6459         (remote_target::prepare_to_store, store_registers_using_G)
6460         (remote_target::store_registers, remote_target::get_trace_status):
6461         Adjust to call remote_state's method.
6462         (_initialize_remote): Remove reference to
6463         remote_gdbarch_data_handle.
6464
6465 2018-05-22  Pedro Alves  <palves@redhat.com>
6466
6467         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
6468         pread>: New method declarations.
6469         (remote_target::open_1): Adjust.
6470         (readahead_cache_invalidate): Rename to ...
6471         (readahead_cache::invalidate): ... this, and adjust to be a class
6472         method.
6473         (readahead_cache_invalidate_fd): Rename to ...
6474         (readahead_cache::invalidate_fd): ... this, and adjust to be a
6475         class method.
6476         (remote_hostio_pwrite): Adjust.
6477         (remote_hostio_pread_from_cache): Rename to ...
6478         (readahead_cache::pread): ... this, and adjust to be a class
6479         method.
6480         (remote_hostio_close): Adjust.
6481
6482 2018-05-22  Pedro Alves  <palves@redhat.com>
6483
6484         * remote.c (remote_hostio_close_cleanup): Delete.
6485         (class scoped_remote_fd): New.
6486         (remote_file_put, remote_file_get): Use it.
6487
6488 2018-05-22  Pedro Alves  <palves@redhat.com>
6489
6490         (struct vCont_action_support): Use bool and initialize all fields.
6491         (struct readahead_cache): Initialize all fields.
6492         (remote_state): Use bool and initialize all fields.
6493         (remote_state::remote_state, remote_state::~remote_state): New.
6494         (new_remote_state): Delete.
6495         (_initialize_remote): Use new to allocate remote_state.
6496
6497 2018-05-22  Pedro Alves  <palves@redhat.com>
6498             張俊芝  <zjz@zjz.name>
6499
6500         PR gdb/22973
6501         * c-exp.y: Include "c-support.h".
6502         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
6503         of tolower.  Use c_ident_is_alpha to scan names.
6504         * c-lang.c: Include "c-support.h".
6505         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
6506         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
6507         * c-support.h: New file, with bits factored out from ...
6508         * cp-name-parser.y: ... this file.
6509         Include "c-support.h".
6510         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
6511         c-support.h and renamed.
6512         (symbol_end, yylex): Adjust.
6513
6514 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6515
6516         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
6517         parameter type to CORE_ADDR.
6518         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
6519         parameter type in declaration to CORE_ADDR.
6520         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
6521         target_auxv_search to get AT_HWCAP and use the result to get the
6522         target description.
6523         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
6524         to CORE_ADDR. Remove the cast of the return value to unsigned
6525         long. Fix error predicate of target_auxv_search.
6526         (ppc_linux_nat_target::read_description): Change the type of the
6527         hwcap variable to CORE_ADDR.
6528
6529 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6530
6531         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
6532         if the size of fpscr is larger than 32 bits.
6533
6534 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6535
6536         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
6537         (ppc32_linux_vsxregmap): New global.
6538         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
6539         regcache_supply_regset, and regcache_collect_regset.
6540         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
6541         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
6542         (fetch_vsx_register, store_vsx_register): Remove.
6543         (fetch_vsx_registers): Add regno parameter. Get regset using
6544         ppc_linux_vsxregset. Use regset to supply registers.
6545         (store_vsx_registers): Add regno parameter. Get regset using
6546         ppc_linux_vsxregset. Use regset to collect registers.
6547         (fetch_register): Call fetch_vsx_registers instead of
6548         fetch_vsx_register.
6549         (store_register): Call store_vsx_registers instead of
6550         store_vsx_register.
6551         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
6552         new regno parameter.
6553         (store_ppc_registers): Call store_vsx_registers with -1 for the
6554         new regno parameter.
6555         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
6556         (ppc_collect_vsxregset): Remove.
6557
6558 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6559
6560         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
6561         offset fields.
6562         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
6563         for vector register offset fields.
6564         (ppc64_fbsd_reg_offsets): Likewise.
6565         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
6566         to vector register offset fields.
6567         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
6568         to vector register offset fields.
6569         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
6570         vector register offset fields.
6571         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
6572         initializers for vector register offset fields.
6573         (rs6000_aix64_reg_offsets): Likewise.
6574         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
6575         (ppc_supply_vrregset): Remove.
6576         (ppc_collect_vrregset): Remove.
6577         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
6578         (ppc_linux_vrregset) : New function.
6579         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
6580         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
6581         (ppc32_linux_vrregset): Remove.
6582         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
6583         and use result instead of ppc32_linux_vrregset.
6584         (ppc32_linux_reg_offsets): Remove initializers for vector register
6585         offset fields.
6586         (ppc64_linux_reg_offsets): Likewise.
6587         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
6588         * ppc-linux-nat.c: Include regset.h.
6589         (gdb_vrregset_t): Adjust comment to account for little-endian
6590         mode.
6591         (supply_vrregset, fill_vrregset): Remove.
6592         (fetch_altivec_register, store_altivec_register): Remove.
6593         (fetch_altivec_registers): Add regno parameter. Get regset using
6594         ppc_linux_vrregset. Use regset to supply registers.
6595         (store_altivec_registers): Add regno parameter. Get regset using
6596         ppc_linux_vrregset. Use regset to collect registers.
6597         (fetch_register): Call fetch_altivec_registers instead of
6598         fetch_altivec_register.
6599         (store_register): Call store_altivec_registers instead of
6600         store_altivec_register.
6601         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
6602         the new regno parameter.
6603         (store_ppc_registers): Call store_altivec_registers with -1 for
6604         the new regno parameter.
6605
6606 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6607
6608         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
6609         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
6610         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
6611         (gdb_vrregset_t): Change array type size to
6612         PPC_LINUX_SIZEOF_VRREGSET.
6613         (gdb_vsxregset_t): Change array type size to
6614         PPC_LINUX_SIZEOF_VSXREGSET.
6615         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
6616         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
6617         PPC_LINUX_SIZEOF_VSXREGSET.
6618
6619 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6620
6621         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
6622         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
6623         nat/ppc-linux.c.
6624         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
6625         ppc_linux_target_wordsize with tid.
6626         (ppc_linux_nat_target::read_description): Call ppc_linux_target
6627         wordsize with tid.
6628         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
6629         (ppc64_64bit_inferior_p): Add static and inline specifiers.
6630         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
6631         tid parameter. Remove static specifier.
6632         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
6633         (ppc_linux_target_wordsize): New declaration.
6634
6635 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6636
6637         * arch/ppc-linux-common.c: New file.
6638         * arch/ppc-linux-common.h: New file.
6639         * arch/ppc-linux-tdesc.h: New file.
6640         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
6641         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
6642         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
6643         arch/ppc-linux-tdesc.h.
6644         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
6645         arch/ppc-linux-tdesc.h.
6646         (ppc_linux_nat_target::read_description): Remove target
6647         description matching code. Fill a ppc_linux_features struct and
6648         call ppc_linux_match_description with it. Move comment about ISA
6649         2.05 to ppc-linux-common.c.
6650         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
6651         arch/ppc-linux-tdesc.h.
6652         (ppc_linux_core_read_description): Remove target description
6653         matching code. Fill a ppc_linux_features struct and call
6654         ppc_linux_match_description with it.
6655         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
6656         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
6657         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
6658         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
6659         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
6660         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
6661         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
6662         (tdesc_powerpc_e500l): Remove.
6663
6664 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
6665
6666         * ada-lang.c (catch_assert_command): Pass empty string instead
6667         of NULL for excep_string argument.
6668
6669 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
6670
6671         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
6672         the width of the requested register exceeds the width of the
6673         `ptrace' data type.
6674
6675 2018-05-21  Tom Tromey  <tom@tromey.com>
6676
6677         * printcmd.c (output_command): Remove.
6678         (output_command_const): Rename to output_command.
6679         * valprint.h (output_command): Rename from output_command_const.
6680         * tracepoint.c (trace_dump_actions): Call output_command.
6681
6682 2018-05-21  Tom Tromey  <tom@tromey.com>
6683
6684         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
6685         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
6686         * ada-lang.h (create_ada_exception_catchpoint): Update.
6687         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
6688         std::string.
6689         (create_excep_cond_exprs, ~ada_catchpoint)
6690         (should_stop_exception, print_one_exception)
6691         (print_mention_exception, print_recreate_exception): Update.
6692         (ada_get_next_arg): Remove.
6693         (catch_ada_exception_command_split): Use std::string.  Change type
6694         of "excep_string", "cond_string".
6695         (catch_ada_exception_command): Update.
6696         (create_ada_exception_catchpoint): Change type of excep_string.
6697         (ada_exception_sal): Remove excep_string parameter.
6698         (~ada_catchpoint): Remove.
6699
6700 2018-05-21  Tom Tromey  <tom@tromey.com>
6701
6702         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
6703         cleanup.
6704
6705 2018-05-21  Tom Tromey  <tom@tromey.com>
6706
6707         * ada-lang.c (ada_exception_message_1, ada_exception_message):
6708         Return unique_xmalloc_ptr.
6709         (print_it_exception): Update.
6710
6711 2018-05-21  Tom Tromey  <tom@tromey.com>
6712
6713         * tracepoint.c (trace_dump_actions): Use std::string.
6714
6715 2018-05-21  Tom Tromey  <tom@tromey.com>
6716
6717         * symfile.c (reread_symbols): Use std::string for original_name.
6718
6719 2018-05-21  Tom Tromey  <tom@tromey.com>
6720
6721         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
6722         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
6723         constructor.
6724
6725 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
6726
6727         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
6728         instance to...
6729         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
6730         * objfiles.c (get_objfile_bfd_data): Allocate
6731         objfile_per_bfd_storage with obstack_new when allocating on
6732         obstack.
6733
6734 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
6735
6736         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
6737         OBSTACK_ZALLOC.
6738         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
6739         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
6740         * mdebugread.c (mdebug_build_psymtabs): Likewise.
6741         (add_pending): Likewise.
6742         (parse_symbol): Likewise.
6743         (parse_partial_symbols): Likewise.
6744         (psymtab_to_symtab_1): Likewise.
6745         (new_psymtab): Likewise.
6746         (elfmdebug_build_psymtabs): Likewise.
6747         * minsyms.c (terminate_minimal_symbol_table): Likewise.
6748         * objfiles.c (get_objfile_bfd_data): Likewise.
6749         (objfile_register_static_link): Likewise.
6750         * psymtab.c (allocate_psymtab): Likewise.
6751         * stabsread.c (read_member_functions): Likewise.
6752         * xcoffread.c (xcoff_end_psymtab): Likewise.
6753
6754 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
6755
6756         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
6757         compiler supports std::is_trivially_constructible.
6758         * common/poison.h: Include obstack.h.
6759         (IsMallocable): Define to is_trivially_constructible if the
6760         compiler supports it, define to true_type otherwise.
6761         (xobnew): New.
6762         (XOBNEW): Redefine.
6763         (xobnewvec): New.
6764         (XOBNEWVEC): Redefine.
6765         * gdb_obstack.h (obstack_zalloc): New.
6766         (OBSTACK_ZALLOC): Redefine.
6767         (obstack_calloc): New.
6768         (OBSTACK_CALLOC): Redefine.
6769         (obstack_new): New.
6770         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
6771         (gdbarch_obstack): New declaration in gdbarch.h, definition in
6772         gdbarch.c.
6773         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
6774         obstack_calloc/obstack_zalloc.
6775         (gdbarch_obstack_zalloc): Remove.
6776         * target-descriptions.c (tdesc_data_init): Use obstack_new.
6777
6778 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6779
6780         * stack.c (backtrace_command_1): Remove useless variable int i.
6781
6782 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6783
6784         * stack.c (print_frame_info): Fix comment.
6785
6786 2018-05-18  Tom Tromey  <tom@tromey.com>
6787
6788         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
6789         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
6790         (~dwarf2_per_objfile): Update
6791         (dwarf2_get_dwz_file): Use new.
6792         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
6793         unique_ptr.
6794
6795 2018-05-18  Tom Tromey  <tom@tromey.com>
6796
6797         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
6798         unique_ptr.
6799         * dwarf2read.c (struct dwp_file): Add constructor and
6800         initializers.
6801         (open_and_init_dwp_file): Return a unique_ptr.
6802         (dwarf2_per_objfile, create_dwp_hash_table)
6803         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
6804         (lookup_dwo_unit_in_dwp): Update.
6805         (open_and_init_dwp_file, get_dwp_file): Update.
6806
6807 2018-05-18  Tom Tromey  <tom@tromey.com>
6808
6809         * dwarf2read.c (dwarf2_per_objfile): Update.
6810         (struct mapped_index): Add initializers.
6811         (dwarf2_read_index): Use new.
6812         (dw2_symtab_iter_init): Update.
6813         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
6814         unique_ptr.
6815
6816 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
6817
6818         * dwarf2read.c (mapped_index) <total_size>: Remove.
6819
6820 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
6821
6822         * unittests/format_pieces-selftests.c (test_format_specifier):
6823         Add ARI comments.
6824
6825 2018-05-18  Tom Tromey  <tom@tromey.com>
6826
6827         * c-typeprint.c (maybe_print_hole): New function.
6828         (c_print_type_struct_field_offset): Update.
6829         (c_type_print_base_struct_union): Call maybe_print_hole.
6830
6831 2018-05-17  Keith Seitz  <keiths@redhat.com>
6832
6833         * breakpoint.c (build_bpstat_chain): New function, moved from
6834         bpstat_stop_status.
6835         (bpstat_stop_status): Add optional parameter, `stop_chain'.
6836         If no stop chain is passed, call build_bpstat_chain to build it.
6837         * breakpoint.h (build_bpstat_chain): Declare.
6838         (bpstat_stop_status): Move documentation here from breakpoint.c.
6839         * infrun.c (handle_signal_stop): Before eliding inlined frames,
6840         build the stop chain and pass it to skip_inline_frames.
6841         Pass this stop chain to bpstat_stop_status.
6842         * inline-frame.c: Include breakpoint.h.
6843         (stopped_by_user_bp_inline_frame): New function.
6844         (skip_inline_frames): Add parameter `stop_chain'.
6845         Move documention to inline-frame.h.
6846         If non-NULL, use stopped_by_user_bp_inline_frame to determine
6847         whether the frame should be elided.
6848         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
6849         Add moved documentation and update for new parameter.
6850
6851 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
6852
6853         PR cli/14975
6854         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6855         unittests/format_pieces-selftests.c.
6856         * common/format.h (format_piece) <operator==>: New.
6857         (format_pieces) <operator[]>: Remove.
6858         * common/format.c (format_pieces::format_pieces): Handle \e.
6859         * unittests/format_pieces-selftests.c: New.
6860
6861 2018-05-17  Tom Tromey  <tom@tromey.com>
6862
6863         PR symtab/23010:
6864         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
6865         (dw2_instantiate_symtab): Add skip_partial parameter.
6866         (dw2_find_last_source_symtab, dw2_map_expand_apply)
6867         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
6868         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
6869         (dw2_expand_symtabs_matching_one)
6870         (dw2_find_pc_sect_compunit_symtab)
6871         (dw2_debug_names_lookup_symbol)
6872         (dw2_debug_names_expand_symtabs_for_function): Update.
6873         (init_cutu_and_read_dies): Add skip_partial parameter.
6874         (process_psymtab_comp_unit, build_type_psymtabs_1)
6875         (process_skeletonless_type_unit, load_partial_comp_unit)
6876         (psymtab_to_symtab_1): Update.
6877         (load_full_comp_unit): Add skip_partial parameter.
6878         (process_imported_unit_die, dwarf2_read_addr_index)
6879         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
6880         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
6881         (read_signatured_type): Update.
6882
6883 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
6884
6885         * value.c (release_value): Remove unused variable.
6886         (record_latest_value): Likewise.
6887         (access_value_history): Likewise.
6888         (preserve_values): Likewise.
6889
6890 2018-05-17  Tom Tromey  <tom@tromey.com>
6891
6892         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
6893         Initialize.
6894
6895 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
6896
6897         PR gdb/22286
6898         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
6899         Also handle registers whose width is not a multiple of
6900         PTRACE_TYPE_RET.
6901         (linux_nat_trad_target::store_register): Likewise.
6902
6903 2018-05-16  Tom Tromey  <tom@tromey.com>
6904
6905         * gdbcore.h (core_bfd): Redefine.
6906         * corelow.c (core_target::close): Update.
6907         (core_target_open): Update.
6908         * progspace.h (struct program_space) <cbfd>: Now a
6909         gdb_bfd_ref_ptr.
6910
6911 2018-05-16  Tom Tromey  <tom@tromey.com>
6912
6913         PR cli/19551:
6914         * symfile-add-flags.h (enum symfile_add_flags)
6915         <SYMFILE_NOT_FILENAME>: New constant.
6916         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
6917         objfile name from BFD.
6918         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
6919         * minidebug.c (find_separate_debug_file_in_section): Put
6920         ".gnu_debugdata" into BFD's file name.
6921
6922 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
6923
6924         * regcache.c (regcache_read_ftype, regcache_write_ftype):
6925         Remove.
6926
6927 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
6928
6929         PR binutils/21446
6930         * aarch64-tdep.c (aarch64_analyze_prologue,
6931         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
6932         Indicate not interested in errors.
6933
6934 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
6935
6936         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
6937         Supply the MIPS_ZERO_REGNUM register.
6938
6939 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
6940
6941         * mips-tdep.c (mask_address_var): Make variable static.
6942
6943 2018-05-14  Tom Tromey  <tom@tromey.com>
6944
6945         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
6946
6947 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
6948
6949         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
6950         FXSAVE_ADDR for the mxcsr register.
6951
6952 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
6953
6954         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
6955
6956 2018-05-11  Pedro Alves  <palves@redhat.com>
6957
6958         * corelow.c (core_target) <core_target>: No longer inline.
6959         Initialize m_core_gdbarch, m_core_vec and build the section table
6960         here.
6961         <~core_target>: New.
6962         <core_gdbarch, get_core_register_section>: New methods.
6963         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
6964         factored out from ...
6965         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
6966         (core_ops): Delete.
6967         (sniff_core_bfd): Add gdbarch parameter.
6968         (core_close): Delete, merged into ...
6969         (core_target::close): ... here.  Delete self.
6970         (core_close_cleanup): Delete.
6971         (core_target_open): Allocate a core_target on the heap.  Use a
6972         unique_ptr instead of a cleanup.  Bits moved into the core_target
6973         ctor.  Adjust to use core_target methods instead of globals.
6974         (get_core_register_section): Rename to ...
6975         (core_target::get_core_register_section): ... this and adjust.
6976         (struct get_core_registers_cb_data): New.
6977         (get_core_registers_cb): Use it.  Use bool.
6978         (core_target::fetch_registers, core_target::files_info)
6979         (core_target::xfer_partial, core_target::read_description)
6980         (core_target::pid_to, core_target::thread_name): Adjust to
6981         reference class fields instead of globals.
6982         * target.h (struct target_ops_deleter, target_ops_up): New.
6983
6984 2018-05-11  Pedro Alves  <palves@redhat.com>
6985
6986         * corefile.c (core_file_command): Move to corelow.c.
6987         * corelow.c (the_core_target): Delete.
6988         (core_file_command): Moved from corefile.c.  Check exec_bfd
6989         instead of the_core_target.  Use target_detach instead of calling
6990         into the_core_target directly.
6991         (maybe_say_no_core_file_now): New.
6992         (core_target::detach): Use it.
6993         (_initialize_corelow): Remove references to the_core_target.
6994         * gdbcore.h (the_core_target): Delete.
6995
6996 2018-05-11  Tom Tromey  <tromey@redhat.com>
6997             Pedro Alves  <palves@redhat.com>
6998
6999         * corefile.c (core_bfd): Remove.
7000         * gdbcore.h (core_bfd): Now a macro.
7001         * progspace.h (struct program_space) <cbfd>: New field.
7002
7003 2018-05-11  Tom Tromey  <tom@tromey.com>
7004
7005         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
7006         gdb::def_vector.
7007
7008 2018-05-10  Tom Tromey  <tom@tromey.com>
7009
7010         * configure: Rebuild.
7011         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
7012
7013 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
7014
7015         PR server/23158:
7016         * regformats/regdat.sh: Adjust script, following the addition
7017         of the new expedite_regs parameter to init_target_desc.
7018
7019 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
7020     
7021         PR gdb/23127
7022         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
7023         set_gdbarch_significant_addr_bit.
7024         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
7025         set_gdbarch_significant_addr_bit.
7026         * utils.c (address_significant): Update to sign extend addr.
7027
7028 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
7029
7030         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
7031         (xtensa_linux_init_abi): Limit tdep->num_regs by
7032         tdep->num_nopriv_regs.
7033         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
7034         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
7035         not initialized.
7036
7037 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
7038
7039         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
7040
7041 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
7042
7043         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
7044         (I387_MXCSR_INIT_VAL): New constant.
7045         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
7046         buffer if it was supplied by the inferior.
7047         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
7048         (i387_xsave_get_clear_bv): New function.
7049         (i387_supply_xsave): Only read x87 control registers from the
7050         xsave buffer if the feature is enabled, and the state will have
7051         been written, otherwise, provide a suitable default.
7052         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
7053         including x87 control registers.  Update control registers if they
7054         have changed from the default value, and mark features as enabled
7055         as required.
7056         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
7057
7058 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
7059
7060         * spu-tdep.c (info_spu_event_command): Fix output formatting.
7061
7062 2018-05-07  Tom Tromey  <tom@tromey.com>
7063
7064         * configure: Rebuild.
7065         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
7066
7067 2018-05-07  Tom Tromey  <tom@tromey.com>
7068
7069         PR tdep/20362:
7070         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
7071         bit.  Use correct value for VDIV.
7072
7073 2018-05-04  Tom Tromey  <tom@tromey.com>
7074
7075         * configure: Rebuild.
7076         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
7077
7078 2018-05-04  Tom Tromey  <tom@tromey.com>
7079
7080         * linux-record.c (record_linux_system_call) <case
7081         RECORD_SYS_RECVFROM>: Add "break".
7082
7083 2018-05-04  Tom Tromey  <tom@tromey.com>
7084
7085         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
7086         Add missing "break".
7087         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
7088         Add missing "break".
7089
7090 2018-05-04  Tom Tromey  <tom@tromey.com>
7091
7092         * rs6000-tdep.c (ppc_process_record_op4)
7093         (ppc_process_record_op63): Add fall-through comment.
7094
7095 2018-05-04  Tom Tromey  <tom@tromey.com>
7096
7097         * i386-tdep.c (i386_process_record): Add fall-through comment.
7098
7099 2018-05-04  Tom Tromey  <tom@tromey.com>
7100
7101         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
7102         comment.
7103
7104 2018-05-04  Tom Tromey  <tom@tromey.com>
7105
7106         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
7107         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
7108         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
7109         comment.
7110         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
7111         comment.
7112         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
7113         comment.
7114
7115 2018-05-04  Tom Tromey  <tom@tromey.com>
7116
7117         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
7118
7119 2018-05-04  Tom Tromey  <tom@tromey.com>
7120
7121         * s390-tdep.c (s390_process_record): Fix fall-through comments.
7122         * xcoffread.c (scan_xcoff_symtab): Move comment later.
7123         * symfile.c (section_is_mapped): Fix fall-through comment.
7124         * stabsread.c (define_symbol, read_member_functions): Fix
7125         fall-through comment.
7126         * s390-linux-tdep.c (s390_process_record): Fix fall-through
7127         comment.
7128         * remote.c (remote_wait_as): Fix fall-through comment.
7129         * p-exp.y (yylex): Fix fall-through comment.
7130         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
7131         comment.
7132         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
7133         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
7134         * jv-exp.y (yylex): Fix fall-through comment.
7135         * go-exp.y (lex_one_token): Fix fall-through comment.
7136         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
7137         fall-through comment.
7138         * f-exp.y (yylex): Fix fall-through comment.
7139         * dwarf2read.c (process_die): Fix fall-through comments.
7140         * dbxread.c (process_one_symbol): Fix fall-through comment.
7141         * d-exp.y (lex_one_token): Fix fall-through comment.
7142         * cp-name-parser.y (yylex): Fix fall-through comment.
7143         * coffread.c (coff_symtab_read): Fix fall-through comment.
7144         * c-exp.y (lex_one_token): Fix fall-through comment.
7145         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
7146         comment.
7147         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
7148         comment.
7149
7150 2018-05-04  Tom Tromey  <tom@tromey.com>
7151
7152         PR python/22730:
7153         * NEWS: Mention gdb.execute change.
7154         * gdbcmd.h (execute_control_command): Don't declare.
7155         * python/python.c (execute_gdb_command): Use read_command_lines_1,
7156         execute_control_commands, execute_control_commands_to_string.
7157         * cli/cli-script.h (execute_control_commands)
7158         (execute_control_commands_to_string): Declare.
7159         (execute_control_command): Add from_tty parameter.
7160         * cli/cli-script.c (execute_control_commands)
7161         (execute_control_commands_to_string): New functions.
7162         (execute_user_command): Use execute_control_commands.
7163         (execute_control_command_1): Add "from_tty" parameter.  Update.
7164         (execute_control_command): Likewise.
7165
7166 2018-05-04  Tom Tromey  <tom@tromey.com>
7167
7168         PR python/22731:
7169         * NEWS: Mention that breakpoint commands are writable.
7170         * python/py-breakpoint.c (bppy_set_commands): New function.
7171         (breakpoint_object_getset) <"commands">: Use it.
7172
7173 2018-05-04  Tom Tromey  <tom@tromey.com>
7174
7175         * tracepoint.c (actions_command): Update.
7176         * mi/mi-cmd-break.c (mi_command_line_array)
7177         (mi_command_line_array_cnt, mi_command_line_array_ptr)
7178         (mi_read_next_line): Remove.
7179         (mi_cmd_break_commands): Update.
7180         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
7181         function_view.
7182         * cli/cli-script.c (get_command_line): Update.
7183         (process_next_line): Use function_view.  Constify.
7184         (recurse_read_control_structure, read_command_lines)
7185         (read_command_lines_1): Change argument types to function_view.
7186         (do_define_command, document_command): Update.
7187         * breakpoint.h (check_tracepoint_command): Don't declare.
7188         * breakpoint.c (check_tracepoint_command): Remove.
7189         (commands_command_1, create_tracepoint_from_upload): Update.
7190
7191 2018-05-04  Tom Tromey  <tom@tromey.com>
7192
7193         PR gdb/11750:
7194         * cli/cli-script.h (enum command_control_type) <define_control>:
7195         New constant.
7196         * cli/cli-script.c (multi_line_command_p): Handle define_control.
7197         (build_command_line, execute_control_command_1)
7198         (process_next_line): Likewise.
7199         (do_define_command): New function, extracted from define_command.
7200         (define_command): Use it.
7201
7202 2018-05-04  Tom Tromey  <tom@tromey.com>
7203
7204         * tracepoint.c (actions_command): Update.
7205         * cli/cli-script.h (read_command_lines): Update.
7206         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
7207         (MAX_TMPBUF): Remove define.
7208         (define_command): Use string_printf.
7209         (document_command): Likewise.
7210         * breakpoint.c (commands_command_1): Update.
7211
7212 2018-05-04  Tom Tromey  <tom@tromey.com>
7213
7214         * top.c (execute_command): Update.
7215         * cli/cli-script.h (print_command_lines): Now varargs.
7216         * cli/cli-script.c (print_command_lines): Now varargs.
7217         (execute_control_command_1) <case while_control, case if_control>:
7218         Update.
7219
7220 2018-05-04  Tom Tromey  <tom@tromey.com>
7221
7222         * tracepoint.c (all_tracepoint_actions): Rename from
7223         all_tracepoint_actions_and_cleanup.  Change return type.
7224         (actions_command, encode_actions_1, encode_actions)
7225         (trace_dump_actions, tdump_command): Update.
7226         * remote.c (remote_download_command_source): Update.
7227         * python/python.c (gdbpy_eval_from_control_command)
7228         (python_command, python_interactive_command): Update.
7229         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
7230         * guile/guile.c (guile_command)
7231         (gdbscm_eval_from_control_command, guile_command): Update.
7232         * compile/compile.c (compile_code_command)
7233         (compile_print_command, compile_to_object): Update.
7234         * cli/cli-script.h (struct command_lines_deleter): New.
7235         (counted_command_line): New typedef.
7236         (struct command_line): Add constructor, destructor.
7237         <body_list>: Remove.
7238         <body_list_0, body_list_1>: New members.
7239         (command_line_up): Remove typedef.
7240         (read_command_lines, read_command_lines_1, get_command_line):
7241         Update.
7242         (copy_command_lines): Don't declare.
7243         * cli/cli-script.c (build_command_line): Use "new".
7244         (get_command_line): Return counted_command_line.
7245         (print_command_lines, execute_user_command)
7246         (execute_control_command_1, while_command, if_command): Update.
7247         (realloc_body_list): Remove.
7248         (process_next_line, recurse_read_control_structure): Update.
7249         (read_command_lines, read_command_lines_1): Return counted_command_line.
7250         (free_command_lines): Use "delete".
7251         (copy_command_lines): Remove.
7252         (define_command, document_command, show_user_1): Update.
7253         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
7254         a counted_command_line.
7255         * breakpoint.h (counted_command_line): Remove typedef.
7256         (breakpoint_set_commands): Update.
7257         * breakpoint.c (check_no_tracepoint_commands)
7258         (validate_commands_for_breakpoint): Update.
7259         (breakpoint_set_commands): Change commands to be a
7260         counted_command_line.
7261         (commands_command_1, update_dprintf_command_list)
7262         (create_tracepoint_from_upload): Update.
7263
7264 2018-05-04  Tom Tromey  <tom@tromey.com>
7265
7266         * cli/cli-decode.h (cmd_list_element): New constructor.
7267         (~cmd_list_element): New destructor.
7268         (struct cmd_list_element): Add initializers.
7269         * cli/cli-decode.c (do_add_cmd): Use "new".
7270         (delete_cmd): Use "delete".
7271
7272 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
7273             Pedro Alves <palves@redhat.com>
7274
7275         PR breakpoints/19806 and support for PR external/20207.
7276         * NEWS: Mention Aarch64 watchpoint improvements.
7277         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
7278         watchpoints and PR external/20207 watchpoints.
7279         * nat/aarch64-linux-hw-point.c
7280         (kernel_supports_any_contiguous_range): New.
7281         (aarch64_watchpoint_offset): New.
7282         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
7283         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
7284         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
7285         (aarch64_align_watchpoint): New parameters aligned_offset_p and
7286         next_addr_orig_p.  Support PR external/20207 watchpoints.
7287         (aarch64_downgrade_regs): New.
7288         (aarch64_dr_state_insert_one_point): New parameters offset and
7289         addr_orig.
7290         (aarch64_dr_state_remove_one_point): Likewise.
7291         (aarch64_handle_breakpoint): Update caller.
7292         (aarch64_handle_aligned_watchpoint): Likewise.
7293         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
7294         aligned_offset.
7295         (aarch64_linux_set_debug_regs): Remove const from state.  Call
7296         aarch64_downgrade_regs.
7297         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
7298         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
7299         (DR_CONTROL_MASK): ... this.
7300         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
7301         (unsigned int aarch64_watchpoint_offset): New prototype.
7302         (aarch64_linux_set_debug_regs): Remove const from state.
7303         * utils.c (align_up, align_down): Move to ...
7304         * common/common-utils.c (align_up, align_down): ... here.
7305         * utils.h (align_up, align_down): Move to ...
7306         * common/common-utils.h (align_up, align_down): ... here.
7307
7308 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
7309
7310         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
7311         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
7312         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
7313         Re-implement to match the ABI as summarized in GCC's
7314         gcc/config/sparc/sparc.c.  All callers updated.
7315         (sparc32_store_arguments): Remove assertion.
7316
7317 2018-05-04  Tom Tromey  <tom@tromey.com>
7318
7319         * printcmd.c: Don't include tui.h.
7320         (decode_format): Use skip_spaces.
7321
7322 2018-05-04  Tom Tromey  <tom@tromey.com>
7323
7324         PR gdb/22619:
7325         * printcmd.c (last_count): New global.
7326         (x_command): Use saved count when repeating.
7327
7328 2018-05-04  Tom Tromey  <tom@tromey.com>
7329
7330         * nto-procfs.c (do_closedir_cleanup): Remove.
7331         (procfs_pidlist): Use gdb_dir_up.
7332         * procfs.c (do_closedir_cleanup): Remove.
7333         (proc_update_threads): Use gdb_dir_up.
7334         * common/filestuff.h (struct gdb_dir_deleter): New.
7335         (gdb_dir_up): New typedef.
7336
7337 2018-05-04  Tom Tromey  <tom@tromey.com>
7338
7339         * ada-lang.c (print_mention_exception): Use std::string.
7340
7341 2018-05-04  Tom Tromey  <tom@tromey.com>
7342
7343         * ada-lang.c (create_excep_cond_exprs): Update.
7344         (ada_exception_catchpoint_cond_string): Use std::string.
7345
7346 2018-05-04  Tom Tromey  <tom@tromey.com>
7347
7348         * ada-lang.c (xget_renaming_scope): Return std::string.
7349         (old_renaming_is_invisible): Update.
7350
7351 2018-05-04  Tom Tromey  <tom@tromey.com>
7352
7353         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
7354         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
7355
7356 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
7357
7358         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
7359
7360 2018-05-04  Tom Tromey  <tom@tromey.com>
7361
7362         * remote.c (remote_query_supported_append): Change type.
7363         (remote_check_symbols): Update.
7364
7365 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
7366
7367         PR gdb/11420
7368         * configure.ac: Prepend libpython.
7369         * python/python-config.py: Likewise.
7370         * configure: Regenerate.
7371
7372 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
7373
7374         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
7375
7376 2018-05-03  Pedro Alves  <palves@redhat.com>
7377
7378         * s390-linux-nat.c
7379         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
7380         override.  Write 'true' instead of '1'.
7381         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
7382         declaration.
7383
7384 2018-05-02  Pedro Alves  <palves@redhat.com>
7385
7386         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
7387         add_inf_child_target.
7388         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
7389         add_inf_child_target.
7390         * aix-thread.c (aix_thread_target_info): New.
7391         (aix_thread_target) <shortname, longname, doc>: Delete.
7392         <info>: New.
7393         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
7394         add_inf_child_target.
7395         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
7396         add_inf_child_target.
7397         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
7398         add_inf_child_target.
7399         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
7400         add_inf_child_target.
7401         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
7402         add_inf_child_target.
7403         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
7404         add_inf_child_target.
7405         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
7406         add_inf_child_target.
7407         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
7408         add_inf_child_target.
7409         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
7410         add_inf_child_target.
7411         * bfd-target.c (target_bfd_target_info): New.
7412         (target_bfd) <shortname, longname, doc>: Delete.
7413         <info>: New.
7414         * bsd-kvm.c (bsd_kvm_target_info): New.
7415         (bsd_kvm_target) <shortname, longname, doc>: Delete.
7416         <info>: New.
7417         (bsd_kvm_target::open): Rename to ...
7418         (bsd_kvm_target_open): ... this.  Adjust.
7419         * bsd-uthread.c (bsd_uthread_target_info): New.
7420         (bsd_uthread_target) <shortname, longname, doc>: Delete.
7421         <info>: New.
7422         * corefile.c (core_file_command): Adjust.
7423         * corelow.c (core_target_info): New.
7424         (core_target) <shortname, longname, doc>: Delete.
7425         <info>: New.
7426         (core_target::open): Rename to ...
7427         (core_target_open): ... this.  Adjust.
7428         * ctf.c (ctf_target_info): New.
7429         (ctf_target) <shortname, longname, doc>: Delete.
7430         <info>: New.
7431         (ctf_target::open): Rename to ...
7432         (ctf_target_open): ... this.
7433         (_initialize_ctf): Adjust.
7434         * exec.c (exec_target_info): New.
7435         (exec_target) <shortname, longname, doc>: Delete.
7436         <info>: New.
7437         (exec_target::open): Rename to ...
7438         (exec_target_open): ... this.
7439         * gdbcore.h (core_target_open): Declare.
7440         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
7441         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
7442         add_inf_child_target.
7443         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
7444         add_inf_child_target.
7445         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
7446         add_inf_child_target.
7447         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
7448         add_inf_child_target.
7449         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
7450         add_inf_child_target.
7451         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
7452         add_inf_child_target.
7453         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
7454         add_inf_child_target.
7455         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
7456         add_inf_child_target.
7457         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
7458         add_inf_child_target.
7459         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
7460         add_inf_child_target.
7461         * inf-child.c (inf_child_target_info): New.
7462         (inf_child_target::info): New.
7463         (inf_child_open_target): Remove 'target' parameter.  Use
7464         get_native_target instead.
7465         (inf_child_target::open): Delete.
7466         (add_inf_child_target): New.
7467         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
7468         Delete.
7469         <info>: New.
7470         (add_inf_child_target): Declare.
7471         (inf_child_open_target): Declare.
7472         * linux-thread-db.c (thread_db_target_info): New.
7473         (thread_db_target) <shortname, longname, doc>: Delete.
7474         <info>: New.
7475         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
7476         add_inf_child_target.
7477         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
7478         add_inf_child_target.
7479         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
7480         add_inf_child_target.
7481         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
7482         add_inf_child_target.
7483         * make-target-delegates (print_class): Adjust.
7484         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
7485         add_inf_child_target.
7486         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
7487         add_inf_child_target.
7488         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
7489         add_inf_child_target.
7490         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
7491         add_inf_child_target.
7492         * nto-procfs.c (nto_native_target_info): New.
7493         (nto_procfs_target_native) <shortname, longname, doc>:
7494         Delete.
7495         <info>: New.
7496         (nto_procfs_target_info): New.
7497         (nto_procfs_target_procfs) <shortname, longname, doc>:
7498         Delete.
7499         <info>: New.
7500         (init_procfs_targets): Adjust.
7501         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
7502         add_inf_child_target.
7503         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
7504         add_inf_child_target.
7505         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
7506         add_inf_child_target.
7507         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
7508         add_inf_child_target.
7509         * ravenscar-thread.c (ravenscar_target_info): New.
7510         (ravenscar_thread_target) <shortname, longname, doc>:
7511         Delete.
7512         <info>: New.
7513         * record-btrace.c (record_btrace_target_info):
7514         (record_btrace_target) <shortname, longname, doc>: Delete.
7515         <info>: New.
7516         (record_btrace_target::open): Rename to ...
7517         (record_btrace_target_open): ... this.  Adjust.
7518         * record-full.c (record_longname, record_doc): New.
7519         (record_full_base_target) <shortname, longname, doc>: Delete.
7520         <info>: New.
7521         (record_full_target_info): New.
7522         (record_full_target): <shortname>: Delete.
7523         <info>: New.
7524         (record_full_core_open_1, record_full_open_1): Update comments.
7525         (record_full_base_target::open): Rename to ...
7526         (record_full_open): ... this.
7527         (cmd_record_full_restore): Update.
7528         (_initialize_record_full): Update.
7529         * remote-sim.c (remote_sim_target_info): New.
7530         (gdbsim_target) <shortname, longname, doc>: Delete.
7531         <info>: New.
7532         (gdbsim_target::open): Rename to ...
7533         (gdbsim_target_open): ... this.
7534         (_initialize_remote_sim): Adjust.
7535         * remote.c (remote_doc): New.
7536         (remote_target_info): New.
7537         (remote_target) <shortname, longname, doc>: Delete.
7538         <info>: New.
7539         (extended_remote_target_info): New.
7540         (extended_remote_target) <shortname, longname, doc>: Delete.
7541         <info>: New.
7542         (remote_target::open_1): Make static.  Adjust.
7543         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
7544         * s390-linux-nat.c (_initialize_s390_nat): Use
7545         add_inf_child_target.
7546         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
7547         add_inf_child_target.
7548         * sol-thread.c (thread_db_target_info): New.
7549         (sol_thread_target) <shortname, longname, doc>: Delete.
7550         <info>: New.
7551         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
7552         add_inf_child_target.
7553         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
7554         add_inf_child_target.
7555         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
7556         add_inf_child_target.
7557         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
7558         add_inf_child_target.
7559         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
7560         add_inf_child_target.
7561         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
7562         add_inf_child_target.
7563         * spu-linux-nat.c (_initialize_spu_nat): Use
7564         add_inf_child_target.
7565         * spu-multiarch.c (spu_multiarch_target_info): New.
7566         (spu_multiarch_target) <shortname, longname, doc>: Delete.
7567         <info>: New.
7568         * target-delegates.c: Regenerate.
7569         * target.c: Include <unordered_map>.
7570         (target_ops_p): Delete.
7571         (DEF_VEC_P(target_ops_p)): Delete.
7572         (target_factories): New.
7573         (test_target_info): New.
7574         (test_target_ops::info): New.
7575         (open_target): Adjust to use target_factories.
7576         (add_target_with_completer): Rename to ...
7577         (add_target): ... this.  Change prototype.  Register target_info
7578         and open callback in target_factories.  Register target_info in
7579         command context instead of target_ops.
7580         (add_target): Delete old implementation.
7581         (add_deprecated_target_alias): Change prototype.  Adjust.
7582         (the_native_target): New.
7583         (set_native_target, get_native_target): New.
7584         (find_default_run_target): Use the_native_target.
7585         (find_attach_target, find_run_target): Simplify.
7586         (target_ops::open): Delete.
7587         (dummy_target_info): New.
7588         (dummy_target::shortname, dummy_target::longname)
7589         (dummy_target::doc): Delete.
7590         (dummy_target::info): New.
7591         (debug_target::shortname, debug_target::longname)
7592         (debug_target::doc): Delete.
7593         (debug_target::info): New.
7594         * target.h (struct target_info): New.
7595         (target_ops::~target_ops): Add comment.
7596         (target_ops::info): New.
7597         (target_ops::shortname, target_ops::longname, target_ops::doc): No
7598         longer virtual.  Implement in terms of target_info.
7599         (set_native_target, get_native_target): Declare.
7600         (target_open_ftype): New.
7601         (add_target, add_target_with_completer)
7602         (add_deprecated_target_alias): Change prototype.
7603         (test_target) <shortname, longname, doc>: Delete.
7604         <info>: New.
7605         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
7606         add_inf_child_target.
7607         * tracefile-tfile.c (tfile_target_info): New.
7608         (tfile_target) <shortname, longname, doc>: Delete.
7609         <info>: New.
7610         (tfile_target::open): Rename to ...
7611         (tfile_target_open): ... this.
7612         (_initialize_tracefile_tfile): Adjust.
7613         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
7614         add_inf_child_target.
7615         * windows-nat.c (_initialize_windows_nat): Use
7616         add_inf_child_target.
7617         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
7618         add_inf_child_target.
7619
7620 2018-05-02  Pedro Alves  <palves@redhat.com>
7621
7622         * linux-nat.h (linux_nat_target) <low_new_thread,
7623         low_delete_thread, low_new_fork, low_forget_process,
7624         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
7625         New virtual methods.
7626         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
7627         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
7628         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
7629         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
7630         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
7631         Delete.
7632         * linux-fork.c (delete_fork): Adjust to call low method.
7633         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
7634         (linux_nat_new_fork, linux_nat_forget_process_hook)
7635         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
7636         (linux_nat_status_is_event):
7637         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
7638         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
7639         to call low method.
7640         (sigtrap_is_event): Rename to ...
7641         (linux_nat_target::low_status_is_event): ... this.
7642         (linux_nat_set_status_is_event): Delete.
7643         (save_stop_reason, linux_nat_wait_1)
7644         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
7645         low methods.
7646         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
7647         (linux_nat_set_new_fork, linux_nat_set_forget_process)
7648         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
7649         (linux_nat_set_prepare_to_resume): Delete.
7650         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
7651         low virtual methods.
7652         * amd64-linux-nat.c: Likewise.
7653         * arm-linux-nat.c: Likewise.
7654         * i386-linux-nat.c: Likewise.
7655         * ia64-linux-nat.c: Likewise.
7656         * mips-linux-nat.c: Likewise.
7657         * ppc-linux-nat.c: Likewise.
7658         * s390-linux-nat.c: Likewise.
7659         * sparc64-linux-nat.c: Likewise.
7660         * x86-linux-nat.c: Likewise.
7661         * x86-linux-nat.h: Include "nat/x86-linux.h".
7662         (x86_linux_nat_target) <low_new_fork, low_forget_process,
7663         low_prepare_to_resume, low_new_thread, low_delete_thread>:
7664         Override methods.
7665
7666 2018-05-02  Pedro Alves  <palves@redhat.com>
7667
7668         * target.h (target_ops)
7669         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
7670         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
7671         stopped_by_watchpoint, have_continuable_watchpoint,
7672         stopped_data_address, watchpoint_addr_within_range,
7673         can_accel_watchpoint_condition, can_run, thread_alive,
7674         has_all_memory, has_memory, has_stack, has_registers,
7675         has_execution, can_async_p, is_async_p, supports_non_stop,
7676         always_non_stop_p, can_execute_reverse, supports_multi_process,
7677         supports_enable_disable_tracepoint,
7678         supports_disable_randomization, supports_string_tracing,
7679         supports_evaluation_of_breakpoint_conditions,
7680         can_run_breakpoint_commands, filesystem_is_local,
7681         can_download_tracepoint, get_trace_state_variable_value,
7682         set_trace_notes, get_tib_address, use_agent, can_use_agent,
7683         record_is_replaying, record_will_replay,
7684         augmented_libraries_svr4_read>: Adjust to return bool.
7685         * aarch64-linux-nat.c: All implementations adjusted.
7686         * aix-thread.c: All implementations adjusted.
7687         * arm-linux-nat.c: All implementations adjusted.
7688         * breakpoint.c: All implementations adjusted.
7689         * bsd-kvm.c: All implementations adjusted.
7690         * bsd-uthread.c: All implementations adjusted.
7691         * corelow.c: All implementations adjusted.
7692         * ctf.c: All implementations adjusted.
7693         * darwin-nat.c: All implementations adjusted.
7694         * darwin-nat.h: All implementations adjusted.
7695         * exec.c: All implementations adjusted.
7696         * fbsd-nat.c: All implementations adjusted.
7697         * fbsd-nat.h: All implementations adjusted.
7698         * gnu-nat.c: All implementations adjusted.
7699         * gnu-nat.h: All implementations adjusted.
7700         * go32-nat.c: All implementations adjusted.
7701         * ia64-linux-nat.c: All implementations adjusted.
7702         * inf-child.c: All implementations adjusted.
7703         * inf-child.h: All implementations adjusted.
7704         * inf-ptrace.c: All implementations adjusted.
7705         * inf-ptrace.h: All implementations adjusted.
7706         * linux-nat.c: All implementations adjusted.
7707         * linux-nat.h: All implementations adjusted.
7708         * mips-linux-nat.c: All implementations adjusted.
7709         * nto-procfs.c: All implementations adjusted.
7710         * ppc-linux-nat.c: All implementations adjusted.
7711         * procfs.c: All implementations adjusted.
7712         * ravenscar-thread.c: All implementations adjusted.
7713         * record-btrace.c: All implementations adjusted.
7714         * record-full.c: All implementations adjusted.
7715         * remote-sim.c: All implementations adjusted.
7716         * remote.c: All implementations adjusted.
7717         * s390-linux-nat.c: All implementations adjusted.
7718         * sol-thread.c: All implementations adjusted.
7719         * spu-multiarch.c: All implementations adjusted.
7720         * target-delegates.c: All implementations adjusted.
7721         * target.c: All implementations adjusted.
7722         * target.h: All implementations adjusted.
7723         * tracefile-tfile.c: All implementations adjusted.
7724         * tracefile.c: All implementations adjusted.
7725         * tracefile.h: All implementations adjusted.
7726         * windows-nat.c: All implementations adjusted.
7727         * x86-linux-nat.h: All implementations adjusted.
7728         * x86-nat.h: All implementations adjusted.
7729
7730 2018-05-02  Pedro Alves  <palves@redhat.com>
7731
7732         * make-target-delegates (scan_target_h): Don't trim lines here.
7733         Replace sequences of tabs and/or whitespace with a single
7734         whitespace.
7735         (top level, parsing methods): Trim each line before processing it
7736         here.
7737
7738 2018-05-02  Pedro Alves  <palves@redhat.com>
7739             John Baldwin  <jhb@freebsd.org>
7740
7741         * target.h (enum strata) <debug_stratum>: New.
7742         (struct target_ops) <all delegation methods>: Replace by C++
7743         virtual methods, and drop "to_" prefix.  All references updated
7744         throughout.
7745         <to_shortname, to_longname, to_doc, to_data,
7746         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
7747         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
7748         virtual methods.  All references updated throughout.
7749         <can_attach, supports_terminal_ours, can_create_inferior,
7750         get_thread_control_capabilities, attach_no_wait>: New
7751         virtual methods.
7752         <insert_breakpoint, remove_breakpoint>: Now
7753         TARGET_DEFAULT_NORETURN methods.
7754         <info_proc>: Now returns bool.
7755         <to_magic>: Delete.
7756         (OPS_MAGIC): Delete.
7757         (current_target): Delete.  All references replaced by references
7758         to ...
7759         (target_stack): ... this.  New.
7760         (target_shortname, target_longname): Adjust.
7761         (target_can_run): Now a function declaration.
7762         (default_child_has_all_memory, default_child_has_memory)
7763         (default_child_has_stack, default_child_has_registers)
7764         (default_child_has_execution): Remove target_ops parameter.
7765         (complete_target_initialization): Delete.
7766         (memory_breakpoint_target): New template class.
7767         (test_target_ops): Refactor as a C++ class with virtual methods.
7768         * make-target-delegates (NAME_PART): Tighten.
7769         (POINTER_PART, CP_SYMBOL): New.
7770         (SIMPLE_RETURN_PART): Reimplement.
7771         (VEC_RETURN_PART): Expect less.
7772         (RETURN_PART, VIRTUAL_PART): New.
7773         (METHOD): Adjust to C++ virtual methods.
7774         (scan_target_h): Remove reference to C99.
7775         (dname): Output "target_ops::" prefix.
7776         (write_function_header): Adjust to output a C++ class method.
7777         (write_declaration): New.
7778         (write_delegator): Adjust to output a C++ class method.
7779         (tdname): Output "dummy_target::" prefix.
7780         (write_tdefault, write_debugmethod): Adjust to output a C++ class
7781         method.
7782         (tdefault_names, debug_names): Delete.
7783         (return_types, tdefaults, styles, argtypes_array): New.
7784         (top level): All methods are delegators.
7785         (print_class): New.
7786         (top level): Print dummy_target and debug_target classes.
7787         * target-delegates.c: Regenerate.
7788         * target-debug.h (target_debug_print_enum_info_proc_what)
7789         (target_debug_print_thread_control_capabilities)
7790         (target_debug_print_thread_info_p): New.
7791         * target.c (dummy_target): Delete.
7792         (the_dummy_target, the_debug_target): New.
7793         (target_stack): Now extern.
7794         (set_targetdebug): Push/unpush debug target.
7795         (default_child_has_all_memory, default_child_has_memory)
7796         (default_child_has_stack, default_child_has_registers)
7797         (default_child_has_execution): Remove target_ops parameter.
7798         (complete_target_initialization): Delete.
7799         (add_target_with_completer): No longer call
7800         complete_target_initialization.
7801         (target_supports_terminal_ours): Use regular delegation.
7802         (update_current_target): Delete.
7803         (push_target): No longer check magic number.  Don't call
7804         update_current_target.
7805         (unpush_target): Don't call update_current_target.
7806         (target_is_pushed): No longer check magic number.
7807         (target_require_runnable): Skip for all stratums over
7808         process_stratum.
7809         (target_ops::info_proc): New.
7810         (target_info_proc): Use find_target_at and
7811         find_default_run_target.
7812         (target_supports_disable_randomization): Use regular delegation.
7813         (target_get_osdata): Use find_target_at.
7814         (target_ops::open, target_ops::close, target_ops::can_attach)
7815         (target_ops::attach, target_ops::can_create_inferior)
7816         (target_ops::create_inferior, target_ops::can_run)
7817         (target_can_run): New.
7818         (default_fileio_target): Use regular delegation.
7819         (target_ops::fileio_open, target_ops::fileio_pwrite)
7820         (target_ops::fileio_pread, target_ops::fileio_fstat)
7821         (target_ops::fileio_close, target_ops::fileio_unlink)
7822         (target_ops::fileio_readlink): New.
7823         (target_fileio_open_1, target_fileio_unlink)
7824         (target_fileio_readlink): Always call the target method.  Handle
7825         FILEIO_ENOSYS.
7826         (return_zero, return_zero_has_execution): Delete.
7827         (init_dummy_target): Delete.
7828         (dummy_target::dummy_target, dummy_target::shortname)
7829         (dummy_target::longname, dummy_target::doc)
7830         (debug_target::debug_target, debug_target::shortname)
7831         (debug_target::longname, debug_target::doc): New.
7832         (target_supports_delete_record): Use regular delegation.
7833         (setup_target_debug): Delete.
7834         (maintenance_print_target_stack): Skip debug_stratum.
7835         (initialize_targets): Instantiate the_dummy_target and
7836         the_debug_target.
7837         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
7838         use target_stack.
7839         (target_auxv_search, fprint_target_auxv): Adjust.
7840         (info_auxv_command): Adjust to use target_stack.
7841         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
7842         * exceptions.c (print_flush): Handle a NULL target_stack.
7843         * regcache.c (target_ops_no_register): Refactor as class with
7844         virtual methods.
7845
7846         * exec.c (exec_target): New class.
7847         (exec_ops): Now an exec_target.
7848         (exec_open, exec_close_1, exec_get_section_table)
7849         (exec_xfer_partial, exec_files_info, exec_has_memory)
7850         (exec_make_note_section): Refactor as exec_target methods.
7851         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
7852         Delete.
7853         (exec_target::find_memory_regions): New.
7854         (_initialize_exec): Don't call init_exec_ops.
7855         * gdbcore.h (exec_file_clear): Delete.
7856
7857         * corefile.c (core_target): Delete.
7858         (core_file_command): Adjust.
7859         * corelow.c (core_target): New class.
7860         (the_core_target): New.
7861         (core_close): Remove target_ops parameter.
7862         (core_close_cleanup): Adjust.
7863         (core_target::close): New.
7864         (core_open, core_detach, get_core_registers, core_files_info)
7865         (core_xfer_partial, core_thread_alive, core_read_description)
7866         (core_pid_to_str, core_thread_name, core_has_memory)
7867         (core_has_stack, core_has_registers, core_info_proc): Rework as
7868         core_target methods.
7869         (ignore, core_remove_breakpoint, init_core_ops): Delete.
7870         (_initialize_corelow): Initialize the_core_target.
7871         * gdbcore.h (core_target): Delete.
7872         (the_core_target): New.
7873
7874         * ctf.c: (ctf_target): New class.
7875         (ctf_ops): Now a ctf_target.
7876         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
7877         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
7878         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
7879         methods.
7880         (init_ctf_ops): Delete.
7881         (_initialize_ctf): Don't call it.
7882         * tracefile-tfile.c (tfile_target): New class.
7883         (tfile_ops): Now a tfile_target.
7884         (tfile_open, tfile_close, tfile_files_info)
7885         (tfile_get_tracepoint_status, tfile_trace_find)
7886         (tfile_fetch_registers, tfile_xfer_partial)
7887         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
7888         Refactor as tfile_target methods.
7889         (tfile_xfer_partial_features): Remove target_ops parameter.
7890         (init_tfile_ops): Delete.
7891         (_initialize_tracefile_tfile): Don't call it.
7892         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
7893         (tracefile_has_stack, tracefile_has_registers)
7894         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
7895         tracefile_target methods.
7896         (init_tracefile_ops): Delete.
7897         (tracefile_target::tracefile_target): New.
7898         * tracefile.h: Include "target.h".
7899         (tracefile_target): New class.
7900         (init_tracefile_ops): Delete.
7901
7902         * spu-multiarch.c (spu_multiarch_target): New class.
7903         (spu_ops): Now a spu_multiarch_target.
7904         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
7905         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
7906         (spu_search_memory, spu_mourn_inferior): Refactor as
7907         spu_multiarch_target methods.
7908         (init_spu_ops): Delete.
7909         (_initialize_spu_multiarch): Remove references to init_spu_ops,
7910         complete_target_initialization.
7911
7912         * ravenscar-thread.c (ravenscar_thread_target): New class.
7913         (ravenscar_ops): Now a ravenscar_thread_target.
7914         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
7915         (ravenscar_thread_alive, ravenscar_pid_to_str)
7916         (ravenscar_fetch_registers, ravenscar_store_registers)
7917         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
7918         (ravenscar_stopped_by_hw_breakpoint)
7919         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
7920         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
7921         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
7922         methods.
7923         (init_ravenscar_thread_ops): Delete.
7924         (_initialize_ravenscar): Remove references to
7925         init_ravenscar_thread_ops and complete_target_initialization.
7926
7927         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
7928         (bsd_uthread_target): New class.
7929         (bsd_uthread_ops): Now a bsd_uthread_target.
7930         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
7931         (bsd_uthread_close, bsd_uthread_mourn_inferior)
7932         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
7933         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
7934         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
7935         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
7936         (bsd_uthread_target): Delete function.
7937         (_initialize_bsd_uthread): Remove reference to
7938         complete_target_initialization.
7939
7940         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
7941         (target_bfd): ... this new class.
7942         (target_bfd_xfer_partial, target_bfd_get_section_table)
7943         (target_bfd_close): Refactor as target_bfd methods.
7944         (target_bfd::~target_bfd): New.
7945         (target_bfd_reopen): Adjust.
7946         (target_bfd::close): New.
7947
7948         * record-btrace.c (record_btrace_target): New class.
7949         (record_btrace_ops): Now a record_btrace_target.
7950         (record_btrace_open, record_btrace_stop_recording)
7951         (record_btrace_disconnect, record_btrace_close)
7952         (record_btrace_async, record_btrace_info)
7953         (record_btrace_insn_history, record_btrace_insn_history_range)
7954         (record_btrace_insn_history_from, record_btrace_call_history)
7955         (record_btrace_call_history_range)
7956         (record_btrace_call_history_from, record_btrace_record_method)
7957         (record_btrace_is_replaying, record_btrace_will_replay)
7958         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
7959         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
7960         (record_btrace_store_registers, record_btrace_prepare_to_store)
7961         (record_btrace_to_get_unwinder)
7962         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
7963         (record_btrace_commit_resume, record_btrace_wait)
7964         (record_btrace_stop, record_btrace_can_execute_reverse)
7965         (record_btrace_stopped_by_sw_breakpoint)
7966         (record_btrace_supports_stopped_by_sw_breakpoint)
7967         (record_btrace_stopped_by_hw_breakpoint)
7968         (record_btrace_supports_stopped_by_hw_breakpoint)
7969         (record_btrace_update_thread_list, record_btrace_thread_alive)
7970         (record_btrace_goto_begin, record_btrace_goto_end)
7971         (record_btrace_goto, record_btrace_stop_replaying_all)
7972         (record_btrace_execution_direction)
7973         (record_btrace_prepare_to_generate_core)
7974         (record_btrace_done_generating_core): Refactor as
7975         record_btrace_target methods.
7976         (init_record_btrace_ops): Delete.
7977         (_initialize_record_btrace): Remove reference to
7978         init_record_btrace_ops.
7979         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
7980         the execution_direction global.
7981         (record_full_base_target, record_full_target)
7982         (record_full_core_target): New classes.
7983         (record_full_ops): Now a record_full_target.
7984         (record_full_core_ops): Now a record_full_core_target.
7985         (record_full_target::detach, record_full_target::disconnect)
7986         (record_full_core_target::disconnect)
7987         (record_full_target::mourn_inferior, record_full_target::kill):
7988         New.
7989         (record_full_open, record_full_close, record_full_async): Refactor
7990         as methods of the record_full_base_target class.
7991         (record_full_resume, record_full_commit_resume): Refactor
7992         as methods of the record_full_target class.
7993         (record_full_wait, record_full_stopped_by_watchpoint)
7994         (record_full_stopped_data_address)
7995         (record_full_stopped_by_sw_breakpoint)
7996         (record_full_supports_stopped_by_sw_breakpoint)
7997         (record_full_stopped_by_hw_breakpoint)
7998         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
7999         methods of the record_full_base_target class.
8000         (record_full_store_registers, record_full_xfer_partial)
8001         (record_full_insert_breakpoint, record_full_remove_breakpoint):
8002         Refactor as methods of the record_full_target class.
8003         (record_full_can_execute_reverse, record_full_get_bookmark)
8004         (record_full_goto_bookmark, record_full_execution_direction)
8005         (record_full_record_method, record_full_info, record_full_delete)
8006         (record_full_is_replaying, record_full_will_replay)
8007         (record_full_goto_begin, record_full_goto_end, record_full_goto)
8008         (record_full_stop_replaying): Refactor as methods of the
8009         record_full_base_target class.
8010         (record_full_core_resume, record_full_core_kill)
8011         (record_full_core_fetch_registers)
8012         (record_full_core_prepare_to_store)
8013         (record_full_core_store_registers, record_full_core_xfer_partial)
8014         (record_full_core_insert_breakpoint)
8015         (record_full_core_remove_breakpoint)
8016         (record_full_core_has_execution): Refactor
8017         as methods of the record_full_core_target class.
8018         (record_full_base_target::supports_delete_record): New.
8019         (init_record_full_ops): Delete.
8020         (init_record_full_core_ops): Delete.
8021         (record_full_save): Refactor as method of the
8022         record_full_base_target class.
8023         (_initialize_record_full): Remove references to
8024         init_record_full_ops and init_record_full_core_ops.
8025
8026         * remote.c (remote_target, extended_remote_target): New classes.
8027         (remote_ops): Now a remote_target.
8028         (extended_remote_ops): Now an extended_remote_target.
8029         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
8030         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
8031         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
8032         (remote_pass_signals, remote_set_syscall_catchpoint)
8033         (remote_program_signals, )
8034         (remote_thread_always_alive): Remove target_ops parameter.
8035         (remote_thread_alive, remote_thread_name)
8036         (remote_update_thread_list, remote_threads_extra_info)
8037         (remote_static_tracepoint_marker_at)
8038         (remote_static_tracepoint_markers_by_strid)
8039         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
8040         (remote_open): Refactor as methods of remote_target.
8041         (extended_remote_open, extended_remote_detach)
8042         (extended_remote_attach, extended_remote_post_attach):
8043         (extended_remote_supports_disable_randomization)
8044         (extended_remote_create_inferior): : Refactor as method of
8045         extended_remote_target.
8046         (remote_set_permissions, remote_open_1, remote_detach)
8047         (remote_follow_fork, remote_follow_exec, remote_disconnect)
8048         (remote_resume, remote_commit_resume, remote_stop)
8049         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
8050         (remote_terminal_ours, remote_wait, remote_fetch_registers)
8051         (remote_prepare_to_store, remote_store_registers)
8052         (remote_flash_erase, remote_flash_done, remote_files_info)
8053         (remote_kill, remote_mourn, remote_insert_breakpoint)
8054         (remote_remove_breakpoint, remote_insert_watchpoint)
8055         (remote_watchpoint_addr_within_range)
8056         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
8057         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
8058         (remote_supports_stopped_by_sw_breakpoint)
8059         (remote_stopped_by_hw_breakpoint)
8060         (remote_supports_stopped_by_hw_breakpoint)
8061         (remote_stopped_by_watchpoint, remote_stopped_data_address)
8062         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
8063         (remote_verify_memory): Refactor as methods of remote_target.
8064         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
8065         parameter.
8066         (remote_xfer_partial, remote_get_memory_xfer_limit)
8067         (remote_search_memory, remote_rcmd, remote_memory_map)
8068         (remote_pid_to_str, remote_get_thread_local_address)
8069         (remote_get_tib_address, remote_read_description): Refactor as
8070         methods of remote_target.
8071         (remote_target::fileio_open, remote_target::fileio_pwrite)
8072         (remote_target::fileio_pread, remote_target::fileio_close): New.
8073         (remote_hostio_readlink, remote_hostio_fstat)
8074         (remote_filesystem_is_local, remote_can_execute_reverse)
8075         (remote_supports_non_stop, remote_supports_disable_randomization)
8076         (remote_supports_multi_process, remote_supports_cond_breakpoints)
8077         (remote_supports_enable_disable_tracepoint)
8078         (remote_supports_string_tracing)
8079         (remote_can_run_breakpoint_commands, remote_trace_init)
8080         (remote_download_tracepoint, remote_can_download_tracepoint)
8081         (remote_download_trace_state_variable, remote_enable_tracepoint)
8082         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
8083         (remote_trace_start, remote_get_trace_status)
8084         (remote_get_tracepoint_status, remote_trace_stop)
8085         (remote_trace_find, remote_get_trace_state_variable_value)
8086         (remote_save_trace_data, remote_get_raw_trace_data)
8087         (remote_set_disconnected_tracing, remote_core_of_thread)
8088         (remote_set_circular_trace_buffer, remote_traceframe_info)
8089         (remote_get_min_fast_tracepoint_insn_len)
8090         (remote_set_trace_buffer_size, remote_set_trace_notes)
8091         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
8092         (remote_disable_btrace, remote_teardown_btrace)
8093         (remote_read_btrace, remote_btrace_conf)
8094         (remote_augmented_libraries_svr4_read, remote_load)
8095         (remote_pid_to_exec_file, remote_can_do_single_step)
8096         (remote_execution_direction, remote_thread_handle_to_thread_info):
8097         Refactor as methods of remote_target.
8098         (init_remote_ops, init_extended_remote_ops): Delete.
8099         (remote_can_async_p, remote_is_async_p, remote_async)
8100         (remote_thread_events, remote_upload_tracepoints)
8101         (remote_upload_trace_state_variables): Refactor as methods of
8102         remote_target.
8103         (_initialize_remote): Remove references to init_remote_ops and
8104         init_extended_remote_ops.
8105
8106         * remote-sim.c (gdbsim_target): New class.
8107         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
8108         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
8109         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
8110         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
8111         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
8112         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
8113         Refactor as methods of gdbsim_target.
8114         (gdbsim_ops): Now a gdbsim_target.
8115         (init_gdbsim_ops): Delete.
8116         (gdbsim_cntrl_c): Adjust.
8117         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
8118
8119         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
8120         (the_amd64_linux_nat_target): New.
8121         (amd64_linux_fetch_inferior_registers)
8122         (amd64_linux_store_inferior_registers): Refactor as methods of
8123         amd64_linux_nat_target.
8124         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
8125         * i386-linux-nat.c: Don't include "linux-nat.h".
8126         (i386_linux_nat_target): New class.
8127         (the_i386_linux_nat_target): New.
8128         (i386_linux_fetch_inferior_registers)
8129         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
8130         as methods of i386_linux_nat_target.
8131         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
8132         * inf-child.c (inf_child_ops): Delete.
8133         (inf_child_fetch_inferior_registers)
8134         (inf_child_store_inferior_registers): Delete.
8135         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
8136         methods of inf_child_target.
8137         (inf_child_target::supports_terminal_ours)
8138         (inf_child_target::terminal_init)
8139         (inf_child_target::terminal_inferior)
8140         (inf_child_target::terminal_ours_for_output)
8141         (inf_child_target::terminal_ours, inf_child_target::interrupt)
8142         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
8143         New.
8144         (inf_child_open, inf_child_disconnect, inf_child_close)
8145         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
8146         (inf_child_post_startup_inferior, inf_child_can_run)
8147         (inf_child_pid_to_exec_file): Refactor as methods of
8148         inf_child_target.
8149         (inf_child_follow_fork): Delete.
8150         (inf_child_target::can_create_inferior)
8151         (inf_child_target::can_attach): New.
8152         (inf_child_target::has_all_memory, inf_child_target::has_memory)
8153         (inf_child_target::has_stack, inf_child_target::has_registers)
8154         (inf_child_target::has_execution): New.
8155         (inf_child_fileio_open, inf_child_fileio_pwrite)
8156         (inf_child_fileio_pread, inf_child_fileio_fstat)
8157         (inf_child_fileio_close, inf_child_fileio_unlink)
8158         (inf_child_fileio_readlink, inf_child_use_agent)
8159         (inf_child_can_use_agent): Refactor as methods of
8160         inf_child_target.
8161         (return_zero, inf_child_target): Delete.
8162         (inf_child_target::inf_child_target): New.
8163         * inf-child.h: Include "target.h".
8164         (inf_child_target): Delete function prototype.
8165         (inf_child_target): New class.
8166         (inf_child_open_target, inf_child_mourn_inferior)
8167         (inf_child_maybe_unpush_target): Delete.
8168         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
8169         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
8170         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
8171         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
8172         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
8173         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
8174         (inf_ptrace_wait, inf_ptrace_xfer_partial)
8175         (inf_ptrace_thread_alive, inf_ptrace_files_info)
8176         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
8177         methods of inf_ptrace_target.
8178         (inf_ptrace_target): Delete function.
8179         * inf-ptrace.h: Include "inf-child.h".
8180         (inf_ptrace_target): Delete function declaration.
8181         (inf_ptrace_target): New class.
8182         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
8183         * linux-nat.c (linux_target): New.
8184         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
8185         (linux_nat_target::~linux_nat_target): New.
8186         (linux_child_post_attach, linux_child_post_startup_inferior)
8187         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
8188         (linux_child_remove_fork_catchpoint)
8189         (linux_child_insert_vfork_catchpoint)
8190         (linux_child_remove_vfork_catchpoint)
8191         (linux_child_insert_exec_catchpoint)
8192         (linux_child_remove_exec_catchpoint)
8193         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
8194         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
8195         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
8196         (linux_nat_stopped_data_address)
8197         (linux_nat_stopped_by_sw_breakpoint)
8198         (linux_nat_supports_stopped_by_sw_breakpoint)
8199         (linux_nat_stopped_by_hw_breakpoint)
8200         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
8201         (linux_nat_kill, linux_nat_mourn_inferior)
8202         (linux_nat_xfer_partial, linux_nat_thread_alive)
8203         (linux_nat_update_thread_list, linux_nat_pid_to_str)
8204         (linux_nat_thread_name, linux_child_pid_to_exec_file)
8205         (linux_child_static_tracepoint_markers_by_strid)
8206         (linux_nat_is_async_p, linux_nat_can_async_p)
8207         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
8208         (linux_nat_supports_multi_process)
8209         (linux_nat_supports_disable_randomization, linux_nat_async)
8210         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
8211         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
8212         (linux_nat_fileio_open, linux_nat_fileio_readlink)
8213         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
8214         methods of linux_nat_target.
8215         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
8216         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
8217         parameter.
8218         (check_stopped_by_watchpoint): Adjust.
8219         (linux_xfer_partial): Delete.
8220         (linux_target_install_ops, linux_target, linux_nat_add_target):
8221         Delete.
8222         (linux_nat_target::linux_nat_target): New.
8223         * linux-nat.h: Include "inf-ptrace.h".
8224         (linux_nat_target): New.
8225         (linux_target, linux_target_install_ops, linux_nat_add_target):
8226         Delete function declarations.
8227         (linux_target): Declare global.
8228         * linux-thread-db.c (thread_db_target): New.
8229         (thread_db_target::thread_db_target): New.
8230         (thread_db_ops): Delete.
8231         (the_thread_db_target): New.
8232         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
8233         (thread_db_update_thread_list, thread_db_pid_to_str)
8234         (thread_db_extra_thread_info)
8235         (thread_db_thread_handle_to_thread_info)
8236         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
8237         (thread_db_resume): Refactor as methods of thread_db_target.
8238         (init_thread_db_ops): Delete.
8239         (_initialize_thread_db): Remove reference to init_thread_db_ops.
8240         * x86-linux-nat.c: Don't include "linux-nat.h".
8241         (super_post_startup_inferior): Delete.
8242         (x86_linux_nat_target::~x86_linux_nat_target): New.
8243         (x86_linux_child_post_startup_inferior)
8244         (x86_linux_read_description, x86_linux_enable_btrace)
8245         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
8246         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
8247         methods of x86_linux_nat_target.
8248         (x86_linux_create_target): Delete.  Bits folded ...
8249         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
8250         pointer.
8251         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
8252         (x86_linux_nat_target): New class.
8253         (x86_linux_create_target): Delete.
8254         (x86_linux_add_target): Now takes a linux_nat_target pointer.
8255         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
8256         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
8257         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
8258         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
8259         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
8260         make extern.
8261         (x86_use_watchpoints): Delete.
8262         * x86-nat.h: Include "breakpoint.h" and "target.h".
8263         (x86_use_watchpoints): Delete.
8264         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
8265         (x86_stopped_by_watchpoint, x86_stopped_data_address)
8266         (x86_insert_watchpoint, x86_remove_watchpoint)
8267         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
8268         (x86_stopped_by_hw_breakpoint): New declarations.
8269         (x86_nat_target): New template class.
8270
8271         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
8272         (the_ppc_linux_nat_target): New.
8273         (ppc_linux_fetch_inferior_registers)
8274         (ppc_linux_can_use_hw_breakpoint)
8275         (ppc_linux_region_ok_for_hw_watchpoint)
8276         (ppc_linux_ranged_break_num_registers)
8277         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
8278         (ppc_linux_insert_mask_watchpoint)
8279         (ppc_linux_remove_mask_watchpoint)
8280         (ppc_linux_can_accel_watchpoint_condition)
8281         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
8282         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
8283         (ppc_linux_watchpoint_addr_within_range)
8284         (ppc_linux_masked_watch_num_registers)
8285         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
8286         (ppc_linux_read_description): Refactor as methods of
8287         ppc_linux_nat_target.
8288         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
8289
8290         * procfs.c (procfs_xfer_partial): Delete forward declaration.
8291         (procfs_target): New class.
8292         (the_procfs_target): New.
8293         (procfs_target): Delete function.
8294         (procfs_auxv_parse, procfs_attach, procfs_detach)
8295         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
8296         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
8297         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
8298         (procfs_create_inferior, procfs_update_thread_list)
8299         (procfs_thread_alive, procfs_pid_to_str)
8300         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
8301         (procfs_stopped_data_address, procfs_insert_watchpoint)
8302         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
8303         (proc_find_memory_regions, procfs_info_proc)
8304         (procfs_make_note_section): Refactor as methods of procfs_target.
8305         (_initialize_procfs): Adjust.
8306         * sol-thread.c (sol_thread_target): New class.
8307         (sol_thread_ops): Now a sol_thread_target.
8308         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
8309         (sol_thread_fetch_registers, sol_thread_store_registers)
8310         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
8311         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
8312         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
8313         (init_sol_thread_ops): Delete.
8314         (_initialize_sol_thread): Adjust.  Remove references to
8315         init_sol_thread_ops and complete_target_initialization.
8316
8317         * windows-nat.c (windows_nat_target): New class.
8318         (windows_fetch_inferior_registers)
8319         (windows_store_inferior_registers, windows_resume, windows_wait)
8320         (windows_attach, windows_detach, windows_pid_to_exec_file)
8321         (windows_files_info, windows_create_inferior)
8322         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
8323         (windows_close, windows_pid_to_str, windows_xfer_partial)
8324         (windows_get_tib_address, windows_get_ada_task_ptid)
8325         (windows_thread_name, windows_thread_alive): Refactor as
8326         windows_nat_target methods.
8327         (do_initial_windows_stuff): Adjust.
8328         (windows_target): Delete function.
8329         (_initialize_windows_nat): Adjust.
8330
8331         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
8332         (darwin_mourn_inferior, darwin_kill_inferior)
8333         (darwin_create_inferior, darwin_attach, darwin_detach)
8334         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
8335         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
8336         (darwin_supports_multi_process): Refactor as darwin_nat_target
8337         methods.
8338         (darwin_resume_to, darwin_files_info): Delete.
8339         (_initialize_darwin_inferior): Rename to ...
8340         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
8341         * darwin-nat.h: Include "inf-child.h".
8342         (darwin_nat_target): New class.
8343         (darwin_complete_target): Delete.
8344         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
8345         (darwin_target): New.
8346         (i386_darwin_fetch_inferior_registers)
8347         (i386_darwin_store_inferior_registers): Refactor as methods of
8348         darwin_nat_target.
8349         (darwin_complete_target): Delete, with ...
8350         (_initialize_i386_darwin_nat): ... bits factored out here.
8351
8352         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
8353         (the_alpha_linux_nat_target): New.
8354         (alpha_linux_register_u_offset): Refactor as
8355         alpha_linux_nat_target method.
8356         (_initialize_alpha_linux_nat): Adjust.
8357         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
8358         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
8359         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
8360         methods of linux_nat_trad_target.
8361         (linux_trad_target): Delete.
8362         * linux-nat-trad.h (linux_trad_target): Delete function.
8363         (linux_nat_trad_target): New class.
8364         * mips-linux-nat.c (mips_linux_nat_target): New class.
8365         (super_fetch_registers, super_store_registers, super_close):
8366         Delete.
8367         (the_mips_linux_nat_target): New.
8368         (mips64_linux_regsets_fetch_registers)
8369         (mips64_linux_regsets_store_registers)
8370         (mips64_linux_fetch_registers, mips64_linux_store_registers)
8371         (mips_linux_register_u_offset, mips_linux_read_description)
8372         (mips_linux_can_use_hw_breakpoint)
8373         (mips_linux_stopped_by_watchpoint)
8374         (mips_linux_stopped_data_address)
8375         (mips_linux_region_ok_for_hw_watchpoint)
8376         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
8377         (mips_linux_close): Refactor as methods of mips_linux_nat.
8378         (_initialize_mips_linux_nat): Adjust to C++ification.
8379
8380         * aix-thread.c (aix_thread_target): New class.
8381         (aix_thread_ops): Now an aix_thread_target.
8382         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
8383         (aix_thread_fetch_registers, aix_thread_store_registers)
8384         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
8385         (aix_thread_thread_alive, aix_thread_pid_to_str)
8386         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
8387         Refactor as methods of aix_thread_target.
8388         (init_aix_thread_ops): Delete.
8389         (_initialize_aix_thread): Remove references to init_aix_thread_ops
8390         and complete_target_initialization.
8391         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
8392         (rs6000_nat_target): New class.
8393         (the_rs6000_nat_target): New.
8394         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
8395         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
8396         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
8397         (super_create_inferior): Delete.
8398         (_initialize_rs6000_nat): Adjust to C++ification.
8399
8400         * arm-linux-nat.c (arm_linux_nat_target): New class.
8401         (the_arm_linux_nat_target): New.
8402         (arm_linux_fetch_inferior_registers)
8403         (arm_linux_store_inferior_registers, arm_linux_read_description)
8404         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
8405         (arm_linux_remove_hw_breakpoint)
8406         (arm_linux_region_ok_for_hw_watchpoint)
8407         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
8408         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
8409         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
8410         arm_linux_nat_target.
8411         (_initialize_arm_linux_nat): Adjust to C++ification.
8412
8413         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
8414         (the_aarch64_linux_nat_target): New.
8415         (aarch64_linux_fetch_inferior_registers)
8416         (aarch64_linux_store_inferior_registers)
8417         (aarch64_linux_child_post_startup_inferior)
8418         (aarch64_linux_read_description)
8419         (aarch64_linux_can_use_hw_breakpoint)
8420         (aarch64_linux_insert_hw_breakpoint)
8421         (aarch64_linux_remove_hw_breakpoint)
8422         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
8423         (aarch64_linux_region_ok_for_hw_watchpoint)
8424         (aarch64_linux_stopped_data_address)
8425         (aarch64_linux_stopped_by_watchpoint)
8426         (aarch64_linux_watchpoint_addr_within_range)
8427         (aarch64_linux_can_do_single_step): Refactor as methods of
8428         aarch64_linux_nat_target.
8429         (super_post_startup_inferior): Delete.
8430         (_initialize_aarch64_linux_nat): Adjust to C++ification.
8431
8432         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
8433         (the_hppa_linux_nat_target): New.
8434         (hppa_linux_fetch_inferior_registers)
8435         (hppa_linux_store_inferior_registers): Refactor as methods of
8436         hppa_linux_nat_target.
8437         (_initialize_hppa_linux_nat): Adjust to C++ification.
8438
8439         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
8440         (the_ia64_linux_nat_target): New.
8441         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
8442         (ia64_linux_stopped_data_address)
8443         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
8444         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
8445         ia64_linux_nat_target methods.
8446         (super_xfer_partial): Delete.
8447         (_initialize_ia64_linux_nat): Adjust to C++ification.
8448
8449         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
8450         (the_m32r_linux_nat_target): New.
8451         (m32r_linux_fetch_inferior_registers)
8452         (m32r_linux_store_inferior_registers): Refactor as
8453         m32r_linux_nat_target methods.
8454         (_initialize_m32r_linux_nat): Adjust to C++ification.
8455
8456         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
8457         (the_m68k_linux_nat_target): New.
8458         (m68k_linux_fetch_inferior_registers)
8459         (m68k_linux_store_inferior_registers): Refactor as
8460         m68k_linux_nat_target methods.
8461         (_initialize_m68k_linux_nat): Adjust to C++ification.
8462
8463         * s390-linux-nat.c (s390_linux_nat_target): New class.
8464         (the_s390_linux_nat_target): New.
8465         (s390_linux_fetch_inferior_registers)
8466         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
8467         (s390_insert_watchpoint, s390_remove_watchpoint)
8468         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
8469         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
8470         (s390_auxv_parse, s390_read_description): Refactor as methods of
8471         s390_linux_nat_target.
8472         (_initialize_s390_nat): Adjust to C++ification.
8473
8474         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
8475         (the_sparc_linux_nat_target): New.
8476         (_initialize_sparc_linux_nat): Adjust to C++ification.
8477         * sparc-nat.c (sparc_fetch_inferior_registers)
8478         (sparc_store_inferior_registers): Remove target_ops parameter.
8479         * sparc-nat.h (sparc_fetch_inferior_registers)
8480         (sparc_store_inferior_registers): Remove target_ops parameter.
8481         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
8482         (the_sparc64_linux_nat_target): New.
8483         (_initialize_sparc64_linux_nat): Adjust to C++ification.
8484
8485         * spu-linux-nat.c (spu_linux_nat_target): New class.
8486         (the_spu_linux_nat_target): New.
8487         (spu_child_post_startup_inferior, spu_child_post_attach)
8488         (spu_child_wait, spu_fetch_inferior_registers)
8489         (spu_store_inferior_registers, spu_xfer_partial)
8490         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
8491         methods.
8492         (_initialize_spu_nat): Adjust to C++ification.
8493
8494         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
8495         (the_tilegx_linux_nat_target): New.
8496         (fetch_inferior_registers, store_inferior_registers):
8497         Refactor as methods.
8498         (_initialize_tile_linux_nat): Adjust to C++ification.
8499
8500         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
8501         (the_xtensa_linux_nat_target): New.
8502         (xtensa_linux_fetch_inferior_registers)
8503         (xtensa_linux_store_inferior_registers): Refactor as
8504         xtensa_linux_nat_target methods.
8505         (_initialize_xtensa_linux_nat): Adjust to C++ification.
8506
8507         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
8508         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
8509         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
8510         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
8511         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
8512         (fbsd_stopped_by_sw_breakpoint)
8513         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
8514         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
8515         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
8516         (fbsd_post_startup_inferior, fbsd_post_attach)
8517         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
8518         (fbsd_set_syscall_catchpoint)
8519         (super_xfer_partial, super_resume, super_wait)
8520         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
8521         (fbsd_handle_debug_trap): Remove target_ops parameter.
8522         (fbsd_nat_add_target): Delete.
8523         * fbsd-nat.h: Include "inf-ptrace.h".
8524         (fbsd_nat_add_target): Delete.
8525         (USE_SIGTRAP_SIGINFO): Define.
8526         (fbsd_nat_target): New class.
8527
8528         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
8529         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
8530         (amd64bsd_target): Delete.
8531         * amd64-bsd-nat.h: New file.
8532         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
8533         "x86-bsd-nat.h".
8534         (amd64_fbsd_nat_target): New class.
8535         (the_amd64_fbsd_nat_target): New.
8536         (amd64fbsd_read_description): Refactor as method of
8537         amd64_fbsd_nat_target.
8538         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
8539         (_initialize_amd64fbsd_nat): Adjust to C++ification.
8540         * amd64-nat.h (amd64bsd_target): Delete function declaration.
8541         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
8542         (i386bsd_store_inferior_registers): Remove target_ops parameter.
8543         (i386bsd_target): Delete.
8544         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
8545         (i386bsd_fetch_inferior_registers)
8546         (i386bsd_store_inferior_registers): Declare.
8547         (i386_bsd_nat_target): New class.
8548         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
8549         (the_i386_fbsd_nat_target): New.
8550         (i386fbsd_resume, i386fbsd_read_description): Refactor as
8551         i386_fbsd_nat_target methods.
8552         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
8553         (_initialize_i386fbsd_nat): Adjust to C++ification.
8554         * x86-bsd-nat.c (super_mourn_inferior): Delete.
8555         (x86bsd_mourn_inferior, x86bsd_target): Delete.
8556         (_initialize_x86_bsd_nat): Adjust to C++ification.
8557         * x86-bsd-nat.h: Include "x86-nat.h".
8558         (x86bsd_target): Delete declaration.
8559         (x86bsd_nat_target): New class.
8560
8561         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
8562         (the_aarch64_fbsd_nat_target): New.
8563         (aarch64_fbsd_fetch_inferior_registers)
8564         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
8565         aarch64_fbsd_nat_target.
8566         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
8567         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
8568         (the_alpha_bsd_nat_target): New.
8569         (alphabsd_fetch_inferior_registers)
8570         (alphabsd_store_inferior_registers): Refactor as
8571         alpha_bsd_nat_target methods.
8572         (_initialize_alphabsd_nat): Refactor as methods of
8573         alpha_bsd_nat_target.
8574         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
8575         (the_amd64_nbsd_nat_target): New.
8576         (_initialize_amd64nbsd_nat): Adjust to C++ification.
8577         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
8578         (the_amd64_obsd_nat_target): New.
8579         (_initialize_amd64obsd_nat): Adjust to C++ification.
8580         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
8581         (the_arm_fbsd_nat_target): New.
8582         (arm_fbsd_fetch_inferior_registers)
8583         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
8584         (_initialize_arm_fbsd_nat): Refactor as methods of
8585         arm_fbsd_nat_target.
8586         (_initialize_arm_fbsd_nat): Adjust to C++ification.
8587         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
8588         (the_arm_netbsd_nat_target): New.
8589         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
8590         arm_netbsd_nat_target.
8591         (_initialize_arm_netbsd_nat): Adjust to C++ification.
8592         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
8593         (the_hppa_nbsd_nat_target): New.
8594         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
8595         hppa_nbsd_nat_target methods.
8596         (_initialize_hppanbsd_nat): Adjust to C++ification.
8597         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
8598         (the_hppa_obsd_nat_target): New.
8599         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
8600         methods of hppa_obsd_nat_target.
8601         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
8602         add_target.
8603         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
8604         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
8605         add_target.
8606         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
8607         (_initialize_i386obsd_nat): Use add_target.
8608         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
8609         (the_m68k_bsd_nat_target): New.
8610         (m68kbsd_fetch_inferior_registers)
8611         (m68kbsd_store_inferior_registers): Refactor as methods of
8612         m68k_bsd_nat_target.
8613         (_initialize_m68kbsd_nat): Adjust to C++ification.
8614         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
8615         (the_mips_fbsd_nat_target): New.
8616         (mips_fbsd_fetch_inferior_registers)
8617         (mips_fbsd_store_inferior_registers): Refactor as methods of
8618         mips_fbsd_nat_target.
8619         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
8620         add_target.
8621         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
8622         (the_mips_nbsd_nat_target): New.
8623         (mipsnbsd_fetch_inferior_registers)
8624         (mipsnbsd_store_inferior_registers): Refactor as methods of
8625         mips_nbsd_nat_target.
8626         (_initialize_mipsnbsd_nat): Adjust to C++ification.
8627         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
8628         (the_mips64_obsd_nat_target): New.
8629         (mips64obsd_fetch_inferior_registers)
8630         (mips64obsd_store_inferior_registers): Refactor as methods of
8631         mips64_obsd_nat_target.
8632         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
8633         add_target.
8634         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
8635         nbsd_nat_target.
8636         * nbsd-nat.h: Include "inf-ptrace.h".
8637         (nbsd_nat_target): New class.
8638         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
8639         (obsd_wait): Refactor as methods of obsd_nat_target.
8640         (obsd_add_target): Delete.
8641         * obsd-nat.h: Include "inf-ptrace.h".
8642         (obsd_nat_target): New class.
8643         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
8644         (the_ppc_fbsd_nat_target): New.
8645         (ppcfbsd_fetch_inferior_registers)
8646         (ppcfbsd_store_inferior_registers): Refactor as methods of
8647         ppc_fbsd_nat_target.
8648         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
8649         add_target.
8650         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
8651         (the_ppc_nbsd_nat_target): New.
8652         (ppcnbsd_fetch_inferior_registers)
8653         (ppcnbsd_store_inferior_registers): Refactor as methods of
8654         ppc_nbsd_nat_target.
8655         (_initialize_ppcnbsd_nat): Adjust to C++ification.
8656         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
8657         (the_ppc_obsd_nat_target): New.
8658         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
8659         methods of ppc_obsd_nat_target.
8660         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
8661         add_target.
8662         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
8663         (the_sh_nbsd_nat_target): New.
8664         (shnbsd_fetch_inferior_registers)
8665         (shnbsd_store_inferior_registers): Refactor as methods of
8666         sh_nbsd_nat_target.
8667         (_initialize_shnbsd_nat): Adjust to C++ification.
8668         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
8669         (inf_ptrace_xfer_partial): Delete.
8670         (sparc_xfer_partial, sparc_target): Delete.
8671         * sparc-nat.h (sparc_fetch_inferior_registers)
8672         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
8673         (sparc_target): Delete function declaration.
8674         (sparc_target): New template class.
8675         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
8676         (_initialize_sparcnbsd_nat): Adjust to C++ification.
8677         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
8678         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
8679         add_target.
8680         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
8681         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
8682         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
8683         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
8684         add_target.
8685         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
8686         (the_vax_bsd_nat_target): New.
8687         (vaxbsd_fetch_inferior_registers)
8688         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
8689         methods.
8690         (_initialize_vaxbsd_nat): Adjust to C++ification.
8691
8692         * bsd-kvm.c (bsd_kvm_target): New class.
8693         (bsd_kvm_ops): Now a bsd_kvm_target.
8694         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
8695         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
8696         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
8697         bsd_kvm_target.
8698         (bsd_kvm_return_one): Delete.
8699         (bsd_kvm_add_target): Adjust to C++ification.
8700
8701         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
8702         (nto_procfs_target_procfs): New classes.
8703         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
8704         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
8705         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
8706         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
8707         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
8708         (procfs_remove_hw_breakpoint, procfs_resume)
8709         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
8710         (procfs_kill_inferior, procfs_store_registers)
8711         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
8712         as methods of nto_procfs_target.
8713         (nto_procfs_ops): Now an nto_procfs_target_procfs.
8714         (nto_native_ops): Delete.
8715         (procfs_open, procfs_native_open): Delete.
8716         (nto_native_ops): Now an nto_procfs_target_native.
8717         (init_procfs_targets): Adjust to C++ification.
8718         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
8719         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
8720         Refactor as methods of nto_procfs_target.
8721
8722         * go32-nat.c (go32_nat_target): New class.
8723         (the_go32_nat_target): New.
8724         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
8725         (go32_store_registers, go32_xfer_partial, go32_files_info)
8726         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
8727         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
8728         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
8729         (go32_pid_to_str): Refactor as methods of go32_nat_target.
8730         (go32_target): Delete.
8731         (_initialize_go32_nat): Adjust to C++ification.
8732
8733         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
8734         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
8735         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
8736         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
8737         gnu_nat_target.
8738         (gnu_target): Delete.
8739         * gnu-nat.h (gnu_target): Delete.
8740         (gnu_nat_target): New class.
8741         * i386-gnu-nat.c (gnu_base_target): New.
8742         (i386_gnu_nat_target): New class.
8743         (the_i386_gnu_nat_target): New.
8744         (_initialize_i386gnu_nat): Adjust to C++ification.
8745
8746 2018-05-02  Pedro Alves  <palves@redhat.com>
8747
8748         * bfd-target.c (target_bfd_xclose): Rename to ...
8749         (target_bfd_close): ... this.
8750         (target_bfd_reopen): Adjust.
8751         * target.c (target_close): Remove references to to_xclose.
8752         * target.h (target_ops::to_xclose): Delete.
8753         (target_ops::to_close): Update comments.
8754
8755 2018-05-02  Pedro Alves  <palves@redhat.com>
8756
8757         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
8758         "linux-nat.h".
8759         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
8760         * inf-ptrace.c (inf_ptrace_register_u_offset)
8761         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
8762         (inf_ptrace_store_register, inf_ptrace_store_registers)
8763         (inf_ptrace_trad_target): Move to ...
8764         * linux-nat-trad.c: ... this new file.
8765         * linux-nat-trad.h: New file.
8766         * linux-nat.c (linux_target_install_ops): Make extern.
8767         (linux_trad_target): Delete.
8768         * linux-nat.h (linux_trad_target): Delete declaration.
8769         (linux_target_install_ops): Declare.
8770         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
8771         "linux-nat.h".
8772
8773 2018-05-02  Pedro Alves  <palves@redhat.com>
8774
8775         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
8776         procfs_target/add_target here.
8777         * procfs.c (procfs_target): Make static.
8778         (_initialize_procfs): Call add_target here.
8779         * procfs.h (struct target_ops): Remove forward declaration.
8780         (procfs_target): Remove declaration.
8781         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
8782
8783 2018-05-02  Pedro Alves  <palves@redhat.com>
8784
8785         * procfs.c (procfs_stopped_by_watchpoint)
8786         (procfs_insert_watchpoint, procfs_remove_watchpoint)
8787         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
8788         Forward declare.
8789         (procfs_use_watchpoints): Delete, move contents...
8790         (procfs_target): ... here.
8791         * procfs.h (procfs_use_watchpoints): Delete declaration.
8792         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
8793         procfs_use_watchpoints.
8794         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
8795         procfs_use_watchpoints.
8796
8797 2018-05-02  Tom Tromey  <tom@tromey.com>
8798
8799         PR python/20084:
8800         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
8801         and var_zuinteger_unlimited.
8802         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
8803         and PARAM_ZUINTEGER_UNLIMITED.
8804         (set_parameter_value): Handle var_zuinteger and
8805         var_zuinteger_unlimited.
8806         (add_setshow_generic): Likewise.
8807         (parmpy_init): Likewise.
8808
8809 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
8810
8811         PR rust/23124
8812         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
8813         pointer is not null before dereferencing it.
8814
8815 2018-04-30  Tom Tromey  <tom@tromey.com>
8816
8817         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
8818         is_mi_like_p.
8819
8820 2018-04-30  Tom Tromey  <tom@tromey.com>
8821
8822         * breakpoint.c (mention): Remove use of is_mi_like_p.
8823         (print_mention_ranged_breakpoint): Likewise.
8824         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
8825         of is_mi_like_p.
8826
8827 2018-04-30  Tom Tromey  <tom@tromey.com>
8828
8829         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
8830
8831 2018-04-30  Tom Tromey  <tom@tromey.com>
8832
8833         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
8834         (info_spu_event_command): Remove some uses of is_mi_like_p.
8835
8836 2018-04-30  Tom Tromey  <tom@tromey.com>
8837
8838         * python/py-framefilter.c (py_print_single_arg)
8839         (enumerate_locals, py_print_args, py_print_frame): Remove some
8840         uses of is_mi_like_p.
8841
8842 2018-04-30  Tom Tromey  <tom@tromey.com>
8843
8844         * ui-out.c: Update.
8845         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
8846         * ui-out.h (ui_out::is_mi_like_p): Now const.
8847         (ui_out::do_is_mi_like_p): Now const.
8848         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
8849
8850 2018-04-30  Tom Tromey  <tom@tromey.com>
8851
8852         * varobj.c (varobj_set_visualizer): Use new_reference.
8853         * python/python.c (gdbpy_decode_line): Use new_reference.
8854         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
8855         new_reference.
8856
8857 2018-04-30  Tom Tromey  <tom@tromey.com>
8858
8859         * varobj.c (install_new_value): Use new_reference.
8860         * value.h (value_incref): Return void.  Swap intro comment with
8861         value_decref.
8862         * value.c (set_value_parent): Use new_reference.
8863         (value_incref): Return void.  Update intro comment.
8864         (release_value): Use new_reference.
8865         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
8866
8867 2018-04-30  Tom Tromey  <tom@tromey.com>
8868
8869         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
8870         * gdb_bfd.h (new_bfd_ref): Remove.
8871         (gdb_bfd_open): Update comment.
8872         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
8873         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
8874         (gdb_bfd_fdopenr): Use new_reference.
8875         * exec.c (exec_file_attach): Use new_reference.
8876
8877 2018-04-30  Tom Tromey  <tom@tromey.com>
8878
8879         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
8880         method.
8881
8882 2018-04-30  Tom Tromey  <tom@tromey.com>
8883
8884         * jit.c (jit_read_code_entry): Use type_align.
8885         * i386-tdep.c (i386_gdbarch_init): Don't call
8886         set_gdbarch_long_long_align_bit.
8887         * gdbarch.sh: Remove long_long_align_bit.
8888         * gdbarch.c, gdbarch.h: Rebuild.
8889         * arc-tdep.c (arc_type_align): New function.
8890         (arc_gdbarch_init): Use arc_type_align.  Don't call
8891         set_gdbarch_long_long_align_bit.
8892
8893 2018-04-30  Tom Tromey  <tom@tromey.com>
8894
8895         * rust-lang.c (rust_type_alignment): Remove.
8896         (rust_composite_type): Use type_align.
8897
8898 2018-04-30  Tom Tromey  <tom@tromey.com>
8899
8900         * NEWS: Mention Type.align.
8901         * python/py-type.c (typy_get_alignof): New function.
8902         (type_object_getset): Add "alignof".
8903
8904 2018-04-30  Tom Tromey  <tom@tromey.com>
8905
8906         PR exp/17095:
8907         * NEWS: Update.
8908         * std-operator.def (UNOP_ALIGNOF): New operator.
8909         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
8910         New.
8911         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
8912         * c-lang.c (c_op_print_tab): Add alignof.
8913         * c-exp.y (ALIGNOF): New token.
8914         (exp): Add "ALIGNOF" production.
8915         (ident_tokens): Add _Alignof and alignof.
8916
8917 2018-04-30  Tom Tromey  <tom@tromey.com>
8918
8919         * i386-tdep.c (i386_type_align): New function.
8920         (i386_gdbarch_init): Update.
8921         * gdbarch.sh (type_align): New method.
8922         * gdbarch.c, gdbarch.h: Rebuild.
8923         * arch-utils.h (default_type_align): Declare.
8924         * arch-utils.c (default_type_align): New function.
8925         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
8926         (struct type) <align_log2>: New field.
8927         <instance_flags>: Now a bitfield.
8928         (TYPE_RAW_ALIGN): New macro.
8929         (type_align, type_raw_align, set_type_align): Declare.
8930         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
8931         functions.
8932         * dwarf2read.c (quirk_rust_enum): Set type alignment.
8933         (get_alignment, maybe_set_alignment): New functions.
8934         (read_structure_type, read_enumeration_type, read_array_type)
8935         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
8936         (read_subrange_type, read_base_type): Set type alignment.
8937
8938 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
8939
8940         * dwarf2read.c (read_index_from_section): Use bool.
8941
8942 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
8943
8944         PR gdb/22950
8945         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
8946         with #ifdef.
8947
8948 2018-04-29  John Reiser  <jreiser@BitWagon.com>
8949
8950         PR build/22873
8951         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
8952         last step, and do it atomically.
8953
8954 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
8955
8956         * compile/compile-c-types.c (convert_int, convert_float):
8957         Update for C FE v1.
8958
8959 2018-04-27  Tom Tromey  <tom@tromey.com>
8960
8961         PR rust/22545:
8962         * rust-lang.c (rust_inclusive_range_type_p): New function.
8963         (rust_range): Handle inclusive ranges.
8964         (rust_compute_range): Likewise.
8965         * rust-exp.y (struct rust_op) <inclusive>: New field.
8966         (DOTDOTEQ): New constant.
8967         (range_expr): Add "..=" productions.
8968         (operator_tokens): Add "..=" token.
8969         (ast_range): Add "inclusive" parameter.
8970         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
8971         ranges.
8972         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
8973         bounds values.
8974         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
8975         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
8976         Update comments.
8977         * expprint.c (print_subexp_standard): Handle new bounds values.
8978         (dump_subexp_body_standard): Likewise.
8979
8980 2018-04-27  Tom Tromey  <tom@tromey.com>
8981
8982         * configure: Rebuild.
8983         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
8984         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
8985         "OVERRIDE".
8986         (class symbol_needs_eval_context): Likewise.
8987         * dwarf2read.c (mock_mapped_index::symbol_name_count)
8988         (mock_mapped_index::symbol_name_at): Use "override".  Remove
8989         "virtual".
8990         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
8991         "override".
8992         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
8993         * aarch64-tdep.c (instruction_reader::read): Use "override".
8994         (instruction_reader_test::read): Likewise.
8995         * arm-tdep.c (instruction_reader::read): Use "override".
8996         (instruction_reader_thumb::read): Likewise.
8997
8998 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
8999
9000         PR remote/9665
9001         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
9002         instead of remote_send.
9003         (remote_send): Remove.
9004
9005 2018-04-26  Pedro Alves  <palves@redhat.com>
9006
9007         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
9008         find_function_start_sal instead of find_pc_line.
9009
9010 2018-04-26  Pedro Alves  <palves@redhat.com>
9011
9012         * breakpoint.c (set_breakpoint_location_function): Handle
9013         mst_data_gnu_ifunc.
9014         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
9015         * elfread.c (elf_symtab_read): Give data symbols with
9016         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
9017         (elf_rel_plt_read): Update comment.
9018         * linespec.c (convert_linespec_to_sals): Handle
9019         mst_data_gnu_ifunc.
9020         (minsym_found): Handle mst_data_gnu_ifunc.
9021         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
9022         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
9023         * parse.c (find_minsym_type_and_address): Handle
9024         mst_data_gnu_ifunc.
9025         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
9026         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
9027         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
9028         comment.
9029         <mst_data_gnu_ifunc>: New enumerator.
9030
9031 2018-04-26  Pedro Alves  <palves@redhat.com>
9032
9033         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
9034         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
9035         'want_trampoline' parameter by a lookup_msym_prefer parameter.
9036         Handle it.
9037         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
9038         (lookup_minimal_symbol_by_pc): Adjust.
9039         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
9040         (lookup_solib_trampoline_symbol_by_pc): Adjust.
9041         * minsyms.h (lookup_msym_prefer): New enum.
9042         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
9043         parameter by a lookup_msym_prefer parameter.
9044
9045 2018-04-26  Pedro Alves  <palves@redhat.com>
9046
9047         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
9048         ends in "@plt" instead of looking at the symbol's section.
9049
9050 2018-04-26  Pedro Alves  <palves@redhat.com>
9051
9052         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
9053         all references.
9054         (find_pc_partial_function_gnu_ifunc): Rename to ...
9055         (find_pc_partial_function): ... this, and remove references to
9056         'is_gnu_ifunc_p'.
9057         (find_pc_partial_function): Delete old implementation.
9058         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
9059
9060 2018-04-26  Pedro Alves  <palves@redhat.com>
9061
9062         * linespec.c (struct bound_minimal_symbol_search_key): New.
9063         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
9064         skip first line if we found a GNU ifunc minimal symbol by name.
9065         (compare_msymbols): Change parameters to work with a destructured
9066         lhs minsym.
9067         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
9068         functions.
9069
9070 2018-04-26  Pedro Alves  <palves@redhat.com>
9071
9072         * breakpoint.c (set_breakpoint_location_function): Don't resolve
9073         ifunc targets here.  Instead, if we have an ifunc minsym, use its
9074         address/name.
9075         (add_location_to_breakpoint): Store the minsym and the objfile in
9076         the breakpoint location.
9077         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
9078         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
9079         Record the minsym in the sal.
9080         * symtab.h (symtab_and_line) <msymbol>: New field.
9081
9082 2018-04-26  Pedro Alves  <palves@redhat.com>
9083
9084         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
9085         unless we actually resolved the ifunc.
9086
9087 2018-04-26  Pedro Alves  <palves@redhat.com>
9088
9089         * c-exp.y (variable production): Prefer ifunc minsyms over
9090         regular function symbols.
9091         * symtab.c (find_gnu_ifunc): New function.
9092         * minsyms.h (lookup_msym_prefer): New enum.
9093         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
9094         parameter by a lookup_msym_prefer parameter.
9095         * symtab.h (find_gnu_ifunc): New declaration.
9096
9097 2018-04-26  Pedro Alves  <palves@redhat.com>
9098
9099         * blockframe.c (find_gnu_ifunc_target_type): New function.
9100         (find_function_type): New.
9101         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
9102         return a value with a memory address.
9103         (eval_call): For calls to GNU ifunc functions, try to find the
9104         type of the target function from the type that the resolver
9105         returns.
9106         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
9107         symbols.
9108         * infcall.c (find_function_return_type): Delete.
9109         (find_function_addr): Add 'function_type' parameter.  For calls to
9110         GNU ifunc functions, try to find the type of the target function
9111         from the type that the resolver returns, and return it via
9112         FUNCTION_TYPE.
9113         (call_function_by_hand_dummy): Adjust to use the function type
9114         returned by find_function_addr.
9115         (find_function_addr): Add 'function_type' parameter and move
9116         description here.
9117         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
9118         declarations.
9119
9120 2018-04-26  Pedro Alves  <palves@redhat.com>
9121
9122         * c-exp.y (variable production): Skip finding an alias for ifunc
9123         symbols.
9124
9125 2018-04-26  Pedro Alves  <palves@redhat.com>
9126
9127         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
9128
9129 2018-04-25  Pedro Alves  <palves@redhat.com>
9130
9131         * infcmd.c (kill_command): Print the pid as string, not the whole
9132         thread's ptid.  Add comment.  s/has been killed/killed/ in output
9133         message.
9134         * remote.c (remote_detach_1): Print the pid as string, not the
9135         whole thread's ptid.
9136
9137 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
9138             Sergio Durigan Junior  <sergiodj@redhat.com>
9139             Pedro Alves  <palves@redhat.com>
9140
9141         * infcmd.c (kill_command): Print message when inferior has
9142         been killed.
9143         * inferior.c (print_inferior_events): Remove 'static'.  Set as
9144         '1'.
9145         (add_inferior): Improve message printed when
9146         'print_inferior_events' is on.
9147         (exit_inferior): Remove message printed when
9148         'print_inferior_events' is on.
9149         (detach_inferior): Improve message printed when
9150         'print_inferior_events' is on.
9151         (initialize_inferiors): Use 'add_inferior_silent' to set
9152         'current_inferior_'.
9153         * inferior.h (print_inferior_events): Declare here as
9154         'extern'.
9155         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
9156         '[Detaching...]' messages when 'print_inferior_events' is on.
9157         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
9158         as prefix/suffix for messages.  Remove periods.  Fix erroneous
9159         'Detaching after fork from child...', replace it by '... from
9160         parent...'.
9161         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
9162         prefix/suffix when printing 'Detaching...' messages.  Print
9163         them when 'print_inferior_events' is on.
9164         * remote.c (remote_detach_1): Print message when detaching
9165         from inferior and '!is_fork_parent'.
9166
9167 2018-04-24  Tom Tromey  <tom@tromey.com>
9168
9169         * cli-out.h: Reindent.
9170
9171 2018-04-24  Tom Tromey  <tom@tromey.com>
9172
9173         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
9174         (cli_ui_out::do_field_string): Use fputs_filtered.
9175         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
9176
9177 2018-04-23  Tom Tromey  <tom@tromey.com>
9178
9179         * guile/scm-frame.c (gdbscm_frame_read_var): Use
9180         gdb::unique_xmalloc_ptr.
9181
9182 2018-04-23  Tom Tromey  <tom@tromey.com>
9183
9184         * configure: Rebuild.
9185
9186 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
9187
9188         PR gdb/23095
9189         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
9190         prepare_for_testing.  Set normal_bp to r_debug_state if target
9191         is bsd.
9192
9193 2018-04-21  Pedro Alves  <palves@redhat.com>
9194             Rajendra SY  <rajendra.sy@gmail.com>
9195
9196         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
9197         * remote.c (extended_remote_attach): In all-stop mode, mark the
9198         thread as executing.
9199
9200 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
9201
9202         * thread.c (thread_apply_all_command): Fix comment.
9203         (thread_command): Fix comment.
9204
9205 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
9206
9207         * common/tdesc.h (tdesc_create_feature): Remove xml filename
9208         parameter.
9209         * features/aarch64-core.c (create_feature_aarch64_core):
9210         Regenerate.
9211         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
9212         Likewise.
9213         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
9214         Likewise.
9215         * features/i386/32bit-avx512.c
9216         (create_feature_i386_32bit_avx512): Likewise.
9217         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
9218         Likewise.
9219         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
9220         Likewise.
9221         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
9222         Likewise.
9223         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
9224         Likewise.
9225         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
9226         Likewise.
9227         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
9228         Likewise.
9229         * features/i386/64bit-avx512.c
9230         (create_feature_i386_64bit_avx512): Likewise.
9231         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
9232         Likewise.
9233         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
9234         Likewise.
9235         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
9236         Likewise.
9237         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
9238         Likewise.
9239         * features/i386/64bit-segments.c
9240         (create_feature_i386_64bit_segments): Likewise.
9241         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
9242         Likewise.
9243         * features/i386/x32-core.c
9244         (create_feature_i386_x32_core): Likewise.
9245         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
9246         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
9247         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
9248         * target-descriptions.c: In generated code, don't pass xml
9249         filename.
9250
9251 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9252
9253         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
9254         (print_xml_feature::visit_post): Likewise.
9255         (print_xml_feature::visit): Likewise.
9256         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
9257         (print_xml_feature): Add new class.
9258         * regformats/regdat.sh: Null xmltarget on feature targets.
9259         * target-descriptions.c (struct target_desc): Add xmltarget.
9260         (maintenance_check_tdesc_xml_convert): Add unittest function.
9261         (tdesc_get_features_xml): Add function to get xml.
9262         (maintenance_check_xml_descriptions): Test xml generation.
9263         * xml-tdesc.c (string_read_description_xml): Add function.
9264         * xml-tdesc.h (string_read_description_xml): Add declaration.
9265
9266 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9267
9268         * features/Makefile: Add feature marker to targets with new style
9269         target descriptions.
9270         * regformats/aarch64.dat: Regenerate.
9271         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
9272         * regformats/i386/amd64-avx-linux.dat: Likewise.
9273         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
9274         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
9275         * regformats/i386/amd64-linux.dat: Likewise.
9276         * regformats/i386/amd64-mpx-linux.dat: Likewise.
9277         * regformats/i386/amd64.dat: Likewise.
9278         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
9279         * regformats/i386/i386-avx-linux.dat: Likewise.
9280         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
9281         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
9282         * regformats/i386/i386-linux.dat: Likewise.
9283         * regformats/i386/i386-mmx-linux.dat: Likewise.
9284         * regformats/i386/i386-mpx-linux.dat: Likewise.
9285         * regformats/i386/i386.dat: Likewise.
9286         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
9287         * regformats/i386/x32-avx-linux.dat: Likewise.
9288         * regformats/i386/x32-linux.dat: Likewise.
9289         * regformats/tic6x-c62x-linux.dat: Likewise.
9290         * regformats/tic6x-c64x-linux.dat: Likewise.
9291         * regformats/tic6x-c64xp-linux.dat: Likewise.
9292         * regformats/regdat.sh: Parse feature marker.
9293
9294 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9295
9296         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
9297         (tdesc_osabi_name): Likewise.
9298         * target-descriptions.c (tdesc_architecture_name): Add new
9299         function.
9300         (tdesc_osabi_name): Likewise.
9301
9302 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9303
9304         * common/tdesc.c (tdesc_predefined_type): Move to here.
9305         (tdesc_named_type): Likewise.
9306         (tdesc_create_vector): Likewise.
9307         (tdesc_create_struct): Likewise.
9308         (tdesc_set_struct_size): Likewise.
9309         (tdesc_create_union): Likewise.
9310         (tdesc_create_flags): Likewise.
9311         (tdesc_create_enum): Likewise.
9312         (tdesc_add_field): Likewise.
9313         (tdesc_add_typed_bitfield): Likewise.
9314         (tdesc_add_bitfield): Likewise.
9315         (tdesc_add_flag): Likewise.
9316         (tdesc_add_enum_value): Likewise.
9317         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
9318         (struct tdesc_type_vector): Likewise.
9319         (struct tdesc_type_field): Likewise.
9320         (struct tdesc_type_with_fields): Likewise.
9321         (tdesc_create_enum): Add declaration.
9322         (tdesc_add_typed_bitfield): Likewise.
9323         (tdesc_add_enum_value): Likewise.
9324         * target-descriptions.c (tdesc_type_field): Move from here.
9325         (tdesc_type_builtin): Likewise.
9326         (tdesc_type_vector): Likewise.
9327         (tdesc_type_with_fields): Likewise.
9328         (tdesc_predefined_types): Likewise.
9329         (tdesc_named_type): Likewise.
9330         (tdesc_create_vector): Likewise.
9331         (tdesc_create_struct): Likewise.
9332         (tdesc_set_struct_size): Likewise.
9333         (tdesc_create_union): Likewise.
9334         (tdesc_create_flags): Likewise.
9335         (tdesc_create_enum): Likewise.
9336         (tdesc_add_field): Likewise.
9337         (tdesc_add_typed_bitfield): Likewise.
9338         (tdesc_add_bitfield): Likewise.
9339         (tdesc_add_flag): Likewise.
9340         (tdesc_add_enum_value): Likewise.
9341         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
9342         (tdesc_add_typed_bitfield): Likewise.
9343         (tdesc_add_enum_value): Likewise.
9344
9345 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9346
9347         * common/tdesc.c (tdesc_feature::accept): Move to here.
9348         (tdesc_feature::operator==): Likewise.
9349         (tdesc_create_reg): Likewise.
9350         * common/tdesc.h (tdesc_type_kind): Likewise.
9351         (struct tdesc_type): Likewise.
9352         (struct tdesc_feature): Likewise.
9353         * regformats/regdat.sh: Create a feature.
9354         * target-descriptions.c (tdesc_type_kind): Move from here.
9355         (tdesc_type): Likewise.
9356         (tdesc_type_up): Likewise.
9357         (tdesc_feature): Likewise.
9358         (tdesc_create_reg): Likewise.
9359
9360 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9361
9362         * Makefile.in: Add arch/tdesc.c
9363         * common/tdesc.c: New file.
9364         * common/tdesc.h (tdesc_element_visitor): Move to here.
9365         (tdesc_element): Likewise.
9366         (tdesc_reg): Likewise.
9367         (tdesc_reg_up): Likewise.
9368         * regformats/regdef.h (reg): Add offset to constructors.
9369         * target-descriptions.c (tdesc_element_visitor): Move from here.
9370         (tdesc_element): Likewise.
9371         (tdesc_reg): Likewise.
9372         (tdesc_reg_up): Likewise.
9373
9374 2018-04-17  Tom Tromey  <tom@tromey.com>
9375
9376         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
9377         discriminant field.
9378
9379 2018-04-17  Tom Tromey  <tom@tromey.com>
9380
9381         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
9382
9383 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9384
9385         * symtab.c (print_symbol_info): Skip printing filename and line
9386         number when `last' is NULL.
9387         (symtab_symbol_info): Use empty string instead of NULL for first
9388         invocation of print_symbol_info.
9389         (rbreak_command): Pass NULL to `last' parameter of
9390         print_symbol_info.
9391
9392 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
9393
9394         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
9395         instead of nullptr.
9396
9397 2018-04-16  Pedro Alves  <palves@redhat.com>
9398
9399         * MAINTAINERS (sh): Remove.
9400         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
9401         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
9402         (ALLDEPFILES): Remove sh64-tdep.c.
9403         * NEWS: Mentions that support for SH-5/SH64 is removed.
9404         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
9405         (sh*-*-openbsd*): Ditto.
9406         (sh64-*-elf*): Remove.
9407         (sh*): Remove.
9408         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
9409         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
9410         * sh-tdep.c: No longer include "sh64-tdep.h".
9411         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
9412         * sh64-tdep.c, sh64-tdep.h: Remove files.
9413
9414 2018-04-16  Pedro Alves  <palves@redhat.com>
9415
9416         * MAINTAINERS: Remove m88k.
9417         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
9418         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
9419         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
9420         * NEWS: Mention that support for m88k was removed.
9421         * configure.host (m88*-*-*): Remove support.
9422         * configure.nat (m88k-*-*): Remove support.
9423         * configure.tgt (m88*-*-openbsd*): Remove.
9424         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
9425
9426 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
9427
9428         * configure.tgt (x86_tobjs): New variable.
9429         (amd64_tobjs, i386_tobjs): Use it.
9430
9431 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9432
9433         * symtab.c (print_symbol_info): Precede the symbol definition by
9434         the line number when available.
9435         * NEWS: Advertise this enhancement.
9436
9437 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
9438
9439         * NEWS (New options): announce set/show record btrace cpu.
9440         * btrace.c: Include record-btrace.h.
9441         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
9442         the vendor is unknown.
9443         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
9444         Maybe overwrite the btrace configuration's cpu.
9445         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
9446         (btrace_fetch): Add cpu parameter.  Update callers.
9447         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
9448         Maybe overwrite the btrace configuration's cpu.  Skip enabling
9449         errata workarounds if the vendor is unknown.
9450         * python/py-record-btrace.c: Include record-btrace.h.
9451         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
9452         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
9453         * record-btrace.c (record_btrace_cpu_state_kind): New.
9454         (record_btrace_cpu): New.
9455         (set_record_btrace_cpu_cmdlist): New.
9456         (record_btrace_get_cpu): New.
9457         (require_btrace_thread, record_btrace_info)
9458         (record_btrace_resume_thread): Call record_btrace_get_cpu.
9459         (cmd_set_record_btrace_cpu_none): New.
9460         (cmd_set_record_btrace_cpu_auto): New.
9461         (cmd_set_record_btrace_cpu): New.
9462         (cmd_show_record_btrace_cpu): New.
9463         (_initialize_record_btrace): Initialize set/show record btrace cpu
9464         commands.
9465         * record-btrace.h (record_btrace_get_cpu): New.
9466
9467 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
9468
9469         * record.c (set_record_command): Fix typo in message.
9470
9471 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
9472
9473         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
9474
9475 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
9476
9477         * infrun.c (process_event_stop_test): Call
9478         gdbarch_in_indirect_branch_thunk.
9479         * gdbarch.sh (in_indirect_branch_thunk): New.
9480         * gdbarch.c: Regenerated.
9481         * gdbarch.h: Regenerated.
9482         * x86-tdep.h: New.
9483         * x86-tdep.c: New.
9484         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
9485         (HFILES_NO_SRCDIR): Add x86-tdep.h.
9486         (ALLDEPFILES): Add x86-tdep.c.
9487         * arch-utils.h (default_in_indirect_branch_thunk): New.
9488         * arch-utils.c (default_in_indirect_branch_thunk): New.
9489         * i386-tdep: Include x86-tdep.h.
9490         (i386_in_indirect_branch_thunk): New.
9491         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
9492         function.
9493         * amd64-tdep: Include x86-tdep.h.
9494         (amd64_in_indirect_branch_thunk): New.
9495         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
9496
9497 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
9498
9499         PR gdb/23053
9500         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
9501         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
9502         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
9503         regression.
9504
9505 2018-04-12  Tom Tromey  <tom@tromey.com>
9506
9507         * rust-lang.c (rust_print_struct_def): Remove univariant code.
9508         (rust_evaluate_subexp): Likewise.
9509
9510 2018-04-12  Pedro Alves  <palves@redhat.com>
9511
9512         * procfs.c (procfs_detach): Make forward declaration's prototype
9513         match definition's protototype.
9514         (proc_get_LDT_entry): Remove stale do_cleanups call.
9515
9516 2018-04-12  Pedro Alves  <palves@redhat.com>
9517
9518         * target.h (target_ops::to_has_exited): Delete.
9519         (target_has_exited): Delete.
9520         * target-delegates.c: Regenerate.
9521
9522 2018-04-11  Pedro Alves  <palves@redhat.com>
9523
9524         * target.c (fileio_fh_t::t): Add comment.
9525         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
9526         (target_fileio_close): Handle a NULL target.
9527         (invalidate_fileio_fh): New.
9528         (target_close): Call it.
9529         * remote.c (remote_hostio_send_command): No longer check whether
9530         remote_desc is open.
9531
9532 2018-04-11  Pedro Alves  <palves@redhat.com>
9533
9534         * target.c (fileio_fh_t): Make it a named struct instead of a
9535         typedef.
9536         (fileio_fh_t::is_closed): New method.
9537         (DEF_VEC_O (fileio_fh_t)): Remove.
9538         (fileio_fhandles): Now a std::vector.
9539         (is_closed_fileio_fh): Delete.
9540         (acquire_fileio_fd): Adjust.  Rename parameters.
9541         (release_fileio_fd): Adjust.
9542         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
9543         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
9544         (target_fileio_close): Adjust.
9545
9546 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
9547
9548         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
9549         index.
9550
9551 2018-04-10  Pedro Alves  <palves@redhat.com>
9552
9553         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
9554         (scoped_finish_thread_state): New class.
9555         * infcmd.c (run_command_1): Use it instead of finish_thread_state
9556         cleanup.
9557         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
9558         (fetch_inferior_event, normal_stop): Likewise.
9559         * thread.c (finish_thread_state_cleanup): Delete.
9560
9561 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9562             Pedro Alves  <palves@redhat.com>
9563
9564         * value.c: Include "selftest.h" and "common/array-view.h".
9565         (struct range) <operator ==>: New.
9566         (test_ranges_contain): New.
9567         (check_ranges_vector): New.
9568         (test_insert_into_bit_range_vector): New.
9569         (_initialize_values): Register selftests.
9570         * common/array-view.h (operator==, operator!=): New.
9571
9572 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9573
9574         * common/gdb_vecs.h (unordered_remove): Add overload that takes
9575         an iterator.
9576         * inline-frame.c: Include <algorithm>.
9577         (struct inline_state): Add constructor.
9578         (inline_state_s): Remove.
9579         (DEF_VEC_O(inline_state_s)): Remove.
9580         (inline_states): Change type to std::vector.
9581         (find_inline_frame_state): Adjust to std::vector.
9582         (allocate_inline_frame_state): Remove.
9583         (clear_inline_frame_state): Adjust to std::vector.
9584         (skip_inline_frames): Adjust to std::vector.
9585
9586 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9587
9588         * tracepoint.h (struct trace_state_variable): Add constructor.
9589         <name>: Change type to std::string.
9590         * tracepoint.c (tsv_s): Remove.
9591         (DEF_VEC_O(tsv_s)): Remove.
9592         (tvariables): Change to std::vector.
9593         (create_trace_state_variable): Adjust to std::vector.
9594         (find_trace_state_variable): Likewise.
9595         (find_trace_state_variable_by_number): Likewise.
9596         (delete_trace_state_variable): Likewise.
9597         (trace_variable_command): Adjust to std::string.
9598         (delete_trace_variable_command): Likewise.
9599         (tvariables_info_1): Adjust to std::vector.
9600         (save_trace_state_variables): Likewise.
9601         (start_tracing): Likewise.
9602         (merge_uploaded_trace_state_variables): Adjust to std::vector
9603         and std::string.
9604         * target.h (struct target_ops)
9605         <to_download_trace_state_variable>: Pass reference to
9606         trace_state_variable.
9607         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
9608         * target-delegates.c: Re-generate.
9609         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
9610         (mi_tsv_deleted): Likewise.
9611         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
9612         * remote.c (remote_download_trace_state_variable): Change
9613         pointer to reference and adjust.
9614         * make-target-delegates (parse_argtypes): Handle references.
9615         (write_function_header): Likewise.
9616         (munge_type): Likewise.
9617
9618 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9619
9620         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9621         string_view-selftests.c.
9622         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
9623         testsuite.
9624         * unittests/basic_string_view/cons/char/1.cc: Likewise.
9625         * unittests/basic_string_view/cons/char/2.cc: Likewise.
9626         * unittests/basic_string_view/cons/char/3.cc: Likewise.
9627         * unittests/basic_string_view/element_access/char/1.cc:
9628         Likewise.
9629         * unittests/basic_string_view/element_access/char/empty.cc:
9630         Likewise.
9631         * unittests/basic_string_view/element_access/char/front_back.cc:
9632         Likewise.
9633         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
9634         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
9635         Likewise.
9636         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
9637         Likewise.
9638         * unittests/basic_string_view/modifiers/swap/char/1.cc:
9639         Likewise.
9640         * unittests/basic_string_view/operations/compare/char/1.cc:
9641         Likewise.
9642         * unittests/basic_string_view/operations/compare/char/13650.cc:
9643         Likewise.
9644         * unittests/basic_string_view/operations/copy/char/1.cc:
9645         Likewise.
9646         * unittests/basic_string_view/operations/data/char/1.cc:
9647         Likewise.
9648         * unittests/basic_string_view/operations/find/char/1.cc:
9649         Likewise.
9650         * unittests/basic_string_view/operations/find/char/2.cc:
9651         Likewise.
9652         * unittests/basic_string_view/operations/find/char/3.cc:
9653         Likewise.
9654         * unittests/basic_string_view/operations/find/char/4.cc:
9655         Likewise.
9656         * unittests/basic_string_view/operations/rfind/char/1.cc:
9657         Likewise.
9658         * unittests/basic_string_view/operations/rfind/char/2.cc:
9659         Likewise.
9660         * unittests/basic_string_view/operations/rfind/char/3.cc:
9661         Likewise.
9662         * unittests/basic_string_view/operations/substr/char/1.cc:
9663         Likewise.
9664         * unittests/basic_string_view/operators/char/2.cc: Likewise.
9665         * unittests/string_view-selftests.c: New file.
9666
9667 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9668
9669         * unittests/basic_string_view/capacity/1.cc: New file.
9670         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
9671         * unittests/basic_string_view/cons/char/1.cc: New file.
9672         * unittests/basic_string_view/cons/char/2.cc: New file.
9673         * unittests/basic_string_view/cons/char/3.cc: New file.
9674         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
9675         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
9676         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
9677         * unittests/basic_string_view/element_access/char/1.cc: New file.
9678         * unittests/basic_string_view/element_access/char/2.cc: New file.
9679         * unittests/basic_string_view/element_access/char/empty.cc: New file.
9680         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
9681         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
9682         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
9683         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
9684         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
9685         * unittests/basic_string_view/include.cc: New file.
9686         * unittests/basic_string_view/inserters/char/1.cc: New file.
9687         * unittests/basic_string_view/inserters/char/2.cc: New file.
9688         * unittests/basic_string_view/inserters/char/3.cc: New file.
9689         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
9690         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
9691         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
9692         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
9693         * unittests/basic_string_view/literals/types.cc: New file.
9694         * unittests/basic_string_view/literals/values.cc: New file.
9695         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
9696         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
9697         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
9698         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
9699         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
9700         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
9701         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
9702         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
9703         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
9704         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
9705         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
9706         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
9707         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
9708         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
9709         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
9710         * unittests/basic_string_view/operations/data/char/1.cc: New file.
9711         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
9712         * unittests/basic_string_view/operations/find/char/1.cc: New file.
9713         * unittests/basic_string_view/operations/find/char/2.cc: New file.
9714         * unittests/basic_string_view/operations/find/char/3.cc: New file.
9715         * unittests/basic_string_view/operations/find/char/4.cc: New file.
9716         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
9717         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
9718         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
9719         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
9720         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
9721         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
9722         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
9723         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
9724         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
9725         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
9726         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
9727         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
9728         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
9729         * unittests/basic_string_view/operators/char/2.cc: New file.
9730         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
9731         * unittests/basic_string_view/range_access/char/1.cc: New file.
9732         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
9733         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
9734         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
9735         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
9736         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
9737         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
9738         * unittests/basic_string_view/requirements/typedefs.cc: New file.
9739         * unittests/basic_string_view/typedefs.cc: New file.
9740         * unittests/basic_string_view/types/1.cc: New file.
9741
9742 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9743
9744         * common/gdb_string_view.h: Remove libstdc++ implementation
9745         details, adjust to gdb reality.
9746         * common/gdb_string_view.tcc: Likewise.
9747         * cli/cli-script.c (struct string_view): Remove.
9748         (user_args) <m_args>: Change element type to gdb::string_view.
9749         (user_args::insert_args): Adjust.
9750
9751 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9752
9753         * common/gdb_string_view.h: New file.
9754         * common/gdb_string_view.tcc: New file.
9755
9756 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9757
9758         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
9759         * configure: Re-generate.
9760
9761 2018-04-09  Pedro Alves  <palves@redhat.com>
9762
9763         * gdbarch.sh: Include "observable.h" instead of "observer.h".
9764         (set_target_gdbarch): Call
9765         gdb::observers::architecture_changed.notify instead of
9766         observer_notify_architecture_changed.
9767
9768 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9769
9770         * tracepoint.c (struct current_traceframe_cleanup): Remove.
9771         (do_restore_current_traceframe_cleanup): Remove.
9772         (restore_current_traceframe_cleanup_dtor): Remove.
9773         (make_cleanup_restore_current_traceframe): Remove.
9774         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
9775         New.
9776         * tracepoint.h (struct scoped_restore_current_traceframe): New.
9777         * infrun.c (fetch_inferior_event): Use
9778         scoped_restore_current_traceframe.
9779
9780 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9781
9782         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
9783         Remove.
9784         <n_allocated_type_units>: Remove.
9785         <all_type_units>: Change to std::vector.
9786         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
9787         to std::vector change.
9788         (dwarf2_per_objfile::get_cutu): Likewise.
9789         (dwarf2_per_objfile::get_tu): Likewise.
9790         (create_signatured_type_table_from_index): Likewise.
9791         (create_signatured_type_table_from_debug_names): Likewise.
9792         (dw2_symtab_iter_next): Likewise.
9793         (dw2_print_stats): Likewise.
9794         (dw2_expand_all_symtabs): Likewise.
9795         (dw2_expand_marked_cus): Likewise.
9796         (dw2_debug_names_iterator::next): Likewise.
9797         (dwarf2_initialize_objfile): Likewise.
9798         (add_signatured_type_cu_to_table): Likewise.
9799         (create_all_type_units): Likewise.
9800         (add_type_unit): Likewise.
9801         (struct tu_abbrev_offset): Add constructor.
9802         (build_type_psymtabs_1): Adjust to std::vector change.
9803         (print_tu_stats): Likewise.
9804         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9805         (write_debug_names): Likewise.
9806
9807 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9808
9809         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
9810         Make an std::vector.
9811         <n_comp_units>: Remove.
9812         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
9813         to std::vector change.
9814         (dwarf2_per_objfile::get_cutu): Likewise.
9815         (dwarf2_per_objfile::get_cu): Likewise.
9816         (create_cus_from_index): Likewise.
9817         (create_addrmap_from_index): Likewise.
9818         (create_addrmap_from_aranges): Likewise.
9819         (dwarf2_read_index): Likewise.
9820         (dw2_find_last_source_symtab): Likewise.
9821         (dw2_map_symtabs_matching_filename): Likewise.
9822         (dw2_symtab_iter_next): Likewise.
9823         (dw2_print_stats): Likewise.
9824         (dw2_expand_all_symtabs): Likewise.
9825         (dw2_expand_symtabs_with_fullname): Likewise.
9826         (dw2_expand_marked_cus): Likewise.
9827         (dw2_map_symbol_filenames): Likewise.
9828         (create_cus_from_debug_names): Likewise.
9829         (dwarf2_read_debug_names): Likewise.
9830         (dw2_debug_names_iterator::next): Likewise.
9831         (dwarf2_initialize_objfile): Likewise.
9832         (set_partial_user): Likewise.
9833         (dwarf2_build_psymtabs_hard): Likewise.
9834         (read_comp_units_from_section): Remove arguments, adjust to
9835         std::vector change.
9836         (create_all_comp_units): Adjust to std::vector and
9837         read_comp_units_from_section changes.
9838         (dwarf2_find_containing_comp_unit): Adjust to std::vector
9839         change.
9840         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9841         (psyms_seen_size): Likewise.
9842         (write_gdbindex): Likewise.
9843         (write_debug_names): Likewise.
9844
9845 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9846
9847         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
9848         with dwarf2_per_objfile.
9849         (create_cus_from_index): Likewise.
9850         (create_signatured_type_table_from_index): Likewise.
9851         (dwarf2_read_index): Likewise.
9852         (dwarf2_initialize_objfile): Likewise.
9853         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
9854         per_cu rather than get_dwarf2_per_objfile.
9855
9856 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9857
9858         * dwarf2read.h (struct signatured_type): Forward declare.
9859         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
9860         New methods.
9861         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
9862         (dw2_get_cutu): ...this.
9863         (dwarf2_per_objfile::get_cu): Rename from...
9864         (dw2_get_cu): ...this.
9865         (dwarf2_per_objfile::get_tu): New.
9866         (create_addrmap_from_index): Adjust.
9867         (create_addrmap_from_aranges): Adjust.
9868         (dw2_find_last_source_symtab): Adjust.
9869         (dw2_map_symtabs_matching_filename): Adjust.
9870         (dw2_symtab_iter_next): Adjust.
9871         (dw2_print_stats): Adjust.
9872         (dw2_expand_all_symtabs): Adjust.
9873         (dw2_expand_symtabs_with_fullname): Adjust.
9874         (dw2_expand_marked_cus): Adjust.
9875         (dw_expand_symtabs_matching_file_matcher): Adjust.
9876         (dw2_map_symbol_filenames): Adjust.
9877         (dw2_debug_names_iterator::next): Adjust.
9878         (dwarf2_initialize_objfile): Adjust.
9879         (set_partial_user): Adjust.
9880         (dwarf2_build_psymtabs_hard): Adjust.
9881
9882 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9883
9884         * dwarf2read.c (create_signatured_type_table_from_debug_names):
9885         Remove unused variables.
9886         (dw2_map_symtabs_matching_filename): Likewise.
9887         (dwarf2_record_block_ranges): Likewise.
9888         (dwarf2_read_addr_index): Likewise.
9889         (follow_die_offset): Likewise.
9890
9891 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9892
9893         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
9894         to symbol_file_add_main.
9895
9896 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9897
9898         PR mi/22299
9899         * mi/mi-console.c (do_fputc_async_safe): New.
9900         (mi_console_file::write_async_safe): New.
9901         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
9902         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
9903         New.
9904         * ui-file.c (ui_file::putstrn): Adjust call to
9905         fputstrn_unfiltered.
9906         * utils.c (printchar): Replace do_fputs and do_fprintf
9907         parameters by do_fputc.
9908         (fputstr_filtered): Adjust call to printchar.
9909         (fputstr_unfiltered): Likewise.
9910         (fputstrn_filtered): Likewise.
9911         (fputstrn_unfiltered): Add do_fputc parameter, pass to
9912         printchar.
9913         * utils.h (do_fputc_ftype): New typedef.
9914         (fputstrn_unfiltered): Add do_fputc parameter.
9915
9916 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9917
9918         * regformats/i386/i386-avx.dat: Remove.
9919
9920 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
9921
9922         PR gdb/22979
9923         * amd64-tdep.c (amd64_none_init_abi): New function.
9924         (amd64_x32_none_init_abi): New function.
9925         (_initialize_amd64_tdep): Register handlers for x86-64 and
9926         x64_32 with GDB_OSABI_NONE.
9927         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
9928         GDB_OSABI_NONE osabi.
9929
9930 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
9931
9932         PR gdb/22980
9933         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
9934         GDB_OSABI_NONE.
9935         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
9936         * osabi.c (gdb_osabi_names): Add "unknown" entry.
9937
9938 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
9939
9940         * common/byte-vector.h (char_vector): New type.
9941         * target.h (target_read_alloc): Return
9942         gdb::optional<byte_vector>.
9943         (target_read_stralloc): Return gdb::optional<char_vector>.
9944         (target_get_osdata): Return gdb::optional<char_vector>.
9945         * target.c (target_read_alloc_1): Templatize.  Replacement
9946         manual memory management with vector.
9947         (target_read_alloc): Change return type, adjust.
9948         (target_read_stralloc): Change return type, adjust.
9949         (target_get_osdata): Change return type, adjust.
9950         * auxv.c (struct auxv_info) <length>: Remove.
9951         <data>: Change type to gdb::optional<byte_vector>.
9952         (auxv_inferior_data_cleanup): Free auxv_info with delete.
9953         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
9954         (target_auxv_search): Adjust.
9955         (fprint_target_auxv): Adjust.
9956         * avr-tdep.c (avr_io_reg_read_command): Adjust.
9957         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
9958         (linux_make_corefile_notes): Adjust.
9959         * osdata.c (get_osdata): Adjust.
9960         * remote.c (remote_get_threads_with_qxfer): Adjust.
9961         (remote_memory_map): Adjust.
9962         (remote_traceframe_info): Adjust.
9963         (btrace_read_config): Adjust.
9964         (remote_read_btrace): Adjust.
9965         (remote_pid_to_exec_file): Adjust.
9966         * solib-aix.c (solib_aix_get_library_list): Adjust.
9967         * solib-dsbt.c (decode_loadmap): Don't free buf.
9968         (dsbt_get_initial_loadmaps): Adjust.
9969         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
9970         * solib-target.c (solib_target_current_sos): Adjust.
9971         * tracepoint.c (sdata_make_value): Adjust.
9972         * xml-support.c (xinclude_start_include): Adjust.
9973         (xml_fetch_content_from_file): Adjust.
9974         * xml-support.h (xml_fetch_another): Change return type.
9975         (xml_fetch_content_from_file): Change return type.
9976         * xml-syscall.c (xml_init_syscalls_info): Adjust.
9977         * xml-tdesc.c (file_read_description_xml): Adjust.
9978         (fetch_available_features_from_target): Change return type.
9979         (target_fetch_description_xml): Adjust.
9980         (target_read_description_xml): Adjust.
9981
9982 2018-04-06  Tom Tromey  <tom@tromey.com>
9983
9984         * value.c (~value): Update.
9985         (struct value) <contents>: Now unique_xmalloc_ptr.
9986         (value_contents_bits_eq, allocate_value_contents)
9987         (value_contents_raw, value_contents_all_raw)
9988         (value_contents_for_printing, value_contents_for_printing_const)
9989         (set_value_enclosing_type): Update.
9990
9991 2018-04-06  Tom Tromey  <tom@tromey.com>
9992
9993         * value.c (range_s): Remove typedef, VEC.
9994         (struct range): Add operator<.
9995         (range_lessthan): Remove.
9996         (ranges_contain): Change type.
9997         (~value): Update.
9998         (struct value) <unavailable, optimized_out>: Now std::vector.
9999         (value_entirely_available)
10000         (value_entirely_covered_by_range_vector)
10001         (value_entirely_unavailable, value_entirely_optimized_out):
10002         Update.
10003         (insert_into_bit_range_vector): Change argument type.
10004         (find_first_range_overlap): Likewise.
10005         (struct ranges_and_idx, value_contents_bits_eq)
10006         (require_not_optimized_out, require_available): Update.
10007         (ranges_copy_adjusted): Change argument types.
10008         (value_optimized_out, value_copy, value_fetch_lazy): Update.
10009
10010 2018-04-06  Tom Tromey  <tom@tromey.com>
10011
10012         * value.c (~value): Update.
10013         (struct value) <parent>: Now a value_ref_ptr.
10014         (value_parent, set_value_parent, value_address, value_copy):
10015         Update.
10016
10017 2018-04-06  Tom Tromey  <tom@tromey.com>
10018
10019         * value.c (struct value): Add constructor, destructor, and member
10020         initializers.
10021         (allocate_value_lazy, value_decref): Update.
10022
10023 2018-04-06  Tom Tromey  <tom@tromey.com>
10024
10025         * value.c (struct value) <released, next>: Remove.
10026         (all_values): Now a std::vector.
10027         (allocate_value_lazy): Update.
10028         (value_next): Remove.
10029         (value_mark, value_free_to_mark, release_value)
10030         (value_release_to_mark): Update.
10031
10032 2018-04-06  Tom Tromey  <tom@tromey.com>
10033
10034         * value.h (fetch_subexp_value, value_release_to_mark): Update.
10035         (free_value_chain): Remove.
10036         * value.c (free_value_chain): Remove.
10037         (value_release_to_mark): Return a std::vector.
10038         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
10039         std::vector.
10040         (check_condition): Update.
10041         * eval.c (fetch_subexp_value): Change "val_chain" to a
10042         std::vector.
10043         * breakpoint.c (update_watchpoint): Update.
10044         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
10045
10046 2018-04-06  Tom Tromey  <tom@tromey.com>
10047
10048         * value.h (free_all_values): Remove.
10049         * value.c (free_all_values): Remove.
10050
10051 2018-04-06  Tom Tromey  <tom@tromey.com>
10052
10053         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
10054         (value_history_chain, value_history_count): Remove.
10055         (value_history): New global.
10056         (record_latest_value, access_value_history, show_values)
10057         (preserve_values): Update.
10058
10059 2018-04-06  Tom Tromey  <tom@tromey.com>
10060
10061         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
10062         * varobj.c (varobj_set_display_format, varobj_set_value)
10063         (install_default_visualizer, construct_visualizer)
10064         (install_new_value, ~varobj, varobj_get_value_type)
10065         (my_value_of_variable, varobj_editable_p): Update.
10066         * c-varobj.c (c_describe_child, c_value_of_variable)
10067         (cplus_number_of_children, cplus_describe_child): Update.
10068         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
10069         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
10070         (ada_value_of_variable, ada_value_is_changeable_p): Update.
10071
10072 2018-04-06  Tom Tromey  <tom@tromey.com>
10073
10074         * printcmd.c (last_examine_address): Change type to
10075         value_ref_ptr.
10076         (do_examine, x_command): Update.
10077
10078 2018-04-06  Tom Tromey  <tom@tromey.com>
10079
10080         * value.c (release_value): Update.
10081         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
10082         (struct bpstats) <val>: Now a value_ref_ptr.
10083         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
10084         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
10085         (~watchpoint, print_it_watchpoint, watch_command_1)
10086         (invalidate_bp_value_on_memory_change): Update.
10087
10088 2018-04-06  Tom Tromey  <tom@tromey.com>
10089
10090         * varobj.c (varobj_clear_saved_item)
10091         (update_dynamic_varobj_children, install_new_value, ~varobj):
10092         Update.
10093         * value.h (value_incref): Move declaration earlier.
10094         (value_decref): Rename from value_free.
10095         (struct value_ref_policy): New.
10096         (value_ref_ptr): New typedef.
10097         (struct value_deleter): Remove.
10098         (gdb_value_up): Remove typedef.
10099         (release_value): Change return type.
10100         (release_value_or_incref): Remove.
10101         * value.c (set_value_parent): Update.
10102         (value_incref): Change return type.
10103         (value_decref): Rename from value_free.
10104         (value_free_to_mark, free_all_values, free_value_chain): Update.
10105         (release_value): Return value_ref_ptr.
10106         (release_value_or_incref): Remove.
10107         (record_latest_value, set_internalvar, clear_internalvar):
10108         Update.
10109         * stack.c (info_frame_command): Don't call value_free.
10110         * python/py-value.c (valpy_dealloc, valpy_new)
10111         (value_to_value_object): Update.
10112         * printcmd.c (do_examine): Update.
10113         * opencl-lang.c (lval_func_free_closure): Update.
10114         * mi/mi-main.c (register_changed_p): Don't call value_free.
10115         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
10116         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
10117         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
10118         value_free.
10119         * guile/scm-value.c (vlscm_free_value_smob)
10120         (vlscm_scm_from_value): Update.
10121         * frame.c (frame_register_unwind, frame_unwind_register_signed)
10122         (frame_unwind_register_unsigned, get_frame_register_bytes)
10123         (put_frame_register_bytes): Don't call value_free.
10124         * findvar.c (address_from_register): Don't call value_free.
10125         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
10126         * dwarf2loc.c (entry_data_value_free_closure)
10127         (value_of_dwarf_reg_entry, free_pieced_value_closure)
10128         (dwarf2_evaluate_loc_desc_full): Update.
10129         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
10130         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
10131         (~watchpoint, watch_command_1)
10132         (invalidate_bp_value_on_memory_change): Update.
10133         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
10134
10135 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
10136
10137         PR gdb/23022
10138         * warning.m4: Add -Wno-error=deprecated-register.
10139         * configure: Re-generate.
10140
10141 2018-04-05  Tom Tromey  <tom@tromey.com>
10142
10143         * linespec.h: Remove include of "vec.h".
10144
10145 2018-04-05  Tom Tromey  <tom@tromey.com>
10146
10147         * linespec.c (typep): Remove typedef.
10148         (find_methods, find_superclass_methods): Take a std::vector.
10149         (find_method): Use std::vector.
10150
10151 2018-04-05  Tom Tromey  <tom@tromey.com>
10152
10153         * utils.c (compare_strings): Remove.
10154         * utils.h (compare_strings): Remove.
10155         * objc-lang.h (find_imps): Update.
10156         * objc-lang.c (find_methods): Take a std::vector.
10157         (uniquify_strings, find_imps): Likewise.
10158         * linespec.c (find_methods): Take a std::vector.
10159         (decode_objc): Use std::vector.
10160         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
10161         a std::vector.
10162         (find_method, find_function_symbols): Use std::vector.
10163
10164 2018-04-05  Tom Tromey  <tom@tromey.com>
10165
10166         * completer.c (completion_tracker::completion_tracker): Remove
10167         cast.
10168         (completion_tracker::discard_completions): Likewise.
10169         * breakpoint.c (ambiguous_names_p): Remove cast.
10170         * ada-lang.c (_initialize_ada_language): Remove cast.
10171         * utils.h (streq): Update.
10172         (streq_hash): Add new declaration.
10173         * utils.c (streq): Return bool.
10174         (streq_hash): New function.
10175
10176 2018-04-05  Tom Tromey  <tom@tromey.com>
10177
10178         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
10179         Remove a string copy.
10180
10181 2018-04-05  Tom Tromey  <tom@tromey.com>
10182
10183         * linespec.c (filter_results): Use std::vector.
10184         (decode_line_2, decode_line_full): Update.
10185
10186 2018-04-05  Tom Tromey  <tom@tromey.com>
10187
10188         * linespec.c (canonical_to_fullform): Return std::string.
10189         (filter_results): Update.
10190         (struct decode_line_2_item): Add constructor.
10191         <fullform, displayform>: Now std::string.
10192         (decode_line_2_compare_items): Now a std::sort comparator.
10193         (decode_line_2): Update.
10194
10195 2018-04-05  Tom Tromey  <tom@tromey.com>
10196
10197         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
10198         (unexpected_linespec_error): Update.
10199         (linespec_parse_basic, parse_linespec): Update.
10200
10201 2018-04-05  Tom Tromey  <tom@tromey.com>
10202
10203         * linespec.c (linespec_parse_basic): Reindent.
10204
10205 2018-04-05  Tom Tromey  <tom@tromey.com>
10206
10207         * minsyms.h (iterate_over_minimal_symbols): Update.
10208         * minsyms.c (iterate_over_minimal_symbols): Take a
10209         gdb::function_view.
10210         * linespec.c (struct collect_minsyms): Remove.
10211         (compare_msyms): Now a std::sort comparator.
10212         (add_minsym): Add parameters.
10213         (search_minsyms_for_name): Update.  Use std::vector.
10214
10215 2018-04-03  Tom Tromey  <tom@tromey.com>
10216
10217         * mipsread.c (read_alphacoff_dynamic_symtab): Use
10218         gdb::byte_vector.
10219
10220 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
10221
10222         * MAINTAINERS (Write After Approval): Add Weimin Pan.
10223
10224 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
10225
10226         PR gdb/16959
10227         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
10228         printing static type.
10229
10230 2018-04-01  Tom Tromey  <tom@tromey.com>
10231
10232         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
10233         (rs6000_xfer_shared_libraries): Update.
10234
10235 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
10236
10237         * common/gdb_vecs.h (char_ptr): Remove.
10238         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
10239
10240 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
10241
10242         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
10243         with std::vector.
10244         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
10245
10246 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
10247
10248         * tracepoint.h (struct uploaded_tp): Initialize fields.
10249         <actions, step_actions, cmd_strings>: Change type to
10250         std::vector<char *>.
10251         * tracepoint.c (get_uploaded_tp): Allocate with new.
10252         (free_uploaded_tps): Free with delete.
10253         (parse_tracepoint_definition): Adjust to std::vector change.
10254         * breakpoint.c (read_uploaded_action): Likewise.
10255         (create_tracepoint_from_upload): Likewise.
10256         * ctf.c (ctf_write_uploaded_tp): Likewise.
10257         (SET_ARRAY_FIELD): Likewise.
10258         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
10259
10260 2018-03-30  Tom Tromey  <tom@tromey.com>
10261
10262         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
10263         std::unique_ptr.
10264         (svr4_keep_data_in_core): Update.
10265         (svr4_read_so_list): Update.
10266
10267 2018-03-30  Tom Tromey  <tom@tromey.com>
10268
10269         * windows-nat.c (handle_output_debug_string, handle_exception):
10270         Update.
10271         * target.h (target_read_string): Update.
10272         * target.c (target_read_string): Change "string" to
10273         unique_xmalloc_ptr.
10274         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
10275         Update.
10276         * solib-frv.c (frv_current_sos): Update.
10277         * solib-dsbt.c (dsbt_current_sos): Update.
10278         * solib-darwin.c (darwin_current_sos): Update.
10279         * linux-thread-db.c (inferior_has_bug): Update.
10280         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
10281         Update.  Remove alloca.
10282         * ada-lang.c (ada_main_name): Update.
10283
10284 2018-03-30  Tom Tromey  <tom@tromey.com>
10285
10286         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
10287         (struct dwo_file_deleter): New.
10288         (dwo_file_up): New typedef.
10289         (open_and_init_dwo_file): Use dwo_file_up.
10290         (free_dwo_file_cleanup): Remove.
10291
10292 2018-03-30  Tom Tromey  <tom@tromey.com>
10293
10294         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
10295         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
10296
10297 2018-03-30  Tom Tromey  <tom@tromey.com>
10298
10299         * dwarf2read.c (class free_cached_comp_units): New class.
10300         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
10301         (free_cached_comp_units): Remove function.
10302
10303 2018-03-30  Tom Tromey  <tom@tromey.com>
10304
10305         * utils.h (make_cleanup_unpush_target): Remove.
10306         * inf-ptrace.c (struct target_unpusher): New.
10307         (target_unpush_up) New typedef.
10308         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
10309         target_unpush_up.
10310         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
10311
10312 2018-03-27  Tom Tromey  <tom@tromey.com>
10313
10314         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
10315
10316 2018-03-27  Pedro Alves  <palves@redhat.com>
10317             Tom Tromey  <tom@tromey.com>
10318
10319         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
10320         destructor.  Now a class.
10321         (gdb_readline_wrapper_cleanup): Remove function.
10322         (gdb_readline_wrapper): Remove cleanups.
10323
10324 2018-03-27  Tom Tromey  <tom@tromey.com>
10325
10326         * typeprint.h (struct type_print_options) <local_typedefs,
10327         global_typedefs>: Remove "struct" keyword.
10328         (class typedef_hash_table): New class.
10329         (recursively_update_typedef_hash, add_template_parameters)
10330         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
10331         (find_typedef_in_hash): Don't declare.
10332         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
10333         (typedef_hash_table::recursively_update): Rename from
10334         recursively_update_typedef_hash.  Now a member.
10335         (typedef_hash_table::add_template_parameters): Rename from
10336         add_template_parameters.  Now a member.
10337         (typedef_hash_table::typedef_hash_table): Now a constructor;
10338         rename from create_typedef_hash.
10339         (typedef_hash_table::~typedef_hash_table): Now a destructor;
10340         rename from free_typedef_hash.
10341         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
10342         (do_free_global_table): Remove.
10343         (typedef_hash_table::typedef_hash_table): New constructor; renamed
10344         from copy_type_recursive.
10345         (create_global_typedef_table): Remove.
10346         (typedef_hash_table::find_global_typedef): Now a member of
10347         typedef_hash_table.
10348         (typedef_hash_table::find_typedef): Rename from
10349         find_typedef_in_hash; now a member.
10350         (whatis_exp): Update.
10351         * extension.h (struct ext_lang_type_printers): Add constructor and
10352         destructor.
10353         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
10354         declare.
10355         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
10356         Now a constructor; rename from start_ext_lang_type_printers.
10357         (ext_lang_type_printers): Now a destructor; rename from
10358         free_ext_lang_type_printers.
10359         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
10360         Update.
10361         (c_type_print_base_struct_union): Update.  Remove cleanups.
10362
10363 2018-03-27  Tom Tromey  <tom@tromey.com>
10364
10365         * dwarf-index-write.c: Include <cmath>.
10366
10367 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
10368
10369         * NEWS: Add entry describing new "set|show varsize-limit" command.
10370         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
10371         command.
10372         * printcmd.c (_initialize_printcmd): Add "set var" alias of
10373         "set variable".
10374
10375 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
10376
10377         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
10378         dwarf-index-write.c
10379         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
10380         * dwarf-index-common.c: New file.
10381         * dwarf-index-common.h: New file.
10382         * dwarf-index-write.c: New file.
10383         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
10384         (struct dwarf2_section_info): Move from here.
10385         (dwarf2_section_info_def): Likewise.
10386         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
10387         (offset_type): Likewise.
10388         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
10389         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
10390         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
10391         (byte_swap): Likewise.
10392         (MAYBE_SWAP): Likewise.
10393         (dwarf2_per_cu_ptr): Likewise.
10394         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
10395         (struct tu_stats): Likewise.
10396         (struct dwarf2_per_objfile): Likewise.
10397         (struct dwarf2_per_cu_data): Likewise.
10398         (struct signatured_type): Likewise.
10399         (sig_type_ptr): Likewise.
10400         (DEF_VEC_P (sig_type_ptr)): Likewise.
10401         (INDEX4_SUFFIX): Likewise.
10402         (INDEX5_SUFFIX): Likewise.
10403         (DEBUG_STR_SUFFIX): Likewise.
10404         (dwarf2_read_section): Make non-static.
10405         (mapped_index_string_hash): Move from here.
10406         (dwarf5_djb_hash): Likewise.
10407         (file_write): Likewise.
10408         (class data_buf): Likewise.
10409         (struct symtab_index_entry): Likewise.
10410         (struct mapped_symtab): Likewise.
10411         (find_slot): Likewise.
10412         (hash_expand): Likewise.
10413         (add_index_entry): Likewise.
10414         (uniquify_cu_indices): Likewise.
10415         (class c_str_view): Likewise.
10416         (class c_str_view_hasher): Likewise.
10417         (class vector_hasher): Likewise.
10418         (write_hash_table): Likewise.
10419         (psym_index_map): Likewise.
10420         (struct addrmap_index_data): Likewise.
10421         (add_address_entry): Likewise.
10422         (add_address_entry_worker): Likewise.
10423         (write_address_map): Likewise.
10424         (symbol_kind): Likewise.
10425         (write_psymbols): Likewise.
10426         (struct signatured_type_index_data): Likewise.
10427         (write_one_signatured_type): Likewise.
10428         (recursively_count_psymbols): Likewise.
10429         (recursively_write_psymbols): Likewise.
10430         (class debug_names): Likewise.
10431         (check_dwarf64_offsets): Likewise.
10432         (psyms_seen_size): Likewise.
10433         (write_gdbindex): Likewise.
10434         (write_debug_names): Likewise.
10435         (assert_file_size): Likewise.
10436         (write_psymtabs_to_index): Likewise.
10437         (save_gdb_index_command): Likewise.
10438         (_initialize_dwarf2_read): Don't register the "save gdb-index"
10439         command.
10440         * dwarf2read.h: New file.
10441
10442 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
10443
10444         PR gdb/22670
10445         * dwarf2read.c (dwarf2_physname): Do not return the demangled
10446         symbol name if the CU's language stores symbol names in linkage
10447         format.
10448         * language.h (struct language_defn)
10449         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
10450         all instances of this struct.
10451
10452 2018-03-26  Tom Tromey  <tom@tromey.com>
10453
10454         * stack.c (backtrace_command_1): Remove verbose code.
10455
10456 2018-03-26  Tom Tromey  <tom@tromey.com>
10457
10458         * python/py-framefilter.c (py_print_type): Don't catch
10459         exceptions.  Return void.
10460         (py_print_value): Likewise.
10461         (py_print_single_arg): Likewise.
10462         (enumerate_args): Don't catch exceptions.
10463         (py_print_args): Likewise.
10464         (py_print_frame): Likewise.
10465         (gdbpy_apply_frame_filter): Catch exceptions here.
10466
10467 2018-03-26  Tom Tromey  <tom@tromey.com>
10468
10469         * stack.c (_initialize_stack): Remove trailing newlines from help
10470         text.  Add "Usage" line to "backtrace" help.
10471
10472 2018-03-26  Tom Tromey  <tom@tromey.com>
10473
10474         PR python/16486:
10475         * python/py-framefilter.c (py_print_args): Call wrap_hint.
10476
10477 2018-03-26  Tom Tromey  <tom@tromey.com>
10478
10479         * python/py-framefilter.c (py_print_single_arg): Return
10480         EXT_LANG_BT_ERROR from catch.
10481
10482 2018-03-26  Tom Tromey  <tom@tromey.com>
10483
10484         PR backtrace/15584:
10485         * stack.c (backtrace_command_1): Move some code into no-filters
10486         "if".
10487
10488 2018-03-26  Tom Tromey  <tom@tromey.com>
10489
10490         * python/py-framefilter.c (throw_quit_or_print_exception): New
10491         function.
10492         (gdbpy_apply_frame_filter): Use it.
10493
10494 2018-03-26  Tom Tromey  <tom@tromey.com>
10495
10496         PR cli/17716:
10497         * python/py-framefilter.c (py_print_type, py_print_value)
10498         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
10499         RETURN_MASK_ERROR.
10500
10501 2018-03-26  Tom Tromey  <tom@tromey.com>
10502
10503         * python/py-framefilter.c (enumerate_args): Use
10504         gdb::unique_xmalloc_ptr.
10505
10506 2018-03-26  Tom Tromey  <tom@tromey.com>
10507
10508         * python/py-framefilter.c (py_print_frame): Return
10509         EXT_LANG_BT_OK.
10510         (gdbpy_apply_frame_filter): Update comment.
10511         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
10512         Remove.
10513         <EXT_LANG_BT_NO_FILTERS>: Change value.
10514
10515 2018-03-26  Tom Tromey  <tom@tromey.com>
10516
10517         PR backtrace/15582:
10518         * stack.c (backtrace_command): Parse "hide" argument.
10519         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
10520         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
10521         constant.
10522
10523 2018-03-26  Tom Tromey  <tom@tromey.com>
10524
10525         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
10526         add "flags".
10527         (backtrace_command): Remove "fulltrace", add "flags".
10528
10529 2018-03-26  Tom Tromey  <tom@tromey.com>
10530
10531         * stack.c (backtrace_command): Rewrite command line parsing.
10532
10533 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
10534
10535         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
10536
10537 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
10538
10539         * filename-seen-cache.h: Add include guard.
10540
10541 2018-03-26  Keith Seitz  <keiths@redhat.com>
10542
10543         * symfile.c (place_section): Remove "struct" from section_addr_info
10544         in comment.
10545         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
10546         "struct" keyword from section_addr_info.
10547
10548 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
10549
10550         * regformats/regdef.h (reg): Add constructors.
10551
10552 2018-03-25  Pedro Alves  <palves@redhat.com>
10553
10554         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
10555         if then/else bodies in var_func_name extraction.
10556
10557 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
10558
10559         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
10560         lookup_minimal_symbol() to find symbol entry.
10561         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
10562
10563 2018-03-23  Keith Seitz  <keiths@redhat.com>
10564
10565         PR c++/22968
10566         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
10567         nested type definitions for C++, too.
10568
10569 2018-03-23  Tom Tromey  <tom@tromey.com>
10570
10571         * machoread.c (struct oso_el): Add a constructor.  Don't define as
10572         a typedef.
10573         (macho_register_oso): Remove.
10574         (macho_symtab_read): Take a std::vector.
10575         (oso_el_compare_name): Now a std::sort comparator.
10576         (macho_symfile_read_all_oso): Take a std::vector.
10577         (macho_symfile_read): Use std::vector.  Remove cleanups.
10578
10579 2018-03-22  Tom Tromey  <tom@tromey.com>
10580
10581         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
10582         (record_full_goto_bookmark): Use std::string.
10583
10584 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
10585
10586         PR tdep/18295
10587         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
10588         a single mask.
10589
10590 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
10591
10592         * rs6000-tdep.c (store_insn_p): New function.
10593         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
10594         and cr_reg to their unshifted values. Use store_insn_p to
10595         match LR saves using either R1 or fdata->alloca_reg. Use
10596         store_insn_p to match CR saves. Set alloca_reg_offset
10597         when alloca_reg and framep are set. Remove lr_reg shift
10598         when assigning to fdata->lr_register.
10599
10600 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10601
10602         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
10603         command line args instead of emitting a warning.
10604
10605 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
10606
10607         * tracepoint.h (struct static_tracepoint_marker): Initialize
10608         fields, define default constructor, move constructor and move
10609         assignment, disable the rest.
10610         <str_id, extra>: Make std::string.
10611         (release_static_tracepoint_marker): Remove.
10612         (free_current_marker): Remove.
10613         * tracepoint.c (free_current_marker): Remove.
10614         (parse_static_tracepoint_marker_definition): Adjust to
10615         std::string, use new hex2str overload.
10616         (release_static_tracepoint_marker): Remove.
10617         (print_one_static_tracepoint_marker): Get marker by reference
10618         and adjust to std::string.
10619         (info_static_tracepoint_markers_command): Adjust to std::vector
10620         changes
10621         * target.h (static_tracepoint_marker_p): Remove typedef.
10622         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
10623         (struct target_ops) <to_static_tracepoint_marker_at>: Return
10624         bool.
10625         <to_static_tracepoint_markers_by_strid>: Return std::vector.
10626         * target-debug.h
10627         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
10628         (target_debug_print_std_vector_static_tracepoint_marker): New.
10629         (target_debug_print_struct_static_tracepoint_marker_p): Rename
10630         to...
10631         (target_debug_print_static_tracepoint_marker_p): ... this.
10632         * target-delegates.c: Re-generate.
10633         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
10634         Make std::string.
10635         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
10636         (decode_static_tracepoint_spec): Adjust to std::vector.
10637         (tracepoint_print_one_detail): Adjust to std::string.
10638         (strace_marker_decode_location): Adjust to std::string.
10639         (update_static_tracepoint): Adjust to std::string, remove call
10640         to release_static_tracepoint_marker.
10641         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
10642         Adjust to std::vector.
10643         * remote.c (remote_static_tracepoint_marker_at): Return bool.
10644         (remote_static_tracepoint_markers_by_strid): Adjust to
10645         std::vector.
10646         * common/rsp-low.h (hex2str): New overload with explicit count
10647         of bytes.
10648         * common/rsp-low.c (hex2str): New overload with explicit count
10649         of bytes.
10650         * unittests/rsp-low-selftests.c (test_hex2str): New function.
10651         (_initialize_rsp_low_selftests): Add test_hex2str test.
10652         * unittests/tracepoint-selftests.c
10653         (test_parse_static_tracepoint_marker_definition): Adjust to
10654         std::string.
10655
10656 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
10657
10658         * tracepoint.c (parse_static_tracepoint_marker_definition):
10659         Consider case where the definition is followed by more
10660         definitions.
10661         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10662         tracepoint-selftests.c.
10663         * unittests/tracepoint-selftests.c: New.
10664
10665 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
10666
10667         * MAINTAINERS (Write After Approval): Add Pedro Franco de
10668         Carvalho.
10669
10670 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
10671
10672         * symtab.c (find_pc_sect_line): fixed indentation.
10673
10674 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
10675
10676         * symtab.c (find_pc_sect_line): now uses binary search.
10677
10678 2018-03-19  Tom Tromey  <tom@tromey.com>
10679
10680         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
10681         "IDENT" production.
10682
10683 2018-03-19  Pedro Alves  <palves@redhat.com>
10684             Tom Tromey  <tom@tromey.com>
10685
10686         * unittests/observable-selftests.c: New file.
10687         * common/observable.h: New file.
10688         * observable.h: New file.
10689         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
10690         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
10691         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
10692         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
10693         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
10694         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
10695         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
10696         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
10697         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
10698         python/py-breakpoint.c, python/py-finishbreakpoint.c,
10699         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
10700         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
10701         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
10702         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
10703         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
10704         tui/tui-interp.c, valops.c: Update all users.
10705         * tui/tui-hooks.c (tui_bp_created_observer)
10706         (tui_bp_deleted_observer, tui_bp_modified_observer)
10707         (tui_inferior_exit_observer, tui_before_prompt_observer)
10708         (tui_normal_stop_observer, tui_register_changed_observer):
10709         Remove.
10710         (tui_observers_token): New global.
10711         (attach_or_detach, tui_attach_detach_observers): New functions.
10712         (tui_install_hooks, tui_remove_hooks): Use
10713         tui_attach_detach_observers.
10714         * record-btrace.c (record_btrace_thread_observer): Remove.
10715         (record_btrace_thread_observer_token): New global.
10716         * observer.sh: Remove.
10717         * observer.c: Rename to observable.c.
10718         * observable.c (namespace gdb_observers): Define new objects.
10719         (observer_debug): Move into gdb_observers namespace.
10720         (struct observer, struct observer_list, xalloc_observer_list_node)
10721         (xfree_observer_list_node, generic_observer_attach)
10722         (generic_observer_detach, generic_observer_notify): Remove.
10723         (_initialize_observer): Update.
10724         Don't include observer.inc.
10725         * Makefile.in (generated_files): Remove observer.h, observer.inc.
10726         (clean mostlyclean): Likewise.
10727         (observer.h, observer.inc): Remove targets.
10728         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
10729         (COMMON_SFILES): Use observable.c, not observer.c.
10730         * .gitignore: Remove observer.h.
10731
10732 2018-03-18  Tom Tromey  <tom@tromey.com>
10733
10734         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
10735         gdb::def_vector.
10736         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
10737
10738 2018-03-17  Tom Tromey  <tom@tromey.com>
10739
10740         * auto-load.c (auto_load_objfile_script_1): Use std::string.
10741
10742 2018-03-17  Tom Tromey  <tom@tromey.com>
10743
10744         * target.c (class scoped_target_fd): New.
10745         (target_fileio_close_cleanup): Remove.
10746         (target_fileio_read_alloc_1): Use scoped_target_fd.
10747
10748 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
10749
10750         * silent-rules.mk: New.
10751         * Makefile.in: Include silent-rules.mk
10752         (srcdir, VPATH, top_srcdir): Move up.
10753         (COMPILE): Add ECHO_CXX.
10754         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
10755         (init.c): Add ECHO_INIT_C.
10756         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
10757         (version.c): Add ECHO_GEN.
10758         (printcmd.o): Add ECHO_CXX.
10759         (target-float.o): Add ECHO_CXX.
10760         (ada-exp.o): Add ECHO_CXX.
10761         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
10762         (insight$(EXEEXT)): Add ECHO_CXXLD.
10763         * gnulib/configure.ac: Add AM_SILENT_RULES.
10764         * gnulib/aclocal.m4: Re-generate.
10765         * gnulib/configure: Re-generate.
10766         * gnulib/import/Makefile.in: Re-generate.
10767
10768 2018-03-16  Tom Tromey  <tom@tromey.com>
10769
10770         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
10771         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
10772         * utils.c (do_free_section_addr_info)
10773         (make_cleanup_free_section_addr_info): Remove.
10774         * symfile.h (struct other_sections): Add constructor.
10775         (struct section_addr_info): Remove.
10776         (section_addr_info): New typedef.
10777         (struct sym_fns) <sym_offsets>: Change type of parameter.
10778         (build_section_addr_info_from_objfile)
10779         (relative_addr_info_to_section_offsets, addr_info_make_relative)
10780         (default_symfile_offsets, symbol_file_add)
10781         (symbol_file_add_from_bfd)
10782         (build_section_addr_info_from_section_table): Update.
10783         (alloc_section_addr_info, free_section_addr_info): Don't declare.
10784         * symfile.c (alloc_section_addr_info): Remove.
10785         (build_section_addr_info_from_section_table): Change return type.
10786         Update.
10787         (build_section_addr_info_from_bfd)
10788         (build_section_addr_info_from_objfile): Likewise.
10789         (free_section_addr_info): Remove.
10790         (relative_addr_info_to_section_offsets): Change type of "addrs".
10791         (addrs_section_compar): Now a std::sort comparator.
10792         (addrs_section_sort): Change return type.
10793         (addr_info_make_relative): Change type of "addrs".  Update.
10794         (default_symfile_offsets, syms_from_objfile_1)
10795         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
10796         (symbol_file_add_separate): Update.
10797         (symbol_file_add): Change type of "addrs".  Update.
10798         (add_symbol_file_command): Update.  Remove cleanups.
10799         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
10800         cleanups.
10801         * symfile-debug.c (debug_sym_offsets): Change type of "info".
10802         * solib.c (solib_read_symbols): Update.
10803         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
10804         * machoread.c (macho_symfile_offsets): Update.
10805         * jit.c (jit_bfd_try_read_symtab): Update.
10806
10807 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
10808
10809         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10810         unittests/utils-selftests.c.
10811         * unittests/utils-selftests.c: New file.
10812
10813 2018-03-14  Tom Tromey  <tom@tromey.com>
10814
10815         PR cli/14977:
10816         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
10817         for NULL.
10818
10819 2018-03-14  Tom Tromey  <tom@tromey.com>
10820
10821         PR cli/19918:
10822         * printcmd.c (printf_pointer): Allow "-" in format.
10823
10824 2018-03-14  Tom Tromey  <tom@tromey.com>
10825
10826         * printcmd.c (_initialize_printcmd): Add usage to printf.
10827
10828 2018-03-14  Yao Qi  <qiyao@sourceware.org>
10829
10830         * MAINTAINERS: Update my email address.
10831
10832 2018-03-13  Tom Tromey  <tom@tromey.com>
10833
10834         * machoread.c (macho_check_dsym): Change filenamep to a
10835         std::string*.
10836         (macho_symfile_read): Update.
10837         * symfile.c (load_command): Use std::string.
10838
10839 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
10840
10841         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
10842         to error message string.
10843         (riscv_register_name): Use xsnprintf instead of sprintf.
10844         (riscv_insn::fetch_instruction): Use gdb_assert instead of
10845         internal_error.
10846         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
10847         error.
10848         (riscv_push_dummy_call): Likewise.
10849
10850 2018-03-12  Tom Tromey  <tom@tromey.com>
10851
10852         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
10853         Use gdb::byte_vector.
10854         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
10855
10856 2018-03-12  Yao Qi  <yao.qi@linaro.org>
10857
10858         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
10859         parameter type to readable_regcache.
10860         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
10861         the declaration.
10862
10863 2018-03-11  Tom Tromey  <tom@tromey.com>
10864
10865         * dwarf2read.c (struct nextfield): Add initializers.
10866         (struct nextfnfield): Remove.
10867         (struct fnfieldlist): Add initializers.  Remove "length" and
10868         "head", use std::vector.
10869         (struct decl_field_list): Remove.
10870         (struct field_info): Add initializers.
10871         <fields, baseclasses>: Now std::vector.
10872         <nbaseclasses, nfnfields, typedef_field_list_count,
10873         nested_types_list_count>: Remove.
10874         (dwarf2_add_field, dwarf2_add_type_defn)
10875         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
10876         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
10877         (process_structure_scope): Update.
10878
10879 2018-03-11  Tom Tromey  <tom@tromey.com>
10880
10881         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
10882         for use by std::sort.
10883         (build_type_psymtabs_1): Use std::vector.
10884
10885 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
10886
10887         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
10888         and LIBMPFR in the printed configuration.
10889
10890 2018-03-08  Tom Tromey  <tom@tromey.com>
10891
10892         * source.c (get_filename_and_charpos): Use scoped_fd.
10893         * nto-procfs.c (procfs_open_1): Use scoped_fd.
10894         (procfs_pidlist): Likewise.
10895         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
10896         (iterate_over_mappings): Likewise.
10897
10898 2018-03-08  Tom Tromey  <tom@tromey.com>
10899
10900         * infcall.c (struct call_return_meta_info)
10901         <stack_temporaries_enabled>: Remove.
10902         (get_call_return_value, call_function_by_hand_dummy): Update.
10903         * thread.c (disable_thread_stack_temporaries): Remove.
10904         (enable_thread_stack_temporaries): Remove.
10905         (thread_stack_temporaries_enabled_p): Return bool.
10906         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
10907         (get_last_thread_stack_temporary): Update.
10908         * eval.c (evaluate_subexp): Update.
10909         * gdbthread.h (class enable_thread_stack_temporaries): Now a
10910         class, not a function.
10911         (value_ptr, value_vec): Remove typedefs.
10912         (class thread_info) <stack_temporaries_enabled>: Now bool.
10913         <stack_temporaries>: Now a std::vector.
10914         (thread_stack_temporaries_enabled_p)
10915         (value_in_thread_stack_temporaries): Return bool.
10916
10917 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
10918
10919         * remote.c (putpkt_binary): Fix omitted bytes reporting.
10920         (getpkt_or_notif_sane_1): Likewise.
10921
10922 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
10923
10924         * build-id.c (build_id_to_debug_bfd): Use std::string.
10925
10926 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
10927
10928         * build-id.c (find_separate_debug_file_by_buildid): Return
10929         std::string.
10930         * build-id.h (find_separate_debug_file_by_buildid): Return
10931         std::string.
10932         * coffread.c (coff_symfile_read): Adjust to std::string.
10933         * elfread.c (elf_symfile_read): Adjust to std::string.
10934         * symfile.c (separate_debug_file_exists): Change parameter to
10935         std::string.
10936         (find_separate_debug_file): Return std::string.
10937         (find_separate_debug_file_by_debuglink): Return std::string.
10938         * symfile.h (find_separate_debug_file_by_debuglink): Return
10939         std::string.
10940
10941 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
10942
10943         * common/xml-utils.c (xml_escape_text): Move code to...
10944         (xml_escape_text_append): ... this new function.
10945         * common/xml-utils.h (xml_escape_text_append): New declaration.
10946         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
10947         New function.
10948         (_initialize_xml_utils): register test_xml_escape_text_append as
10949         a selftest.
10950
10951 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
10952
10953         * defs.h: Remove MAX_REGISTER_SIZE.
10954         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
10955         asserts.
10956         * python/py-unwind.c (pyuw_sniffer): Likewise.
10957
10958 2018-03-07  Tom Tromey  <tom@tromey.com>
10959
10960         * linux-tdep.c (linux_info_proc): Update.
10961         * target.h (struct target_ops) <to_fileio_readlink>: Return
10962         optional<string>.
10963         (target_fileio_readlink): Return optional<string>.
10964         * remote.c (remote_hostio_readlink): Return optional<string>.
10965         * inf-child.c (inf_child_fileio_readlink): Return
10966         optional<string>.
10967         * target.c (target_fileio_readlink): Return optional<string>.
10968
10969 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
10970
10971         * regcache.c (cooked_read_test): Add riscv to the list of
10972         architectures that have a save_reggroup.
10973
10974 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10975
10976         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
10977         value is not a dynamic class object.
10978
10979 2018-03-06  Tom Tromey  <tom@tromey.com>
10980
10981         * rust-exp.y: Formatting fixes.
10982
10983 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10984
10985         * riscv-tdep.c (riscv_register_name): Remove target description
10986         support.
10987         (riscv_gdbarch_init): Remove target description check.
10988
10989 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10990
10991         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
10992         comment.
10993         * riscv-tdep.h: Likewise.
10994
10995 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10996
10997         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
10998         (riscv_pseudo_register_write): Delete.
10999         (riscv_gdbarch_init): Remove all use of pseudo registers.
11000
11001 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
11002
11003         * record-btrace.c (btrace_print_lines): Replace cleanup
11004         parameter with RAII equivalents.
11005         (btrace_insn_history): Replace cleanup with RAII equivalents.
11006         * ui-out.h (make_cleanup_ui_out_list_begin_end,
11007         make_cleanup_ui_out_tuple_begin_end): Remove.
11008         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
11009         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
11010         make_cleanup_ui_out_list_begin_end): Remove.
11011
11012 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
11013
11014         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
11015         parameter types to std::vector.  Use bool.
11016         (record_btrace_wait): Replace VEC(tp_t) with
11017         std::vector<thread_info *>.
11018         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
11019
11020 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
11021
11022         * record-btrace.c (record_btrace_disable_callback): Remove.
11023         (struct scoped_btrace_disable): New.
11024         (record_btrace_open): Use scoped_btrace_disable.
11025
11026 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11027
11028         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
11029         reading values from registers.
11030
11031 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11032
11033         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
11034         where appropriate.
11035
11036 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11037
11038         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
11039         change parameter type.  Use GDB's print functions, and use
11040         core_addr_to_string where appropriate.
11041         (riscv_push_dummy_call): Use core_addr_to_string where
11042         appropriate, update call to riscv_print_arg_location, and reindent
11043         a few lines.
11044         (riscv_return_value): Update call to riscv_print_arg_location.
11045
11046 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11047             Tim Newsome <tim@sifive.com>
11048             Albert Ou <a0u@eecs.berkeley.edu>
11049             Darius Rad <darius@bluespec.com>
11050
11051         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
11052         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
11053         (ALLDEPFILES): Add riscv-tdep.c
11054         * configure.tgt: Add riscv support.
11055         * riscv-tdep.c: New file.
11056         * riscv-tdep.h: New file.
11057         * NEWS: Mention new target.
11058         * MAINTAINERS: Add entry for riscv.
11059
11060 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11061
11062         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
11063         fields within aggregates.
11064
11065 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
11066
11067         * record-btrace.c (btrace_print_lines): Change type of flags to
11068         gdb_disassembly_flags.
11069
11070 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
11071
11072         * fbsd-nat.c: Include "inf-ptrace.h".
11073         (USE_SIGTRAP_SIGINFO): Conditionally define.
11074         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
11075         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
11076         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
11077         function.
11078         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
11079         Likewise.
11080         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
11081         Likewise.
11082         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
11083         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
11084         "supports_stopped_by_hw_breakpoint" target methods.
11085
11086 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
11087
11088         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
11089         * fbsd-nat.c (debug_fbsd_nat): New variable.
11090         (show_fbsd_nat_debug): New function.
11091         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
11092         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
11093
11094 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
11095
11096         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
11097         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
11098         prototype.
11099         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
11100         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
11101         method.
11102
11103 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
11104
11105         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
11106         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
11107
11108 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
11109
11110         * charset.c (struct charset_vector): New.
11111         (charsets): Change type to charset_vector.
11112         (find_charset_names): Adjust.
11113         (add_one): Adjust.
11114         (_initialize_charset): Adjust.
11115
11116 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
11117
11118         * progspace.h (struct program_space) <deleted_solibs>: Change
11119         type to std::vector<std::string>.
11120         * progspace.c (clear_program_space_solib_cache): Adjust.
11121         * breakpoint.c (print_solib_event): Adjust.
11122         (check_status_catch_solib): Adjust.
11123         * solib.c (update_solib_list): Adjust.
11124         * ui-out.h (class ui_out) <field_string>: New overload.
11125         * ui-out.c (ui_out::field_string): New overload.
11126
11127 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
11128
11129         * progspace.h (struct program_space): Add constructor and
11130         destructor, initialize fields.
11131         (add_program_space): Remove.
11132         * progspace.c (add_program_space): Rename to...
11133         (program_space::program_space): ... this.
11134         (release_program_space): Rename to...
11135         (program_space::~program_space): ... this.
11136         (delete_program_space): Use delete to delete program_space.
11137         (initialize_progspace): Use new to allocate program_space.
11138         * inferior.c (add_inferior_with_spaces): Likewise.
11139         (clone_inferior_command): Likewise.
11140         * infrun.c (follow_fork_inferior): Likewise.
11141         (handle_vfork_child_exec_or_exit): Likewise.
11142
11143 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
11144
11145         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
11146         (delim_string_to_char_ptr_vec): Return std::vector of
11147         gdb::unique_xmalloc_ptr.
11148         (dirnames_to_char_ptr_vec_append): Take std::vector of
11149         gdb::unique_xmalloc_ptr.
11150         (dirnames_to_char_ptr_vec): Return std::vector of
11151         gdb::unique_xmalloc_ptr.
11152         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
11153         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
11154         (delim_string_to_char_ptr_vec): Return an std::vector of
11155         gdb::unique_xmalloc_ptr, adjust the code.
11156         (dirnames_to_char_ptr_vec_append): Take an std::vector of
11157         gdb::unique_xmalloc_ptr, adjust the code.
11158         (dirnames_to_char_ptr_vec): Return an std::vector of
11159         gdb::unique_xmalloc_ptr, adjust the code.
11160         * auto-load.c (auto_load_safe_path_vec): Change type to
11161         std::vector of gdb::unique_xmalloc_ptr.
11162         (auto_load_expand_dir_vars): Return an std::vector of
11163         gdb::unique_xmalloc_ptr, adjust the code.
11164         (auto_load_safe_path_vec_update): Adjust.
11165         (filename_is_in_auto_load_safe_path_vec): Adjust.
11166         (auto_load_objfile_script_1): Adjust.
11167         * build-id.c (build_id_to_debug_bfd): Adjust.
11168         * linux-thread-db.c (thread_db_load_search): Adjust.
11169         * source.c (add_path): Adjust.
11170         (openp): Adjust.
11171         * symfile.c (find_separate_debug_file): Adjust.
11172         * utils.c (do_free_char_ptr_vec): Remove.
11173         (make_cleanup_free_char_ptr_vec): Remove.
11174
11175 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
11176
11177         PR gdb/22907
11178         * common/pathstuff.c: Conditionally include "<windows.h>".
11179
11180 2018-03-01  Georg Sauthoff  <mail@georg.so>
11181
11182         PR gdb/22888
11183         * gcore.in: Quote variables and switch interpreter to bash.
11184
11185 2018-03-01  Tom Tromey  <tom@tromey.com>
11186
11187         * dwarf2read.c (alloc_discriminant_info): Fix default_index
11188         assertion.  Add assertion for discriminant_index.
11189         (quirk_rust_enum): Use correct base type name in univariant case.
11190
11191 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
11192
11193         * record.c (get_call_history_modifiers): Return a
11194         record_print_flags.
11195         (cmd_record_call_history): Adjust.
11196         * record-btrace.c (record_btrace_call_history): Adjust.
11197         (record_btrace_call_history_range): Adjust.
11198         (record_btrace_call_history_from): Adjust.
11199         * target-debug.h (target_debug_print_record_print_flags): New.
11200         * target-delegates.c: Re-generate.
11201         * target.c (target_call_history): Change flags type.
11202         (target_call_history_from): Likewise.
11203         (target_call_history_range): Likewise.
11204         * target.h (struct target_ops) <target_call_history>: Likewise.
11205         (target_call_history_from): Likewise.
11206         (target_call_history_range): Likewise.
11207
11208 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
11209             Simon Marchi  <simon.marchi@polymtl.ca>
11210
11211         * common/common-utils.c: Include "sys/stat.h".
11212         (is_regular_file): Move here from "source.c"; change return
11213         type to "bool".
11214         * common/common-utils.h (is_regular_file): New prototype.
11215         * common/pathstuff.c (contains_dir_separator): New function.
11216         * common/pathstuff.h (contains_dir_separator): New prototype.
11217         * source.c: Don't include "sys/stat.h".
11218         (is_regular_file): Move to "common/common-utils.c".
11219
11220 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
11221
11222         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
11223         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
11224         * auto-load.c: Include "common/pathstuff.h".
11225         * common/common-def.h (current_directory): Move here.
11226         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
11227         function.
11228         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
11229         prototype.
11230         * common/pathstuff.c: New file.
11231         * common/pathstuff.h: New file.
11232         * compile/compile.c: Include "common/pathstuff.h".
11233         * defs.h (current_directory): Move to "common/common-defs.h".
11234         * dwarf2read.c: Include "common/pathstuff.h".
11235         * exec.c: Likewise.
11236         * guile/scm-safe-call.c: Likewise.
11237         * linux-thread-db.c: Likewise.
11238         * main.c: Likewise.
11239         * nto-tdep.c: Likewise.
11240         * objfiles.c: Likewise.
11241         * source.c: Likewise.
11242         * symtab.c: Likewise.
11243         * utils.c: Include "common/pathstuff.h".
11244         (gdb_realpath): Move to "common/pathstuff.c".
11245         (gdb_realpath_keepfile): Likewise.
11246         (gdb_abspath): Likewise.
11247         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
11248         (gdb_realpath_keepfile): Likewise.
11249         (gdb_abspath): Likewise.
11250
11251 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
11252
11253         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
11254         wildcard process pid for super_resume for kernels with a
11255         specific bug.
11256
11257 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
11258
11259         * compile/compile.c (get_args): Add additional comments
11260         explaining function.
11261
11262 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
11263             Tom Tromey  <tom@tromey.com>
11264
11265         * target.h (memory_write_request_s): Remove typedef.  Don't define
11266         VEC.
11267         (target_write_memory_blocks): Change argument to std::vector.
11268         (struct memory_write_request): Add constructor.
11269         * target-memory.c (compare_block_starting_address): Return bool.
11270         Change argument types.
11271         (claim_memory): Change arguments to use std::vector.
11272         (split_regular_and_flash_blocks, blocks_to_erase)
11273         (compute_garbled_blocks): Likewise.
11274         (cleanup_request_data, cleanup_write_requests_vector): Remove.
11275         (target_write_memory_blocks): Change argument to std::vector.
11276         * symfile.c (struct load_section_data): Add constructor and
11277         destructor.  Use std::vector for "requests".
11278         (struct load_progress_data): Add initializers.
11279         (load_section_callback): Update.  Use "new".
11280         (clear_memory_write_data): Remove.
11281         (generic_load): Update.
11282
11283 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
11284
11285         * arch/aarch64.h: Use common/tdesc.h.
11286
11287 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
11288
11289         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
11290         architecture with a 64-bit ABI.
11291
11292 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
11293
11294         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
11295         ahead of target description loading.
11296
11297 2018-02-26  Tom Tromey  <tom@tromey.com>
11298
11299         * stack.c (backtrace_command_1): Update.
11300         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
11301         of "flags".
11302         * python/py-framefilter.c (py_print_frame)
11303         (gdbpy_apply_frame_filter): Change type of "flags".
11304         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
11305         of "flags".
11306         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
11307         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
11308         * extension.h (enum frame_filter_flag): Rename from
11309         frame_filter_flags.
11310         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
11311         (apply_ext_lang_frame_filter): Change type of "flags".
11312         * extension.c (apply_ext_lang_frame_filter): Change type of
11313         "flags".
11314         * extension-priv.h (struct extension_language_ops)
11315         <apply_frame_filter>: Change type of "flags".
11316
11317 2018-02-26  Tom Tromey  <tom@tromey.com>
11318
11319         PR python/16497:
11320         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
11321         off-by-one in py_end computation.
11322         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
11323         PRINT_MORE_FRAMES.
11324         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
11325         constant.
11326
11327 2018-02-26  Tom Tromey  <tom@tromey.com>
11328
11329         * dwarf2read.c (struct variant_field): New.
11330         (struct nextfield) <variant>: New field.
11331         (dwarf2_add_field): Handle DW_TAG_variant_part.
11332         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
11333         discriminated union.
11334         (read_structure_type): Handle DW_TAG_variant_part.
11335         (handle_struct_member_die): New function, extracted from
11336         process_structure_scope.  Handle DW_TAG_variant.
11337         (process_structure_scope): Handle discriminated unions.  Call
11338         handle_struct_member_die.
11339
11340 2018-02-26  Tom Tromey  <tom@tromey.com>
11341
11342         * rust-lang.h (rust_last_path_segment): Declare.
11343         * rust-lang.c (rust_last_path_segment): Now public.  Change
11344         contract.
11345         (struct disr_info): Remove.
11346         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
11347         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
11348         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
11349         (rust_enum_p, rust_enum_variant): New function.
11350         (rust_underscore_fields): Remove "offset" parameter.
11351         (rust_print_enum): New function.
11352         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
11353         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
11354         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
11355         enums.
11356         (rust_internal_print_type): New function, from rust_print_type.
11357         Remove enum code.
11358         (rust_print_type): Call rust_internal_print_type.
11359         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
11360         Update enum handling.
11361         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
11362         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
11363         (rust_union_quirks): New functions.
11364         (process_full_comp_unit, process_full_type_unit): Call
11365         rust_union_quirks.
11366         (process_structure_scope): Update rust_unions if necessary.
11367
11368 2018-02-26  Tom Tromey  <tom@tromey.com>
11369
11370         * value.h (value_union_variant): Declare.
11371         * valops.c (value_union_variant): New function.
11372         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
11373         (struct discriminant_info): New.
11374         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
11375         enumerator.
11376         (struct main_type) <flag_discriminated_union>: New field.
11377
11378 2018-02-26  Tom Tromey  <tom@tromey.com>
11379
11380         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11381         unittests/unpack-selftests.c.
11382         * unittests/unpack-selftests.c: New file.
11383         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
11384
11385 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11386
11387         * dwarf2read.c (struct partial_die_info) <read>: New method.
11388         (read_partial_die): Remove the declaration.
11389         (load_partial_dies): Update.
11390         (partial_die_info::partial_die_info):
11391         (read_partial_die): Change it to partial_die_info::read.
11392
11393 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11394
11395         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
11396         (fixup_partial_die): Remove declaration.
11397         (scan_partial_symbols): Update.
11398         (partial_die_parent_scope): Likewise.
11399         (partial_die_full_name): Likewise.
11400         (fixup_partial_die): Change it to partial_die_info::fixup.
11401
11402 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11403
11404         * dwarf2read.c (read_partial_die): Update the declaration.
11405         (load_partial_dies): Caller update.
11406         (read_partial_die): Remove one argument abbrev_len.
11407
11408 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11409
11410         * dwarf2read.c (struct partial_die_info): Add ctor, delete
11411         assignment operator.
11412         (load_partial_dies): Use ctor and copy ctor.
11413         (read_partial_die): Update.
11414         (dwarf2_cu::find_partial_die): Use ctor.
11415
11416 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11417
11418         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
11419         (find_partial_die_in_comp_unit): Change it to
11420         dwarf2_cu::find_partial_die.
11421         (find_partial_die): Update.
11422
11423 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11424
11425         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
11426         is NULL.
11427
11428 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11429
11430         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
11431
11432 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
11433
11434         * arch/amd64.h: Use common/tdesc.h.
11435         * arch/i386.c: Likewise.
11436         * arch/i386.h: Likewise.
11437         * arch/tic6x.c: Likewise.
11438         * arch/tdesc.h: Move file from here...
11439         * common/tdesc.h: ...to here.
11440         * features/aarch64-core.c: Regenerate.
11441         * features/aarch64-fpu.c: Regenerate.
11442         * features/i386/32bit-avx.c: Regenerate.
11443         * features/i386/32bit-avx512.c: Regenerate.
11444         * features/i386/32bit-core.c: Regenerate.
11445         * features/i386/32bit-linux.c: Regenerate.
11446         * features/i386/32bit-mpx.c: Regenerate.
11447         * features/i386/32bit-pkeys.c: Regenerate.
11448         * features/i386/32bit-sse.c: Regenerate.
11449         * features/i386/64bit-avx.c: Regenerate.
11450         * features/i386/64bit-avx512.c: Regenerate.
11451         * features/i386/64bit-core.c: Regenerate.
11452         * features/i386/64bit-linux.c: Regenerate.
11453         * features/i386/64bit-mpx.c: Regenerate.
11454         * features/i386/64bit-pkeys.c: Regenerate.
11455         * features/i386/64bit-segments.c: Regenerate.
11456         * features/i386/64bit-sse.c: Regenerate.
11457         * features/i386/x32-core.c: Regenerate.
11458         * features/tic6x-c6xp.c: Regenerate.
11459         * features/tic6x-core.c: Regenerate.
11460         * features/tic6x-gp.c: Regenerate.
11461         * target-descriptions.c: Use common/tdesc.h.
11462         * target-descriptions.h: Likewise.
11463
11464 2018-02-24  Tom Tromey  <tom@tromey.com>
11465
11466         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
11467         (try_thread_db_load_from_dir, thread_db_load_search): Use
11468         std::string.
11469         (info_auto_load_libthread_db_compare): Return bool.  Change
11470         argument types.
11471         (info_auto_load_libthread_db): Use std::vector, std::string.
11472         Remove cleanups.
11473
11474 2018-02-24  Tom Tromey  <tom@tromey.com>
11475
11476         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
11477         std::string.
11478         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
11479         std::string*.
11480         * gdbarch.c: Rebuild.
11481         * gdbarch.h: Rebuild.
11482         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
11483         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
11484         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
11485         std::string*.
11486
11487 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
11488
11489         * gdbtypes.h (sect_offset): Change type to uint64_t.
11490         (sect_offset_str): New function.
11491         * dwarf2read.c (create_addrmap_from_aranges): Use
11492         sect_offset_str.
11493         (error_check_comp_unit_head): Likewise.
11494         (create_debug_type_hash_table): Likewise.
11495         (read_cutu_die_from_dwo): Likewise.
11496         (init_cutu_and_read_dies): Likewise.
11497         (init_cutu_and_read_dies_no_follow): Likewise.
11498         (process_psymtab_comp_unit_reader): Likewise.
11499         (partial_die_parent_scope): Likewise.
11500         (peek_die_abbrev): Likewise.
11501         (process_queue): Likewise.
11502         (dwarf2_physname): Likewise.
11503         (read_namespace_alias): Likewise.
11504         (read_import_statement): Likewise.
11505         (create_dwo_cu_reader): Likewise.
11506         (create_cus_hash_table): Likewise.
11507         (lookup_dwo_cutu): Likewise.
11508         (inherit_abstract_dies): Likewise.
11509         (read_func_scope): Likewise.
11510         (read_call_site_scope): Likewise.
11511         (dwarf2_add_member_fn): Likewise.
11512         (read_common_block): Likewise.
11513         (read_module_type): Likewise.
11514         (read_typedef): Likewise.
11515         (read_subrange_type): Likewise.
11516         (load_partial_dies): Likewise.
11517         (read_partial_die): Likewise.
11518         (find_partial_die): Likewise.
11519         (read_str_index): Likewise.
11520         (dwarf2_string_attr): Likewise.
11521         (build_error_marker_type): Likewise.
11522         (lookup_die_type): Likewise.
11523         (dump_die_shallow): Likewise.
11524         (follow_die_ref): Likewise.
11525         (dwarf2_fetch_die_loc_sect_off): Likewise.
11526         (dwarf2_fetch_constant_bytes): Likewise.
11527         (follow_die_sig): Likewise.
11528         (get_signatured_type): Likewise.
11529         (get_DW_AT_signature_type): Likewise.
11530         (dwarf2_find_containing_comp_unit): Likewise.
11531         (set_die_type): Likewise.
11532
11533 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
11534
11535         * arch/aarch64.c: Include "common-defs.h".
11536         * arch/amd64.c: Likewise.
11537         * arch/i386.c: Likewise.
11538
11539 2018-02-21  Tom Tromey  <tom@tromey.com>
11540
11541         * value.h: (extract_field_op): Update.
11542         * eval.c (extract_field_op): Return a const char *.
11543         * expression.h (parse_expression_for_completion): Update.
11544         * completer.c (complete_expression): Update.
11545         (add_struct_fields): Make fieldname const.
11546         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
11547         (mark_completion_tag, parse_exp_in_context_1): Update.
11548         (parse_expression_for_completion): Change "name" to
11549         unique_xmalloc_ptr*.
11550
11551 2018-02-21  Tom Tromey  <tom@tromey.com>
11552
11553         * infcall.c (call_function_by_hand_dummy): Use std::vector.
11554
11555 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11556
11557         * avr-tdep.c (avr_read_pc): Change parameter type to
11558         readable_regcache.
11559         * gdbarch.sh (read_pc): Likewise.
11560         * gdbarch.c: Re-generated.
11561         * gdbarch.h: Re-generated.
11562         * hppa-tdep.c (hppa_read_pc): Change parameter type to
11563         readable_regcache.
11564         * ia64-tdep.c (ia64_read_pc): Likewise.
11565         * mips-tdep.c (mips_read_pc): Likewise.
11566         * spu-tdep.c (spu_read_pc): Likewise.
11567
11568 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11569
11570         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
11571         * regcache-dump.c: New file.
11572         * regcache.c: Move register_dump to regcache-dump.c.
11573         (maintenance_print_registers): Likewise.
11574         (maintenance_print_raw_registers): Likewise.
11575         (maintenance_print_cooked_registers): Likewise.
11576         (maintenance_print_register_groups): Likewise.
11577         (maintenance_print_remote_registers): Likewise.
11578         (_initialize_regcache): Likewise.
11579         * regcache.h (register_dump): Moved from regcache.c.
11580
11581 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11582
11583         * regcache.c (regcache::regcache): Update.
11584         (regcache::invalidate): Move it to detached_regcache::invalidate.
11585         (get_thread_arch_aspace_regcache): Update.
11586         (regcache::raw_update): Update.
11587         (regcache::cooked_read): Remove some code.
11588         (regcache::cooked_read_value): Likewise.
11589         (regcache::raw_write): Remove assert on m_readonly_p.
11590         (regcache::raw_supply_integer): Move it to
11591         detached_regcache::raw_supply_integer.
11592         (regcache::raw_supply_zeroed): Likewise.
11593         * regcache.h (detached_regcache) <raw_supply_integer>: New
11594         declaration.
11595         <raw_supply_zeroed, invalidate>: Likewise.
11596         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
11597         <invalidate>: Likewise.
11598         <m_readonly_p>: Removed.
11599
11600 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11601
11602         * infcmd.c (get_return_value): Let stop_regs point to
11603         get_current_regcache.
11604         * regcache.c (regcache::regcache): Remove.
11605         (register_dump_reg_buffer): New class.
11606         (regcache_print): Adjust.
11607         * regcache.h (regcache): Remove constructors.
11608
11609 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11610
11611         * regcache.c (class register_dump): New class.
11612         (register_dump_regcache, register_dump_none): New class.
11613         (register_dump_remote, register_dump_groups): New class.
11614         (regcache_print): Update.
11615         * regcache.h (regcache_dump_what): Move it to regcache.c.
11616         (regcache) <dump>: Remove.
11617
11618 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11619
11620         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
11621          reg_buffer_rw *.
11622         (jit_unwind_reg_set_impl): Call raw_supply.
11623         (jit_frame_sniffer): Use reg_buffer_rw.
11624         * record-full.c (record_full_core_regbuf): Change its type.
11625         (record_full_core_open_1): Use reg_buffer_rw.
11626         (record_full_close): Likewise.
11627         (record_full_core_fetch_registers): Use regcache->raw_supply.
11628         (record_full_core_store_registers): Likewise.
11629         * regcache.c (regcache::get_register_status): Move it to
11630         reg_buffer.
11631         (regcache_raw_set_cached_value): Remove.
11632         (regcache::raw_set_cached_value): Remove.
11633         (regcache::raw_write): Call raw_supply.
11634         (regcache::raw_supply): Move it to reg_buffer_rw.
11635         * regcache.h (regcache_raw_set_cached_value): Remove.
11636         (reg_buffer_rw): New class.
11637
11638 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11639
11640         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
11641         readonly_detached_regcache.
11642         (dummy_frame_prev_register): Use regcache->cooked_read.
11643         * frame.c (frame_save_as_regcache): Change return type.
11644         (frame_pop): Update.
11645         * frame.h (frame_save_as_regcache): Update declaration.
11646         * inferior.h (get_infcall_suspend_state_regcache): Update
11647         declaration.
11648         * infrun.c (infcall_suspend_state) <registers>: use
11649         readonly_detached_regcache.
11650         (save_infcall_suspend_state): Don't use regcache_dup.
11651         (get_infcall_suspend_state_regcache): Change return type.
11652         * linux-fork.c (struct fork_info) <savedregs>: Change to
11653         readonly_detached_regcache.
11654         <pc>: New field.
11655         (fork_save_infrun_state): Don't use regcache_dup.
11656         (info_checkpoints_command): Adjust.
11657         * mi/mi-main.c (register_changed_p): Update declaration.
11658         (mi_cmd_data_list_changed_registers): Use
11659         readonly_detached_regcache.
11660         (register_changed_p): Change parameter type to
11661         readonly_detached_regcache.
11662         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
11663         readonly_detached_regcache.
11664         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
11665         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
11666         New.
11667         (regcache::save): Move it to reg_buffer.
11668         (regcache::restore): Change parameter type.
11669         (regcache_dup): Remove.
11670         * regcache.h (reg_buffer) <save>: New method.
11671         (readonly_detached_regcache): New class.
11672         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
11673         readonly_detached_regcache.
11674         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
11675
11676 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11677
11678         * frame.c (frame_save_as_regcache): Use regcache method save.
11679         (frame_pop): Use regcache method restore.
11680         * infrun.c (restore_infcall_suspend_state): Likewise.
11681         * linux-fork.c (fork_load_infrun_state): Likewise.
11682         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
11683         save.
11684         * regcache.c (regcache_save): Remove.
11685         (regcache::restore): More asserts.
11686         (regcache_cpy): Remove.
11687         * regcache.h (regcache_save): Remove the declaration.
11688         (regcache::restore): Move from private to public.
11689         Remove the friend declaration of regcache_cpy.
11690         (regcache_cpy): Remove declaration.
11691
11692 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11693
11694         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
11695         parameter type to 'readable_regcache *'.
11696         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
11697         * arm-tdep.c (arm_neon_quad_read): Likewise.
11698         (arm_pseudo_read): Likewise.
11699         * avr-tdep.c (avr_pseudo_register_read): Likewise.
11700         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
11701         * frv-tdep.c (frv_pseudo_register_read): Likewise.
11702         * gdbarch.c: Re-generated.
11703         * gdbarch.h: Re-generated.
11704         * gdbarch.sh (pseudo_register_read): Change parameter type to
11705         'readable_regcache *'.
11706         (pseudo_register_read_value): Likewise.
11707         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
11708         (h8300_pseudo_register_read): Likewise.
11709         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
11710         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
11711         (i386_pseudo_register_read_into_value): Likewise.
11712         (i386_pseudo_register_read_value): Likewise.
11713         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
11714         declaration.
11715         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
11716         * m32c-tdep.c (m32c_raw_read): Likewise.
11717         (m32c_read_flg): Likewise.
11718         (m32c_banked_register): Likewise.
11719         (m32c_banked_read): Likewise.
11720         (m32c_sb_read): Likewise.
11721         (m32c_part_read): Likewise.
11722         (m32c_cat_read): Likewise.
11723         (m32c_r3r2r1r0_read): Likewise.
11724         (m32c_pseudo_register_read): Likewise.
11725         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
11726         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
11727         (mep_pseudo_cr64_read): Likewise.
11728         (mep_pseudo_register_read): Likewise.
11729         * mips-tdep.c (mips_pseudo_register_read): Likewise.
11730         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
11731         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
11732         * regcache.c (regcache::raw_read): Move it to readable_regcache.
11733         (regcache::cooked_read): Likewise.
11734         (regcache::cooked_read_value): Likewise.
11735         (regcache_cooked_read_signed):
11736         (regcache::cooked_read): Likewise.
11737         * regcache.h (readable_regcache): New class.
11738         (regcache): Inherit readable_regcache.  Move some methods to
11739         readable_regcache.
11740         * rl78-tdep.c (rl78_pseudo_register_read): Change
11741         parameter type to 'readable_regcache *'.
11742         * rs6000-tdep.c (do_regcache_raw_read): Remove.
11743         (e500_pseudo_register_read): Change parameter type to
11744         'readable_regcache *'.
11745         (dfp_pseudo_register_read): Likewise.
11746         (vsx_pseudo_register_read): Likewise.
11747         (efpr_pseudo_register_read): Likewise.
11748         * s390-tdep.c (s390_pseudo_register_read): Likewise.
11749         * sh-tdep.c (sh_pseudo_register_read): Likewise.
11750         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
11751         (sh64_pseudo_register_read): Likewise.
11752         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
11753         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
11754         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
11755         (spu_pseudo_register_read): Likewise.
11756         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
11757         (xtensa_pseudo_register_read): Likewise.
11758
11759 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11760
11761         * regcache.c (regcache::regcache): Call reg_buffer ctor.
11762         (regcache::arch): Move it to reg_buffer::arch.
11763         (regcache::register_buffer): Likewise.
11764         (regcache::assert_regnum): Likewise.
11765         (regcache::num_raw_registers): Likewise.
11766         * regcache.h (reg_buffer): New class.
11767         (regcache): Inherit reg_buffer.
11768
11769 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
11770
11771         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
11772         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
11773
11774 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
11775
11776         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
11777
11778 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
11779
11780         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
11781         (SFILES): Remove common/*.c files.
11782         (COMMON_OBS): Remove some *.o files built from common/*.c files.
11783         * common/common.host: Add common reference.
11784         * configure.ac: Likewise.
11785         * configure: Regenerate.
11786
11787 2018-02-16  Yao Qi  <yao.qi@linaro.org>
11788
11789         * block.c (block_namespace_info): Inherit allocate_on_obstack.
11790         (block_initialize_namespace): Use new.
11791         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
11792         (dwarf2_free_objfile): Use delete.
11793         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
11794         (copy_type_recursive): Use new.
11795         * gdb_obstack.h (allocate_on_obstack): New.
11796
11797 2018-02-15  Yao Qi  <yao.qi@linaro.org>
11798
11799         PR gdb/22849
11800         * inferior.c (exit_inferior_1): Reset inf->control.
11801
11802 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
11803
11804         * ada-lang.c (ada_to_fixed_value_create): Delete advance
11805         declaration.
11806
11807 2018-02-14  Pedro Alves  <palves@redhat.com>
11808
11809         * frame-unwind.c (frame_unwind_try_unwinder): Always call
11810         frame_cleanup_after_sniffer on exception.
11811
11812 2018-02-14  Tom Tromey  <tom@tromey.com>
11813
11814         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
11815         const.
11816         (solib_bfd_open): Make pathname const.
11817         * solib.c (solib_bfd_open): Make pathname const.
11818         * solib-spu.c (spu_bfd_fopen): Make name const.
11819         (spu_bfd_open): Make pathname const.
11820         * solib-darwin.c (darwin_bfd_open): Make pathname const.
11821         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
11822
11823 2018-02-14  Tom Tromey  <tom@tromey.com>
11824
11825         * symfile.c (symfile_bfd_open): Update.
11826         * source.h (openp, source_full_path_of, find_and_open_source):
11827         Change argument type to unique_xmalloc_ptr.
11828         * source.c (openp): Take a unique_xmalloc_ptr.
11829         (source_full_path_of, find_and_open_source): Likewise.
11830         (open_source_file, symtab_to_fullname): Update.
11831         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
11832         unique_xmalloc_ptr.
11833         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
11834         (exec_file_find): Update.
11835         * psymtab.c (psymtab_to_fullname): Update.
11836         * nto-tdep.h (nto_find_and_open_solib): Update.
11837         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
11838         unique_xmalloc_ptr.
11839         * exec.c (exec_file_attach): Update.
11840         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
11841         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
11842
11843 2018-02-14  Tom Tromey  <tom@tromey.com>
11844
11845         * solib.c: Include source.h.
11846         * nto-tdep.c: Include source.h.
11847         * mi/mi-cmd-env.c: Include source.h.
11848         * infcmd.c: Include source.h.
11849         * exec.c: Include source.h.
11850         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
11851         (add_path, directory_switch, source_path, init_source_path): Move
11852         declarations...
11853         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
11854         (add_path, directory_switch, source_path, init_source_path):
11855         ...here.
11856
11857 2018-02-14  Tom Tromey  <tom@tromey.com>
11858
11859         * solist.h (exec_file_find, solib_find): Return
11860         unique_xmalloc_ptr.
11861         (solib_bfd_fopen): Take a const char *.
11862         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
11863         (exec_file_find, solib_find): Likewise.
11864         (solib_bfd_fopen): Do not take ownership of "pathname".
11865         (solib_bfd_open): Use unique_xmalloc_ptr.
11866         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
11867         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
11868         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
11869         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
11870
11871 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
11872
11873         * ada-lang.c (name_match_type_from_name): Remove reference to
11874         ada_name_for_lookup in function's documentation.
11875         * ada-lang.h (ada_name_for_lookup): Delete declaration.
11876
11877 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
11878
11879         * defs.h (enum openp_flags): New enum.
11880         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
11881         Move to enum openp_flags.
11882         (openp_flags): New enum flags.
11883         (openp): Change parameter type to openp_flags.
11884         * source.c (openp): Change parameter type to openp_flags.
11885         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
11886         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
11887
11888 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
11889
11890         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
11891         per-command.
11892
11893 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
11894
11895         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
11896         into...
11897         (class dwarf2_queue_guard): ...the destructor of this new class.
11898         (dw2_do_instantiate_symtab): Create instance of the new class
11899         dwarf2_queue_guard, remove cleanup.
11900
11901 2018-02-09  Tom Tromey  <tom@tromey.com>
11902
11903         * source.c (find_source_lines): Don't reference past the end of
11904         the vector.
11905
11906 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11907
11908         * remote.c (remote_btrace_maybe_reopen): Change error message.
11909         * btrace.c (btrace_enable): Likewise.
11910         (parse_xml_btrace): Likewise.
11911         (parse_xml_btrace_conf): Likewise.
11912
11913 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11914
11915         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
11916         (linux_enable_pt, linux_enable_bts): Call
11917         diagnose_perf_event_open_fail.
11918
11919 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11920
11921         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
11922         Remove parameter and change return type.  Update callers.  Move it.
11923         (linux_enable_bts, linux_enable_pt): Improve error message.
11924         (linux_enable_pt): Remove zero buffer size check.
11925         (linux_enable_btrace): Improve error messages.  Remove NULL return
11926         check.
11927
11928 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11929
11930         * btrace.c (btrace_enable): Remove target_supports_btrace call.
11931         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
11932         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
11933         (linux_supports_pt, linux_supports_btrace): Remove.
11934         (linux_enable_bts): Call cpu_supports_bts.
11935         * nat/linux-btrace.h (linux_supports_btrace): Remove.
11936         * remote.c (remote_supports_btrace): Remove.
11937         (init_remote_ops): Remove remote_supports_btrace.
11938         * target-delegates.c: Regenerated.
11939         * target.c (target_supports_btrace): Remove.
11940         * target.h (target_ops) <to_supports_btrace>: Remove
11941         (target_supports_btrace): Remove.
11942         * x86-linux-nat.c (x86_linux_create_target): Remove
11943         linux_supports_btrace.
11944
11945 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11946
11947         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
11948         btrace failed.
11949         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
11950         exception and use message in own exception.
11951
11952 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11953
11954         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
11955         (perf_event_pt_event_type): Use gdb_file_up.
11956         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
11957         scoped_fd, and scoped_mmap.
11958
11959 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11960
11961         * common/scoped_mmap.h: New.
11962         * unittests/scoped_mmap-selftest.c: New.
11963         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11964         unittests/scoped_mmap-selftest.c.
11965
11966 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11967
11968         * common/scoped_fd.h: New.
11969         * unittests/scoped_fd-selftest.c: New.
11970         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11971         unittests/scoped_fd-selftest.c.
11972
11973 2018-02-09  Tom Tromey  <tom@tromey.com>
11974
11975         * auto-load.c (auto_load_section_scripts): Use
11976         gdb::unique_xmalloc_ptr.
11977
11978 2018-02-09  Tom Tromey  <tom@tromey.com>
11979
11980         * auto-load.c (execute_script_contents): Use std::string.
11981
11982 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
11983
11984         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
11985         Python function, rather than a new command.
11986
11987 2018-02-08  Tom Tromey  <tom@tromey.com>
11988
11989         * solib.c (solib_find_1): Use std::string.
11990         (solib_bfd_fopen): Use unique_xmalloc_ptr.
11991
11992 2018-02-08  Tom Tromey  <tom@tromey.com>
11993
11994         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
11995
11996 2018-02-08  Tom Tromey  <tom@tromey.com>
11997
11998         * source.c (find_source_lines): Use gdb::def_vector.
11999
12000 2018-02-08  Tom Tromey  <tom@tromey.com>
12001
12002         * macrocmd.c (struct temporary_macro_definition): New.
12003         (macro_define_command): Use temporary_macro_definition.  Remove
12004         cleanups.
12005         (free_macro_definition_ptr): Remove.
12006
12007 2018-02-08  Tom Tromey  <tom@tromey.com>
12008
12009         * macroexp.c (maybe_expand): Use std::string.
12010
12011 2018-02-08  Tom Tromey  <tom@tromey.com>
12012
12013         * macroexp.c (struct macro_buffer): Add initializers for some
12014         members.
12015         (init_buffer, init_shared_buffer, free_buffer)
12016         (free_buffer_return_text): Remove.
12017         (macro_buffer): New constructors.
12018         (~macro_buffer): New destructor.
12019         (macro_buffer::set_shared): New method.
12020         (macro_buffer::resize_buffer, macro_buffer::appendc)
12021         (macro_buffer::appendmem): Now methods, not free functions.
12022         (set_token, append_tokens_without_splicing, stringify)
12023         (macro_stringify): Update.
12024         (gather_arguments): Change return type.  Remove argc_p argument,
12025         add args_ptr argument.  Use std::vector.
12026         (substitute_args): Remove argc argument.  Accept std::vector.
12027         (expand): Update.  Use std::vector.
12028         (scan, macro_expand, macro_expand_next): Update.
12029
12030 2018-02-08  Tom Tromey  <tom@tromey.com>
12031
12032         * symtab.c (default_collect_symbol_completion_matches_break_on):
12033         Use unique_xmalloc_ptr.
12034         * macroscope.h: (sal_macro_scope, user_macro_scope)
12035         (default_macro_scope): Return unique_xmalloc_ptr.
12036         * macroscope.c (sal_macro_scope, user_macro_scope)
12037         (default_macro_scope): Return unique_xmalloc_ptr.
12038         * macroexp.h (macro_expand, macro_expand_once): Return
12039         unique_xmalloc_ptr.
12040         * macroexp.c (macro_expand, macro_expand_once): Return
12041         unique_xmalloc_ptr.
12042         * macrocmd.c (macro_expand_command, macro_expand_once_command)
12043         (info_macro_command, info_macros_command): Use
12044         unique_xmalloc_ptr.
12045         * compile/compile-c-support.c (write_macro_definitions): Use
12046         unique_xmalloc_ptr.
12047         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
12048
12049 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
12050
12051         * value.c (value_static_field): Assign field type instead of
12052         containing type when returning an optimized out value.
12053
12054 2018-02-06  Yao Qi  <yao.qi@linaro.org>
12055
12056         * ft32-tdep.c (ft32_read_pc): Remove.
12057         (ft32_write_pc): Remove.
12058         (ft32_gdbarch_init): Update.
12059         * m32r-tdep.c (m32r_read_pc): Remove.
12060         (m32r_gdbarch_init): Update.
12061         * mep-tdep.c (mep_read_pc): Remove.
12062         (mep_gdbarch_init): Update.
12063         * microblaze-tdep.c (microblaze_write_pc): Remove.
12064         (microblaze_gdbarch_init): Update.
12065         * mn10300-tdep.c (mn10300_read_pc): Remove.
12066         (mn10300_write_pc): Remove.
12067         (mn10300_gdbarch_init): Update.
12068         * moxie-tdep.c (moxie_read_pc): Remove.
12069         (moxie_write_pc): Remove.
12070         (moxie_gdbarch_init): Update.
12071
12072 2018-02-06  Yao Qi  <yao.qi@linaro.org>
12073
12074         * expprint.c (print_subexp_standard): Handle
12075         OP_F77_UNDETERMINED_ARGLIST.
12076         (dump_subexp_body_standard): Likewise.
12077
12078 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
12079
12080         * target-descriptions.c (tdesc_element_visitor) Add empty
12081         implementations.
12082         (tdesc_type): Move make_gdb_type from here.
12083         (tdesc_type_builtin): Likewise.
12084         (tdesc_type_vector): Likewise.
12085         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
12086         (make_gdb_type_struct): Move from tdesc_type_with_fields.
12087         (make_gdb_type_union): Likewise.
12088         (make_gdb_type_flags): Likewise.
12089         (make_gdb_type_enum): Likewise.
12090         (make_gdb_type): New function.
12091         (tdesc_register_type): Use static make_gdb_type.
12092
12093 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
12094
12095         * infcmd.c (default_print_one_register_info): Align natural-format
12096         column values consistently one under another.
12097         (pad_to_column): New function.
12098
12099 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
12100
12101         * dwarf2read.c (dwarf2_physname): Move commment.
12102
12103 2018-02-01  Leszek Swirski  <leszeks@google.com>
12104
12105         * varobj.c (varobj_formatted_print_options): Allow recursive
12106         pretty printing if pretty printing is enabled.
12107
12108 2018-02-01  Leszek Swirski  <leszeks@google.com>
12109
12110         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
12111         names after a structop as a filename.
12112
12113 2018-02-01  Yao Qi  <yao.qi@linaro.org>
12114
12115         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
12116         (arm_record_coproc_data_proc): Likewise.
12117
12118 2018-02-01  Yao Qi  <yao.qi@linaro.org>
12119
12120         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
12121
12122 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
12123
12124         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
12125         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
12126
12127 2018-01-31  Pedro Alves  <palves@redhat.com>
12128
12129         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
12130         * inflow.c (child_terminal_save_inferior): Wrap reference to
12131         tcgetpgrp in HAVE_TERMIOS_H.
12132         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
12133         _WIN32.
12134         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
12135         always iterate over all inferiors.
12136         (gdbsim_cntrl_c): Adjust.
12137         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
12138
12139 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
12140
12141         * gdbtypes.c (lookup_array_range_type): Make sure the array's
12142         index type is objfile-owned if the element type is as well.
12143
12144 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
12145
12146         GDB 8.1 released.
12147
12148 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12149
12150         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
12151         "features/s390x-linux64.c".
12152         (_initialize_s390_linux_tdep): Remove initialization of tdescs
12153         s390_linux32 and s390x_linux64.
12154         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
12155         default tdesc.
12156         * s390-tdep.c: Include "features/s390-linux32.c" and
12157         "features/s390x-linux64.c".
12158         (s390_tdesc_valid): Add check for tdesc_has_registers.
12159         (s390_gdbarch_init): Make sure there is always a valid tdesc.
12160         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
12161         tdesc_s390x_linux64.
12162         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
12163         tdesc_s390x_linux64 to...
12164         * s390-tdep.h: ...here.
12165
12166 2018-01-30  Pedro Alves  <palves@redhat.com>
12167
12168         PR gdb/13211
12169         * config.in, configure: Regenerate.
12170         * configure.ac: Check for getpgid.
12171         * go32-nat.c (go32_pass_ctrlc): New.
12172         (go32_target): Install it.
12173         * inf-child.c (inf_child_target): Install
12174         child_terminal_save_inferior, child_pass_ctrlc and
12175         child_interrupt.
12176         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
12177         (inf_ptrace_target): No longer install it.
12178         * infcmd.c (interrupt_target_1): Adjust.
12179         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
12180         (child_interrupt): Declare.
12181         (inferior::terminal_state): New.
12182         * inflow.c (struct terminal_info): Update comments.
12183         (inferior_process_group): Delete.
12184         (terminal_is_ours): Delete.
12185         (gdb_tty_state): New.
12186         (child_terminal_init): Adjust.
12187         (is_gdb_terminal, sharing_input_terminal_1)
12188         (sharing_input_terminal): New functions.
12189         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
12190         Set the process's actual process group in the foreground if
12191         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
12192         mark terminal as the inferior's if not sharing GDB's terminal.
12193         Don't check attach_flag.
12194         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
12195         pass down a target_terminal_state.
12196         (child_terminal_save_inferior): New, factored out from ...
12197         (child_terminal_ours_1): ... this.  Handle
12198         target_terminal_state::is_ours_for_output.
12199         (child_interrupt, child_pass_ctrlc): New.
12200         (inflow_inferior_exit): Clear the inferior's terminal_state.
12201         (copy_terminal_info): Copy the inferior's terminal state.
12202         (_initialize_inflow): Remove reference to terminal_is_ours.
12203         * inflow.h (inferior_process_group): Delete.
12204         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
12205         * procfs.c (procfs_target): Don't install procfs_interrupt.
12206         (procfs_interrupt): Delete.
12207         * remote.c (remote_serial_quit_handler): Adjust.
12208         (remote_interrupt): Remove ptid parameter.  Adjust.
12209         * target-delegates.c: Regenerate.
12210         * target.c: Include "terminal.h".
12211         (target_terminal::terminal_state): Rename to ...
12212         (target_terminal::m_terminal_state): ... this.
12213         (target_terminal::init): Adjust.
12214         (target_terminal::inferior): Adjust to per-inferior
12215         terminal_state.
12216         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
12217         (target_terminal::ours, target_terminal::ours_for_output): Use
12218         target_terminal_is_ours_kind.
12219         (target_interrupt): Remove ptid parameter.  Adjust.
12220         (default_target_pass_ctrlc): Adjust.
12221         * target.h (target_ops::to_terminal_save_inferior): New field.
12222         (target_ops::to_interrupt): Remove ptid_t parameter.
12223         (target_interrupt): Remove ptid_t parameter.  Update comment.
12224         (target_pass_ctrlc): Update comment.
12225         * target/target.h (target_terminal_state): New scoped enum,
12226         factored out of ...
12227         (target_terminal::terminal_state): ... here.
12228         (target_terminal::inferior): Update comments.
12229         (target_terminal::restore_inferior): New.
12230         (target_terminal::is_inferior, target_terminal::is_ours)
12231         (target_terminal::is_ours_for_output): Adjust.
12232         (target_terminal::scoped_restore_terminal_state): Adjust to
12233         rename, and call restore_inferior() instead of inferior().
12234         (target_terminal::scoped_restore_terminal_state::m_state): Change
12235         type.
12236         (target_terminal::terminal_state): Rename to ...
12237         (target_terminal::m_terminal_state): ... this and change type.
12238
12239 2018-01-30  Pedro Alves  <palves@redhat.com>
12240
12241         * linux-nat.c (wait_for_signal): New function.
12242         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
12243         directly.
12244         (async_terminal_is_ours)
12245         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
12246         (linux_nat_add_target): Don't override
12247         to_terminal_inferior/to_terminal_ours.
12248
12249 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
12250
12251         * remote.c (remote_follow_fork): Don't call "detach_inferior".
12252
12253 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
12254
12255         * dwarf2read.c (free_dwo_files): Add forward-declaration.
12256         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
12257         dwarf2_per_objfile_free here.
12258         (dwarf2_per_objfile_free): Remove.
12259         (_initialize_dwarf2_read): Don't register
12260         dwarf2_per_objfile_free as a registry cleanup.
12261
12262 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
12263
12264         Avoid compilation errors in MinGW native builds
12265
12266         The error is triggered by including python-internal.h, and the
12267         error message is:
12268
12269              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
12270                       from build-gnulib/import/math.h:27,
12271                       from d:/usr/Python26/include/pyport.h:235,
12272                       from d:/usr/Python26/include/Python.h:58,
12273                       from python/python-internal.h:94,
12274                       from python/py-arch.c:24:
12275              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
12276         using ::hypot;
12277                 ^~~~~
12278
12279         This happens because Python headers define 'hypot' to expand t
12280         '_hypot' in the Windows builds.
12281         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
12282         'hypoth'.  This avoids a compilation error.
12283
12284 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
12285
12286         * MAINTAINERS (Write After Approval): Fix ordering.
12287
12288 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
12289
12290         * MAINTAINERS (Write After Approval): Add Alan Hayward.
12291
12292 2018-01-26  Alan Modra  <amodra@gmail.com>
12293
12294         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
12295         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
12296         Remove nop.  Make const.  Comment.
12297         (powerpc32_plt_stub_so_2): New.
12298         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
12299         Correct count.  Update uses.
12300         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
12301         Move common code reading PLT entry word.  Correct
12302         powerpc32_plt_stub PLT address calculation.
12303         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
12304         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
12305         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
12306         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
12307         (ppc64_standard_linkage8): Likewise.
12308         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
12309         Correct insns description.
12310         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
12311
12312 2018-01-24  Pedro Alves  <palves@redhat.com>
12313
12314         GCC PR libstdc++/83906
12315         * gdbtypes.c (operator==(const dynamic_prop &,
12316         const dynamic_prop &)): New.
12317         (operator==(const range_bounds &, const range_bounds &)): New.
12318         (check_types_equal): Use them instead of memcmp.
12319         * gdbtypes.h (operator==(const dynamic_prop &,
12320         const dynamic_prop &)): Declare.
12321         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
12322         (operator==(const range_bounds &, const range_bounds &)): Declare.
12323         (operator!=(const range_bounds &, const range_bounds &)): Declare.
12324
12325 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12326
12327         * s390-linux-tdep.c (s390_record_address_mask)
12328         (s390_record_calc_disp_common, s390_record_calc_disp)
12329         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12330         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12331         (s390_process_record): Move to s390-tdep.c.
12332         (s390_linux_init_abi_any): Adjust.
12333         * s390-tdep.c (s390_record_address_mask)
12334         (s390_record_calc_disp_common, s390_record_calc_disp)
12335         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12336         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12337         (s390_process_record): Moved from s390-linux-tdep.c
12338         (s390_gdbarch_init): Adjust.
12339
12340 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12341
12342         * s390-linux-nat.c (s390-tdep.h): New include.
12343         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
12344         (HFILES_NO_SRCDIR): Add s390-tdep.h.
12345         (ALLDEPFILES): Add s390-tdep.c.
12346         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
12347         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
12348         * s390-tdep.h: ...this.  New file.
12349         * s390-linux-tdep.c (s390-tdep.h): New include.
12350         (_initialize_s390_tdep): Rename to...
12351         (_initialize_s390_linux_tdep): ...this and adjust.
12352         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
12353         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
12354         s390-tdep.h.
12355         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
12356         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
12357         (s390_is_partial_instruction, s390_software_single_step)
12358         (is_non_branch_ril, s390_displaced_step_copy_insn)
12359         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
12360         (s390_prologue_data, s390_addr, s390_store, s390_load)
12361         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
12362         (s390_register_call_saved, s390_guess_tracepoint_registers)
12363         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
12364         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
12365         (s390_pseudo_register_name, s390_pseudo_register_type)
12366         (s390_pseudo_register_read, s390_pseudo_register_write)
12367         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
12368         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
12369         (s390_addr_bits_remove, s390_address_class_type_flags)
12370         (s390_address_class_type_flags_to_name)
12371         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
12372         (s390_function_arg_float, s390_function_arg_vector)
12373         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
12374         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
12375         (s390_frame_align, s390_register_return_value, s390_return_value)
12376         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
12377         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
12378         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
12379         (s390_trad_frame_prev_register, s390_unwind_cache)
12380         (s390_prologue_frame_unwind_cache)
12381         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
12382         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
12383         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
12384         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
12385         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
12386         (s390_frame_base_address, s390_local_base_address)
12387         (s390_frame_base, s390_gcc_target_options)
12388         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
12389         (s390_validate_reg_range, s390_tdesc_valid)
12390         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
12391         * s390-tdep.c: ...this.  New file.
12392
12393 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12394
12395         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
12396         (s390_process_record, s390_gdbarch_tdep_alloc)
12397         (s390_linux_init_abi_any): Use/set new hook.
12398
12399 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12400
12401         * s390-linux-tdep.c (osabi.h): New include.
12402         (s390_linux_init_abi_31, s390_linux_init_abi_64)
12403         (s390_linux_init_abi_any): New functions.
12404         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
12405
12406 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12407
12408         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
12409         tdesc_has_registers check
12410
12411 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12412
12413         * s390-linux-tdep.c (s390_tdesc_valid): New function.
12414         (s390_validate_reg_range): New macro.
12415         (s390_gdbarch_init): Adjust.
12416
12417 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12418
12419         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
12420         (s390_gdbarch_tdep_alloc): Adjust.
12421         (s390_gdbarch_init): Adjust.
12422
12423 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12424
12425         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
12426         <have_tdb>: Change type to bool.
12427         (s390_gdbarch_tdep_alloc): Adjust.
12428         (s390_gdbarch_init): Adjust.
12429
12430 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12431
12432         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
12433         (gdbarch_tdep) <have_upper, have_vx>: New fields.
12434         (s390_gdbarch_tdep_alloc): New function.
12435         (s390_gdbarch_init): Allocate tdep at start and use its fields
12436         instead of separate variables.
12437
12438 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12439
12440         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
12441         when looking for cached gdbarch and add comment for remaining.
12442
12443 2018-01-22  Pedro Alves  <palves@redhat.com>
12444             Sergio Durigan Junior  <sergiodj@redhat.com>
12445
12446         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
12447         case.
12448
12449 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
12450
12451         * MAINTAINERS: Update my company e-mail address.
12452
12453 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12454
12455         * regcache.c (cooked_write_test): New function.
12456         (_initialize_regcache): Register the test.
12457
12458 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12459
12460         * ia64-tdep.c (ia64_pseudo_register_read): Call
12461         regcache->cooked_read instead of regcache_cooked_read_unsigned.
12462         * m32c-tdep.c (m32c_cat_read): Likewise.
12463         (m32c_r3r2r1r0_read): Likewise.
12464         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
12465         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
12466
12467 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12468
12469         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
12470         method raw_read instead of regcache_raw_read.
12471         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
12472         * arm-tdep.c (arm_neon_quad_read): Likewise.
12473         * avr-tdep.c (avr_pseudo_register_read): Likewise.
12474         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
12475         * frv-tdep.c (frv_pseudo_register_read): Likewise.
12476         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
12477         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
12478         (i386_pseudo_register_read_into_value): Likewise.
12479         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
12480         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
12481         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
12482         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
12483         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
12484         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
12485         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
12486         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
12487         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
12488
12489 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12490
12491         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
12492         * configure.tgt: Remove target mt.
12493         * mt-tdep.c: Remove.
12494         * regcache.c (cooked_read_test): Remove the check for mt.
12495
12496 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12497
12498         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
12499         instead of gdbarch_pseudo_register_read_value.
12500
12501 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
12502
12503         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
12504         language is Ada.
12505
12506 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
12507
12508         * linespec.c (create_sals_line_offset): Remove code that preserved
12509         the symtab_and_line's line number.
12510
12511 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12512
12513         * varobj.c (varobj_create): Don't set valid_block when creating a
12514         floating varobj.
12515
12516 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12517
12518         * varobj.c (varobj_create): Remove out of date comment.
12519
12520 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12521
12522         PR mi/20395
12523         * ada-exp.y (write_var_from_sym): Pass extra parameter when
12524         updating innermost block.
12525         * parse.c (innermost_block_tracker::update): Take extra type
12526         parameter, and check types match before updating innermost block.
12527         (write_dollar_variable): Update innermost block for registers.
12528         * parser-defs.h (enum innermost_block_tracker_type): New enum.
12529         (innermost_block_tracker::innermost_block_tracker): Initialise
12530         m_types member.
12531         (innermost_block_tracker::reset): Take type parameter.
12532         (innermost_block_tracker::update): Take type parameter, and pass
12533         type through as needed.
12534         (innermost_block_tracker::m_types): New member.
12535         * varobj.c (varobj_create): Pass type when reseting innermost
12536         block.
12537
12538 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12539
12540         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
12541         * ada-lang.c (resolve_subexp): Likewise.
12542         * breakpoint.c (set_breakpoint_condition) Likewise.
12543         (watch_command_1) Likewise.
12544         * c-exp.y (variable): Likewise.
12545         * d-exp.y (PrimaryExpression): Likewise.
12546         * f-exp.y (variable): Likewise.
12547         * go-exp.y (variable): Likewise.
12548         * m2-exp.y (variable): Likewise.
12549         * objfiles.c (objfile::~objfile): Likewise.
12550         * p-exp.y (variable): Likewise.
12551         * parse.c (innermost_block): Change type.
12552         * parser-defs.h (class innermost_block_tracker): New.
12553         (innermost_block): Change to innermost_block_tracker.
12554         * printcmd.c (display_command): Switch to innermost_block API.
12555         (do_one_display): Likewise.
12556         * rust-exp.y (do_one_display): Likewise.
12557         * symfile.c (clear_symtab_users): Likewise.
12558         * varobj.c (varobj_create): Switch to innermost_block API, replace
12559         use of innermost_block with block stored on varobj object.
12560
12561 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12562
12563         * expression.h (innermost_block): Remove declaration.
12564         * varobj.c: Add 'parser-defs.h' include.
12565
12566 2018-01-19  Tom Tromey  <tom@tromey.com>
12567
12568         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
12569         symbols in the static and global blocks.
12570
12571 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
12572
12573         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
12574         gdb_ptrace.h, and move including gdb_wait.h ...
12575         * nat/linux-ptrace.h: ... to here.
12576
12577 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
12578
12579         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
12580         inf_ptrace_detach_success.
12581         (inf_ptrace_detach_success): Add inferior parameter, use it
12582         instead of inferior_ptid, pass it to detach_inferior.
12583         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
12584         parameter.
12585         * inferior.c (detach_inferior): Add overload that takes an
12586         inferior object.
12587         * inferior.h (detach_inferior): Likewise.
12588         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
12589         use inferior_ptid, adjust call to inf_ptrace_detach_success.
12590         * linux-thread-db.c (thread_db_detach): Use inf parameter.
12591
12592 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
12593
12594         * target.h (struct target_ops) <to_detach>: Add inferior
12595         parameter.
12596         (target_detach): Likewise.
12597         * target.c (dispose_inferior): Pass inferior down.
12598         (target_detach): Pass inferior down.  Assert that it is equal to
12599         the current inferior.
12600         * aix-thread.c (aix_thread_detach): Pass inferior down.
12601         * corefile.c (core_file_command): Pass current_inferior() down.
12602         * corelow.c (core_detach): Add inferior parameter.
12603         * darwin-nat.c (darwin_detach): Likewise.
12604         * gnu-nat.c (gnu_detach): Likewise.
12605         * inf-ptrace.c (inf_ptrace_detach): Likewise.
12606         * infcmd.c (detach_command): Pass current_inferior() down to
12607         target_detach.
12608         * infrun.c (follow_fork_inferior): Pass parent_inf to
12609         target_detach.
12610         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
12611         target_detach.
12612         * linux-nat.c (linux_nat_detach): Add inferior parameter.
12613         * linux-thread-db.c (thread_db_detach): Likewise.
12614         * nto-procfs.c (procfs_detach): Likewise.
12615         * procfs.c (procfs_detach): Likewise.
12616         * record.c (record_detach): Likewise.
12617         * record.h (struct inferior): Forward-declare.
12618         (record_detach): Add inferior parameter.
12619         * remote-sim.c (gdbsim_detach): Likewise.
12620         * remote.c (remote_detach_1): Likewise.
12621         (remote_detach): Likewise.
12622         (extended_remote_detach): Likewise.
12623         * sol-thread.c (sol_thread_detach): Likewise.
12624         * target-debug.h (target_debug_print_inferior_p): New macro.
12625         * target-delegates.c: Re-generate.
12626         * top.c (kill_or_detach): Pass inferior down to target_detach.
12627         * windows-nat.c (windows_detach): Add inferior parameter.
12628
12629 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
12630
12631         * target.h (struct target_ops) <to_detach>: Remove args
12632         parameter.
12633         (target_detach): Likewise.
12634         * target.c (dispose_inferior): Adjust.
12635         (target_detach): Remove args parameter, adjust.
12636         * aix-thread.c (aix_thread_detach): Adjust.
12637         * corefile.c (core_file_command): Adjust.
12638         * corelow.c (core_detach): Adjust.
12639         * darwin-nat.c (darwin_detach): Adjust.
12640         * gnu-nat.c (gnu_detach): Adjust.
12641         * inf-ptrace.c (inf_ptrace_detach): Adjust.
12642         * infcmd.c (detach_command): Adjust
12643         * infrun.c (follow_fork_inferior): Adjust.
12644         (handle_vfork_child_exec_or_exit): Adjust.
12645         * linux-fork.c (linux_fork_detach): Remove args parameter.
12646         * linux-fork.h (linux_fork_detach): Likewise.
12647         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
12648         * linux-thread-db.c (thread_db_detach): Likewise.
12649         * nto-procfs.c (procfs_detach): Likewise.
12650         * procfs.c (procfs_detach): Likewise.
12651         (do_detach): Remove signo parameter.
12652         * record.c (record_detach): Remove args parameter.
12653         * record.h (record_detach): Likewise.
12654         * remote-sim.c (gdbsim_detach): Likewise.
12655         * remote.c (remote_detach_1): Likewise.
12656         (remote_detach): Likewise.
12657         (extended_remote_detach): Likewise.
12658         * sol-thread.c (sol_thread_detach): Likewise.
12659         * target-delegates.c: Re-generate.
12660         * top.c (struct qt_args) <args>: Remove field.
12661         (kill_or_detach): Don't pass args.
12662         (quit_force): Don't set args.
12663         * windows-nat.c (windows_detach): Remove args parameter.
12664
12665 2018-01-19  Yao Qi  <yao.qi@linaro.org>
12666
12667         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
12668         (arm_linux_init_abi): Install it.
12669
12670 2018-01-19  Yao Qi  <yao.qi@linaro.org>
12671
12672         * osabi.c (gdb_osabi_names): Extend the regexp for
12673         arm-linux-gnueabihf.
12674
12675 2018-01-18  Yao Qi  <yao.qi@linaro.org>
12676
12677         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
12678         m_abbrevs.
12679         (abbrev_table::add_abbrev): Update.
12680         (abbrev_table::lookup_abbrev): Update.
12681
12682 2018-01-18  Yao Qi  <yao.qi@linaro.org>
12683
12684         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
12685
12686 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
12687
12688         * compile/compile.c (compile_to_object): Convert "triplet_rx"
12689         to "std::string".
12690
12691 2018-01-17  Tom Tromey  <tom@tromey.com>
12692
12693         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
12694
12695 2018-01-17  Tom Tromey  <tom@tromey.com>
12696
12697         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
12698         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
12699         (create_array_type_with_stride): Update.
12700         * dwarf2read.c (set_die_type): Update.
12701
12702 2018-01-17  Tom Tromey  <tom@tromey.com>
12703
12704         * dwarf2read.c (delayed_method_info): Remove typedef.
12705         (dwarf2_cu::method_info): Now a std::vector.
12706         (add_to_method_list): Update.
12707         (free_delayed_list): Remove.
12708         (compute_delayed_physnames): Update.
12709         (process_full_comp_unit, process_full_type_unit): Clear the method
12710         list.  Remove cleanups.
12711         (psymtab_include_file_name): Add name_holder parameter.  Use
12712         unique_xmalloc_ptr.
12713         (dwarf_decode_lines): Update.
12714
12715 2018-01-17  Tom Tromey  <tom@tromey.com>
12716             Simon Marchi  <simon.marchi@ericsson.com>
12717
12718         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
12719         (dwarf2_per_objfile::free_cached_comp_units)
12720         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
12721         (init_cutu_and_read_dies_no_follow): Update.
12722         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
12723         (dwarf2_cu::~dwarf2_cu): New.
12724         (free_heap_comp_unit, free_stack_comp_unit): Remove.
12725         (age_cached_comp_units, free_one_cached_comp_unit): Update.
12726
12727 2018-01-17  Tom Tromey  <tom@tromey.com>
12728             Simon Marchi  <simon.marchi@ericsson.com>
12729
12730         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
12731         (struct die_reader_specs) <abbrev_table>: New member.
12732         (struct abbrev_table): Add constructor.
12733         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
12734         <abbrev_obstack>: Now an auto_obstack.
12735         (abbrev_table_up): New typedef.
12736         (init_cu_die_reader): Add abbrev_table parameter.
12737         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
12738         Add result_dwo_abbrev_table.
12739         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
12740         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
12741         Update.
12742         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
12743         parameter.
12744         (skip_children): Update.
12745         (abbrev_table::alloc_abbrev): Rename from
12746         abbrev_table_alloc_abbrev.
12747         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
12748         (abbrev_table::lookup_abbrev): Rename from
12749         abbrev_table_lookup_abbrev.
12750         (abbrev_table_read_table): Return abbrev_table_up.
12751         (abbrev_table_free, abbrev_table_free_cleanup)
12752         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
12753         (load_partial_dies): Update.
12754
12755 2018-01-17  Tom Tromey  <tom@tromey.com>
12756
12757         * dwarf2read.c (dwarf2_compute_name): Update comment.
12758         (read_func_scope, read_variable): Update.
12759         (new_symbol): Remove.
12760         (new_symbol_full): Rename to new_symbol.
12761
12762 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
12763
12764         PR gdb/16577
12765         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
12766         a warning instead of throwing an error, set section size to 0 and return
12767         NULL.
12768         * gdb_bfd.h (gdb_bfd_map_section): Update description.
12769
12770 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
12771
12772         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
12773         std::string.
12774         (linux_ptrace_attach_fail_reason_string): Likewise.
12775         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
12776         Likewise.
12777         (linux_ptrace_attach_fail_reason_string): Likewise.
12778         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
12779
12780 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
12781
12782         * linux-nat.c (linux_nat_attach): Remove xstrdup.
12783
12784 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
12785
12786         PR gdb/21559
12787         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
12788         checking for fs_base/gs_base fields in struct user_regs_struct.
12789         * configure: Regenerate.
12790
12791 2018-01-17  Yao Qi  <yao.qi@linaro.org>
12792
12793         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
12794         function.
12795         (aarch64_linux_init_abi): Install it to gdbarch hook
12796         gcc_target_options.
12797
12798 2018-01-15  Pedro Alves  <palves@redhat.com>
12799
12800         * common/signals-state-save-restore.c
12801         (save_original_signals_state): Fix typos.
12802
12803 2017-01-12  Tom Tromey  <tom@tromey.com>
12804             Sergio Durigan Junior  <sergiodj@redhat.com>
12805
12806         * Makefile.in (install-only): Install gdb-add-index.
12807
12808 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
12809
12810         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
12811
12812 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12813
12814         * infrun.c (keep_going_pass_signal): Clear step-over info when
12815         insert_breakpoints fails.
12816
12817 2018-01-11  Pedro Alves  <palves@redhat.com>
12818
12819         PR gdb/22583
12820         * infrun.c (resume): Rename to ...
12821         (resume_1): ... this.
12822         (resume): Reimplement as wrapper around resume_1.
12823
12824 2018-01-11  Pedro Alves  <palves@redhat.com>
12825
12826         PR remote/22597
12827         * remote.c (remote_parse_stop_reply): Default to the last-set
12828         general thread instead of to 'magic_null_ptid'.
12829
12830 2018-01-10  Pedro Alves  <palves@redhat.com>
12831
12832         * language.h (language_get_symbol_name_matcher): Rename ...
12833         (get_symbol_name_matcher): ... this.
12834         * language.c (language_get_symbol_name_matcher): Ditto.
12835         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
12836         callers adjusted.
12837
12838 2018-01-10  Pedro Alves  <palves@redhat.com>
12839
12840         PR gdb/22670
12841         * dwarf2read.c
12842         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
12843         Adjust to use language_get_symbol_name_matcher instead of
12844         language_defn::la_get_symbol_name_matcher.
12845         * language.c (language_get_symbol_name_matcher): If in Ada mode
12846         and the lookup name is a verbatim match, return Ada's matcher.
12847         * language.h (language_get_symbol_name_matcher): Adjust comment.
12848         (ada_lookup_name_info::verbatim_p):: New method.
12849
12850 2018-01-10  Pedro Alves  <palves@redhat.com>
12851
12852         PR gdb/22670
12853         * ada-lang.c (ada_collect_symbol_completion_matches): If the
12854         minsym's language is language_auto or language_cplus, pass down
12855         language_ada instead.
12856         * symtab.c (compare_symbol_name): Don't frob symbol language here.
12857
12858 2018-01-10  Pedro Alves  <palves@redhat.com>
12859
12860         PR gdb/22670
12861         * minsyms.c (linkage_name_str): New function.
12862         (iterate_over_minimal_symbols): Use it.
12863
12864 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12865
12866         * NEWS: Document that 'info proc' now works on FreeBSD.
12867
12868 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12869
12870         * configure.ac: Check for kinfo_getfile in libutil.
12871         * configure: Regenerate.
12872         * config.in: Regenerate.
12873         * fbsd-nat.c: Include "fbsd-tdep.h".
12874         (fbsd_fetch_cmdline): New.
12875         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
12876         rather than calling error.
12877         (fbsd_info_proc): New.
12878         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
12879         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
12880         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
12881
12882 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12883
12884         * fbsd-nat.c (struct free_deleter): Remove.
12885         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
12886
12887 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12888
12889         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
12890         NULL for an empty pathname.
12891
12892 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12893
12894         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
12895         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
12896         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
12897         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
12898         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
12899         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
12900         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
12901         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
12902         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
12903         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
12904         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
12905         (fbsd_core_fetch_timeval, fbsd_print_sigset)
12906         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
12907         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
12908         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
12909
12910 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
12911
12912         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
12913         (gnu_xfer_auxv): New function.
12914         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
12915         TARGET_OBJECT_AUXV.
12916
12917 2018-01-08  Yao Qi  <yao.qi@linaro.org>
12918             Simon Marchi  <simon.marchi@ericsson.com>
12919
12920         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
12921         common/selftest.c.
12922         (COMMON_OBS): Remove selftest.o.
12923         * configure.ac: Append selftest-arch.c and common/selftest.c to
12924         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
12925         * configure: Re-generated.
12926         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
12927         GDB_SELF_TEST.
12928         (maintenance_info_selftests): Likewise.
12929
12930 2018-01-08  Xavier Roirand  <roirand@adacore.com>
12931
12932         * ada-valprint.c (val_print_packed_array_elements): Use
12933         proper number of elements when printing an array indexed
12934         by an enumeration type.
12935
12936 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12937
12938         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
12939         (dw2_get_file_names_reader): Adjust.
12940         (lookup_dwo_signatured_type): Adjust.
12941         (lookup_dwp_signatured_type): Adjust.
12942         (lookup_signatured_type): Adjust.
12943         (create_type_unit_group): Adjust.
12944         (get_type_unit_group): Adjust.
12945         (process_psymtab_comp_unit_reader): Adjust.
12946         (build_type_psymtabs_reader): Adjust.
12947         (scan_partial_symbols): Adjust.
12948         (add_partial_symbol): Adjust.
12949         (add_partial_subprogram): Adjust.
12950         (peek_die_abbrev): Adjust.
12951         (fixup_go_packaging): Adjust.
12952         (process_imported_unit_die): Adjust.
12953         (dwarf2_compute_name): Adjust.
12954         (dwarf2_physname): Adjust.
12955         (read_import_statement): Adjust.
12956         (handle_DW_AT_stmt_list): Adjust.
12957         (read_file_scope): Adjust.
12958         (read_func_scope): Adjust.
12959         (read_lexical_block_scope): Adjust.
12960         (read_call_site_scope): Adjust.
12961         (read_variable): Adjust.
12962         (dwarf2_rnglists_process): Adjust.
12963         (dwarf2_ranges_process): Adjust.
12964         (dwarf2_ranges_read): Adjust.
12965         (dwarf2_get_pc_bounds): Adjust.
12966         (dwarf2_record_block_ranges): Adjust.
12967         (dwarf2_add_field): Adjust.
12968         (dwarf2_add_member_fn): Adjust.
12969         (read_structure_type): Adjust.
12970         (process_structure_scope): Adjust.
12971         (read_enumeration_type): Adjust.
12972         (read_array_type): Adjust.
12973         (mark_common_block_symbol_computed): Adjust.
12974         (read_common_block): Adjust.
12975         (read_namespace_type): Adjust.
12976         (read_namespace): Adjust.
12977         (read_module_type): Adjust.
12978         (read_tag_pointer_type): Adjust.
12979         (read_tag_ptr_to_member_type): Adjust.
12980         (read_tag_string_type): Adjust.
12981         (read_subroutine_type): Adjust.
12982         (read_typedef): Adjust.
12983         (read_base_type): Adjust.
12984         (attr_to_dynamic_prop): Adjust.
12985         (read_subrange_type): Adjust.
12986         (read_unspecified_type): Adjust.
12987         (dwarf2_read_abbrevs): Adjust.
12988         (load_partial_dies): Adjust.
12989         (read_partial_die): Adjust.
12990         (find_partial_die): Adjust.
12991         (guess_partial_die_structure_name): Adjust.
12992         (fixup_partial_die): Adjust.
12993         (read_attribute_value): Adjust.
12994         (read_addr_index): Adjust.
12995         (read_addr_index_from_leb128): Adjust.
12996         (read_str_index): Adjust.
12997         (dwarf2_string_attr): Adjust.
12998         (get_debug_line_section): Adjust.
12999         (dwarf_decode_line_header): Adjust.
13000         (lnp_state_machine::check_line_address): Adjust.
13001         (dwarf_decode_lines_1): Adjust.
13002         (dwarf_decode_lines): Adjust.
13003         (dwarf2_start_symtab): Adjust.
13004         (var_decode_location): Adjust.
13005         (new_symbol_full): Adjust.
13006         (dwarf2_const_value_data): Adjust.
13007         (dwarf2_const_value_attr): Adjust.
13008         (dwarf2_const_value): Adjust.
13009         (die_type): Adjust.
13010         (die_containing_type): Adjust.
13011         (build_error_marker_type): Adjust.
13012         (lookup_die_type): Adjust.
13013         (guess_full_die_structure_name): Adjust.
13014         (anonymous_struct_prefix): Adjust.
13015         (determine_prefix): Adjust.
13016         (dwarf2_name): Adjust.
13017         (follow_die_ref_or_sig): Adjust.
13018         (follow_die_offset): Adjust.
13019         (follow_die_ref): Adjust.
13020         (follow_die_sig_1): Adjust.
13021         (follow_die_sig): Adjust.
13022         (get_signatured_type): Adjust.
13023         (get_DW_AT_signature_type): Adjust.
13024         (decode_locdesc): Adjust.
13025         (dwarf_decode_macros): Adjust.
13026         (cu_debug_loc_section): Adjust.
13027         (fill_in_loclist_baton): Adjust.
13028         (dwarf2_symbol_mark_computed): Adjust.
13029         (init_one_comp_unit): Don't assign
13030         dwarf2_cu::dwarf2_per_objfile.
13031         (set_die_type): Adjust.
13032
13033 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
13034
13035         * dwarf2read.c (struct mapped_debug_names): Add constructor.
13036         <dwarf2_per_objfile>: New field.
13037         (dwarf2_per_objfile): Remove global.
13038         (get_dwarf2_per_objfile): New function.
13039         (set_dwarf2_per_objfile): New function.
13040         (dwarf2_build_psymtabs_hard): Change objfile parameter to
13041         dwarf2_per_objfile.
13042         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
13043         (read_abbrev_offset): Likewise.
13044         (read_indirect_string): Likewise.
13045         (read_indirect_line_string): Likewise.
13046         (read_indirect_string_at_offset): Likewise.
13047         (read_indirect_string_from_dwz): Likewise.
13048         (dwarf2_find_containing_comp_unit): Change objfile parameter to
13049         dwarf2_per_objfile.
13050         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
13051         (create_all_comp_units): Change objfile parameter to
13052         dwarf2_per_objfile.
13053         (create_all_type_units): Likewise.
13054         (process_queue): Add dwarf2_per_objfile parameter.
13055         (read_and_check_comp_unit_head): Likewise.
13056         (lookup_dwo_unit_in_dwp): Likewise.
13057         (get_dwp_file): Likewise.
13058         (process_cu_includes): Likewise.
13059         (struct free_dwo_file_cleanup_data): New struct.
13060         (dwarf2_has_info): Use get_dwarf2_per_objfile and
13061         set_dwarf2_per_objfile.
13062         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
13063         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
13064         context, adjust calls.
13065         (dw2_instantiate_symtab): Likewise.
13066         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
13067         (dw2_get_cu): Likewise.
13068         (create_cu_from_index_list): Change objfile parameter to
13069         dwarf2_per_objfile.
13070         (create_cus_from_index_list): Get dwarf2_per_objfile from
13071         context, adjust calls.
13072         (create_cus_from_index): Likewise.
13073         (create_signatured_type_table_from_index): Change objfile
13074         parameter to dwarf2_per_objfile.
13075         (create_signatured_type_table_from_debug_names): Change objfile
13076         parameter to dwarf2_per_objfile.
13077         (create_addrmap_from_index): Likewise.
13078         (create_addrmap_from_aranges): Likewise.
13079         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
13080         (dw2_setup): Remove.
13081         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
13082         context.
13083         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
13084         get_dwarf2_per_objfile.
13085         (dw2_forget_cached_source_info): Likewise.
13086         (dw2_map_symtabs_matching_filename): Likewise.
13087         (struct dw2_symtab_iterator) <index>: Remove.
13088         <dwarf2_per_objfile>: New field.
13089         (dw2_symtab_iter_init): Replace index parameter with
13090         dwarf2_per_objfile.
13091         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
13092         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
13093         (dw2_print_stats): Likewise.
13094         (dw2_dump): Likewise.
13095         (dw2_expand_symtabs_for_function): Likewise.
13096         (dw2_expand_all_symtabs): Likewise.
13097         (dw2_expand_symtabs_with_fullname): Likewise.
13098         (dw2_expand_marked_cus): Replace index and objfile parameters
13099         with dwarf2_per_objfile.
13100         (dw_expand_symtabs_matching_file_matcher): Add
13101         dwarf2_per_objfile parameter and adjust calls.
13102         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
13103         adjust calls.
13104         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
13105         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
13106         adjust calls.
13107         (create_cus_from_debug_names_list): Replace objfile parameter
13108         with dwarf2_per_objfile and adjust calls.
13109         (create_cus_from_debug_names): Likewise.
13110         (dwarf2_read_debug_names): Likewise.
13111         (mapped_debug_names::namei_to_name): Adjust call.
13112         (dw2_debug_names_iterator::next): Likewise.
13113         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
13114         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
13115         (dw2_debug_names_dump): Likewise.
13116         (dw2_debug_names_expand_symtabs_for_function): Likewise.
13117         (dw2_debug_names_expand_symtabs_matching): Likewise.
13118         (dwarf2_initialize_objfile): Likewise.
13119         (dwarf2_build_psymtabs): Likewise.
13120         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
13121         this_cu.
13122         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
13123         (read_and_check_comp_unit_head): Likewise.
13124         (read_abbrev_offset): Likewise.
13125         (create_debug_type_hash_table): Likewise.
13126         (create_debug_types_hash_table): Likewise.
13127         (create_all_type_units): Replace objfile parameter with
13128         dwarf2_per_objfile.
13129         (add_type_unit): Add dwarf2_per_objfile parameter.
13130         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
13131         with dwarf2_per_objfile.
13132         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
13133         (lookup_dwp_signatured_type): Likewise.
13134         (lookup_signatured_type): Likewise.
13135         (read_cutu_die_from_dwo): Likewise.
13136         (init_tu_and_read_dwo_dies): Likewise.
13137         (init_cutu_and_read_dies): Likewise.
13138         (init_cutu_and_read_dies_no_follow): Likewise.
13139         (allocate_type_unit_groups_table): Add objfile parameter.
13140         (create_type_unit_group): Use dwarf2_per_objfile from cu.
13141         (get_type_unit_group): Likewise.
13142         (process_psymtab_comp_unit): Update call.
13143         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
13144         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
13145         (print_tu_stats): Likewise.
13146         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
13147         in void* parameter.
13148         (build_type_psymtabs): Change objfile parameter to
13149         dwarf2_per_objfile.
13150         (process_skeletonless_type_unit): Use dwarf2_per_objfile
13151         passed in void* parameter.
13152         (process_skeletonless_type_units): Change objfile parameter to
13153         dwarf2_per_objfile.
13154         (set_partial_user): Likewise.
13155         (dwarf2_build_psymtabs_hard): Likewise.
13156         (read_comp_units_from_section): Likewise.
13157         (create_all_comp_units): Likewise.
13158         (scan_partial_symbols): Update calls.
13159         (add_partial_symbol): Likewise.
13160         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
13161         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
13162         (process_queue): Add dwarf2_per_objfile parameter.
13163         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
13164         (compute_compunit_symtab_includes): Likewise.
13165         (process_cu_includes): Add dwarf2_per_objfile parameter.
13166         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
13167         (process_full_type_unit): Likewise.
13168         (process_imported_unit_die): Update call.
13169         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
13170         (read_file_scope): Likewise.
13171         (allocate_dwo_file_hash_table): Add objfile parameter.
13172         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
13173         (create_cus_hash_table): Likewise.
13174         (create_dwp_hash_table): Likewise.
13175         (create_dwo_unit_in_dwp_v1): Likewise.
13176         (create_dwp_v2_section): Likewise.
13177         (create_dwo_unit_in_dwp_v2): Likewise.
13178         (lookup_dwo_unit_in_dwp): Likewise.
13179         (try_open_dwop_file): Likewise.
13180         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
13181         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
13182         cleanup to include a reference to dwarf2_per_objfile.
13183         (open_dwp_file): Add dwarf2_per_objfile parameter.
13184         (open_and_init_dwp_file): Likewise.
13185         (get_dwp_file): Likewise.
13186         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
13187         (queue_and_load_all_dwo_tus): Update call.
13188         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
13189         data.
13190         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
13191         (dwarf2_ranges_process): Likewise.
13192         (dwarf2_get_pc_bounds): Likewise.
13193         (mark_common_block_symbol_computed): Likewise.
13194         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
13195         (dwarf2_read_abbrevs): Update call.
13196         (read_partial_die): Use dwarf2_per_objfile from cu.
13197         (find_partial_die): Likewise.
13198         (fixup_partial_die): Likewise.
13199         (read_attribute_value): Likewise.
13200         (read_indirect_string_at_offset_from): Add objfile parameter.
13201         (read_indirect_string_at_offset): Add dwarf2_per_objfile
13202         parameter.
13203         (read_indirect_string_from_dwz): Add objfile parameter.
13204         (read_indirect_string): Add objfile parameter.
13205         (read_addr_index_1): Add dwarf2_per_objfile parameter.
13206         (read_addr_index): Use dwarf2_per_objfile from cu.
13207         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
13208         call dw2_setup.
13209         (read_str_index): Use dwarf2_per_objfile from cu.
13210         (get_debug_line_section): Likewise.
13211         (read_formatted_entries): Add dwarf2_per_objfile parameter.
13212         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
13213         (new_symbol_full): Use dwarf2_per_objfile from cu.
13214         (build_error_marker_type): Likewise.
13215         (lookup_die_type): Likewise.
13216         (determine_prefix): Likewise.
13217         (follow_die_offset): Likewise.
13218         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
13219         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
13220         (dwarf2_fetch_die_type_sect_off): Likewise.
13221         (dwarf2_get_die_type): Likewise.
13222         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
13223         (get_signatured_type): Likewise.
13224         (get_DW_AT_signature_type): Likewise.
13225         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
13226         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
13227         (cu_debug_loc_section): Likewise.
13228         (fill_in_loclist_baton): Likewise.
13229         (dwarf2_symbol_mark_computed): Likewise.
13230         (dwarf2_find_containing_comp_unit): Change objfile parameter to
13231         dwarf2_per_objfile.
13232         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
13233         parameter.
13234         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
13235         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
13236         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
13237         (set_die_type): Use dwarf2_free_objfile from cu.
13238         (get_die_type_at_offset): Likewise.
13239         (dwarf2_per_objfile_free): Don't assign global variable.
13240         (debug_names) <constructor>: Add dwarf2_per_objfile
13241         parameter, update m_debugstrlookup construction.
13242         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
13243         parameter.
13244         <m_dwarf2_per_objfile>: New field.
13245         <lookup>: Use m_dwarf2_per_objfile.
13246         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
13247         (psyms_seen_size): Likewise.
13248         (write_gdbindex): Replace objfile parameter with
13249         dwarf2_per_objfile.
13250         (write_debug_names): Likewise.
13251         (write_psymtabs_to_index): Likewise.
13252         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
13253         calls.
13254
13255 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
13256
13257         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
13258         <dwarf2_per_objfile>: New field.
13259         (struct dwarf2_per_cu_data) <objfile>: Remove.
13260         <dwarf2_per_objfile>: New field.
13261         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
13262         of objfile.
13263         (create_signatured_type_table_from_index): Likewise.
13264         (create_debug_type_hash_table): Likewise.
13265         (fill_in_sig_entry_from_dwo_entry): Likewise.
13266         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
13267         (create_type_unit_group): Assign dwarf2_per_objfile instead of
13268         objfile.
13269         (create_partial_symtab): Access objfile through
13270         dwarf2_per_objfile.
13271         (process_psymtab_comp_unit_reader): Likewise.
13272         (read_comp_units_from_section): Likewise.
13273         (scan_partial_symbols): Likewise.
13274         (add_partial_symbol): Likewise.
13275         (add_partial_subprogram): Likewise.
13276         (peek_die_abbrev): Likewise.
13277         (fixup_go_packaging): Likewise.
13278         (process_full_comp_unit): Likewise.
13279         (process_full_type_unit): Likewise.
13280         (process_imported_unit_die): Likewise.
13281         (dwarf2_compute_name): Likewise.
13282         (dwarf2_physname): Likewise.
13283         (read_import_statement): Likewise.
13284         (create_cus_hash_table): Assign dwarf2_physname instead of
13285         objfile.
13286         (read_func_scope): Access objfile through dwarf2_per_objfile.
13287         (read_lexical_block_scope): Likewise.
13288         (read_call_site_scope): Likewise.
13289         (read_variable): Likewise.
13290         (dwarf2_rnglists_process): Likewise.
13291         (dwarf2_ranges_process): Likewise.
13292         (dwarf2_ranges_read): Likewise.
13293         (dwarf2_record_block_ranges): Likewise.
13294         (dwarf2_add_field): Likewise.
13295         (dwarf2_add_member_fn): Likewise.
13296         (read_structure_type): Likewise.
13297         (process_structure_scope): Likewise.
13298         (read_enumeration_type): Likewise.
13299         (read_array_type): Likewise.
13300         (read_common_block): Likewise.
13301         (read_namespace_type): Likewise.
13302         (read_namespace): Likewise.
13303         (read_module_type): Likewise.
13304         (read_tag_pointer_type): Likewise.
13305         (read_tag_ptr_to_member_type): Likewise.
13306         (read_tag_string_type): Likewise.
13307         (read_subroutine_type): Likewise.
13308         (read_typedef): Likewise.
13309         (read_base_type): Likewise.
13310         (attr_to_dynamic_prop): Likewise.
13311         (read_subrange_type): Likewise.
13312         (read_unspecified_type): Likewise.
13313         (load_partial_dies): Likewise.
13314         (read_partial_die): Likewise.
13315         (find_partial_die): Likewise.
13316         (guess_partial_die_structure_name): Likewise.
13317         (fixup_partial_die): Likewise.
13318         (read_attribute_value): Likewise.
13319         (read_addr_index_from_leb128): Likewise.
13320         (dwarf2_read_addr_index): Likewise.
13321         (dwarf2_string_attr): Likewise.
13322         (lnp_state_machine::check_line_address): Likewise.
13323         (dwarf_decode_lines_1): Likewise.
13324         (dwarf_decode_lines): Likewise.
13325         (dwarf2_start_symtab): Likewise.
13326         (var_decode_location): Likewise.
13327         (new_symbol_full): Likewise.
13328         (dwarf2_const_value_data): Likewise.
13329         (dwarf2_const_value_attr): Likewise.
13330         (dwarf2_const_value): Likewise.
13331         (die_type): Likewise.
13332         (die_containing_type): Likewise.
13333         (lookup_die_type): Likewise.
13334         (guess_full_die_structure_name): Likewise.
13335         (anonymous_struct_prefix): Likewise.
13336         (dwarf2_name): Likewise.
13337         (follow_die_ref_or_sig): Likewise.
13338         (follow_die_offset): Likewise.
13339         (follow_die_ref): Likewise.
13340         (dwarf2_fetch_die_loc_sect_off): Likewise.
13341         (dwarf2_fetch_constant_bytes): Likewise.
13342         (dwarf2_fetch_die_type_sect_off): Likewise.
13343         (dwarf2_get_die_type): Likewise.
13344         (follow_die_sig): Likewise.
13345         (decode_locdesc): Likewise.
13346         (dwarf2_per_cu_objfile): Likewise.
13347         (dwarf2_per_cu_text_offset): Likewise.
13348         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
13349         objfile.
13350         (set_die_type): Access objfile through
13351         dwarf2_per_objfile.
13352
13353 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
13354
13355         * valprint.c (converted_character_d): Remove typedef.
13356         (DEF_VEC_O (converted_character_d)): Remove.
13357         (count_next_character): Use std::vector.
13358         (print_converted_chars_to_obstack): Likewise.
13359         (generic_printstr): Likewise.
13360
13361 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
13362
13363         * xml-support.h (struct gdb_xml_value): Add constructor.
13364         <value>: Change type to unique_xmalloc_ptr.
13365         (gdb_xml_value_s): Remove typedef.
13366         (DEF_VEC_O (gdb_xml_value_s)): Remove.
13367         (gdb_xml_element_start_handler): Change parameter type to
13368         std::vector.
13369         (xml_find_attribute): Likewise.
13370         * xml-support.c (xml_find_attribute): Change parameter type to
13371         std::vector and adjust.
13372         (gdb_xml_values_cleanup): Remove.
13373         (gdb_xml_parser::start_element): Adjust to std::vector.
13374         (xinclude_start_include): Change paraeter type to std::vector
13375         and adjust.
13376         * btrace.c (check_xml_btrace_version): Likewise.
13377         (parse_xml_btrace_block): Likewise.
13378         (parse_xml_btrace_pt_config_cpu): Likewise.
13379         (parse_xml_btrace_pt): Likewise.
13380         (parse_xml_btrace_conf_bts): Likewise.
13381         (parse_xml_btrace_conf_pt): Likewise.
13382         * memory-map.c (memory_map_start_memory): Likewise.
13383         (memory_map_start_property): Likewise.
13384         * osdata.c (osdata_start_osdata): Likewise.
13385         (osdata_start_item): Likewise.
13386         (osdata_start_column): Likewise.
13387         * remote.c (start_thread): Likewise.
13388         * solib-aix.c (library_list_start_library): Likewise.
13389         (library_list_start_list): Likewise.
13390         * solib-svr4.c (library_list_start_library): Likewise.
13391         (svr4_library_list_start_list): Likewise.
13392         * solib-target.c (library_list_start_segment): Likewise.
13393         (library_list_start_section): Likewise.
13394         (library_list_start_library): Likewise.
13395         (library_list_start_list): Likewise.
13396         * tracepoint.c (traceframe_info_start_memory): Likewise.
13397         (traceframe_info_start_tvar): Likewise.
13398         * xml-syscall.c (syscall_start_syscall): Likewise.
13399         * xml-tdesc.c (tdesc_start_target): Likewise.
13400         (tdesc_start_feature): Likewise.
13401         (tdesc_start_reg): Likewise.
13402         (tdesc_start_union): Likewise.
13403         (tdesc_start_struct): Likewise.
13404         (tdesc_start_flags): Likewise.
13405         (tdesc_start_enum): Likewise.
13406         (tdesc_start_field): Likewise.
13407         (tdesc_start_enum_value): Likewise.
13408         (tdesc_start_vector): Likewise.
13409
13410 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
13411
13412         * extension.h (struct xmethod_worker) <clone>: Remove.
13413         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
13414         Remove.
13415         (python_xmethod_worker::clone): Remove.
13416         * valops.c (find_overload_match): Use std::move instead of
13417         clone.
13418
13419 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
13420
13421         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
13422         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
13423         <free_xmethod_worker_data>: Remove.
13424         <get_matching_xmethod_workers>: Chance VEC to std::vector.
13425         <get_xmethod_arg_types>: Remove.
13426         <get_xmethod_result_type>: Remove.
13427         <invoke_xmethod>: Remove.
13428         * extension.c (new_xmethod_worker): Remove.
13429         (clone_xmethod_worker): Remove.
13430         (get_matching_xmethod_workers): Return void, pass std::vector by
13431         pointer.
13432         (get_xmethod_arg_types): Rename to...
13433         (xmethod_worker::get_arg_types): ... this, and adjust.
13434         (get_xmethod_result_type): Rename to...
13435         (xmethod_worker::get_result_type): ... this, and adjust.
13436         (invoke_xmethod): Remove.
13437         (free_xmethod_worker): Remove.
13438         (free_xmethod_worker_vec): Remove.
13439         * extension.h (enum ext_lang_rc): Move here from
13440         extension-priv.h.
13441         (struct xmethod_worker): Add constructor and destructor.
13442         <data>: Remove.
13443         <value>: Remove.
13444         <invoke, clone, do_get_result_type, do_get_arg_types>: New
13445         virtual pure methods.
13446         <get_arg_types, get_result_type>: New methods.
13447         (xmethod_worker_ptr): Remove typedef.
13448         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
13449         (xmethod_worker_vec): Remove typedef.
13450         (xmethod_worker_up): New typedef.
13451         (invoke_xmethod): Remove.
13452         (clone_xmethod_worker): Remove.
13453         (free_xmethod_worker): Remove.
13454         (free_xmethod_worker_vec): Remove.
13455         (get_xmethod_arg_types): Remove.
13456         (get_xmethod_result_type): Remove.
13457         * valops.c (find_method_list): Use std::vector, don't use
13458         intermediate vector.
13459         (value_find_oload_method_list): Use std::vector.
13460         (find_overload_match): Use std::vector.
13461         (find_oload_champ): Use std::vector.
13462         * value.c (value_free): Use operator delete.
13463         (value_of_xmethod): Rename to...
13464         (value_from_xmethod): ... this.  Don't assign
13465         xmethod_worker::value, take rvalue-reference.
13466         (result_type_of_xmethod): Adjust.
13467         (call_xmethod): Adjust.
13468         * value.h: Include extension.h.
13469         (struct xmethod_worker): Don't forward-declare.
13470         (value_of_xmethod): Rename to...
13471         (value_from_xmethod): ... this, take rvalue-reference.
13472         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
13473         (struct python_xmethod_worker): ... this, add constructor and
13474         destructor.
13475         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
13476         (gdbpy_free_xmethod_worker_data): Rename to...
13477         (python_xmethod_worker::~python_xmethod_worker): ... this and
13478         adjust.
13479         (gdbpy_clone_xmethod_worker_data): Rename to...
13480         (python_xmethod_worker::clone): ... this and adjust.
13481         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
13482         temporary vector.
13483         (gdbpy_get_xmethod_arg_types): Rename to...
13484         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
13485         (gdbpy_get_xmethod_result_type): Rename to...
13486         (python_xmethod_worker::do_get_result_type): ... this and
13487         adjust.
13488         (gdbpy_invoke_xmethod): Rename to...
13489         (python_xmethod_worker::invoke): ... this and adjust.
13490         (new_python_xmethod_worker): Rename to...
13491         (python_xmethod_worker::python_xmethod_worker): ... this and
13492         adjust.
13493         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
13494         Remove.
13495         (gdbpy_free_xmethod_worker_data): Remove.
13496         (gdbpy_get_matching_xmethod_workers): Use std::vector.
13497         (gdbpy_get_xmethod_arg_types): Remove.
13498         (gdbpy_get_xmethod_result_type): Remove.
13499         (gdbpy_invoke_xmethod): Remove.
13500         * python/python.c (python_extension_ops): Remove obsolete
13501         callbacks.
13502
13503 2018-01-05  Pedro Alves  <palves@redhat.com>
13504
13505         PR gdb/18653
13506         * common/signals-state-save-restore.c
13507         (save_original_signals_state): New parameter 'quiet'.  Warn if we
13508         find a custom handler preinstalled, instead of internal erroring.
13509         But only warn if !quiet.
13510         * common/signals-state-save-restore.h
13511         (save_original_signals_state): New parameter 'quiet'.
13512         * main.c (captured_main_1): Move save_original_signals_state call
13513         after option handling, and pass QUIET.
13514
13515 2018-01-05  Pedro Alves  <palves@redhat.com>
13516
13517         * spu-tdep.c (spu_catch_start): Pass
13518         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
13519
13520 2018-01-05  Pedro Alves  <palves@redhat.com>
13521
13522         PR gdb/22670
13523         * ada-lang.c (literal_symbol_name_matcher): New function.
13524         (ada_get_symbol_name_matcher): Use it for
13525         symbol_name_match_type::SEARCH_NAME.
13526         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
13527         it down instead of assuming symbol_name_match_type::FULL.
13528         * block.h (block_lookup_symbol): New parameter 'match_type'.
13529         * c-valprint.c (print_unpacked_pointer): Use
13530         lookup_symbol_search_name instead of lookup_symbol.
13531         * compile/compile-object-load.c (get_out_value_type): Pass down
13532         symbol_name_match_type::SEARCH_NAME.
13533         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
13534         symbol_name_match_type::FULL.
13535         * cp-support.c (cp_get_symbol_name_matcher): Handle
13536         symbol_name_match_type::SEARCH_NAME.
13537         * infrun.c (insert_exception_resume_breakpoint): Use
13538         lookup_symbol_search_name.
13539         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
13540         * psymtab.c (maintenance_check_psymtabs): Use
13541         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
13542         * stack.c (print_frame_args): Use lookup_symbol_search_name and
13543         SYMBOL_SEARCH_NAME.
13544         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
13545         if symbol_name_match_type::SEARCH_NAME.
13546         (lookup_symbol_in_language): Pass down
13547         symbol_name_match_type::FULL.
13548         (lookup_symbol_search_name): New.
13549         (lookup_language_this): Pass down
13550         symbol_name_match_type::SEARCH_NAME.
13551         (lookup_symbol_aux, lookup_local_symbol): New parameter
13552         'match_type'.  Pass it down.
13553         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
13554         (lookup_symbol_search_name): New declaration.
13555         (lookup_symbol_in_block): New 'match_type' parameter.
13556
13557 2018-01-05  Pedro Alves  <palves@redhat.com>
13558
13559         PR gdb/22670
13560         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
13561         ada_lookup_symbol.
13562         (ada_lookup_symbol): Reimplement in terms of
13563         ada_lookup_symbol_list, bits factored out from
13564         ada_lookup_encoded_symbol.
13565
13566 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
13567
13568         * ada-exp.y (write_object_renaming): When subscripting an array
13569         using a symbol as the index, pass the block in call to
13570         ada_lookup_encoded_symbol when looking that symbol up.
13571
13572 2018-01-05  Jerome Guitton  <guitton@adacore.com>
13573
13574         * ada-lang.c (ada_array_length): Use ada_index_type instead of
13575         TYPE_INDEX_TYPE.
13576
13577 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
13578
13579         * ada-lang.c (ada_to_fixed_value_create): Add handling of
13580         the case where VALUE_LVAL (val0) is not lval_memory.
13581
13582 2018-01-05  Xavier Roirand  <roirand@adacore.com>
13583
13584         * ada-valprint.c (print_optional_low_bound): Handle
13585         character-indexed array printing like boolean-indexed array
13586         printing.
13587
13588 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
13589
13590         * NEWS: Create a new section for the next release branch.
13591         Rename the section of the current branch, now that it has
13592         been cut.
13593
13594 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
13595
13596         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
13597         * version.in: Bump version to 8.1.50.DATE-git.
13598
13599 2018-01-03  Xavier Roirand  <roirand@adacore.com>
13600
13601         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
13602         Add field.
13603         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
13604         Add field.
13605         (default_exception_support_info) <catch_handlers_sym>: Add field.
13606         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
13607         (ada_exception_name_addr_1): Add "catch handlers" handling.
13608         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
13609         Update all callers.
13610         (create_excep_cond_exprs) <ex>: Add parameter.
13611         (re_set_exception): Update create_excep_cond_exprs call.
13612         (print_it_exception, print_one_exception, print_mention_exception)
13613         (print_recreate_exception): Add "catch handler" handling.
13614         (allocate_location_catch_handlers, re_set_catch_handlers)
13615         (check_status_catch_handlers, print_it_catch_handlers)
13616         (print_one_catch_handlers, print_mention_catch_handlers)
13617         (print_recreate_catch_handlers): New function.
13618         (catch_handlers_breakpoint_ops): New variable.
13619         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
13620         Add parameter.  Add "catch handler" handling.
13621         (ada_exception_sym_name, ada_exception_breakpoint_ops):
13622         Add "catch handler" handling.
13623         (ada_exception_catchpoint_cond_string): Add "catch handler"
13624         handling.
13625         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
13626         call.
13627         (catch_ada_handlers_command): New function.
13628         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
13629         operations structure.
13630         (_initialize_ada_language): Add "catch handlers" command entry.
13631         * NEWS: Document "catch handlers" feature.
13632
13633 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
13634
13635         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
13636         account when creating the array type of the slice.
13637         (ada_value_slice): Likewise.
13638
13639 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
13640
13641         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
13642         New enum value.
13643         (create_array_type_with_stride): Add byte_stride_prop parameter.
13644         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
13645         New parameter.  Update all callers in this file.
13646         (array_type_has_dynamic_stride): New function.
13647         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
13648         of arrays with dynamic byte strides.
13649         * dwarf2read.c (read_array_type): Add support for dynamic
13650         DW_AT_byte_stride attributes.
13651
13652 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
13653
13654         * dwarf2read.c (read_unspecified_type): Treat
13655         DW_TAG_enumeration_type DIEs from Ada units as stubs.
13656
13657 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
13658
13659         Update copyright year range in all GDB files.
13660
13661 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
13662
13663         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
13664         and gdb/testsuite/gdb.base/step-line.c.
13665
13666 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
13667
13668         * copyright.py (main): Dump the contents of
13669         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
13670         even if BY_HAND is empty.
13671
13672 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
13673
13674         * top.c (print_gdb_version): Update Copyright year in version
13675         message.
13676
13677 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
13678
13679         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
13680
13681 For older changes see ChangeLog-2017.
13682 \f
13683 Local Variables:
13684 mode: change-log
13685 left-margin: 8
13686 fill-column: 74
13687 version-control: never
13688 coding: utf-8
13689 End: